1 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
6 2019-04-19 Tom Tromey <tom@tromey.com>
8 * server.c (struct vstop_notif): Derive from notif_event.
10 (queue_stop_reply): Update.
11 (remove_all_on_match_ptid): Change type. Rewrite.
12 (discard_queued_stop_replies): Rewrite.
13 (in_queued_stop_replies_ptid): Change type.
14 (in_queued_stop_replies): Rewrite.
16 (queue_stop_reply_callback): Update.
17 (captured_main): Don't call initialize_notif.
18 (push_stop_notification): Update.
19 * notif.c (notif_write_event, handle_notif_ack)
20 (notif_event_enque, notif_push): Update.
21 (notif_event_xfree, initialize_notif): Remove.
22 * notif.h (struct notif_event): Include <list>, not
24 (struct notif_server) <queue>: Now a std::list.
25 (notif_event_p): Remove typedef.
26 (initialize_notif): Don't declare.
27 (struct notif_event): Add virtual destructor.
29 2019-04-17 Alan Hayward <alan.hayward@arm.com>
31 * ax.c (ax_vdebug): Call debug_printf.
32 * debug.c (debug_write): New function.
33 * debug.h (debug_write): New declaration.
34 * linux-low.c (sigchld_handler): Call debug_write.
36 2019-04-17 Alan Hayward <alan.hayward@arm.com>
38 * debug.c (debug_set_output): New function.
39 (debug_vprintf): Send output to debug_file.
40 (debug_flush): Likewise.
41 * debug.h (debug_set_output): New declaration.
42 * server.c (handle_monitor_command): Add debug-file option.
43 (captured_main): Likewise.
45 2019-04-17 Alan Hayward <alan.hayward@arm.com>
47 * debug.c (remote_debug): Add definition.
48 * debug.h (remote_debug): Add declaration.
49 * hostio.c (remote_debug): Remove declaration.
50 * remote-utils.c (struct ui_file): Likewise.
51 (remote_debug): Likewise.
52 * remote-utils.h (remote_debug): Likewise,
53 * server.c (remote_debug): Remove definition.
55 2019-04-10 Kevin Buettner <kevinb@redhat.com>
57 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
58 when using a 64-bit gdbserver.
60 2019-04-09 Tom Tromey <tromey@adacore.com>
62 * linux-low.c (select_event_lwp): Use find_thread_in_random.
64 2019-04-08 Tom Tromey <tom@tromey.com>
66 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
68 (linux_resume_one_lwp): Likewise.
70 2019-04-08 Tom Tromey <tom@tromey.com>
72 * gdbreplay.c: Update.
73 * linux-low.c: Update.
76 2019-04-08 Tom Tromey <tom@tromey.com>
78 * server.c: Use C++ exception handling.
79 * linux-low.c: Use C++ exception handling.
80 * gdbreplay.c: Use C++ exception handling.
82 2019-04-08 Tom Tromey <tom@tromey.com>
84 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
85 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
86 (captured_main, main): Update.
87 * gdbreplay.c (main): Update.
89 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
91 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
92 value in argument pointer, return 1 if the entry is found and 0
93 otherwise. Move comment.
94 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
95 * linux-low.h (linux_get_auxv): Declare.
96 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
98 2019-04-05 Tom Tromey <tromey@adacore.com>
100 * server.c (gdbserver_usage): Use upper-case for metasyntactic
103 2019-03-28 Alan Hayward <alan.hayward@arm.com>
105 * linux-low.c (AT_HWCAP2): Add define if not already included.
107 2019-03-26 Alan Hayward <alan.hayward@arm.com>
109 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
110 (aarch64_arch_setup): Call linux_get_hwcap.
111 * linux-arm-low.c (arm_get_hwcap): Remove function.
112 (arm_read_description): Call linux_get_hwcap.
113 * linux-low.c (linux_get_auxv): New function.
114 (linux_get_hwcap): Likewise.
115 (linux_get_hwcap2): Likewise.
116 * linux-low.h (linux_get_hwcap): New declaration.
117 (linux_get_hwcap2): Likewise.
118 * linux-ppc-low.c (ppc_get_auxv): Remove function.
119 (ppc_arch_setup): Call linux_get_hwcap.
120 * linux-s390-low.c (s390_get_hwcap): Remove function.
121 (s390_arch_setup): Call linux_get_hwcap.
123 2019-03-22 Alan Hayward <alan.hayward@arm.com>
124 Jiong Wang <jiong.wang@arm.com>
126 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
127 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
129 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
131 2019-03-22 Alan Hayward <alan.hayward@arm.com>
132 Jiong Wang <jiong.wang@arm.com>
134 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
135 (aarch64_get_hwcap): New function.
136 (aarch64_arch_setup): Read APIA hwcap.
138 2019-03-22 Alan Hayward <alan.hayward@arm.com>
139 Jiong Wang <jiong.wang@arm.com>
141 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
142 (initialize_low_tracepoint): Likewise.
143 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
144 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
145 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
146 (aarch64_linux_read_description): Likewise.
147 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
149 2019-03-12 John Baldwin <jhb@FreeBSD.org>
151 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
152 i386_create_target_description for 'segments' parameter.
153 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
154 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
155 * win32-i386-low.c (i386_arch_setup): Likewise.
157 2019-03-12 Tom Tromey <tromey@adacore.com>
159 * linux-low.c (iterate_over_lwps): Update.
161 2019-03-06 Tom Tromey <tom@tromey.com>
163 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
164 (captured_main): Use SCOPE_EXIT.
166 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
168 * configure.srv: Use '$enable_unittest' instead of '$development'
169 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
172 2019-02-27 Tom Tromey <tromey@adacore.com>
174 * gdbreplay.c (logchar): Handle \r\n.
176 2019-02-07 Alan Hayward <alan.hayward@arm.com>
178 * linux-low.c (linux_attach): Add process before lwp.
179 * server.c (attach_inferior): Check if already attached.
181 2019-02-07 Tom Tromey <tom@tromey.com>
183 * x86-tdesc.h: Rename include guard.
184 * x86-low.h: Add include guard.
185 * wincecompat.h: Rename include guard.
186 * win32-low.h: Add include guard.
187 * utils.h: Rename include guard.
188 * tracepoint.h: Rename include guard.
189 * tdesc.h: Rename include guard.
190 * target.h: Rename include guard.
191 * server.h: Rename include guard.
192 * remote-utils.h: Rename include guard.
193 * regcache.h: Rename include guard.
194 * nto-low.h: Rename include guard.
195 * notif.h: Add include guard.
196 * mem-break.h: Rename include guard.
197 * lynx-low.h: Add include guard.
198 * linux-x86-tdesc.h: Add include guard.
199 * linux-s390-tdesc.h: Add include guard.
200 * linux-ppc-tdesc-init.h: Add include guard.
201 * linux-low.h: Add include guard.
202 * linux-aarch64-tdesc.h: Add include guard.
203 * linux-aarch32-low.h: Add include guard.
204 * inferiors.h: Rename include guard.
205 * i387-fp.h: Rename include guard.
206 * hostio.h: Rename include guard.
207 * gdbthread.h: Rename include guard.
208 * gdb_proc_service.h: Rename include guard.
209 * event-loop.h: Rename include guard.
210 * dll.h: Rename include guard.
211 * debug.h: Rename include guard.
212 * ax.h: Rename include guard.
214 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
217 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
218 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
220 2019-01-25 Tom Tromey <tom@tromey.com>
222 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
224 2019-01-25 Tom Tromey <tom@tromey.com>
226 * win32-low.c: Fix common/ includes.
227 * win32-i386-low.c: Fix common/ includes.
228 * tracepoint.c: Fix common/ includes.
229 * thread-db.c: Fix common/ includes.
230 * target.h: Fix common/ includes.
231 * symbol.c: Fix common/ includes.
232 * spu-low.c: Fix common/ includes.
233 * server.h: Fix common/ includes.
234 * server.c: Fix common/ includes.
235 * remote-utils.c: Fix common/ includes.
236 * regcache.h: Fix common/ includes.
237 * regcache.c: Fix common/ includes.
238 * nto-x86-low.c: Fix common/ includes.
239 * notif.h: Fix common/ includes.
240 * mem-break.h: Fix common/ includes.
241 * lynx-low.c: Fix common/ includes.
242 * lynx-i386-low.c: Fix common/ includes.
243 * linux-x86-tdesc-selftest.c: Fix common/ includes.
244 * linux-x86-low.c: Fix common/ includes.
245 * linux-low.c: Fix common/ includes.
246 * inferiors.h: Fix common/ includes.
247 * i387-fp.c: Fix common/ includes.
248 * hostio.c: Fix common/ includes.
249 * hostio-errno.c: Fix common/ includes.
250 * gdbthread.h: Fix common/ includes.
251 * gdbreplay.c: Fix common/ includes.
252 * fork-child.c: Fix common/ includes.
253 * event-loop.c: Fix common/ includes.
255 (enum gdb_agent_op): Fix common/ includes.
257 2019-01-21 Tom Tromey <tom@tromey.com>
259 * tracepoint.c: Fix includes.
260 * remote-utils.c: Fix includes.
261 * linux-x86-low.c: Fix includes.
263 2019-01-01 Joel Brobecker <brobecker@adacore.com>
265 * gdbreplay.c (gdbreplay_version): Update copyright year in
267 * server.c (gdbserver_version): Likewise.
269 2018-12-05 Alan Hayward <alan.hayward@arm.com>
271 * linux-low.c (add_lwp): Switch ordering.
273 2018-11-29 Tom Tromey <tom@tromey.com>
275 * win32-low.c (win32_join): Take pid, not process.
276 * target.h (struct target_ops) <join>: Change argument type.
277 (join_inferior): Change argument name.
278 * spu-low.c (spu_join): Take pid, not process.
279 * server.c (handle_detach): Preserve pid before destroying
281 * lynx-low.c (lynx_join): Take pid, not process.
282 * linux-low.c (linux_join): Take pid, not process.
284 2018-11-23 Alan Hayward <alan.hayward@arm.com>
286 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
287 (aarch64_cannot_fetch_register): Likewise.
288 (struct linux_target_ops): Update references.
290 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
292 * linux-ppc-low.c: Include nat/linux-ptrace.h.
294 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
296 * configure.srv (ipa_ppc_linux_regobj): Add
297 powerpc-isa207-htm-vsx32l-ipa.o and
298 powerpc-isa207-htm-vsx64l-ipa.o.
299 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
300 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
301 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
302 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
303 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
304 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
305 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
306 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
307 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
308 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
309 (init_registers_powerpc_isa207_htm_vsx32l)
310 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
311 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
312 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
313 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
314 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
315 (ppc_store_tm_ctarregset): New functions.
316 (ppc_regsets): Add entries for HTM regsets.
317 (ppc_arch_setup): Set htm in features struct when needed. Set
318 sizes for the HTM regsets.
319 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
320 (initialize_low_arch): Call
321 init_registers_powerpc_isa207_htm_vsx32l and
322 init_registers_powerpc_isa207_htm_vsx64l.
323 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
324 PPC_TDESC_ISA207_HTM_VSX.
325 (initialize_low_tracepoint): Call
326 init_registers_powerpc_isa207_htm_vsx32l and
327 init_registers_powerpc_isa207_htm_vsx64l.
329 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
331 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
332 rs6000/power-linux-pmu.xml to srv_xmlfiles.
333 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
334 (ppc_store_pmuregset): New functions.
335 (ppc_regsets): Add entries for ebb and pmu regsets.
336 (ppc_arch_setup): Set isa207 in features struct if the ebb and
337 pmu regsets are available. Set sizes for these regsets.
339 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
341 * configure.srv (ipa_ppc_linux_regobj): Add
342 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
343 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
344 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
345 rs6000/powerpc-isa207-vsx32l.xml, and
346 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
347 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
348 <PPC_TDESC_ISA207_VSX>: New enum value.
349 (init_registers_powerpc_isa207_vsx32l): Declare.
350 (init_registers_powerpc_isa207_vsx64l): Declare.
351 * linux-ppc-low.c (ppc_fill_tarregset): New function.
352 (ppc_store_tarregset): New function.
353 (ppc_regsets): Add entry for the TAR regset.
354 (ppc_arch_setup): Set isa207 in features struct when needed. Set
355 size for the TAR regsets.
356 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
357 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
358 and init_registers_powerpc_isa207_vsx64l.
359 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
360 (initialize_low_tracepoint): Call
361 init_registers_powerpc_isa207_vsx32l and
362 init_registers_powerpc_isa207_vsx64l.
364 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
365 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
367 * configure.srv (ipa_ppc_linux_regobj): Add
368 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
369 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
370 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
371 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
372 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
373 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
374 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
375 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
376 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
377 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
378 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
379 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
380 (ppc_hwcap): Add comment.
381 (ppc_hwcap2): New global.
382 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
383 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
384 (ppc_regsets): Add entries for the DSCR and PPR regsets.
385 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
386 when needed. Set sizes for the the DSCR and PPR regsets.
387 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
388 (initialize_low_arch): Call
389 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
390 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
391 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
392 PPC_TDESC_ISA205_PPR_DSCR_VSX.
393 (initialize_low_tracepoint): Call
394 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
395 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
397 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
399 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
401 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
402 Simon Marchi <simark@simark.ca>
404 * acinclude.m4: Include "../selftest.m4".
405 * configure: Regenerate.
406 * configure.ac: Use "GDB_AC_SELFTEST".
407 * configure.srv: Use "$enable_unittests" instead of
408 "$development" when checking whether unit tests have been
410 * server.c (captured_main): Update message informing that
411 selftests have been disabled.
413 2018-10-04 Tom Tromey <tom@tromey.com>
415 * configure: Rebuild.
417 2018-10-04 Tom Tromey <tom@tromey.com>
419 * server.c (handle_status): Rename inner "thread".
420 (process_serial_event): Declare "res" in 'm' case.
421 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
422 (iterate_over_lwps): Rename inner "thread".
423 (linux_qxfer_libraries_svr4): Rename inner "len".
424 * gdbthread.h (find_thread_in_random): Rename inner "thread".
426 2018-10-01 Gary Benson <gbenson@redhat.com>
428 * gdb_proc_service.h: Moved common code to
429 common/gdb_proc_service.h.
431 2018-10-01 Gary Benson <gbenson@redhat.com>
433 * gdb_proc_service.h: Synchronize comments and whitespace with
434 GDB's version of this file.
436 2018-09-25 Tom Tromey <tom@tromey.com>
438 * configure: Rebuild.
439 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
441 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
443 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
444 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
445 ($(IPA_LIB)): Sort IPA_OBJS.
447 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
449 * Makefile.in: Remove references to $(ADD_DEPS).
451 2018-09-16 Tom Tromey <tom@tromey.com>
453 * remote-utils.c (remote_open): Use GNU style for metasyntactic
455 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
458 2018-09-05 Tom Tromey <tom@tromey.com>
460 * configure: Rebuild.
462 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
465 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
467 2018-08-27 Tom Tromey <tom@tromey.com>
470 * configure: Rebuild.
472 2018-08-27 Tom Tromey <tom@tromey.com>
474 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
475 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
476 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
477 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
478 (s390x_emit_stack_adjust): Add casts to unsigned char.
480 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
484 * server.h (struct client_state) <disable_randomization>:
487 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
489 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
491 (mips_supply_ptrace_register): Likewise.
493 2018-07-22 Tom Tromey <tom@tromey.com>
495 * configure: Rebuild.
497 2018-07-22 Tom Tromey <tom@tromey.com>
499 * win32-low.c (win32_create_inferior): Remove unused variables.
500 * gdbreplay.c (remote_open): Remove unused variable.
501 * remote-utils.c (remote_prepare): Remove unused variable.
502 * x86-tdesc.h (X86_TDESC_H): Define.
503 (amd64_expedite_regs): Define conditionally.
504 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
505 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
506 * remote-utils.c (readchar): Remove unused variable.
508 2018-07-13 Pedro Alves <palves@redhat.com>
510 * linux-low.c (linux_kill): Change parameter to process_info
511 pointer instead of pid. Adjust.
512 * lynx-low.c (lynx_kill): Likewise.
513 * nto-low.c (nto_kill): Likewise.
514 * spu-low.c (spu_kill): Likewise.
515 * win32-low.c (win32_kill): Likewise.
516 * server.c (handle_v_kill, kill_inferior_callback)
517 (detach_or_kill_for_exit): Adjust.
518 * target.c (kill_inferior): Change parameter to process_info
519 pointer instead of pid. Adjust.
520 * target.h (struct target_ops) <kill>: Change parameter to
521 process_info pointer instead of pid. Adjust all implementations
523 (kill_inferior): Likewise.
525 2018-07-13 Pedro Alves <palves@redhat.com>
527 * linux-low.c (linux_detach, linux_join): Change parameter to
528 process_info pointer instead of pid. Adjust.
529 * lynx-low.c (lynx_detach, lynx_join): Likewise.
530 * nto-low.c (nto_detach): Likewise.
531 * spu-low.c (spu_detach, spu_join): Likewise.
532 * win32-low.c (win32_detach, win32_join): Likewise.
533 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
534 * target.h (struct target_ops) <detach, join>: Change parameter to
535 process_info pointer instead of pid. Adjust all implementations
537 (detach_inferior, join_inferior): Rename 'pid' parameter to
540 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
541 Jan Kratochvil <jan.kratochvil@redhat.com>
542 Paul Fertser <fercerpav@gmail.com>
543 Tsutomu Seki <sekiriki@gmail.com>
545 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
546 (OBS): Add 'common/netstuff.o'.
547 (GDBREPLAY_OBS): Likewise.
548 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
549 (remote_open): Implement support for IPv6
551 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
553 (handle_accept_event): Accept connections from IPv6 sources.
554 (remote_prepare): Handle IPv6-style hostnames; implement
555 support for IPv6 connections.
556 (remote_open): Implement support for printing connections from
559 2018-07-11 Pedro Alves <palves@redhat.com>
562 * mem-break.c (any_persistent_commands): Add process_info
563 parameter and use it instead of relying on the current process.
564 Change return type to bool.
565 * mem-break.h (any_persistent_commands): Add process_info
566 parameter and change return type to bool.
567 * server.c (handle_detach): Remove require_running_or_return call.
568 Look up the process_info for the process we're about to detach.
569 If not found, return back error to GDB. Adjust
570 any_persistent_commands call to pass down a process pointer.
572 2018-07-11 Pedro Alves <palves@redhat.com>
574 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
575 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
576 instead of collect_register_by_name.
577 * regcache.c (regcache_raw_get_unsigned_by_name): New.
578 * regcache.h (regcache_raw_get_unsigned_by_name): New.
580 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
581 Pedro Alves <palves@redhat.com>
583 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
585 2018-07-03 Tom Tromey <tom@tromey.com>
587 * linux-low.c: Update.
588 * lynx-low.c: Update.
589 * mem-break.c: Update.
591 * remote-utils.c: Update.
595 * win32-low.c: Update.
597 2018-07-03 Tom Tromey <tom@tromey.com>
601 2018-07-03 Tom Tromey <tom@tromey.com>
603 * linux-low.c: Update.
605 2018-07-03 Tom Tromey <tom@tromey.com>
609 2018-07-03 Tom Tromey <tom@tromey.com>
611 * linux-low.c: Update.
612 * linux-mips-low.c: Update.
613 * lynx-low.c: Update.
615 * remote-utils.c: Update.
619 * thread-db.c: Update.
621 2018-07-03 Tom Tromey <tom@tromey.com>
623 * linux-low.c: Update.
624 * linux-mips-low.c: Update.
625 * lynx-low.c: Update.
626 * mem-break.c: Update.
628 * remote-utils.c: Update.
632 * tracepoint.c: Update.
634 2018-07-03 Tom Tromey <tom@tromey.com>
636 * linux-low.c: Update.
637 * linux-ppc-low.c: Update.
638 * linux-x86-low.c: Update.
639 * proc-service.c: Update.
642 * thread-db.c: Update.
643 * win32-low.c: Update.
645 2018-07-03 Tom Tromey <tom@tromey.com>
647 * linux-low.c: Update.
648 * lynx-low.c: Update.
650 * remote-utils.c: Update.
652 * thread-db.c: Update.
653 * win32-low.c: Update.
655 2018-06-29 Joel Brobecker <brobecker@adacore.com>
657 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
658 parameter in call to 'amd64_create_target_description'.
660 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
662 * x86-tdesc.h: Remove executable permission flag.
664 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
666 * configure.ac: Remove AC_PREREQ, add missing quoting.
667 * configure: Re-generate.
668 * config.in: Re-generate.
669 * aclocal.m4: Re-generate.
671 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
673 * tracepoint.h (current_traceframe): Remove declaration.
675 2018-06-18 Alan Hayward <alan.hayward@arm.com>
677 * linux-aarch64-low.c (is_sve_tdesc): New function.
678 (aarch64_sve_regs_copy_to_regcache): Likewise.
679 (aarch64_sve_regs_copy_from_regcache): Likewise.
680 (aarch64_regs_info): Add SVE checks.
681 (initialize_low_arch): Initialize SVE.
683 2018-06-18 Alan Hayward <alan.hayward@arm.com>
685 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
687 2018-06-11 Alan Hayward <alan.hayward@arm.com>
689 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
690 (initialize_low_tracepoint): Likewise
691 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
692 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
694 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
696 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
698 2018-06-11 Alan Hayward <alan.hayward@arm.com>
700 * server.h (PBUFSIZ): Increase size
702 2018-06-11 Alan Hayward <alan.hayward@arm.com>
704 * regcache.c (regcache::raw_compare): New function.
705 * regcache.h (regcache::raw_compare): New declaration.
707 2018-06-11 Alan Hayward <alan.hayward@arm.com>
709 * regcache.c (new_register_cache): Use new.
710 (free_register_cache): Use delete.
711 (register_data): Use const.
712 (supply_register): Move body inside regcache.
713 (regcache::raw_supply): New override function.
714 (collect_register): Move body inside regcache.
715 (regcache::raw_collect): New override function.
716 (regcache::get_register_status): New override function.
717 * regcache.h (struct regcache): Inherit from reg_buffer_common.
719 2018-06-09 Tom Tromey <tom@tromey.com>
721 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
723 (event_queue): Use std::queue.
724 (gdb_event_xfree): Remove.
725 (initialize_event_loop, process_event, wait_for_event): Update.
727 2018-06-08 Stan Cox <scox@redhat.com>
729 * win32-low.c (win32_create_inferior): last_ptid and last_status
730 moved to client_state.
732 2018-06-08 Pedro Alves <palves@redhat.com>
734 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
735 common/common-exceptions.o, common/common-utils.o,
736 common/errors.o, common/print-utils.o and utils.o.
737 * gdbreplay.c: Include "common-defs.h" instead of the two
738 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
739 string.h or alloca.h.
740 (perror_with_name): Delete.
741 (remote_open): Use xstrdup instead of strdup.
742 (main): Rename to ...
743 (captured_main): ... this.
746 2018-06-08 Tom Tromey <tom@tromey.com>
748 * linux-low.c (linux_low_read_btrace): Update.
750 2018-06-04 Stan Cox <scox@redhat.com>
752 * server.h (struct client_state): New.
753 * server.c (cont_thread, general_thread, multi_process)
754 (report_fork_events, report_vfork_events, report_exec_events)
755 (report_thread_events, swbreak_feature, hwbreak_feature)
756 (vCont_supported, disable_randomization, pass_signals)
757 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
758 Moved to client_state.
759 * remote-utils.c (remote_debug, noack_mode)
760 (transport_is_reliable): Moved to client_state.
761 * tracepoint.c (current_traceframe): Moved to client_state.
764 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
765 linux-low.c, remote-utils.h, target.c: Use client_state.
767 2018-05-31 Alan Hayward <alan.hayward@arm.com>
769 * configure.srv: Add new c/h file.
771 2018-05-31 Alan Hayward <alan.hayward@arm.com>
773 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
776 2018-05-25 Maciej W. Rozycki <macro@mips.com>
778 * gdb.arch/mips-fpregset-core.exp: New test.
779 * gdb.arch/mips-fpregset-core.c: New test source.
781 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
784 * hostio.c (require_int): Do not report overflow for integers
785 between 0xfffffff and 0x7fffffff.
787 2018-05-22 Maciej W. Rozycki <macro@mips.com>
789 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
790 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
791 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
793 (the_low_target): Wire them.
795 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
797 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
798 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
799 mode. Call collect_register_by_name with vscr using
800 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
801 (ppc_store_vrregset): Add and set vscr_offset variable as in
802 ppc_fill_vrregset. Call supply_register_by_name with vscr using
805 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
807 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
808 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
809 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
811 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
813 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
814 (ppc_store_vsxregset): Likewise.
815 (ppc_fill_vrregset): Likewise.
816 (ppc_store_vrregset): Likewise.
817 (ppc_fill_evrregset): Likewise.
818 (ppc_store_evrregset): Likewise.
819 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
820 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
823 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
825 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
826 wordsize of the inferior. Call ppc_linux_target_wordsize.
828 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
830 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
831 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
832 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
833 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
834 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
835 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
836 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
837 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
838 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
839 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
840 (tdesc_powerpc_e500l): Remove.
841 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
842 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
843 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
844 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
846 (ppc_arch_setup): Remove target description matching code. Fill a
847 ppc_linux_features struct and call ppc_linux_match_description
850 2018-05-22 Maciej W. Rozycki <macro@mips.com>
852 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
853 width of the requested register exceeds the width of the
855 (mips_cannot_store_register): Likewise.
857 2018-05-21 Maciej W. Rozycki <macro@mips.com>
859 * linux-mips-low.c (mips_fetch_register): New function. Update
861 (mips_store_gregset): Supply 0 rather than $restart for $zero.
862 (the_low_target): Wire `mips_fetch_register'.
864 2018-05-10 Joel Brobecker <brobecker@adacore.com>
866 * lynx-i386-low.c (LYNXOS_178): New macro.
867 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
868 the layout on LynxOS-178.
869 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
870 handle floating point registers that are not supported by
873 2018-05-10 Tom Tromey <tom@tromey.com>
875 * configure: Rebuild.
877 2018-05-10 Joel Brobecker <brobecker@adacore.com>
880 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
881 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
882 Use it to set the expedite_regs field in the given tdesc.
883 * x86-tdesc.h: New file.
884 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
885 Adjust following the addition of the new expedite_regs parameter
887 * linux-tic6x-low.c (tic6x_read_description): Likewise.
888 * linux-x86-tdesc.c: #include "x86-tdesc.h".
889 (i386_linux_read_description, amd64_linux_read_description):
890 Adjust following the addition of the new expedite_regs parameter
892 * lynx-i386-low.c: #include "x86-tdesc.h".
893 (lynx_i386_arch_setup): Adjust following the addition of the new
894 expedite_regs parameter to init_target_desc.
895 * nto-x86-low.c: #include "x86-tdesc.h".
896 (nto_x86_arch_setup): Adjust following the addition of the new
897 expedite_regs parameter to init_target_desc.
898 * win32-i386-low.c: #include "x86-tdesc.h".
899 (i386_arch_setup): Adjust following the addition of the new
900 expedite_regs parameter to init_target_desc.
902 2018-05-10 Joel Brobecker <brobecker@adacore.com>
905 * win32-low.c (win32_create_inferior): Add call to my_wait
906 setting last_status global.
908 2018-05-10 Joel Brobecker <brobecker@adacore.com>
911 * win32-low.c (create_process): Only call gdb_tilde_expand if
912 inferior_cwd is not NULL.
914 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
916 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
917 registers to the cache if their values have changed.
918 (i387_xsave_to_cache): Provide default values for x87 control
919 registers when these features are available, but disabled.
920 * regcache.c (supply_register_by_name_zeroed): New function.
921 * regcache.h (supply_register_by_name_zeroed): Declare new
924 2018-05-07 Tom Tromey <tom@tromey.com>
926 * configure: Rebuild.
928 2018-05-04 Tom Tromey <tom@tromey.com>
930 * configure: Rebuild.
932 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
933 Pedro Alves <palves@redhat.com>
935 * linux-aarch64-low.c (aarch64_stopped_data_address):
938 2018-04-27 Tom Tromey <tom@tromey.com>
940 * configure: Rebuild.
942 2018-04-23 Tom Tromey <tom@tromey.com>
944 * configure: Rebuild.
946 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
948 * Makefile.in (depcomp): Add "..".
949 (all_deps_files): New and use it.
951 2018-04-18 Alan Hayward <alan.hayward@arm.com>
953 * configure.srv (aarch64*-*-linux*): Don't include xml.
954 (i[34567]86-*-cygwin*): Likewise.
955 (i[34567]86-*-linux*): Likewise.
956 (i[34567]86-*-lynxos*): Likewise.
957 (i[34567]86-*-mingw32ce*): Likewise.
958 (i[34567]86-*-mingw*): Likewise.
959 (i[34567]86-*-nto*): Likewise.
960 (tic6x-*-uclinux): Likewise.
961 (x86_64-*-linux*): Likewise.
962 (x86_64-*-mingw*): Likewise.
963 (x86_64-*-cygwin*): Likewise.
965 2018-04-18 Alan Hayward <alan.hayward@arm.com>
967 * tdesc.c: Remove xml parameter.
969 2018-04-18 Alan Hayward <alan.hayward@arm.com>
971 * server.c (get_features_xml): Remove cast.
972 * tdesc.c (void target_desc::accept): Fill in function.
973 (tdesc_get_features_xml): Remove old xml creation.
974 (print_xml_feature::visit_pre): Add xml vistor.
975 * tdesc.h (struct target_desc): Make xmltarget mutable.
976 (tdesc_get_features_xml): Remove declaration.
978 2018-04-18 Alan Hayward <alan.hayward@arm.com>
980 * tdesc.c (tdesc_architecture_name): Add new function.
981 (tdesc_osabi_name): Likewise.
982 (tdesc_get_features_xml): Use new functions.
984 2018-04-18 Alan Hayward <alan.hayward@arm.com>
986 * tdesc.c (tdesc_create_flags): Remove.
987 (tdesc_add_flag): Likewise.
988 (tdesc_named_type): Likewise.
989 (tdesc_create_union): Likewise.
990 (tdesc_create_struct): Likewise.
991 (tdesc_create_vector): Likewise.
992 (tdesc_add_bitfield): Likewise.
993 (tdesc_add_field): Likewise.
994 (tdesc_set_struct_size): Likewise.
996 2018-04-18 Alan Hayward <alan.hayward@arm.com>
998 * tdesc.c (~target_desc): Remove implictly deleted items.
999 (init_target_desc): Iterate all features.
1000 (tdesc_get_features_xml): Use vector.
1001 (tdesc_create_feature): Create feature.
1002 * tdesc.h (tdesc_feature) Remove
1003 (target_desc): Add features.
1005 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1007 * Makefile.in: Add common/tdesc.c
1008 * tdesc.c (init_target_desc): init all reg_defs from register
1010 (tdesc_create_reg): Create tdesc_reg.
1011 * tdesc.h (tdesc_feature): Add register vector.
1013 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1015 * tdesc.h (struct target_desc) <features>: Change type to
1016 std::vector<std::string>.
1017 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1019 (tdesc_get_features_xml): Likewise.
1020 (tdesc_create_feature): Likewise.
1022 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1024 * regcache.c (find_register_by_number): Return a ref.
1025 (find_regno): Use references.
1026 (register_size): Likewise.
1027 (register_data): Likewise.
1028 * tdesc.c (target_desc::~target_desc): Remove free calls.
1029 (target_desc::operator==): Use std::vector compare.
1030 (init_target_desc): Use reference.
1031 (tdesc_create_reg): Use reg constructors.
1032 * tdesc.h (struct target_desc): Replace pointer with object.
1034 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1036 * regcache.c (find_register_by_number): Make static.
1037 (find_regno): Use find_register_by_number
1038 * regcache.h (struct reg): Remove declaration.
1040 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1042 * tdesc.c (target_desc::~target_desc): Move to here.
1043 (target_desc::operator==): Likewise.
1044 * tdesc.h (target_desc::~target_desc): Move from here.
1045 (target_desc::operator==): Likewise.
1047 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1049 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1051 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1053 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1055 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1056 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1057 and init_registers_s390_gs_linux64.
1059 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1061 * linux-s390-low.c (s390_fill_gs): Remove function.
1062 (s390_fill_gsbc): Remove function.
1063 (s390_regsets): Set fill functions for the guarded storage regsets
1066 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1068 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1069 the word size. Add comment.
1070 (s390_get_wordsize): New function.
1071 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1072 pswm with it. Instead, use s390_get_wordsize to determine the
1073 word size first and derive the correct tdesc from that directly.
1075 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1077 * Makefile.in: Include silent-rules.mk.
1078 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1079 (COMPILE): Add ECHO_CXX.
1080 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1081 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1082 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1083 (version-generated.c): Add ECHO_GEN.
1084 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1085 (IPAGENT_COMPILE): Add ECHO_CXX.
1086 (%-generated.c): Add ECHO_REGDAT.
1088 2018-03-14 Tom Tromey <tom@tromey.com>
1091 * ax.c (ax_printf): Special case for NULL.
1093 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1095 * linux-low.c (linux_qxfer_libraries_svr4): Use
1096 xml_escape_text_append.
1098 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1100 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1102 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1104 * server.c (handle_general_set): Remove unnecessary xstrdup.
1106 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1108 * server.c (parse_debug_format_options): Adjust to
1109 delim_string_to_char_ptr_vec changes.
1110 * thread-db.c (thread_db_load_search): Adjust to
1111 dirnames_to_char_ptr_vec changes.
1113 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1115 * target.h (target_enable_btrace, target_disable_btrace)
1116 (target_read_btrace, target_read_btrace_conf): Turn macro into
1117 inline function. Throw error if target method is not defined.
1118 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1119 check for btrace target method. Be prepared to handle exceptions
1120 from btrace target methods.
1122 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1124 * server.c (captured_main): Change order of error message printed
1125 when the current working directory cannot be found.
1127 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1129 * server.c: Include "filenames.h" and "pathstuff.h".
1130 (program_name): Delete variable.
1131 (program_path): New anonymous class.
1132 (get_exec_wrapper): Use "program_path" instead of
1134 (handle_v_run): Likewise.
1135 (captured_main): Likewise.
1136 (process_serial_event): Likewise.
1138 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1140 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1141 (OBJS): Add "pathstuff.o".
1142 * server.c (current_directory): New global variable.
1143 (captured_main): Initialize "current_directory".
1145 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1147 * tdesc.c: Use common/tdesc.h.
1148 * tdesc.h: Likewise.
1150 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1151 Simon Marchi <simon.marchi@ericsson.com>
1153 * Makefile.in: Switch order of make rules.
1155 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1157 * Makefile.in: Add common directory in build.
1158 * configure.ac: Add common reference.
1159 * configure: Regenerate.
1161 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1163 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1164 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1165 * spu-low.c (spu_target_ops): Likewise.
1166 * win32-low.c (win32_target_ops): Likewise.
1167 * server.c (supported_btrace_packets): Report packets unconditionally.
1168 * target.h (target_ops) <supports_btrace>: Remove.
1169 (target_supports_btrace): Remove.
1171 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1173 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1174 (handle_btrace_disable): Change return type to void. Use exceptions
1176 (handle_btrace_general_set): Catch exception and copy message to
1179 2018-02-08 Tom Tromey <tom@tromey.com>
1181 * linux-low.c (install_software_single_step_breakpoints): Use
1182 make_scoped_restore.
1183 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1184 (do_restore_current_thread_cleanup): Remove.
1185 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1188 2018-02-08 Tom Tromey <tom@tromey.com>
1190 * mem-break.c (set_raw_breakpoint_at): Use
1191 gdb::unique_xmalloc_ptr.
1193 2018-01-30 Pedro Alves <palves@redhat.com>
1196 * target.c (target_terminal::terminal_state): Rename to ...
1197 (target_terminal::m_terminal_state): ... this.
1199 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1201 * linux-low.c (handle_extended_wait): Surround call to
1202 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1204 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1206 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1207 linux_ptrace_attach_fail_reason_string now returning an
1209 (linux_attach): Likewise.
1210 * thread-db.c (attach_thread): Likewise.
1212 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1215 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1216 checking for fs_base/gs_base fields in struct user_regs_struct.
1217 * configure: Regenerate.
1219 2018-01-16 Yao Qi <yao.qi@linaro.org>
1222 * linux-low.c (fetch_register): Call supply_register instead of
1225 2018-01-08 Yao Qi <yao.qi@linaro.org>
1226 Simon Marchi <simon.marchi@ericsson.com>
1228 * Makefile.in (OBS): Remove selftest.o.
1229 * configure.ac: Set srv_selftest_objs if $development is true.
1230 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1231 * configure: Re-generated.
1232 * server.c (captured_main): Wrap variable selftest_filter with
1235 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1237 * server.c (parse_debug_format_options): Return std::string.
1238 (handle_monitor_command, captured_main): Adjust.
1240 2018-01-05 Pedro Alves <palves@redhat.com>
1243 * server.c (captured_main): Pass quiet=false to
1244 save_original_signals_state.
1246 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1248 * gdbreplay.c (gdbreplay_version): Update copyright year in
1250 * server.c (gdbserver_version): Likewise.
1252 2017-12-08 Tom Tromey <tom@tromey.com>
1254 * ax.c (ax_printf): Update.
1256 2017-12-07 Yao Qi <yao.qi@linaro.org>
1258 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1259 aarch64_linux_read_description.
1260 * linux-amd64-ipa.c (idx2mask): New array.
1261 (get_ipa_tdesc): Move idx2mask out.
1262 (initialize_low_tracepoint): Initialize target descriptions.
1263 * linux-i386-ipa.c (idx2mask): New array.
1264 (get_ipa_tdesc): Move idx2mask out.
1265 (initialize_low_tracepoint): Initialize target descriptions.
1267 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1269 * tdesc.c (struct tdesc_type): Change return type.
1270 (tdesc_add_flag): Change parameter type.
1271 (tdesc_add_bitfield): Likewise.
1272 (tdesc_add_field): Likewise.
1273 (tdesc_set_struct_size): Likewise.
1275 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1277 * regcache.c (registers_to_string): Remove unused variable.
1279 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1281 * inferiors.c (for_each_inferior_with_data): Remove.
1282 * inferiors.h (for_each_inferior_with_data): Remove.
1283 * server.c (handle_qxfer_threads_worker): Change parameter type.
1284 (handle_qxfer_threads_proper): Use for_each_thread.
1286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1288 * inferiors.c (for_each_inferior): Remove.
1289 (clear_inferiors): Use for_each_thread.
1290 * inferiors.h (for_each_inferior): Remove.
1291 * linux-low.c (linux_wait_for_event_filtered): Use
1293 (linux_stabilize_threads): Likewise.
1294 * regcache.c (regcache_release): Likewise.
1295 * server.c (gdb_wants_all_threads_stopped): Likewise.
1296 (clear_pending_status_callback): Remove.
1297 (handle_status): Use for_each_thread.
1298 (captured_main): Likewise.
1299 * win32-low.c (child_init_thread_list): Likewise.
1300 (win32_clear_inferiors): Likewise.
1301 (fake_breakpoint_event): Likewise.
1303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1305 * inferiors.h (find_inferior): Remove.
1306 * inferiors.c (find_inferior): Remove.
1308 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1310 * linux-low.c (resume_status_pending_p): Update comment.
1311 (need_step_over_p): Update comment.
1313 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1315 * linux-low.c (proceed_one_lwp): Return void, change parameter
1317 (unsuspend_and_proceed_one_lwp): Likewise.
1318 (proceed_all_lwps): Use for_each_thread.
1319 (unstop_all_lwps): Likewise.
1321 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1323 * linux-low.c (linux_resume_one_thread): Return void, take
1325 (linux_resume): Use for_each_thread.
1327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1329 * linux-low.c (send_sigstop_callback): Return void, change
1330 parameter type. Rename to...
1331 (send_sigstop): ... this.
1332 (suspend_and_send_sigstop_callback): Return void, change parameter
1334 (suspend_and_send_sigstop): ... this.
1335 (stop_all_lwps): Use for_each_thread.
1337 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1339 * linux-low.c (lwp_running): Return bool, remove unused
1341 (linux_stabilize_threads): Use find_thread.
1343 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1345 * linux-low.c (select_singlestep_lwp_callback): Remove.
1346 (count_events_callback): Remove.
1347 (select_event_lwp_callback): Remove.
1348 (select_event_lwp): Use find_thread/for_each_thread.
1350 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1352 * linux-low.c (not_stopped_callback): Return bool, take filter
1354 (linux_wait_for_event_filtered): Use find_thread.
1355 (linux_wait_1): Likewise.
1357 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1359 * linux-low.c (same_lwp): Remove.
1360 (find_lwp_pid): Use find_thread.
1362 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1364 * linux-low.c (delete_lwp_callback): Remove.
1365 (linux_mourn): Use for_each_thread.
1367 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1369 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1370 args parameter, don't check for pid.
1371 (linux_detach): Use for_each_thread.
1373 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1375 * linux-low.c (struct counter): Remove.
1376 (second_thread_of_pid_p): Remove.
1377 (last_thread_of_process_p): Use find_thread.
1379 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1381 * inferiors.c (find_inferior_in_random): Remove.
1382 * inferiors.h (find_inferior_in_random): Remove.
1383 * linux-low.c (status_pending_p_callback): Return bool, accept
1384 parameter ptid directly.
1385 (linux_wait_for_event_filtered): Use find_thread_in_random.
1386 (linux_wait_1): Likewise.
1388 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1390 * inferiors.c (find_inferior_id): Remove.
1391 (find_thread_ptid): Move implemention from find_inferior_id to
1393 * inferiors.h (find_inferior_id): Remove.
1394 * server.c (handle_status): Use find_thread_ptid.
1395 (process_serial_event): Likewise.
1396 * thread-db.c (find_one_thread): Likewise.
1397 (thread_db_thread_handle): Likewise.
1398 * win32-low.c (thread_rec): Likewise.
1399 (child_delete_thread): Likewise.
1400 (win32_thread_alive): Likewise.
1401 (get_child_debug_event): Likewise.
1403 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1405 * linux-mips-low.c (update_watch_registers_callback): Return
1406 void, remove pid_p parameter, don't check for pid.
1407 (mips_insert_point, mips_remove_point): Use for_each_thread.
1409 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1411 * lynx.low (lynx_delete_thread_callback): Remove.
1412 (lynx_mourn): Use for_each_thread.
1414 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1416 * regcache.c (regcache_invalidate_one): Remove.
1417 (regcache_invalidate_pid): use for_each_thread.
1419 2017-11-26 Tom Tromey <tom@tromey.com>
1421 * linux-low.c (linux_create_inferior): Update.
1423 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1425 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1427 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1429 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1430 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1431 * linux-aarch64-tdesc-selftest.c: New file.
1432 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1434 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1436 * configure.srv: Add new file.
1437 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1438 * linux-aarch64-tdesc-selftest.c: New file.
1439 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1441 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1443 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1444 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1445 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1447 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1449 * configure.srv: Add new files.
1450 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1451 aarch64_linux_read_description.
1452 * linux-aarch64-low.c (aarch64_linux_read_description):
1453 Merge with aarch64_arch_setup.
1454 (aarch64_arch_setup): Call aarch64_linux_read_description.
1455 * linux-aarch64-tdesc.c: New file.
1456 * linux-aarch64-tdesc.h: New file.
1458 2017-11-24 Yao Qi <yao.qi@linaro.org>
1460 * configure.srv: Set $srv_regobj for tic6x-linux.
1461 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1462 (tic6x_read_description): Move some code to tic6x_arch_setup.
1463 (tic6x_tdesc_test): New function.
1464 (initialize_low_arch): Call selftests::register_test.
1466 2017-11-22 Yao Qi <yao.qi@linaro.org>
1468 * remote-utils.c (prepare_resume_reply): Use memcpy.
1470 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1472 * linux-low.c (kill_one_lwp_callback): Return void, take
1473 argument directly, don't filter on pid.
1474 (linux_kill): Use for_each_thread.
1476 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1478 * linux-low.c (need_step_over_p): Return bool, remove dummy
1480 (linux_resume, proceed_all_lwps): Use find_thread.
1482 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1484 * linux-low.c (resume_status_pending_p): Return bool, remove
1486 (linux_resume): Use find_thread.
1488 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1490 * linux-low.c (struct thread_resume_array): Remove.
1491 (linux_set_resume_request): Return void, take arguments
1493 (linux_resume): Use for_each_thread.
1495 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1497 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1498 return bool, remove data argument.
1499 (linux_stabilize_threads): Use find_thread.
1501 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1503 * linux-low.c (unsuspend_one_lwp): Remove.
1504 (unsuspend_all_lwps): Use for_each_thread, inline code from
1507 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1509 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1510 * linux-low.c (struct iterate_over_lwps_args): Remove.
1511 (iterate_over_lwps_filter): Remove.
1512 (iterate_over_lwps): Use find_thread.
1514 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1516 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1517 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1518 code from reset_lwp_ptrace_options_callback.
1520 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1522 * linux-arm-low.c (struct update_registers_data): Remove.
1523 (update_registers_callback): Return void, take arguments
1524 directly, don't check thread's pid.
1525 (arm_insert_point, arm_remove_point): Use for_each_thread.
1527 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1529 * win32-low.c (continue_one_thread): Return void, take argument
1531 (child_continue): Use for_each_thread.
1533 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1535 * win32-i386-low.c (update_debug_registers_callback): Rename
1537 (update_debug_registers): ... this, return void, remove pid_p arg.
1538 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1540 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1542 * inferiors.h (struct process_info): Add constructor, initialize
1544 <syscalls_to_catch>: Change type to std::vector<int>.
1545 * inferiors.c (add_process): Allocate process_info with new.
1546 (remove_process): Free process_info with delete.
1547 * linux-low.c (handle_extended_wait): Adjust.
1548 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1549 * server.c (handle_general_set): Adjust.
1551 2017-11-16 Pedro Alves <palves@redhat.com>
1553 * remote-utils.c (remote_close): Block SIGIO signals instead of
1554 uninstalling the SIGIO handler.
1556 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1558 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1560 2017-11-16 Yao Qi <yao.qi@linaro.org>
1562 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1563 (tic6x_store_gregset): Likewise.
1564 (tic6x_usrregs_info): Move it up.
1566 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1568 * Makefile.in: Update arch rules.
1569 * configure.srv: Explicitly mark arch/ files.
1571 2017-11-13 Andreas Schwab <schwab@suse.de>
1573 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1575 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1577 2017-11-06 Pedro Alves <palves@redhat.com>
1579 * config.in, configure: Regenerate.
1581 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1583 * target.c (struct thread_search): Remove.
1584 (thread_search_callback): Remove.
1585 (prepare_to_access_memory): Use for_each_thread instead of
1586 find_inferior. Inline code from thread_search_callback.
1588 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1590 * server.c (struct visit_actioned_threads_data): Remove.
1591 (visit_actioned_threads): Change prototype to take arguments
1593 (resume): Use find_thread instead of find_inferior.
1595 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1597 * server.c (queue_stop_reply_callback): Change prototype, return
1599 (find_status_pending_thread_callback): Remove.
1600 (handle_status): Replace find_inferior with find_thread and
1603 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1605 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1607 (aarch64_store_gregset): Likewise.
1608 (aarch64_fill_fpregset): Likewise.
1609 (aarch64_store_fpregset): Likewise.
1611 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1613 * gdbthread.h (find_thread, for_each_thread): New functions.
1614 * inferiors.c (thread_of_pid): Remove.
1615 (find_any_thread_of_pid): Use find_thread.
1616 * linux-low.c (num_lwps): Use for_each_thread.
1618 2017-10-17 Yao Qi <yao.qi@linaro.org>
1620 * Makefile.in: Remove one rule.
1621 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1623 2017-10-17 Yao Qi <yao.qi@linaro.org>
1625 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1626 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1628 2017-10-17 Yao Qi <yao.qi@linaro.org>
1630 * configure.srv: Rename arm.o with arch/arm.o.
1632 2017-10-17 Yao Qi <yao.qi@linaro.org>
1634 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1635 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1636 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1637 (arch-i386.o, arch-amd64.o): Remove rules.
1638 (arch/%.o): New rule.
1639 Update POSTCOMPILE and COMPILE.pre.
1640 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1641 * configure: Re-generated.
1642 * configure.srv: Replace arch-i386.o with arch/i386.o.
1643 Replace arch-amd64.o with arch/amd64.o.
1645 2017-10-16 Yao Qi <yao.qi@linaro.org>
1647 * configure: Regenerated.
1649 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1651 * inferiors.h: (struct inferior_list): Remove.
1652 (struct inferior_list_entry); Remove.
1653 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1654 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1655 get_first_inferior): Remove.
1656 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1657 find_inferior_id, find_inferior_in_random): Change signature.
1658 * inferiors.c (all_threads): Change type to
1659 std::list<thread_info *>.
1660 (get_thread): Remove macro.
1661 (find_inferior, find_inferior_id): Change signature, implement
1663 (find_inferior_in_random): Change signature, implement using
1664 find_thread_in_random.
1665 (for_each_inferior, for_each_inferior_with_data): Change
1666 signature, implement using for_each_thread.
1667 (add_inferior_to_list, remove_inferior): Remove.
1668 (add_thread, get_first_thread, thread_of_pid,
1669 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1670 (get_first_inferior, one_inferior_p, clear_inferior_list):
1672 (clear_inferiors, get_thread_process): Update.
1673 * gdbthread.h: Include <list>.
1674 (struct thread_info) <entry>: Remove field.
1676 (all_threads): Change type to std::list<thread_info *>.
1677 (get_first_inferior): Add doc.
1678 (find_thread, for_each_thread, find_thread_in_random): New
1680 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1681 * linux-arm-low.c (update_registers_callback): Update.
1682 * linux-low.c (second_thread_of_pid_p): Update.
1683 (kill_one_lwp_callback, linux_detach_lwp_callback,
1684 delete_lwp_callback, status_pending_p_callback, same_lwp,
1685 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1686 iterate_over_lwps, not_stopped_callback,
1687 resume_stopped_resumed_lwps, count_events_callback,
1688 select_singlestep_lwp_callback, select_event_lwp_callback,
1689 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1690 suspend_and_send_sigstop_callback, wait_for_sigstop,
1691 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1692 lwp_running, linux_set_resume_request, resume_status_pending_p,
1693 need_step_over_p, start_step_over, linux_resume_one_thread,
1694 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1695 reset_lwp_ptrace_options_callback): Update.
1696 * linux-mips-low.c (update_watch_registers_callback): Update.
1697 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1699 (free_register_cache_thread_one): Remove.
1700 (regcache_release): Update.
1701 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1702 handle_qxfer_threads_worker): Update.
1703 (handle_query): Update, use list iterator.
1704 (visit_actioned_threads, handle_pending_status,
1705 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1706 clear_pending_status_callback, set_pending_status_callback,
1707 find_status_pending_thread_callback, handle_status,
1708 process_serial_event): Update.
1709 * target.c (thread_search_callback): Update.
1710 * thread-db.c (thread_db_get_tls_address): Update.
1711 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1713 * win32-i386-low.c (update_debug_registers_callback): Update.
1714 * win32-low.c (delete_thread_info, child_delete_thread,
1715 continue_one_thread, suspend_one_thread,
1716 get_child_debug_event): Adjust.
1718 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1720 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1721 * inferiors.h: Include <list>.
1722 (struct process_info) <entry>: Remove field.
1724 (pid_of): Change macro to function.
1725 (ptid_of, lwpid_of): Remove macro.
1726 (all_processes): Change type to std::list<process_info *>.
1727 (ALL_PROCESSES): Remove macro.
1728 (for_each_process, find_process): New function.
1729 * inferiors.c (all_processes): Change type to
1730 std::list<process_info *>.
1731 (find_thread_process): Adjust.
1732 (add_process): Likewise.
1733 (remove_process): Likewise.
1734 (find_process_pid): Likewise.
1735 (get_first_process): Likewise.
1736 (started_inferior_callback): Remove.
1737 (have_started_inferiors_p): Adjust.
1738 (attached_inferior_callback): Remove.
1739 (have_attached_inferiors_p): Adjust.
1740 * linux-low.c (check_zombie_leaders): Likewise.
1741 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1742 (x86_linux_update_xmltarget): Adjust.
1743 * server.c (handle_query): Likewise.
1744 (gdb_reattached_process): Remove.
1745 (handle_status): Adjust.
1746 (kill_inferior_callback): Likewise.
1747 (detach_or_kill_inferior): Remove.
1748 (print_started_pid): Likewise.
1749 (print_attached_pid): Likewise.
1750 (detach_or_kill_for_exit): Update.
1751 (process_serial_event): Likewise.
1752 * linux-arm-low.c (arm_new_fork): Likewise.
1754 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1756 * dll.h: Include <list>.
1757 (struct dll_info): Add constructor.
1758 <entry>: Remove field.
1759 (all_dlls): Change type to std::list<dll_info>.
1760 * dll.c: Include <algorithm>.
1761 (get_dll): Remove macro.
1762 (all_dlls): Change type to std::list<dll_info *>.
1763 (free_one_dll): Remove.
1764 (match_dll): Likewise.
1765 (loaded_dll): Adjust.
1766 (unloaded_dll): Adjust to all_dlls type change, use
1767 std::find_if. Inline code from match_dll.
1768 (clear_dlls): Adjust to all_dlls type change.
1769 * server.c (emit_dll_description): Remove.
1770 (handle_qxfer_libraries): Adjust to all_dlls type change,
1771 integrate emit_dll_description's functionality.
1773 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1775 * linux-low.h (struct linux_target_ops) <delete_process>: New
1777 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1778 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1779 (struct linux_target_ops): Add delete_process callback.
1780 * linux-arm-low.c (arm_delete_process): New.
1781 (struct linux_target_ops): Add delete_process callback.
1782 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1783 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1784 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1785 * linux-mips-low.c (mips_linux_delete_process): New.
1786 (struct linux_target_ops): Add delete_process callback.
1787 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1788 * linux-s390-low.c (struct linux_target_ops): Likewise.
1789 * linux-sh-low.c (struct linux_target_ops): Likewise.
1790 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1791 * linux-tile-low.c (struct linux_target_ops): Likewise.
1792 * linux-x86-low.c (x86_linux_delete_process): New.
1793 (struct linux_target_ops): Add delete_process callback.
1794 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1796 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1798 * linux-aarch64-low.c (the_low_target): Add thread delete
1800 * linux-arm-low.c (arm_delete_thread): New function.
1801 (the_low_target): Add thread delete callback.
1802 * linux-bfin-low.c (the_low_target): Likewise.
1803 * linux-crisv32-low.c (the_low_target): Likewise.
1804 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1806 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1808 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1809 * linux-mips-low.c (mips_linux_delete_thread): New function.
1810 (the_low_target): Add thread delete callback.
1811 * linux-ppc-low.c (the_low_target): Likewise.
1812 * linux-s390-low.c (the_low_target): Likewise.
1813 * linux-sh-low.c (the_low_target): Likewise.
1814 * linux-tic6x-low.c (the_low_target): Likewise.
1815 * linux-tile-low.c (the_low_target): Likewise.
1816 * linux-x86-low.c (the_low_target): Likewise.
1817 * linux-xtensa-low.c (the_low_target): Likewise.
1819 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1821 * win32-low.c: Include "common-inferior.h".
1823 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1825 * inferiors.c (set_inferior_cwd): New function.
1826 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1827 (handle_query): Inform that QSetWorkingDir is supported.
1828 * win32-low.c (create_process): Pass the inferior's cwd to
1831 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1833 * inferiors.c (current_inferior_cwd): New global variable.
1834 (get_inferior_cwd): New function.
1835 * inferiors.h (struct process_info) <cwd>: New field.
1837 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1839 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1840 (OBS): Add gdb_tilde_expand.o.
1842 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1844 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1845 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1847 2017-09-29 Pedro Alves <palves@redhat.com>
1849 * ax.c (gdb_parse_agent_expr): Constify.
1850 * ax.h (gdb_parse_agent_expr): Constify.
1851 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1853 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1854 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1855 * remote-utils.h (read_ptid): Constify.
1856 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1857 (process_point_options, process_serial_event): Constify.
1858 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1859 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1860 (cmd_qtbuffer): Constify.
1862 2017-09-29 Pedro Alves <palves@redhat.com>
1864 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1867 2017-09-29 Pedro Alves <palves@redhat.com>
1869 * linux-low.c (handle_extended_wait): Pass parent thread instead
1870 of process to thread_db_notice_clone.
1871 * linux-low.h (thread_db_notice_clone): Replace parent process
1872 parameter with parent thread parameter.
1873 * thread-db.c (find_one_thread): Add comment.
1874 (thread_db_notice_clone): Replace parent process parameter with
1875 parent thread parameter. Temporarily switch to the parent thread.
1877 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1879 * gdbthread.h: Include "common-gdbthread.h".
1880 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1881 "if" when validating the ptid.
1882 * remote-utils.c: Include "gdbthread.h".
1883 (prepare_resume_reply): Use "switch_to_thread".
1884 * target.c (done_accessing_memory): Likewise.
1886 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1888 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1889 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1890 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1891 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1892 s390x-gs-linux64-ipa.o to ipa_obj.
1893 * linux-s390-low.c (HWCAP_S390_GS): New define.
1894 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1896 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1897 (s390_arch_setup): Check for guarded-storage support and choose
1899 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1900 init_registers_s390x_gs_linux64.
1901 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1903 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1904 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1906 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1908 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1910 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1912 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1913 (thread_db_thread_handle): Declare.
1914 * linux-low.c (linux_target_ops): Initialize thread_handle.
1915 * server.c (handle_qxfer_threads_worker): Add support for
1917 * target.h (struct target_ops): Add new function pointer,
1919 (target_thread_handle): Define.
1920 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1922 (thread_db_thread_handle): New function.
1924 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1926 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1927 * linux-low.h (thread_db_notice_clone): Declare.
1928 * thread-db.c (thread_db_notice_clone): New function.
1930 2017-09-21 Pedro Alves <palves@redhat.com>
1932 * server.c (gdb_read_memory, handle_status, process_serial_event)
1933 (handle_serial_event, handle_target_event): Adjust to
1934 set_desired_thread prototype change.
1935 * target.c (set_desired_thread): Remove 'use_general' parameter
1937 * target.h (set_desired_thread): Remove 'use_general' parameter.
1939 2017-09-20 Tom Tromey <tom@tromey.com>
1941 * target.c (target_terminal::terminal_state): Define.
1942 (target_terminal::init): Rename from target_terminal_init.
1943 (target_terminal::inferior): Rename from
1944 target_terminal_inferior.
1945 (target_terminal::ours): Rename from target_terminal_ours.
1946 (target_terminal::ours_for_output, target_terminal::info): New.
1948 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1950 * server.c (accumulate_file_name_length): Remove.
1951 (emit_dll_description): Adjust to std::string change.
1952 (handle_qxfer_libraries): Use std::string to hold document.
1954 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1956 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1957 return type of xml_escape_text.
1958 * server.c (emit_dll_description): Likewise.
1960 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1962 * server.c (captured_main): Accept argument for --selftest.
1963 Update run_tests call.
1964 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1965 when registering selftests.
1967 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1969 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1970 instead of "VEC" for "target_desc.reg_defs".
1971 (regcache_cpy): Likewise.
1972 (registers_to_string): Likewise.
1973 (registers_from_string): Likewise.
1974 (find_regno): Likewise.
1975 (supply_regblock): Likewise.
1976 (regcache_raw_read_unsigned): Likewise.
1977 * tdesc.c (init_target_desc): Likewise.
1978 (tdesc_create_reg): Likewise.
1979 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1980 (struct target_desc) <reg_defs>: Convert to "std::vector".
1981 (target_desc): Do not initialize "reg_defs".
1982 (~target_desc): Update code to use "std::vector" instead of "VEC"
1983 for "target_desc.reg_defs".
1984 (operator==): Likewise.
1986 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1988 * inferiors.h (thread_to_gdb_id): Remove.
1989 * inferiors.c (thread_to_gdb_id): Remove.
1990 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1991 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1992 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1994 * nto-low.c (nto_fetch_registers, nto_store_registers,
1995 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1997 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1999 * inferiors.h (gdb_id_to_thread_id): Remove.
2000 * inferiors.c (gdb_id_to_thread_id): Remove.
2001 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2002 removal. Move pid declaration closer to where it's used.
2004 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2006 * server.c (handle_detach): New function.
2007 (process_serial_event): Move code out, call handle_detach.
2009 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2011 * server.c (require_running): Rename to ...
2012 (require_running_or_return): ... this ...
2013 (require_running_or_break): ... and this.
2014 (handle_query, process_serial_event): Adjust.
2016 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2018 * linux-low.c (linux_set_resume_request): Remove unused
2021 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2023 * server.c (first_thread_of): Remove.
2024 (process_serial_event): Replace usage of first_thread_of with
2025 find_any_thread_of_pid.
2026 * tracepoint.c (same_process_p): Remove.
2027 (gdb_agent_about_to_close): Replace usage of same_process_p with
2028 find_any_thread_of_pid.
2029 * linux-x86-low.c (same_process_callback): Remove.
2030 (x86_arch_setup_process_callback): Replace usage of
2031 same_process_callback with find_any_thread_of_pid.
2032 * thread-db.c (any_thread_of): Remove.
2033 (switch_to_process): Replace usage of any_thread_of with
2034 find_any_thread_of_pid.
2035 * inferiors.c (thread_pid_matches_callback): Remove.
2036 (find_thread_process): Adjust to use find_any_thread_of_pid.
2038 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2040 * regcache.c (get_thread_regcache): Guard calls to "memset"
2043 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2045 * linux-low.c (handle_extended_wait): Use
2046 "allocate_target_description" instead of "XNEW".
2047 * linux-x86-low.c (initialize_low_arch): Likewise.
2049 2017-09-05 Yao Qi <yao.qi@linaro.org>
2051 * configure.srv (srv_i386_regobj): Remove.
2052 (srv_amd64_regobj): Remove.
2053 (srv_regobj): Set it to "" for x86 non-linux targets.
2054 * linux-x86-tdesc.c (i386_linux_read_description):
2055 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2056 (init_registers_i386): Remove the declaration.
2057 (tdesc_i386): Remove the declaration.
2058 (lynx_i386_arch_setup): Call i386_create_target_description.
2059 * nto-x86-low.c: Likewise.
2060 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2061 [!__x86_64__]: include arch/i386.h.
2062 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2064 2017-09-05 Yao Qi <yao.qi@linaro.org>
2066 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2067 i386/amd64-XXX-linux from it.
2069 2017-09-05 Yao Qi <yao.qi@linaro.org>
2071 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2073 (ipa_amd64_linux_regobj): Remove.
2074 (ipa_x32_linux_regobj): Remove.
2076 2017-09-05 Yao Qi <yao.qi@linaro.org>
2078 * Makefile.in (arch-amd64.o): New rule.
2079 * configure.srv: Append arch-amd64.o.
2080 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2081 (get_ipa_tdesc): Call amd64_linux_read_description.
2082 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2083 and init_registers_amd64_XXX.
2084 * linux-x86-low.c (x86_linux_read_description): Call
2085 amd64_linux_read_description.
2086 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2087 (initialize_low_arch): Don't call init_registers_x32_XXX and
2088 init_registers_amd64_XXX.
2089 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2090 and tdesc_amd64_XXX.
2091 [__x86_64__] (amd64_tdesc_test): New function.
2092 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2093 and init_registers_amd64_XXX.
2094 * linux-x86-tdesc.c: Include arch/amd64.h.
2095 (xcr0_to_tdesc_idx): New function.
2096 (i386_linux_read_description): New function.
2097 (amd64_get_ipa_tdesc_idx): New function.
2098 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2099 (amd64_get_ipa_tdesc): Declare.
2101 2017-09-05 Yao Qi <yao.qi@linaro.org>
2103 * configure.srv (srv_i386_linux_xmlfiles): Remove
2104 i386/i386-XXX-linux.xml from it.
2106 2017-09-05 Yao Qi <yao.qi@linaro.org>
2108 * configure.srv: Set srv_i386_linux_regobj empty if $development
2110 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2111 initialize_low_tdesc.
2112 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2113 with #if initialize_low_tdesc.
2114 * linux-x86-tdesc-selftest.c: New file.
2115 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2117 2017-09-05 Yao Qi <yao.qi@linaro.org>
2119 * Makefile.in (arch-i386.o): New rule.
2120 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2121 (x86_64-*-linux*): Likewise.
2122 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2123 include arch/i386.h.
2124 (i386_linux_read_description): Remove code and call
2125 i386_create_target_description.
2126 * tdesc.c (allocate_target_description): New function.
2127 * tdesc.h (set_tdesc_architecture): Remove declaration.
2128 (set_tdesc_osabi): Likewise.
2130 2017-09-05 Yao Qi <yao.qi@linaro.org>
2132 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2133 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2134 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2136 * server.c (get_features_xml): Call tdesc_get_features_xml.
2137 * tdesc.c (set_tdesc_architecture): New function.
2138 (set_tdesc_osabi): New function.
2139 (tdesc_get_features_xml): New function.
2140 (tdesc_create_feature): Add an argument.
2141 * tdesc.h (struct target_desc) <features>: New field.
2142 <arch, osabi>: New field.
2143 (~target_desc): xfree features, arch, and osabi.
2144 (target_desc::oerator==): Don't compare .xmltarget.
2145 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2146 (set_tdesc_osabi): Likewise.
2147 (tdesc_get_features_xml): Likewise.
2149 2017-09-05 Yao Qi <yao.qi@linaro.org>
2151 * linux-x86-tdesc.c: Include selftest.h.
2152 (i386_tdesc_test): New function.
2153 (initialize_low_tdesc): Call selftests::register_test.
2154 * tdesc.h: Include regdef.h.
2155 (target_desc): Override operator == and !=.
2157 2017-09-05 Yao Qi <yao.qi@linaro.org>
2159 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2160 (ipa_obj): Likewise.
2161 * linux-i386-ipa.c: Include common/x86-xstate.h
2162 (get_ipa_tdesc): Call i386_linux_read_description.
2163 (initialize_low_tracepoint): Don't call init_registers_XXX
2164 functions, call initialize_low_tdesc instead.
2165 * linux-x86-low.c (x86_linux_read_description): Call
2166 i386_linux_read_description.
2167 (initialize_low_arch): Don't call init_registers_i386_XXX
2168 functions, call initialize_low_tdesc.
2169 * linux-x86-tdesc.c: New file.
2170 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2171 (i386_get_ipa_tdesc_idx): Declare.
2172 (i386_get_ipa_tdesc): Declare.
2173 (initialize_low_tdesc): Declare.
2175 2017-09-05 Yao Qi <yao.qi@linaro.org>
2177 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2180 2017-09-05 Yao Qi <yao.qi@linaro.org>
2182 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2183 * regcache.c (get_thread_regcache): Use VEC_length.
2184 (init_register_cache): Likewise.
2185 (regcache_cpy): Likewise.
2186 (registers_to_string): Iterate reg_defs via VEC_iterate.
2187 (find_regno): Likewise.
2188 (find_register_by_number): Use VEC_index.
2189 (register_size): Call find_register_by_number.
2190 (register_data): Call find_register_by_number.
2191 (supply_regblock): Use VEC_length.
2192 (regcache_raw_read_unsigned): Likewise.
2193 * tdesc.c (init_target_desc): Iterate reg_defs via
2195 (default_description): Update initializer.
2196 (copy_target_description): Don't update field num_registers.
2197 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2198 <num_registers>: Remove.
2200 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2202 * Makefile.in (.SECONDARY): Define target.
2204 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2206 * linux-low.c (linux_wait_1): Adjust.
2207 * server.c (queue_stop_reply_callback): Adjust.
2209 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2211 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2212 QEnvironmentUnset and QEnvironmentReset packets.
2213 (handle_query): Inform remote that QEnvironmentHexEncoded,
2214 QEnvironmentUnset and QEnvironmentReset are supported.
2216 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2218 * inferiors.h (inferior_target_data): Rename to ...
2219 (thread_target_data): ... this.
2220 (inferior_regcache_data): Rename to ...
2221 (thread_regcache_data): ... this.
2222 (set_inferior_regcache_data): Rename to ...
2223 (set_thread_regcache_data): ... this.
2224 * inferiors.c (inferior_target_data): Rename to ...
2225 (thread_target_data): ... this.
2226 (inferior_regcache_data): Rename to ...
2227 (thread_regcache_data): ... this.
2228 (set_inferior_regcache_data): Rename to ...
2229 (set_thread_regcache_data): ... this.
2230 (free_one_thread): Update.
2231 * linux-low.h (get_thread_lwp): Update.
2232 * regcache.c (get_thread_regcache): Update.
2233 (regcache_invalidate_thread): Update.
2234 (free_register_cache_thread): Update.
2235 * win32-i386-low.c (update_debug_registers_callback): Update.
2236 (win32_get_current_dr): Update.
2237 * win32-low.c (thread_rec): Update.
2238 (delete_thread_info): Update.
2239 (continue_one_thread): Update.
2240 (suspend_one_thread): Update.
2242 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2244 * inferiors.c (set_inferior_target_data): Remove.
2245 * inferiors.h (set_inferior_target_data): Remove.
2247 2017-08-18 Yao Qi <yao.qi@linaro.org>
2249 * Makefile.in (OBS): Add selftest.o.
2250 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2251 * configure, config.in: Re-generated.
2252 * server.c: Include common/sefltest.h.
2253 (captured_main): Handle option --selftest.
2255 2017-08-09 Yao Qi <yao.qi@linaro.org>
2257 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2258 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2259 i386-avx-mpx.o and i386-mmx.o.
2260 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2261 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2262 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2263 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2264 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2265 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2266 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2267 i386/amd64-avx-mpx.xml.
2269 2017-08-09 Yao Qi <yao.qi@linaro.org>
2271 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2272 and x32-avx-avx512.o.
2273 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2274 i386/x32-avx-avx512.xml.
2276 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2278 * tracepoint.h (enum class fast_tpoint_collect_result): New
2280 (fast_tracepoint_collecting): Change return type to
2281 fast_tpoint_collect_result.
2282 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2283 * linux-low.h: Include tracepoint.h.
2284 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2285 fast_tpoint_collect_result.
2286 * linux-low.c (handle_tracepoints): Adjust.
2287 (linux_fast_tracepoint_collecting): Change return type to
2288 fast_tpoint_collect_result.
2289 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2290 linux_wait_1, stuck_in_jump_pad_callback,
2291 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2292 proceed_one_lwp): Adjust to type change.
2294 2017-07-10 Yao Qi <yao.qi@linaro.org>
2296 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2298 2017-06-29 Yao Qi <yao.qi@linaro.org>
2300 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2302 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2304 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2306 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2308 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2310 * linux-low.c (linux_create_inferior): Adjust code to access the
2311 environment information via 'gdb_environ' class.
2312 * lynx-low.c (lynx_create_inferior): Likewise.
2313 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2314 (get_environ): Return a pointer to 'our_environ'.
2315 (captured_main): Initialize 'our_environ'.
2316 * server.h (get_environ): Adjust prototype.
2317 * spu-low.c (spu_create_inferior): Adjust code to access the
2318 environment information via 'gdb_environ' class.
2320 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2322 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2323 usage of "register" keyword.
2325 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2327 * configure: Re-generate.
2329 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2331 * configure: Re-generate.
2333 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2335 * Makefile.in (COMPILE.pre): Add "-x c++".
2337 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2339 * fork-child.c: Conditionally include <signal.h>.
2341 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2343 * server.c (handle_general_set): Handle new packet
2344 "QStartupWithShell".
2345 (handle_query): Add "QStartupWithShell" to the list of supported
2347 (gdbserver_usage): Add help text explaining the
2348 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2350 (captured_main): Recognize and act upon the presence of the new
2353 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2354 Pedro Alves <palves@redhat.com>
2356 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2357 * configure: Regenerate.
2358 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2360 (i[34567]86-*-lynxos*): Likewise.
2361 (spu*-*-*): Likewise.
2362 * fork-child.c: New file.
2363 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2365 (linux_ptrace_fun): New function.
2366 (linux_create_inferior): Adjust function prototype to reflect
2367 change on "target.h". Adjust function code to use
2369 (linux_request_interrupt): Delete "signal_pid".
2370 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2371 (lynx_ptrace_fun): New function.
2372 (lynx_create_inferior): Adjust function prototype to reflect
2373 change on "target.h". Adjust function code to use
2375 * nto-low.c (nto_create_inferior): Adjust function prototype and
2376 code to reflect change on "target.h". Update comments.
2377 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2378 "common-terminal.h" and "environ.h".
2379 (terminal_fd): Moved to fork-child.c.
2380 (old_foreground_pgrp): Likewise.
2381 (restore_old_foreground_pgrp): Likewise.
2382 (last_status): Make it global.
2383 (last_ptid): Likewise.
2384 (our_environ): New variable.
2385 (startup_with_shell): Likewise.
2386 (program_name): Likewise.
2387 (program_argv): Rename to...
2388 (program_args): ...this.
2389 (wrapper_argv): New variable.
2390 (start_inferior): Delete function.
2391 (get_exec_wrapper): New function.
2392 (get_exec_file): Likewise.
2393 (get_environ): Likewise.
2394 (prefork_hook): Likewise.
2395 (post_fork_inferior): Likewise.
2396 (postfork_hook): Likewise.
2397 (postfork_child_hook): Likewise.
2398 (handle_v_run): Update code to deal with arguments coming from the
2399 remote host. Update calls from "start_inferior" to
2401 (captured_main): Likewise. Initialize environment variable. Call
2403 * server.h (post_fork_inferior): New prototype.
2404 (get_environ): Likewise.
2405 (last_status): Declare.
2406 (last_ptid): Likewise.
2407 (signal_pid): Likewise.
2408 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2409 (spu_ptrace_fun): New function.
2410 (spu_create_inferior): Adjust function prototype to reflect change
2411 on "target.h". Adjust function code to use "fork_inferior".
2412 * target.c (target_terminal_init): New function.
2413 (target_terminal_inferior): Likewise.
2414 (target_terminal_ours): Likewise.
2415 * target.h: Include <vector>.
2416 (struct target_ops) <create_inferior>: Update prototype.
2417 (create_inferior): Update macro.
2418 * utils.c (gdb_flush_out_err): New function.
2419 * win32-low.c (win32_create_inferior): Adjust function prototype
2420 and code to reflect change on "target.h".
2422 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2424 * inferiors.c (switch_to_thread): New function.
2426 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2428 * Makefile.in (SFILE): Add "common/job-control.c".
2429 (OBS): Add "job-control.o".
2431 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2433 * Makefile: Remove "@host_makefile_frag@".
2435 2017-05-05 Pedro Alves <palves@redhat.com>
2437 * configure: Regenerate.
2439 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2441 * configure: Regenerate.
2443 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2445 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2446 software_single_step change of return type to
2447 std::vector<CORE_ADDR>.
2448 * linux-low.c (install_software_single_step_breakpoints):
2450 * linux-low.h (install_software_single_step_breakpoints):
2453 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2455 * remote-utils.c: Include "gdb_termios.h" instead of
2457 * terminal.h: Delete file.
2459 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2461 * server.c: Include <vector>.
2462 <program_argv, wrapper_argv>: Convert to std::vector.
2463 (start_inferior): Rewrite function to use C++.
2464 (handle_v_run): Likewise. Update code that calculates the argv
2465 based on the vRun packet; use C++.
2466 (captured_main): Likewise.
2468 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2470 * server.c (handle_v_cont): Initialize thread_resume::thread
2473 2017-04-05 Pedro Alves <palves@redhat.com>
2475 * configure: Regenerate.
2477 2017-04-05 Pedro Alves <palves@redhat.com>
2479 * gdbreplay.c (sync_error): Constify.
2480 * linux-x86-low.c (push_opcode): Constify.
2482 2017-04-05 Pedro Alves <palves@redhat.com>
2484 * win32-low.c (get_child_debug_event)
2485 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2486 Report TARGET_WAITKIND_SPURIOUS instead.
2488 2017-04-05 Pedro Alves <palves@redhat.com>
2490 * remote-utils.c (remote_prepare, remote_open): Constify.
2491 * remote-utils.h (remote_prepare, remote_open): Constify.
2492 * server.c (captured_main): Constify 'port' handling.
2494 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2496 * Makefile.in (clean): Clear .deps.
2498 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2500 * .gitignore: Remove generated files, replace with wildcard.
2501 * (clean): Replace removal of generated files with wildcard.
2502 (version.c): Replace with...
2503 (version-generated.c): ...this.
2504 (xml-builtin.c): Replace with...
2505 (xml-builtin-generated.c): ...this.
2506 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2507 (%.c: *regformats*): Replace with...
2508 (%-generated.c: *regformats*): ...this.
2510 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2512 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2513 (xtensa_fill_gregset): Call collect_register_by_name for
2515 (xtensa_store_gregset): Call supply_register_by_name for
2518 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2520 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2521 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2522 (xtensa_store_gregset): Call supply_register for all registers in
2523 a0_regnum..a0_regnum + C0_NREGS range.
2525 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2527 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2528 (ax-ipa.o: ax.c): Remove.
2529 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2530 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2531 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2532 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2533 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2535 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2537 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2538 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2539 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2540 (errors-ipa.o: ../common/errors.c): Remove.
2541 (format-ipa.o: ../common/format.c): Remove.
2542 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2544 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2546 * Makefile.in (%-ipa.o: %.c): New rule.
2547 (tracepoint-ipa.o: tracepoint.c): Remove.
2548 (utils-ipa.o: utils.c): Remove.
2549 (remote-utils-ipa.o: remote-utils.c): Remove.
2550 (regcache-ipa.o: regcache.c): Remove.
2551 (i386-linux-ipa.o: i386-linux.c): Remove.
2552 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2553 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2554 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2555 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2556 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2557 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2558 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2559 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2560 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2561 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2562 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2563 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2564 (aarch64-ipa.o: aarch64.c): Remove.
2565 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2566 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2567 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2568 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2569 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2570 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2571 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2572 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2573 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2574 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2575 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2576 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2577 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2578 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2579 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2580 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2581 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2582 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2583 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2584 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2585 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2586 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2587 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2588 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2589 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2590 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2591 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2592 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2593 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2594 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2595 (tdesc-ipa.o: tdesc.c): Remove.
2596 (x32-linux-ipa.o: x32-linux.c): Remove.
2597 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2598 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2600 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2602 * Makefile.in (%.o: ../arch/%.c): New rule.
2603 (arm.o: ../arch/arm.c): Remove.
2604 (arm-linux.o: ../arch/arm-linux.c): Remove.
2605 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2606 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2608 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2610 * Makefile.in (%.o: ../nat/%.c): New rule.
2611 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2612 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2613 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2614 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2615 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2616 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2617 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2618 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2619 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2620 (linux-personality.o: ../nat/linux-personality.c): Remove.
2621 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2622 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2623 (x86-linux.o: ../nat/x86-linux.c): Remove.
2624 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2625 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2627 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2629 * Makefile.in (%.o: ../common/%.c): New rule.
2630 (signals.o: ../common/signals.c): Remove.
2631 (print-utils.o: ../common/print-utils.c): Remove.
2632 (rsp-low.o: ../common/rsp-low.c): Remove.
2633 (common-utils.o: ../common/common-utils.c): Remove.
2634 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2635 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2636 (vec.o: ../common/vec.c): Remove.
2637 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2638 (xml-utils.o: ../common/xml-utils.c): Remove.
2639 (ptid.o: ../common/ptid.c): Remove.
2640 (buffer.o: ../common/buffer.c): Remove.
2641 (format.o: ../common/format.c): Remove.
2642 (filestuff.o: ../common/filestuff.c): Remove.
2643 (agent.o: ../common/agent.c): Remove.
2644 (errors.o: ../common/errors.c): Remove.
2645 (environ.o: ../common/environ.c): Remove.
2646 (common-debug.o: ../common/common-debug.c): Remove.
2647 (cleanups.o: ../common/cleanups.c): Remove.
2648 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2649 (fileio.o: ../common/fileio.c): Remove.
2650 (common-regcache.o: ../common/common-regcache.c): Remove.
2651 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2652 (new-op.o: ../common/new-op.c): Remove.
2653 (btrace-common.o: ../common/btrace-common.c): Remove.
2655 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2657 * Makefile.in (%.o: ../target/%.c): New rule.
2658 (waitstatus.o: ../target/waitstatus.c): Remove.
2660 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2663 (%.c: ../regformats/%.dat,
2664 (%.c: ../regformats/arm/%.dat,
2665 (%.c: ../regformats/i386/%.dat,
2666 (%.c: ../regformats/rs6000/%.dat): New rules.
2667 (aarch64.c): Remove.
2668 (reg-arm.c): Remove.
2669 (arm-with-iwmmxt.c): Remove.
2670 (arm-with-vfpv2.c): Remove.
2671 (arm-with-vfpv3.c): Remove.
2672 (arm-with-neon.c): Remove.
2673 (reg-bfin.c): Remove.
2674 (reg-cris.c): Remove.
2675 (reg-crisv32.c): Remove.
2677 (i386-linux.c): Remove.
2678 (i386-avx.c): Remove.
2679 (i386-avx-linux.c): Remove.
2680 (i386-avx-avx512.c): Remove.
2681 (i386-avx-avx512-linux.c): Remove.
2682 (i386-mpx.c): Remove.
2683 (i386-mpx-linux.c): Remove.
2684 (i386-avx-mpx-avx512-pku.c): Remove.
2685 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2686 (i386-avx-mpx.c): Remove.
2687 (i386-avx-mpx-linux.c): Remove.
2688 (i386-mmx.c): Remove.
2689 (i386-mmx-linux.c): Remove.
2690 (reg-ia64.c): Remove.
2691 (reg-m32r.c): Remove.
2692 (reg-m68k.c): Remove.
2694 (mips-linux.c): Remove.
2695 (mips-dsp-linux.c): Remove.
2696 (mips64-linux.c): Remove.
2697 (mips64-dsp-linux.c): Remove.
2698 (nios2-linux.c): Remove.
2699 (powerpc-32.c): Remove.
2700 (powerpc-32l.c): Remove.
2701 (powerpc-altivec32l.c): Remove.
2702 (powerpc-cell32l.c): Remove.
2703 (powerpc-vsx32l.c): Remove.
2704 (powerpc-isa205-32l.c): Remove.
2705 (powerpc-isa205-altivec32l.c): Remove.
2706 (powerpc-isa205-vsx32l.c): Remove.
2707 (powerpc-e500l.c): Remove.
2708 (powerpc-64l.c): Remove.
2709 (powerpc-altivec64l.c): Remove.
2710 (powerpc-cell64l.c): Remove.
2711 (powerpc-vsx64l.c): Remove.
2712 (powerpc-isa205-64l.c): Remove.
2713 (powerpc-isa205-altivec64l.c): Remove.
2714 (powerpc-isa205-vsx64l.c): Remove.
2715 (s390-linux32.c): Remove.
2716 (s390-linux32v1.c): Remove.
2717 (s390-linux32v2.c): Remove.
2718 (s390-linux64.c): Remove.
2719 (s390-linux64v1.c): Remove.
2720 (s390-linux64v2.c): Remove.
2721 (s390-te-linux64.c): Remove.
2722 (s390-vx-linux64.c): Remove.
2723 (s390-tevx-linux64.c): Remove.
2724 (s390x-linux64.c): Remove.
2725 (s390x-linux64v1.c): Remove.
2726 (s390x-linux64v2.c): Remove.
2727 (s390x-te-linux64.c): Remove.
2728 (s390x-vx-linux64.c): Remove.
2729 (s390x-tevx-linux64.c): Remove.
2730 (tic6x-c64xp-linux.c): Remove.
2731 (tic6x-c64x-linux.c): Remove.
2732 (tic6x-c62x-linux.c): Remove.
2734 (reg-sparc64.c): Remove.
2735 (reg-spu.c): Remove.
2737 (amd64-linux.c): Remove.
2738 (amd64-avx.c): Remove.
2739 (amd64-avx-linux.c): Remove.
2740 (amd64-avx-avx512.c): Remove.
2741 (amd64-avx-avx512-linux.c): Remove.
2742 (amd64-mpx.c): Remove.
2743 (amd64-mpx-linux.c): Remove.
2744 (amd64-avx-mpx-avx512-pku.c): Remove.
2745 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2746 (amd64-avx-mpx.c): Remove.
2747 (amd64-avx-mpx-linux.c): Remove.
2749 (x32-linux.c): Remove.
2750 (x32-avx.c): Remove.
2751 (x32-avx-linux.c): Remove.
2752 (x32-avx-avx512.c): Remove.
2753 (x32-avx-avx512-linux.c): Remove.
2754 (reg-xtensa.c): Remove.
2755 (reg-tilegx.c): Remove.
2756 (reg-tilegx32.c): Remove.
2758 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2760 * Makefile.in (SFILES): Add "common/environ.c".
2761 (OBJS): Add "common/environ.h".
2763 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2765 * configure.ac: Check if the fs_base and gs_base members of
2766 `struct user_regs_struct' exist.
2767 * config.in: Regenerated.
2768 * configure: Likewise.
2770 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2772 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2774 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2775 (get_next_pcs_syscall_next_pc): Likewise.
2777 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2779 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2780 * nto-x86-low.c: Likewise.
2782 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2784 * Makefile.in: Include disable-implicit-rules.mk.
2786 2016-11-23 Pedro Alves <palves@redhat.com>
2788 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2789 (debug_vprintf): Use std::chrono::steady_clock instead of
2790 gettimeofday. Use '.' instead of ':'.
2791 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2792 (get_timestamp): Use std::chrono::steady_clock instead of
2795 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2797 * Makefile.in: Fix whitespace formatting.
2799 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2801 * Makefile.in (SFILES, OBS): Flatten list and order
2804 2016-11-23 Pedro Alves <palves@redhat.com>
2806 * event-loop.c (handle_file_event): Use warning.
2807 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2808 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2811 2016-11-23 Pedro Alves <palves@redhat.com>
2813 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2815 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2816 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2817 debug_printf and debug_flush for debug output.
2818 * server.c (handle_general_set): Likewise.
2819 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2822 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2824 * Makefile.in (.c.o): Replace rule with ...
2825 (%.o: %.c): ... this one.
2827 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2829 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2830 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2832 * configure.ac: Remove checks for the make program.
2833 * configure: Re-generate.
2835 2016-10-28 Pedro Alves <palves@redhat.com>
2837 * Makefile.in (CXX_DIALECT): Get from configure.
2838 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2839 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2840 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2841 * config.in: Regenerate.
2842 * configure: Regenerate.
2844 2016-10-27 Yao Qi <yao.qi@linaro.org>
2846 * linux-low.c (linux_supports_range_stepping): Return true if
2847 can_software_single_step return true.
2849 2016-10-27 Yao Qi <yao.qi@linaro.org>
2851 * inferiors.c (find_inferior_in_random): New function.
2852 * inferiors.h (find_inferior_in_random): Declare.
2853 * linux-low.c (linux_wait_for_event_filtered): Call
2854 find_inferior_in_random instead of find_inferior.
2856 2016-10-27 Yao Qi <yao.qi@linaro.org>
2858 * linux-low.c (linux_wait_1): If single-step breakpoints are
2859 inserted, remove them.
2861 2016-10-26 Pedro Alves <palves@redhat.com>
2863 * linux-low.c (handle_extended_wait): Link parent/child fork
2865 (linux_wait_1): Unlink them.
2866 (linux_set_resume_request): Ignore resume requests for
2867 already-resumed and unhandled fork child threads.
2868 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2869 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2871 (handle_v_requests) <vCont>: Don't call require_running.
2872 * server.h (in_queued_stop_replies): New declaration.
2874 2016-10-24 Yao Qi <yao.qi@linaro.org>
2877 * linux-aarch64-low.c (append_insns): Cast the return value to
2880 2016-10-10 Yao Qi <yao.qi@linaro.org>
2882 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2884 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2886 * target.c (target_supports_multi_process): New function, moved
2888 * target.h (target_supports_multi_process): ... here. Remove
2891 2016-10-05 Tom Tromey <tom@tromey.com>
2894 * tracepoint.c (handle_tracepoint_bkpts): Check
2895 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2897 2016-10-05 Yao Qi <yao.qi@linaro.org>
2899 * configure.srv: Update the path of arm-*.xml files.
2901 2016-10-05 Terry Guo <terry.guo@arm.com>
2902 Yao Qi <yao.qi@linaro.org>
2904 * Makefile.in: Adjust the path of rules.
2905 * configure.srv: Update the path of xml files.
2906 * regformats/arm-with-iwmmxt.dat: Regenerated.
2907 * regformats/arm-with-neon.dat: Likewise.
2908 * regformats/arm-with-vfpv2.dat: Likewise.
2909 * regformats/arm-with-vfpv3.dat Likewise.
2911 2016-09-30 Yao Qi <yao.qi@linaro.org>
2914 * target.c (target_stop_and_wait): Don't call
2915 target_continue_no_signal, use resume_stop instead.
2917 2016-09-26 Yao Qi <yao.qi@linaro.org>
2919 * linux-low.c (linux_wait_1): Call debug_exit.
2921 2016-09-23 Pedro Alves <palves@redhat.com>
2923 * Makefile.in (SFILES): Add common/new-op.c.
2924 (OBS): Add common/new-op.o.
2925 (new-op.o): New rule.
2927 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2929 * .gitinore: Ignore more files.
2931 2016-09-21 Yao Qi <yao.qi@linaro.org>
2933 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2936 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2938 * server.c (start_inferior): Call target_mourn_inferior instead of
2939 mourn_inferior; pass ptid_t argument to it.
2941 (handle_target_event): Likewise.
2942 * target.c (target_mourn_inferior): New function.
2943 * target.h (mourn_inferior): Delete macro.
2945 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2947 * linux-low.c (lwp_is_stepping): New function.
2949 2016-09-06 Carl Love <cel@us.ibm.com>
2951 * server.c (start_inferior): Fixed comment, requested comment change
2952 didn't get updated correctly. Removed reference to ptrace () call as
2953 it is only true on Linux systems.
2955 2016-09-06 Carl Love <cel@us.ibm.com>
2957 * server.c (start_inferior): Do not call
2958 function target_post_create_inferior () if the
2959 inferior process has already exited.
2961 2016-09-05 Pedro Alves <palves@redhat.com>
2963 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2964 (COMPILE.pre, CC_LD): Use CXX directly.
2965 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2966 * acinclude.m4: Don't include build-with-cxx.m4.
2967 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2968 * configure: Regenerate.
2970 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2973 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2974 call writing data to own_buf.
2976 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2978 * target.c (mywait): Call target_wait instead of
2980 (target_wait): New function.
2982 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2984 * server.c (start_inferior): New variable 'ptid'. Replace calls
2985 to the_target->resume by target_continue{,_no_signal}, depending
2987 * target.c (target_stop_and_wait): Call target_continue_no_signal
2988 instead of the_target->resume.
2989 (target_continue): New function.
2991 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2993 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2995 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2998 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3000 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3001 * linux-arm-low.c (ps_get_thread_area): Likewise.
3002 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3003 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3004 * linux-mips-low.c (ps_get_thread_area): Likewise.
3005 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3006 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3007 * linux-x86-low.c (ps_get_thread_area): Likewise.
3008 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3010 2016-08-19 Pedro Alves <palves@redhat.com>
3012 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3014 2016-08-19 Pedro Alves <palves@redhat.com>
3016 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3017 comment. Use memcpy instead of casting through unsigned long.
3019 2016-08-19 Pedro Alves <palves@redhat.com>
3021 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3022 allocating around 0x80000000.
3024 2016-08-19 Pedro Alves <palves@redhat.com>
3027 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3028 (x32-avx512-linux-ipa.o): New rules.
3029 * configure.ac (x86_64-*-linux*): New x32 check.
3030 * configure.srv (ipa_x32_linux_regobj): New.
3031 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3032 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3034 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3036 * configure: Regenerate.
3038 2016-08-09 Pedro Alves <palves@redhat.com>
3041 * Makefile.in (OBS): Add signals-state-save-restore.o.
3042 (signals-state-save-restore.o): New rule.
3043 * config.in: Regenerate.
3044 * configure: Regenerate.
3045 * linux-low.c: Include "signals-state-save-restore.h".
3046 (linux_create_inferior): Call
3047 restore_original_signals_state.
3048 * server.c: Include "dispositions-save-restore.h".
3049 (captured_main): Call save_original_signals_state.
3051 2016-08-05 Pedro Alves <palves@redhat.com>
3053 * configure: Regenerate.
3055 2016-08-04 Yao Qi <yao.qi@linaro.org>
3057 * linux-low.c (regsets_fetch_inferior_registers): Check
3058 errno is ESRCH or not.
3060 2016-08-02 Yao Qi <yao.qi@linaro.org>
3062 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3063 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3064 (thread_db_load_search): Update.
3065 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3066 td_ta_set_event and td_ta_event_getmsg.
3068 2016-07-26 Pedro Alves <palves@redhat.com>
3071 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3072 of unsigned long for 64-bit registers and use uint32_t instead of
3073 unsigned int for 32-bit registers.
3075 2016-07-26 Pedro Alves <palves@redhat.com>
3077 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3080 2016-07-21 Tom Tromey <tom@tromey.com>
3082 * configure: Rebuild.
3084 2016-07-21 Yao Qi <yao.qi@linaro.org>
3086 * mem-break.c (find_gdb_breakpoint): Cast bp to
3087 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3089 2016-07-21 Yao Qi <yao.qi@linaro.org>
3091 * server.c (handle_v_requests): Support s and S actions
3092 if target_supports_software_single_step return true.
3094 2016-07-21 Yao Qi <yao.qi@linaro.org>
3096 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3097 is resume_step, call maybe_hw_step.
3098 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3100 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3102 (proceed_one_lwp): If resume request is resume_step, install
3103 reinsert breakpoints and call maybe_hw_step.
3105 2016-07-21 Yao Qi <yao.qi@linaro.org>
3107 * linux-low.c (proceed_one_lwp): Declare.
3108 (linux_resume_one_thread): Remove local variable 'step'.
3109 Lift code enqueue signal. Call proceed_one_lwp instead of
3110 linux_resume_one_lwp.
3112 2016-07-21 Yao Qi <yao.qi@linaro.org>
3114 * linux-low.c (linux_resume_one_thread): Call
3115 enqueue_pending_signal.
3117 2016-07-21 Yao Qi <yao.qi@linaro.org>
3119 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3120 * inferiors.c (do_restore_current_thread_cleanup): New function.
3121 (make_cleanup_restore_current_thread): Likewise.
3122 * linux-low.c (install_software_single_step_breakpoints): Call
3123 make_cleanup_restore_current_thread. Switch current_thread to
3126 2016-07-21 Yao Qi <yao.qi@linaro.org>
3128 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3129 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3130 (clone_one_breakpoint): Likewise.
3131 (delete_reinsert_breakpoints): Change parameter to thread.
3133 (has_reinsert_breakpoints): Likewise.
3134 (uninsert_reinsert_breakpoints): Likewise.
3135 (reinsert_reinsert_breakpoints): Likewise.
3136 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3137 (delete_reinsert_breakpoints): Likewise.
3138 (reinsert_reinsert_breakpoints): Likewise.
3139 (uninsert_reinsert_breakpoints): Likewise.
3140 (has_reinsert_breakpoints): Likewise.
3142 2016-07-21 Yao Qi <yao.qi@linaro.org>
3144 * inferiors.c (get_thread_process): Make parameter const.
3145 * inferiors.h (get_thread_process): Update declaration.
3146 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3147 Add new parameters child_thread and parent_thread. Callers
3149 * mem-break.h (clone_all_breakpoints): Update declaration.
3151 2016-07-21 Yao Qi <yao.qi@linaro.org>
3153 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3154 <command_list, handler>: Remove.
3155 (struct gdb_breakpoint): New.
3156 (struct other_breakpoint): New.
3157 (struct reinsert_breakpoint): New.
3158 (is_gdb_breakpoint): New function.
3159 (any_persistent_commands): Update command_list if
3160 is_gdb_breakpoint returns true.
3161 (set_breakpoint): Create breakpoints according to their types.
3162 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3163 (set_gdb_breakpoint_1): Likewise.
3164 (set_gdb_breakpoint): Likewise.
3165 (clear_breakpoint_conditions): Change parameter type to
3166 'struct gdb_breakpoint *'.
3167 (clear_breakpoint_commands): Likewise.
3168 (clear_breakpoint_conditions_and_commands): Likewise.
3169 (add_condition_to_breakpoint): Likewise.
3170 (add_breakpoint_condition): Likewise.
3171 (add_commands_to_breakpoint): Likewise.
3172 (check_breakpoints): Check other_breakpoint.
3173 (clone_one_breakpoint): Clone breakpopint according to its type.
3174 * mem-break.h (struct gdb_breakpoint): Declare.
3175 (set_gdb_breakpoint): Update declaration.
3176 (clear_breakpoint_conditions_and_commands): Likewise.
3177 (add_breakpoint_condition): Likewise.
3178 (add_breakpoint_commands): Likewise.
3179 * server.c (process_point_options): Change parameter type to
3180 'struct gdb_breakpoint *'.
3182 2016-07-21 Yao Qi <yao.qi@linaro.org>
3184 * mem-break.c (set_breakpoint_at): Rename it to ...
3185 (set_breakpoint_type_at): ... it.
3186 (set_breakpoint_at): Call set_breakpoint_type_at.
3187 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3188 * mem-break.h (set_breakpoint_at): Update comments.
3190 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3192 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3194 (nios2_store_gregset): Likewise.
3196 2016-07-01 Pedro Alves <palves@redhat.com>
3197 Antoine Tremblay <antoine.tremblay@ericsson.com>
3199 * linux-low.c: Change interface to take the target lwp_info
3200 pointer directly and return void. Handle detaching from a zombie
3202 (linux_detach_lwp_callback): New function.
3203 (linux_detach): Detach from the leader thread after detaching from
3206 2016-06-28 Yao Qi <yao.qi@linaro.org>
3208 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3209 for variable new_offset.
3210 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3211 (aarch64_ftrace_insn_reloc_cb): Likewise.
3212 (aarch64_ftrace_insn_reloc_tb): Likewise.
3213 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3214 PRIx64 instead of PRIx32.
3216 2016-06-28 Yao Qi <yao.qi@linaro.org>
3218 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3219 (the_low_target): Install arm_get_syscall_trapinfo.
3221 2016-06-28 Yao Qi <yao.qi@linaro.org>
3223 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3225 (the_low_target): Install aarch64_get_syscall_trapinfo.
3227 2016-06-28 Yao Qi <yao.qi@linaro.org>
3229 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3231 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3232 Remove parameter sysno.
3233 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3236 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3238 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3239 (s390_emit_ne_goto): Likewise.
3240 (s390_emit_lt_goto): Likewise.
3241 (s390_emit_le_goto): Likewise.
3242 (s390_emit_gt_goto): Likewise.
3243 (s390_emit_ge_goto): Likewise.
3244 (s390x_emit_eq_goto): Likewise.
3245 (s390x_emit_ne_goto): Likewise.
3246 (s390x_emit_lt_goto): Likewise.
3247 (s390x_emit_le_goto): Likewise.
3248 (s390x_emit_gt_goto): Likewise.
3249 (s390x_emit_ge_goto): Likewise.
3250 (s390_emit_ops_impl): Mark variable static.
3251 (s390x_emit_ops): Likewise.
3253 2016-06-17 Yao Qi <yao.qi@linaro.org>
3255 * linux-low.c (handle_extended_wait): Call
3256 uninsert_reinsert_breakpoints for the parent process. Remove
3257 reinsert breakpoints from the child process. Reinsert them to
3258 the parent process when vfork is done.
3259 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3260 (reinsert_reinsert_breakpoints): New function.
3261 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3262 (reinsert_reinsert_breakpoints): Declare.
3264 2016-06-17 Yao Qi <yao.qi@linaro.org>
3266 * linux-low.c (handle_extended_wait): If the parent is doing
3267 step-over, remove the reinsert breakpoints from the forked child.
3269 2016-06-17 Yao Qi <yao.qi@linaro.org>
3271 * linux-low.c (unsuspend_all_lwps): Declare.
3272 (linux_low_filter_event): If thread exited, call finish_step_over.
3273 If step-over is finished, unsuspend other threads.
3275 2016-06-17 Yao Qi <yao.qi@linaro.org>
3277 * linux-low.c (linux_resume_one_lwp_throw): Assert
3278 has_reinsert_breakpoints returns false.
3279 * mem-break.c (delete_disabled_breakpoints): Assert
3280 bp type isn't reinsert_breakpoint.
3282 2016-06-17 Yao Qi <yao.qi@linaro.org>
3284 * linux-low.c (maybe_hw_step): New function.
3285 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3286 (finish_step_over): Switch current_thread to lwp temporarily,
3287 and assert has_reinsert_breakpoints returns true.
3288 (proceed_one_lwp): Call maybe_hw_step.
3289 * mem-break.c (has_reinsert_breakpoints): New function.
3290 * mem-break.h (has_reinsert_breakpoints): Declare.
3292 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3294 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3296 2016-05-17 Yao Qi <yao.qi@linaro.org>
3298 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3299 instead of find_inferior.
3301 2016-05-05 Yao Qi <yao.qi@linaro.org>
3303 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3304 Initialize res to zero.
3306 2016-05-05 Yao Qi <yao.qi@linaro.org>
3308 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3311 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3313 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3314 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3315 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3317 2016-04-28 Par Olsson <par.olsson@windriver.com>
3318 Simon Marchi <simon.marchi@ericsson.com>
3320 * tracepoint.c (write_inferior_int8): New function.
3321 (cmd_qtenable_disable): Write enable flag using
3322 write_inferior_int8.
3324 2016-04-25 Yao Qi <yao.qi@linaro.org>
3326 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3327 (need_step_over_p): Return zero if the LWP has pending signals
3328 can be delivered on software single step target.
3330 2016-04-25 Yao Qi <yao.qi@linaro.org>
3332 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3333 return instead of error.
3335 2016-04-22 Yao Qi <yao.qi@linaro.org>
3337 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3340 2016-04-22 Yao Qi <yao.qi@linaro.org>
3342 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3343 signal when stepping over breakpoint with software single
3346 2016-04-21 Pedro Alves <palves@redhat.com>
3348 * linux-s390-low.c (s390_collect_ptrace_register)
3349 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3351 (s390_check_regset): Use void * instead of gdb_byte *.
3353 2016-04-20 Pedro Alves <palves@redhat.com>
3355 * configure: Renegerate.
3357 2016-04-20 Yao Qi <yao.qi@linaro.org>
3359 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3360 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3362 (arm_store_gregset): Likewise.
3364 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3366 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3367 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3368 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3369 (amd64-avx-mpx-linux.c): New rules.
3370 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3371 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3372 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3373 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3374 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3375 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3376 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3377 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3378 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3379 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3380 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3381 * linux-x86-low.c (x86_linux_read_description): Add case for
3382 X86_XSTATE_AVX_MPX_MASK.
3383 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3384 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3385 init_registers_i386_avx_mpx_linux.
3386 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3387 (initialize_low_tracepoint): Call
3388 init_registers_i386_avx_mpx_linux.
3389 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3390 (initialize_low_tracepoint): Call
3391 init_registers_amd64_avx_mpx_linux.
3392 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3393 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3394 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3397 2016-04-18 Pedro Alves <palves@redhat.com>
3399 * configure: Regenerate.
3401 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3403 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3404 (aarch64_emit_sub): Likewise.
3406 2016-04-12 Pedro Alves <palves@redhat.com>
3408 * utils.c (prepare_to_throw_exception): Delete.
3410 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3412 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3414 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3416 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3418 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3420 * linux-aarch64-ipa.c: Add <elf.h> include.
3421 * linux-ppc-ipa.c: Add <elf.h> include.
3422 * linux-s390-ipa.c: Add <elf.h> include.
3424 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3426 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3427 (get_raw_reg_ptr): Likewise.
3428 (get_trace_state_variable_value_ptr): Likewise.
3429 (set_trace_state_variable_value_ptr): Likewise.
3430 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3433 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3434 Marcin Kościelnicki <koriakin@0x04.net>
3437 * linux-ppc-low.c (emit_insns): New function.
3438 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3439 (ppc_emit_prologue): New function.
3440 (ppc_emit_epilogue): New function.
3441 (ppc_emit_add): New function.
3442 (ppc_emit_sub): New function.
3443 (ppc_emit_mul): New function.
3444 (ppc_emit_lsh): New function.
3445 (ppc_emit_rsh_signed): New function.
3446 (ppc_emit_rsh_unsigned): New function.
3447 (ppc_emit_ext): New function.
3448 (ppc_emit_zero_ext): New function.
3449 (ppc_emit_log_not): New function.
3450 (ppc_emit_bit_and): New function.
3451 (ppc_emit_bit_or): New function.
3452 (ppc_emit_bit_xor): New function.
3453 (ppc_emit_bit_not): New function.
3454 (ppc_emit_equal): New function.
3455 (ppc_emit_less_signed): New function.
3456 (ppc_emit_less_unsigned): New function.
3457 (ppc_emit_ref): New function.
3458 (ppc_emit_const): New function.
3459 (ppc_emit_reg): New function.
3460 (ppc_emit_pop): New function.
3461 (ppc_emit_stack_flush): New function.
3462 (ppc_emit_swap): New function.
3463 (ppc_emit_stack_adjust): New function.
3464 (ppc_emit_call): New function.
3465 (ppc_emit_int_call_1): New function.
3466 (ppc_emit_void_call_2): New function.
3467 (ppc_emit_if_goto): New function.
3468 (ppc_emit_goto): New function.
3469 (ppc_emit_eq_goto): New function.
3470 (ppc_emit_ne_goto): New function.
3471 (ppc_emit_lt_goto): New function.
3472 (ppc_emit_le_goto): New function.
3473 (ppc_emit_gt_goto): New function.
3474 (ppc_emit_ge_goto): New function.
3475 (ppc_write_goto_address): New function.
3476 (ppc_emit_ops_impl): New static variable.
3477 (ppc64v1_emit_prologue): New function.
3478 (ppc64v2_emit_prologue): New function.
3479 (ppc64_emit_epilogue): New function.
3480 (ppc64_emit_add): New function.
3481 (ppc64_emit_sub): New function.
3482 (ppc64_emit_mul): New function.
3483 (ppc64_emit_lsh): New function.
3484 (ppc64_emit_rsh_signed): New function.
3485 (ppc64_emit_rsh_unsigned): New function.
3486 (ppc64_emit_ext): New function.
3487 (ppc64_emit_zero_ext): New function.
3488 (ppc64_emit_log_not): New function.
3489 (ppc64_emit_bit_and): New function.
3490 (ppc64_emit_bit_or): New function.
3491 (ppc64_emit_bit_xor): New function.
3492 (ppc64_emit_bit_not): New function.
3493 (ppc64_emit_equal): New function.
3494 (ppc64_emit_less_signed): New function.
3495 (ppc64_emit_less_unsigned): New function.
3496 (ppc64_emit_ref): New function.
3497 (ppc64_emit_const): New function.
3498 (ppc64v1_emit_reg): New function.
3499 (ppc64v2_emit_reg): New function.
3500 (ppc64_emit_pop): New function.
3501 (ppc64_emit_stack_flush): New function.
3502 (ppc64_emit_swap): New function.
3503 (ppc64v1_emit_call): New function.
3504 (ppc64v2_emit_call): New function.
3505 (ppc64v1_emit_int_call_1): New function.
3506 (ppc64v2_emit_int_call_1): New function.
3507 (ppc64v1_emit_void_call_2): New function.
3508 (ppc64v2_emit_void_call_2): New function.
3509 (ppc64_emit_if_goto): New function.
3510 (ppc64_emit_eq_goto): New function.
3511 (ppc64_emit_ne_goto): New function.
3512 (ppc64_emit_lt_goto): New function.
3513 (ppc64_emit_le_goto): New function.
3514 (ppc64_emit_gt_goto): New function.
3515 (ppc64_emit_ge_goto): New function.
3516 (ppc64v1_emit_ops_impl): New static variable.
3517 (ppc64v2_emit_ops_impl): New static variable.
3518 (ppc_emit_ops): New function.
3519 (linux_low_target): Wire in ppc_emit_ops.
3521 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3522 Marcin Kościelnicki <koriakin@0x04.net>
3525 * Makefile.in: Add powerpc-*-ipa.o
3526 * configure.srv: Add ipa_obj for powerpc*-linux.
3527 * linux-ppc-ipa.c: New file.
3528 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3530 (PPC_FIELD): New macro.
3531 (PPC_SEXT): New macro.
3532 (PPC_OP6): New macro.
3533 (PPC_BO): New macro.
3534 (PPC_LI): New macro.
3535 (PPC_BD): New macro.
3536 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3537 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3538 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3539 (ppc_get_thread_area): New function.
3540 (is_elfv2_inferior): New function.
3541 (gen_ds_form): New function.
3542 (GEN_STD): New macro.
3543 (GEN_STDU): New macro.
3544 (GEN_LD): New macro.
3545 (GEN_LDU): New macro.
3546 (gen_d_form): New function.
3547 (GEN_ADDI): New macro.
3548 (GEN_ADDIS): New macro.
3549 (GEN_LI): New macro.
3550 (GEN_LIS): New macro.
3551 (GEN_ORI): New macro.
3552 (GEN_ORIS): New macro.
3553 (GEN_LWZ): New macro.
3554 (GEN_STW): New macro.
3555 (GEN_STWU): New macro.
3556 (gen_xfx_form): New function.
3557 (GEN_MFSPR): New macro.
3558 (GEN_MTSPR): New macro.
3559 (GEN_MFCR): New macro.
3560 (GEN_MTCR): New macro.
3561 (GEN_SYNC): New macro.
3562 (GEN_LWSYNC): New macro.
3563 (gen_x_form): New function.
3564 (GEN_OR): New macro.
3565 (GEN_MR): New macro.
3566 (GEN_LWARX): New macro.
3567 (GEN_STWCX): New macro.
3568 (GEN_CMPW): New macro.
3569 (gen_md_form): New function.
3570 (GEN_RLDICL): New macro.
3571 (GEN_RLDICR): New macro.
3572 (gen_i_form): New function.
3574 (GEN_BL): New macro.
3575 (gen_b_form): New function.
3576 (GEN_BNE): New macro.
3577 (GEN_LOAD): New macro.
3578 (GEN_STORE): New macro.
3579 (gen_limm): New function.
3580 (gen_atomic_xchg): New function.
3581 (gen_call): New function.
3582 (ppc_relocate_instruction): New function.
3583 (ppc_install_fast_tracepoint_jump_pad): New function.
3584 (ppc_get_min_fast_tracepoint_insn_len): New function.
3585 (ppc_get_ipa_tdesc_idx): New function.
3586 (the_low_target): Wire in the new functions.
3587 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3589 * linux-ppc-tdesc.h: New file.
3591 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3593 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3594 (alloc_jump_pad_buffer): New function.
3595 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3596 (alloc_jump_pad_buffer): New function.
3597 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3598 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3599 (alloc_jump_pad_buffer): New function.
3600 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3601 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3602 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3603 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3605 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3607 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3608 * linux-amd64-ipa.c: Likewise.
3609 * linux-i386-ipa.c: Likewise.
3610 * linux-s390-ipa.c: Likewise.
3611 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3612 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3613 set_trace_state_variable_value_ptr.
3614 (struct ipa_sym_addresses): Likewise.
3615 (symbol_list): Likewise.
3616 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3617 accessing gdb_collect directly.
3618 (gdb_collect_ptr_type): New typedef.
3619 (get_raw_reg_ptr_type): New typedef.
3620 (get_trace_state_variable_value_ptr_type): New typedef.
3621 (set_trace_state_variable_value_ptr_type): New typedef.
3622 (gdb_collect_ptr): New global.
3623 (get_raw_reg_ptr): New global.
3624 (get_trace_state_variable_value_ptr): New global.
3625 (set_trace_state_variable_value_ptr): New global.
3626 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3627 accessing get_raw_reg directly.
3628 (get_get_tsv_func_addr): Likewise for
3629 get_trace_state_variable_value_ptr.
3630 (get_set_tsv_func_addr): Likewise for
3631 set_trace_state_variable_value_ptr.
3632 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3634 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3636 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3638 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3640 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3642 (relocate_instruction): Remove own_buf.
3643 * server.c (own_buf): Make global.
3644 (handle_v_requests): Make global.
3645 * server.h (own_buf): New declaration.
3646 (handle_v_requests): New prototype.
3648 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3651 * linux-s390-low.c (add_insns): New function.
3652 (s390_emit_prologue): New function.
3653 (s390_emit_epilogue): New function.
3654 (s390_emit_add): New function.
3655 (s390_emit_sub): New function.
3656 (s390_emit_mul): New function.
3657 (s390_emit_lsh): New function.
3658 (s390_emit_rsh_signed): New function.
3659 (s390_emit_rsh_unsigned): New function.
3660 (s390_emit_ext): New function.
3661 (s390_emit_log_not): New function.
3662 (s390_emit_bit_and): New function.
3663 (s390_emit_bit_or): New function.
3664 (s390_emit_bit_xor): New function.
3665 (s390_emit_bit_not): New function.
3666 (s390_emit_equal): New function.
3667 (s390_emit_less_signed): New function.
3668 (s390_emit_less_unsigned): New function.
3669 (s390_emit_ref): New function.
3670 (s390_emit_if_goto): New function.
3671 (s390_emit_goto): New function.
3672 (s390_write_goto_address): New function.
3673 (s390_emit_litpool): New function.
3674 (s390_emit_const): New function.
3675 (s390_emit_call): New function.
3676 (s390_emit_reg): New function.
3677 (s390_emit_pop): New function.
3678 (s390_emit_stack_flush): New function.
3679 (s390_emit_zero_ext): New function.
3680 (s390_emit_swap): New function.
3681 (s390_emit_stack_adjust): New function.
3682 (s390_emit_set_r2): New function.
3683 (s390_emit_int_call_1): New function.
3684 (s390_emit_void_call_2): New function.
3685 (s390_emit_eq_goto): New function.
3686 (s390_emit_ne_goto): New function.
3687 (s390_emit_lt_goto): New function.
3688 (s390_emit_le_goto): New function.
3689 (s390_emit_gt_goto): New function.
3690 (s390_emit_ge_goto): New function.
3691 (s390x_emit_prologue): New function.
3692 (s390x_emit_epilogue): New function.
3693 (s390x_emit_add): New function.
3694 (s390x_emit_sub): New function.
3695 (s390x_emit_mul): New function.
3696 (s390x_emit_lsh): New function.
3697 (s390x_emit_rsh_signed): New function.
3698 (s390x_emit_rsh_unsigned): New function.
3699 (s390x_emit_ext): New function.
3700 (s390x_emit_log_not): New function.
3701 (s390x_emit_bit_and): New function.
3702 (s390x_emit_bit_or): New function.
3703 (s390x_emit_bit_xor): New function.
3704 (s390x_emit_bit_not): New function.
3705 (s390x_emit_equal): New function.
3706 (s390x_emit_less_signed): New function.
3707 (s390x_emit_less_unsigned): New function.
3708 (s390x_emit_ref): New function.
3709 (s390x_emit_if_goto): New function.
3710 (s390x_emit_const): New function.
3711 (s390x_emit_call): New function.
3712 (s390x_emit_reg): New function.
3713 (s390x_emit_pop): New function.
3714 (s390x_emit_stack_flush): New function.
3715 (s390x_emit_zero_ext): New function.
3716 (s390x_emit_swap): New function.
3717 (s390x_emit_stack_adjust): New function.
3718 (s390x_emit_int_call_1): New function.
3719 (s390x_emit_void_call_2): New function.
3720 (s390x_emit_eq_goto): New function.
3721 (s390x_emit_ne_goto): New function.
3722 (s390x_emit_lt_goto): New function.
3723 (s390x_emit_le_goto): New function.
3724 (s390x_emit_gt_goto): New function.
3725 (s390x_emit_ge_goto): New function.
3726 (s390_emit_ops): New function.
3727 (struct linux_target_ops): Fill in emit_ops hook.
3729 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3732 * Makefile.in: Add s390 IPA files.
3733 * configure.srv: Build IPA for s390.
3734 * linux-s390-ipa.c: New file.
3735 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3736 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3737 (tdesc_s390_linux32): Likewise.
3738 (init_registers_s390_linux32v1): Likewise.
3739 (tdesc_s390_linux32v1): Likewise.
3740 (init_registers_s390_linux32v2): Likewise.
3741 (tdesc_s390_linux32v2): Likewise.
3742 (init_registers_s390_linux64): Likewise.
3743 (tdesc_s390_linux64): Likewise.
3744 (init_registers_s390_linux64v1): Likewise.
3745 (tdesc_s390_linux64v1): Likewise.
3746 (init_registers_s390_linux64v2): Likewise.
3747 (tdesc_s390_linux64v2): Likewise.
3748 (init_registers_s390_te_linux64): Likewise.
3749 (tdesc_s390_te_linux64): Likewise.
3750 (init_registers_s390_vx_linux64): Likewise.
3751 (tdesc_s390_vx_linux64): Likewise.
3752 (init_registers_s390_tevx_linux64): Likewise.
3753 (tdesc_s390_tevx_linux64): Likewise.
3754 (init_registers_s390x_linux64): Likewise.
3755 (tdesc_s390x_linux64): Likewise.
3756 (init_registers_s390x_linux64v1): Likewise.
3757 (tdesc_s390x_linux64v1): Likewise.
3758 (init_registers_s390x_linux64v2): Likewise.
3759 (tdesc_s390x_linux64v2): Likewise.
3760 (init_registers_s390x_te_linux64): Likewise.
3761 (tdesc_s390x_te_linux64): Likewise.
3762 (init_registers_s390x_vx_linux64): Likewise.
3763 (tdesc_s390x_vx_linux64): Likewise.
3764 (init_registers_s390x_tevx_linux64): Likewise.
3765 (tdesc_s390x_tevx_linux64): Likewise.
3766 (have_hwcap_s390_vx): New static variable.
3767 (s390_arch_setup): Fill have_hwcap_s390_vx.
3768 (s390_get_thread_area): New function.
3769 (s390_ft_entry_gpr_esa): New const.
3770 (s390_ft_entry_gpr_zarch): New const.
3771 (s390_ft_entry_misc): New const.
3772 (s390_ft_entry_fr): New const.
3773 (s390_ft_entry_vr): New const.
3774 (s390_ft_main_31): New const.
3775 (s390_ft_main_64): New const.
3776 (s390_ft_exit_fr): New const.
3777 (s390_ft_exit_vr): New const.
3778 (s390_ft_exit_misc): New const.
3779 (s390_ft_exit_gpr_esa): New const.
3780 (s390_ft_exit_gpr_zarch): New const.
3781 (append_insns): New function.
3782 (s390_relocate_instruction): New function.
3783 (s390_install_fast_tracepoint_jump_pad): New function.
3784 (s390_get_min_fast_tracepoint_insn_len): New function.
3785 (s390_get_ipa_tdesc_idx): New function.
3786 (struct linux_target_ops): Wire in the above functions.
3787 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3788 * linux-s390-tdesc.h: New file.
3790 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3792 * linux-s390-low.c (s390_supports_tracepoints): New function.
3793 (struct linux_target_ops): Fill supports_tracepoints hook.
3795 2016-03-18 Yao Qi <yao.qi@linaro.org>
3797 * linux-low.c (lwp_signal_can_be_delivered): New function.
3798 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3800 2016-03-18 Yao Qi <yao.qi@linaro.org>
3802 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3803 0 if signal is enqueued. Remove 'signal' from one debugging
3804 message. Move one debugging message to some lines below.
3805 Remove code setting 'signal' to 0.
3807 2016-03-18 Yao Qi <yao.qi@linaro.org>
3809 * linux-low.c (linux_low_filter_event): Remove redundant
3810 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3812 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3814 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3815 (struct linux_target_ops): Wire in the above.
3817 2016-03-03 Yao Qi <yao.qi@linaro.org>
3819 * linux-low.c: Update comments to start_step_over.
3821 2016-03-03 Yao Qi <yao.qi@linaro.org>
3824 * linux-low.c (handle_extended_wait): Set child suspended
3825 if event_lwp->bp_reinsert isn't zero.
3827 2016-03-02 Yao Qi <yao.qi@linaro.org>
3829 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3830 enqueue_pending_signal.
3832 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3834 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3837 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3839 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3840 (s390_regmap_3264) [!__s390x__]: New global.
3841 (s390_collect_ptrace_register): Skip map entries containing -1.
3842 (s390_supply_ptrace_register): Ditto.
3843 (s390_fill_gprs_high): New function.
3844 (s390_store_gprs_high): New function.
3845 (s390_regsets): Add NT_S390_HIGH_GPRS.
3846 (s390_get_hwcap): Enable on 31-bit.
3847 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3848 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3849 Detect NT_S390_HIGH_GPRS.
3850 (s390_usrregs_info_3264): Enable on 31-bit.
3851 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3852 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3854 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3857 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3858 * configure.srv: Ditto.
3859 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3860 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3861 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3862 (init_registers_amd64_linux): Remove prototype.
3863 (tdesc_amd64_linux): Remove declaration.
3864 (get_ipa_tdesc): New function.
3865 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3866 initialize remaining tdescs.
3867 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3868 (init_registers_i386_linux): Remove prototype.
3869 (tdesc_i386_linux): Remove declaration.
3870 (get_ipa_tdesc): New function.
3871 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3872 initialize remaining tdescs.
3873 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3874 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3875 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3876 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3877 (x86_get_ipa_tdesc_idx): New function.
3878 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3879 * linux-x86-tdesc.h: New file.
3880 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3881 (target_get_ipa_tdesc_idx): New macro.
3882 * tracepoint.c (ipa_tdesc_idx): New macro.
3883 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3884 (symbol_list): Add ipa_tdesc_idx.
3885 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3886 (ipa_tdesc): Remove.
3887 (ipa_tdesc_idx): New variable.
3888 (get_context_regcache): Use get_ipa_tdesc.
3889 (gdb_collect): Ditto.
3891 * tracepoint.h (get_ipa_tdesc): New prototype.
3892 (ipa_tdesc): Remove.
3894 2016-02-24 Pedro Alves <palves@redhat.com>
3896 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3897 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3898 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3899 Factor out common code between the USE_SIGTRAP_SIGINFO and
3900 !USE_SIGTRAP_SIGINFO blocks.
3901 (linux_low_filter_event): Call save_stop_reason instead of
3902 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3904 (linux_wait_1): Update comments.
3906 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3908 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3909 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3910 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3911 ppc_insert_point, ppc_remove_point.
3913 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3915 * linux-s390-low.c (s390_supports_z_point_type): New function.
3916 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3918 2016-02-16 Yao Qi <yao.qi@linaro.org>
3920 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3921 PC. Get pc from regcache_read_pc.
3923 2016-02-12 Yao Qi <yao.qi@linaro.org>
3925 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3926 or linux_get_pc_32bit.
3927 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3929 2016-02-12 Yao Qi <yao.qi@linaro.org>
3931 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3932 arm_linux_get_next_pcs_fixup.
3934 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3936 * tracepoint.c (x_tracepoint_action_download): Change
3937 write_inferior_data_ptr to write_inferior_data_pointer.
3938 (cmd_qtstart): Likewise.
3939 (write_inferior_data_ptr): Remove.
3940 (download_agent_expr): Change write_inferior_data_ptr to
3941 write_inferior_data_pointer.
3942 (download_tracepoint_1): Likewise.
3943 (download_tracepoint): Likewise.
3944 (download_trace_state_variables): Likewise.
3946 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3947 Marcin Kościelnicki <koriakin@0x04.net>
3949 * tracepoint.c (struct tracepoint_action_ops): Remove.
3950 (struct tracepoint_action): Remove ops.
3951 (m_tracepoint_action_download, r_tracepoint_action_download)
3952 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3953 size and offset accordingly.
3954 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3955 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3956 (tracepoint_action_send, tracepoint_action_download): New functions.
3957 Helpers for trace action handlers.
3958 (add_tracepoint_action): Remove setup actions ops.
3959 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3961 2016-02-10 Yao Qi <yao.qi@linaro.org>
3963 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3965 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3967 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3969 * configure: Regenerate.
3971 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3973 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3974 void * to gdb_byte *.
3975 * linux-low.c (siginfo_fixup): Likewise.
3976 (linux_xfer_siginfo): Likewise.
3977 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3979 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3981 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3983 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3985 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3987 * linux-x86-low.c [__x86_64__]: Include
3988 "nat/amd64-linux-siginfo.h".
3989 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3990 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3991 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3992 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3993 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3994 (cpt_si_fd, si_timerid, si_overrun): Move from
3995 nat/amd64-linux-siginfo.c.
3996 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3998 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4000 * server.c (skip_to_semicolon): Remove.
4001 (process_point_options): Use strchrnul instead of
4004 2016-01-26 Yao Qi <yao.qi@linaro.org>
4006 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4007 * linux-low.c (install_software_single_step_breakpoints): Don't
4008 call regcache_read_pc.
4009 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4012 2016-01-26 Yao Qi <yao.qi@linaro.org>
4014 * linux-low.c (install_software_single_step_breakpoints): Call
4015 regcache_read_pc instead of get_pc.
4017 2016-01-26 Yao Qi <yao.qi@linaro.org>
4019 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4020 (unblock_async_io): Rename to ...
4021 (block_unblock_async_io): ... it. New function.
4022 (enable_async_io): Don't install SIGIO handler. Unblock it
4024 (disable_async_io): Don't ignore SIGIO. Block it instead.
4025 (initialize_async_io): Install SIGIO handler. Don't call
4028 2016-01-26 Yao Qi <yao.qi@linaro.org>
4030 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4031 first character is '\003', call *the_target->request_interrupt.
4033 2016-01-25 Yao Qi <yao.qi@linaro.org>
4035 * remote-utils.c (new_thread_notify): Remove.
4036 (dead_thread_notify): Likewise.
4037 * remote-utils.h (new_thread_notify): Remove declaration.
4038 (dead_thread_notify): Likewise.
4040 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4042 * gdb.trace/pending.exp: Fix expected message on continue.
4044 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4046 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4047 it works properly on big-endian machines where sizeof (CORE_ADDR)
4050 2016-01-21 Pedro Alves <palves@redhat.com>
4052 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4053 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4054 * configure: Regenerate.
4056 2016-01-21 Yao Qi <yao.qi@linaro.org>
4058 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4059 is_thumb and set it according to CPSR saved on the stack.
4060 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4061 arm_sigreturn_next_pc.
4063 2016-01-18 Yao Qi <yao.qi@linaro.org>
4065 * linux-low.c (linux_set_pc_64bit): New function.
4066 (linux_get_pc_64bit): New function.
4067 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4069 * linux-sparc-low.c (debug_threads): Remove declaration.
4070 (sparc_get_pc): Remove.
4071 (the_low_target): Use linux_get_pc_64bit instead of
4073 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4074 (the_low_target): Use linux_get_pc_64bit and
4077 2016-01-18 Yao Qi <yao.qi@linaro.org>
4079 * linux-arm-low.c (debug_threads): Remove declaration.
4080 (arm_get_pc, arm_set_pc): Remove.
4081 (the_low_target): Use linux_get_pc_32bit and
4083 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4084 (the_low_target): Use linux_get_pc_32bit and
4086 * linux-cris-low.c (debug_threads): Remove declaration.
4087 (cris_get_pc, cris_set_pc,): Remove.
4088 (the_low_target): Use linux_get_pc_32bit and
4090 * linux-crisv32-low.c (debug_threads): Remove declaration.
4091 (cris_get_pc, cris_set_pc): Remove.
4092 (the_low_target): Use linux_get_pc_32bit and
4094 * linux-low.c: Include inttypes.h.
4095 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4096 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4097 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4098 (the_low_target): Use linux_get_pc_32bit and
4100 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4101 (the_low_target): Use linux_get_pc_32bit and
4103 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4104 (the_low_target): Use linux_get_pc_32bit and
4106 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4107 (the_low_target): Use linux_get_pc_32bit and
4109 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4110 (the_low_target): Use linux_get_pc_32bit and
4113 2016-01-18 Gary Benson <gbenson@redhat.com>
4115 * configure.ac (AC_FUNC_FORK): New check.
4116 * config.in: Regenerate.
4117 * configure: Likewise.
4119 2016-01-14 Yao Qi <yao.qi@linaro.org>
4121 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4122 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4123 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4124 arm_get_next_pcs_ctor.
4126 2016-01-12 Josh Stone <jistone@redhat.com>
4127 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4129 * inferiors.h: Include "gdb_vecs.h".
4130 (struct process_info): Add syscalls_to_catch.
4131 * inferiors.c (remove_process): Free syscalls_to_catch.
4132 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4133 syscall_return stops.
4134 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4135 * server.c (handle_general_set): Handle QCatchSyscalls.
4136 (handle_query): Report support for QCatchSyscalls.
4137 * target.h (struct target_ops): Add supports_catch_syscall.
4138 (target_supports_catch_syscall): New macro.
4139 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4140 (struct lwp_info): Add syscall_state.
4141 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4142 Maintain syscall_state and syscalls_to_catch across exec.
4143 (get_syscall_trapinfo): New function, proxy to the_low_target.
4144 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4145 (linux_low_filter_event): Toggle syscall_state entry/return for
4146 syscall traps, and set it ignored for all others.
4147 (gdb_catching_syscalls_p): New function.
4148 (gdb_catch_this_syscall_p): New function.
4149 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4150 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4151 (linux_supports_catch_syscall): New function.
4152 (linux_target_ops): Install it.
4153 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4154 (the_low_target): Install it.
4156 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4158 * acinclude.m4: Include new ../warning.m4 file.
4159 * configure: Regenerated.
4160 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4162 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4164 * ax.c (is_goto_target): Mark static.
4165 * linux-low.c (register_addr): Likewise.
4166 (linux_fetch_registers, linux_store_registers): Likewise.
4167 * mem-break.c (any_persistent_commands): Fix old prototype.
4168 (add_commands_to_breakpoint): Mark static.
4169 * regcache.c (find_register_by_name): Delete unused func.
4170 * remote-utils.c (hex_or_minus_one): Mark static.
4171 * server.c (monitor_show_help): Mark static.
4172 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4173 handle_v_requests): Likewise.
4175 2016-01-12 Pedro Alves <palves@redhat.com>
4177 Remove use of the registered trademark symbol throughout.
4179 2016-01-08 Yao Qi <yao.qi@linaro.org>
4181 * remote-utils.c (getpkt): If c is '\003', call target hook
4184 2016-01-06 Yao Qi <yao.qi@linaro.org>
4186 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4187 linux-aarch32-low.c.
4188 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4189 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4190 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4191 (thumb2_breakpoint): Declare.
4192 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4193 linux-aarch32-low.h.
4194 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4195 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4196 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4198 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4200 * gdbreplay.c (gdbreplay_version): Change copyright year in
4202 * server.c (gdbserver_version): Likewise.
4204 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4206 * server.c (crc32_table): Delete.
4207 (crc32): Use libiberty's xcrc32 function.
4209 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4211 * lynx-low.c (lynx_delete_thread_callback): New function.
4212 (lynx_mourn): Properly delete our process and all of its
4213 threads. Remove call to clear_inferiors.
4215 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4217 * target.c (thread_search_callback): Add check that
4218 the thread_stopped target callback is not NULL before
4221 2015-12-21 Yao Qi <yao.qi@linaro.org>
4223 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4226 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4228 * server.c (handle_query): Call target_supports_software_single_step.
4230 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4232 * linux-low.c (single_step): New function.
4233 (linux_resume_one_lwp_throw): Call single_step.
4234 (start_step_over): Likewise.
4236 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4238 * Makefile.in (SFILES): Append arch/arm-linux.c,
4239 arch/arm-get-next-pcs.c.
4240 (arm-linux.o): New rule.
4241 (arm-get-next-pcs.o): New rule.
4242 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4244 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4245 to linux-aarch32-low.c.
4246 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4247 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4248 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4249 (thumb2_breakpoint_len): Likewise.
4250 (arm_is_thumb_mode): Make non-static.
4251 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4252 from linux-aarch32-low.c.
4253 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4254 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4255 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4256 (thumb2_breakpoint_len): Likewise.
4257 (arm_is_thumb_mode): New declaration.
4258 * linux-arm-low.c: Include arch/arm-linux.h
4259 aarch/arm-get-next-pcs.h, sys/syscall.h.
4260 (get_next_pcs_ops): New struct.
4261 (get_next_pcs_addr_bits_remove): New function.
4262 (get_next_pcs_is_thumb): New function.
4263 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4264 (arm_sigreturn_next_pc): Likewise.
4265 (get_next_pcs_syscall_next_pc): Likewise.
4266 (arm_gdbserver_get_next_pcs): Likewise.
4267 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4269 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4270 * server.h: Include gdb_vecs.h.
4272 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4274 * Makefile.in (SFILES): Append common/common-regcache.c.
4275 (OBS): Append common-regcache.o.
4276 (common-regcache.o): New rule.
4277 * regcache.c (init_register_cache): Initialize cache to
4279 (regcache_raw_read_unsigned): New function.
4280 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4281 register_status enum.
4283 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4285 * linux-aarch64-low.c (the_low_targets): Rename
4286 breakpoint_reinsert_addr to get_next_pcs.
4287 * linux-arm-low.c (the_low_targets): Likewise.
4288 * linux-bfin-low.c (the_low_targets): Likewise.
4289 * linux-cris-low.c (the_low_targets): Likewise.
4290 * linux-crisv32-low.c (the_low_targets): Likewise.
4291 * linux-low.c (can_software_single_step): Likewise.
4292 (install_software_single_step_breakpoints): New function.
4293 (start_step_over): Use install_software_single_step_breakpoints.
4294 * linux-low.h: New CORE_ADDR vector.
4295 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4297 * linux-mips-low.c (the_low_targets): Likewise.
4298 * linux-nios2-low.c (the_low_targets): Likewise.
4299 * linux-sparc-low.c (the_low_targets): Likewise.
4301 2015-12-17 Pedro Alves <palves@redhat.com>
4303 * linux-low.c (linux_kill_one_lwp): Remove references to
4305 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4307 (linux_init_signals): Delete.
4308 (initialize_low): Adjust.
4309 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4311 2015-12-16 Pedro Alves <palves@redhat.com>
4313 * configure.ac (compiler warning flags): When testing a
4314 -Wno-foo option, check whether -Wfoo works instead.
4315 * configure: Regenerate.
4317 2015-12-11 Don Breazeal <donb@codesourcery.com>
4319 * server.c (process_serial_event): Don't exit from gdbserver
4320 in remote mode if there are still active inferiors.
4322 2015-12-11 Yao Qi <yao.qi@linaro.org>
4324 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4325 arm_breakpoint_at if the process is 32-bit.
4327 2015-12-11 Yao Qi <yao.qi@linaro.org>
4329 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4332 2015-12-07 Yao Qi <yao.qi@linaro.org>
4334 * configure.srv: Append arm.o to srv_tgtobj for
4335 aarch64*-*-linux* target.
4336 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4337 from linux-arm-low.c.
4338 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4339 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4340 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4341 (thumb2_breakpoint_len): Likewise.
4342 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4343 (arm_breakpoint_kinds): Likewise.
4344 (arm_breakpoint_kind_from_pc): Likewise.
4345 (arm_sw_breakpoint_from_kind): Likewise.
4346 (arm_breakpoint_kind_from_current_state): Likewise.
4347 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4348 (arm_sw_breakpoint_from_kind): Declare.
4349 (arm_breakpoint_kind_from_current_state): Declare.
4350 (arm_breakpoint_at): Declare.
4351 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4352 arm_sw_breakpoint_from_kind if process is 32-bit.
4353 (aarch64_breakpoint_kind_from_pc): New function.
4354 (aarch64_breakpoint_kind_from_current_state): New function.
4355 (the_low_target): Initialize fields breakpoint_kind_from_pc
4356 and breakpoint_kind_from_current_state.
4357 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4358 linux-aarch32-low.c.
4359 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4360 (arm_breakpoint, arm_breakpoint_len): Likewise.
4361 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4362 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4363 (arm_is_thumb_mode): Likewise.
4364 (arm_breakpoint_at): Likewise.
4365 (arm_breakpoint_kind_from_pc): Likewise.
4366 (arm_sw_breakpoint_from_kind): Likewise.
4367 (arm_breakpoint_kind_from_current_state): Likewise.
4370 2015-08-04 Yao Qi <yao.qi@linaro.org>
4372 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4373 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4374 * server.c (extended_protocol): Remove "static".
4375 * server.h (extended_protocol): Declare it.
4377 2015-12-04 Josh Stone <jistone@redhat.com>
4379 * target.h (struct target_ops) <arch_setup>: Rename to ...
4380 (struct target_ops) <post_create_inferior>: ... this.
4381 (target_arch_setup): Rename to ...
4382 (target_post_create_inferior): ... this, calling post_create_inferior.
4383 * server.c (start_inferior): Update target_arch_setup calls to
4384 target_post_create_inferior.
4385 * linux-low.c (linux_low_ptrace_options): Forward declare.
4386 (linux_arch_setup): Update its comment for general use.
4387 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4388 (struct linux_target_ops): Use linux_post_create_inferior.
4389 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4390 to post_create_inferior.
4391 * nto-low.c (struct nto_target_ops): Likewise.
4392 * spu-low.c (struct spu_target_ops): Likewise.
4393 * win32-low.c (struct win32_target_ops): Likewise.
4395 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4397 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4399 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4401 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4402 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4403 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4404 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4405 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4406 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4407 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4408 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4409 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4410 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4411 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4412 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4414 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4416 * linux-low.c (linux_look_up_symbols): Don't call
4417 linux_supports_traceclone.
4418 * linux-low.h (thread_db_init): Remove use_events argument.
4419 * thread-db.c (thread_db_use_event): Remove global variable.
4420 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4421 (struct thread_db) <td_create_bp>: Remove field.
4422 (thread_db_create_event): Remove function.
4423 (thread_db_enable_reporting): Likewise.
4424 (find_one_thread): Don't check for thread_db_use_events.
4425 (attach_thread): Likewise.
4426 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4427 (try_thread_db_load_1): Don't check for thread_db_use_events.
4428 (thread_db_init): Remove use_events argument and thread events
4430 (remove_thread_event_breakpoints): Remove function.
4431 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4433 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4435 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4437 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4438 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4439 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4440 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4441 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4443 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4445 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4446 * linux-low.c (can_hardware_single_step): Use
4447 supports_hardware_single_step.
4448 (can_software_single_step): New function.
4449 (start_step_over): Call can_software_single_step.
4450 (linux_supports_hardware_single_step): New function.
4451 (struct target_ops) <supports_software_single_step>: Initialize.
4452 * linux-low.h (struct linux_target_ops)
4453 <supports_hardware_single_step>: Initialize.
4454 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4455 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4456 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4457 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4458 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4459 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4460 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4461 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4462 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4463 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4465 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4466 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4468 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4469 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4470 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4473 * target.h (struct target_ops): <supports_software_single_step>:
4475 (target_supports_software_single_step): New macro.
4477 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4479 * linux-low.c (linux_wait_1): Fix pc advance condition.
4480 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4481 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4483 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4485 * linux-arm-low.c (arm_is_thumb_mode): New function.
4486 (arm_breakpoint_at): Use arm_is_thumb_mode.
4487 (arm_breakpoint_kind_from_current_state): New function.
4488 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4490 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4491 (linux_breakpoint_kind_from_current_state): New function.
4492 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4493 * linux-low.h (struct linux_target_ops)
4494 <breakpoint_kind_from_current_state>: New field.
4495 * target.h (struct target_ops): Likewise.
4496 (target_breakpoint_kind_from_current_state): New macro.
4498 2015-11-30 Pedro Alves <palves@redhat.com>
4500 * linux-low.c (linux_resume): Wake up the event loop before
4503 2015-11-30 Pedro Alves <palves@redhat.com>
4505 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4507 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4509 * target.c (struct thread_search): New structure.
4510 (thread_search_callback): New function.
4511 (prev_general_thread): New global.
4512 (prepare_to_access_memory, done_accessing_memory): New functions.
4513 * target.h (prepare_to_access_memory, done_accessing_memory):
4514 Replace macros with function declarations.
4516 2015-11-30 Pedro Alves <palves@redhat.com>
4519 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4520 report TARGET_WAITKIND_NO_RESUMED.
4521 * remote-utils.c (prepare_resume_reply): Handle
4522 TARGET_WAITKIND_NO_RESUMED.
4523 * server.c (report_no_resumed): New global.
4524 (handle_query) <qSupported>: Handle "no-resumed+". Report
4525 "no-resumed+" support.
4526 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4527 return error if the client doesn't support no-resumed events.
4528 (push_stop_notification): New function.
4529 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4530 events if the client supports them.
4532 2015-11-30 Pedro Alves <palves@redhat.com>
4534 * linux-low.c (thread_still_has_status_pending_p): Don't check
4536 (lwp_resumed): New function.
4537 (status_pending_p_callback): Return early if the LWP is not
4538 supposed to be resumed.
4540 2015-11-30 Pedro Alves <palves@redhat.com>
4542 * linux-low.c (handle_extended_wait): Assert that the LWP's
4543 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4544 thread create events, leave the new child's status pending.
4545 (linux_low_filter_event): If GDB wants to hear about thread exit
4546 events, leave the LWP marked dead and don't delete it.
4547 (linux_wait_for_event_filtered): Don't check for thread exit.
4548 (filter_exit_event): New function.
4549 (linux_wait_1): Use it, when returning an exit event.
4550 (linux_resume_one_lwp_throw): Assert that the LWP's
4551 waitstatus is TARGET_WAITKIND_IGNORE.
4552 * remote-utils.c (prepare_resume_reply): Handle
4553 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4554 * server.c (report_thread_events): New global.
4555 (handle_general_set): Handle QThreadEvents.
4556 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4557 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4558 TARGET_WAITKIND_THREAD_EXITED.
4559 * server.h (report_thread_events): Declare.
4561 2015-11-30 Pedro Alves <palves@redhat.com>
4563 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4564 the thread's last_resume_kind was resume_stop.
4566 2015-11-30 Pedro Alves <palves@redhat.com>
4568 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4571 2015-11-30 Pedro Alves <palves@redhat.com>
4573 * server.c (handle_v_requests): Handle vCtrlC.
4575 2015-11-30 Pedro Alves <palves@redhat.com>
4577 * gdbthread.h (find_any_thread_of_pid): Declare.
4578 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4580 * server.c (handle_query): If current_thread is NULL, look for
4581 another thread of the selected process.
4583 2015-11-26 Daniel Colascione <dancol@dancol.org>
4584 Simon Marchi <simon.marchi@ericsson.com>
4586 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4587 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4589 * target.h (struct target_ops) <thread_name>: New field.
4590 (target_thread_name): New macro.
4592 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4594 * regcache.h (regcache_invalidate_pid): Add declaration.
4595 * regcache.c (regcache_invalidate_pid): New function, extracted
4596 from regcache_invalidate.
4597 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4598 Add trivial documentation comment.
4599 * lynx-low.c: Use regcache_invalidate_pid instead of
4600 regcache_invalidate.
4602 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4604 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4605 and Elf64_auxv_t if the target is Android.
4607 2015-11-22 Doug Evans <xdje42@gmail.com>
4609 * target.h: #include <sys/types.h>.
4611 2015-11-19 Pedro Alves <palves@redhat.com>
4613 * linux-low.c (linux_process_qsupported): Change prototype.
4615 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4617 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4618 and adjust to loop over all features.
4619 * server.c (handle_query) <qSupported>: Adjust to call
4620 target_process_qsupported once, passing it a vector of unprocessed
4622 * target.h (struct target_ops) <process_qsupported>: Change
4624 (target_process_qsupported): Adjust.
4626 2015-11-19 Pedro Alves <palves@redhat.com>
4628 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4630 * configure: Regenerate.
4632 2015-11-19 Pedro Alves <palves@redhat.com>
4634 * configure: Regenerate.
4636 2015-11-19 Yao Qi <yao.qi@linaro.org>
4638 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4641 2015-11-19 Yao Qi <yao.qi@linaro.org>
4643 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4644 (struct aarch64_operand): Move enum out.
4646 2015-11-19 Yao Qi <yao.qi@linaro.org>
4648 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4649 struct user_fpsimd_state *.
4650 (aarch64_store_fpregset): Likewise.
4652 2015-11-19 Yao Qi <yao.qi@linaro.org>
4654 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4655 struct user_pt_regs *.
4656 (aarch64_store_gregset): Likewise.
4658 2015-11-18 Pedro Alves <palves@redhat.com>
4660 * Makefile.in (all_object_files): Add $IPA_OBJS.
4662 2015-11-17 Pedro Alves <palves@redhat.com>
4664 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4665 GDB_SIGNAL_0 and gdb_signal_to_string.
4667 2015-11-17 Pedro Alves <palves@redhat.com>
4669 * win32-low.c (handle_output_debug_string): Remove parameter.
4670 (win32_kill): Remove our_status local and adjust call to
4671 handle_output_debug_string.
4672 (get_child_debug_event): Adjust call to
4673 handle_output_debug_string.
4675 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4677 * linux-mips-low.c (mips_fill_gregset): Add cast.
4678 (mips_store_gregset): Likewise.
4679 (mips_fill_fpregset): Likewise.
4680 (mips_store_fpregset): Likewise.
4682 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4684 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4687 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4689 * linux-mips-low.c (mips_linux_new_thread): Change type of
4690 watch_type to enum target_hw_bp_type.
4692 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4694 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4695 Change return type to arm_hwbp_type.
4697 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4699 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4700 (arm_store_gregset): Likewise.
4701 * linux-arm-low.c (arm_get_hwcap): Likewise.
4702 (arm_read_description): Likewise.
4704 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4706 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4708 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4710 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4711 (ppc_fill_vsxregset): Likewise.
4712 (ppc_store_vsxregset): Likewise.
4713 (ppc_fill_vrregset): Likewise.
4714 (ppc_store_vrregset): Likewise.
4715 (ppc_fill_evrregset): Likewise.
4716 (ppc_store_evrregset): Likewise.
4718 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4720 * linux-ppc-low.c (ppc_usrregs_info): Remove
4721 forward-declaration.
4722 (ppc_arch_setup): Move lower in file.
4724 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4726 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4727 (ps_pdwrite): Likewise.
4729 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4731 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4732 to after assert checks.
4734 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4736 * proc-service.c (ps_pdread): Add/adjust casts.
4737 (ps_pdwrite): Add/adjust casts.
4739 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4741 * server.c (handle_search_memory_1): Cast return value of
4744 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4746 * server.c (write_qxfer_response): Change type of data to
4749 2015-10-29 Pedro Alves <palves@redhat.com>
4751 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4753 2015-10-29 Pedro Alves <palves@redhat.com>
4755 * tracepoint.c (clear_installed_tracepoints): Add casts.
4757 2015-10-29 Pedro Alves <palves@redhat.com>
4759 * server.c (handle_v_cont, process_serial_event): Add enum
4760 gdb_signal casts to signal parsing code.
4762 2015-10-29 Pedro Alves <palves@redhat.com>
4764 * linux-low.h (NULL_REGSET): Define.
4765 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4766 * linux-arm-low.c (arm_regsets): Likewise.
4767 * linux-crisv32-low.c (cris_regsets): Likewise.
4768 * linux-m68k-low.c (m68k_regsets): Likewise.
4769 * linux-mips-low.c (mips_regsets): Likewise.
4770 * linux-nios2-low.c (nios2_regsets): Likewise.
4771 * linux-ppc-low.c (ppc_regsets): Likewise.
4772 * linux-s390-low.c (s390_regsets): Likewise.
4773 * linux-sh-low.c (sh_regsets): Likewise.
4774 * linux-sparc-low.c (sparc_regsets): Likewise.
4775 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4776 * linux-tile-low.c (tile_regsets): Likewise.
4777 * linux-x86-low.c (x86_regsets): Likewise.
4778 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4780 2015-10-29 Pedro Alves <palves@redhat.com>
4782 * linux-low.h (NULL_REGSET): Define.
4783 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4784 * linux-arm-low.c (arm_regsets): Likewise.
4785 * linux-crisv32-low.c (cris_regsets): Likewise.
4786 * linux-m68k-low.c (m68k_regsets): Likewise.
4787 * linux-mips-low.c (mips_regsets): Likewise.
4788 * linux-nios2-low.c (nios2_regsets): Likewise.
4789 * linux-ppc-low.c (ppc_regsets): Likewise.
4790 * linux-s390-low.c (s390_regsets): Likewise.
4791 * linux-sh-low.c (sh_regsets): Likewise.
4792 * linux-sparc-low.c (sparc_regsets): Likewise.
4793 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4794 * linux-tile-low.c (tile_regsets): Likewise.
4795 * linux-x86-low.c (x86_regsets): Likewise.
4796 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4798 2015-10-26 Doug Evans <dje@google.com>
4800 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4802 2015-10-26 Doug Evans <dje@google.com>
4804 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4806 2015-10-26 Doug Evans <dje@google.com>
4808 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4810 (attach_thread, find_new_threads_callback): Ditto.
4812 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4814 * mem-break.h (set_breakpoint_data): Remove.
4816 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4818 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4819 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4820 (initialize_low): Remove set_breakpoint_data call.
4821 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4822 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4823 (initialize_low): Remove set_breakpoint_data call.
4824 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4825 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4826 (initialize_low): Remove set_breakpoint_data call.
4828 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4830 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4831 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4832 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4833 * target.h (target_breakpoint_kind_from_pc): New macro.
4835 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4838 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4839 the default breakpoint kind.
4841 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4843 * linux-arm-low.c (arm_supports_z_point_type): Add software
4846 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848 * linux-arm-low.c: Refactor breakpoint definitions.
4849 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4850 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4852 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4854 * Makefile.in: Add arm.c/o.
4855 * configure.srv: Likewise.
4856 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4857 (arm_breakpoint_kind_from_pc): New function.
4858 (arm_sw_breakpoint_from_kind): Return proper kind.
4859 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4861 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4863 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4865 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4866 (struct raw_breakpoint) <size>: Remove.
4867 (struct raw_breakpoint) <kind>: Add.
4868 (bp_size): New function.
4869 (bp_opcode): Likewise.
4870 (find_raw_breakpoint_at): Adjust for kind.
4871 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4872 (remove_memory_breakpoint): Adjust for kind call bp_size.
4873 (set_raw_breakpoint_at): Adjust for kind.
4874 (set_breakpoint): Likewise.
4875 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4876 (delete_raw_breakpoint): Adjust for kind.
4877 (delete_breakpoint): Likewise.
4878 (find_gdb_breakpoint): Likewise.
4879 (set_gdb_breakpoint_1): Likewise.
4880 (set_gdb_breakpoint): Likewise.
4881 (delete_gdb_breakpoint_1): Likewise.
4882 (delete_gdb_breakpoint): Likewise.
4883 (uninsert_raw_breakpoint): Likewise.
4884 (reinsert_raw_breakpoint): Likewise.
4885 (set_breakpoint_data): Remove.
4886 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4887 (check_mem_read): Adjust for kind call bp_size.
4888 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4889 (clone_one_breakpoint): Adjust for kind.
4890 * mem-break.h (set_gdb_breakpoint): Likewise.
4891 (delete_gdb_breakpoint): Likewise.
4892 * server.c (process_serial_event): Likewise.
4894 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4896 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4897 (struct linux_target_ops) <breakpoint>: Remove.
4898 (struct linux_target_ops) <breakpoint_len>: Remove.
4899 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4900 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4901 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4902 (arm_sw_breakpoint_from_kind): New function.
4903 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4904 (struct linux_target_ops) <breakpoint>: Remove.
4905 (struct linux_target_ops) <breakpoint_len>: Remove.
4906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4908 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4909 (struct linux_target_ops) <breakpoint>: Remove.
4910 (struct linux_target_ops) <breakpoint_len>: Remove.
4911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4913 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4914 (struct linux_target_ops) <breakpoint>: Remove.
4915 (struct linux_target_ops) <breakpoint_len>: Remove.
4916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4918 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4919 and sw_breakpoint_from_kind to increment the pc.
4920 (linux_breakpoint_kind_from_pc): New function.
4921 (linux_sw_breakpoint_from_kind): New function.
4922 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4923 (initialize_low): Call breakpoint_kind_from_pc and
4924 sw_breakpoint_from_kind to replace breakpoint_data/len.
4925 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4928 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4929 (struct linux_target_ops) <breakpoint>: Remove.
4930 (struct linux_target_ops) <breakpoint_len>: Remove.
4931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4933 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4934 (struct linux_target_ops) <breakpoint>: Remove.
4935 (struct linux_target_ops) <breakpoint_len>: Remove.
4936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4938 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4939 (struct linux_target_ops) <breakpoint>: Remove.
4940 (struct linux_target_ops) <breakpoint_len>: Remove.
4941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4943 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4944 (struct linux_target_ops) <breakpoint>: Remove.
4945 (struct linux_target_ops) <breakpoint_len>: Remove.
4946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4948 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4949 (struct linux_target_ops) <breakpoint>: Remove.
4950 (struct linux_target_ops) <breakpoint_len>: Remove.
4951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4953 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4954 (struct linux_target_ops) <breakpoint>: Remove.
4955 (struct linux_target_ops) <breakpoint_len>: Remove.
4956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4958 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4959 (struct linux_target_ops) <breakpoint>: Remove.
4960 (struct linux_target_ops) <breakpoint_len>: Remove.
4961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4963 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4964 (struct linux_target_ops) <breakpoint>: Remove.
4965 (struct linux_target_ops) <breakpoint_len>: Remove.
4966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4968 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4969 (struct linux_target_ops) <breakpoint>: Remove.
4970 (struct linux_target_ops) <breakpoint_len>: Remove.
4971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4973 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4974 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4975 (struct linux_target_ops) <breakpoint>: Remove.
4976 (struct linux_target_ops) <breakpoint_len>: Remove.
4977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4979 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4980 (struct linux_target_ops) <breakpoint>: Remove.
4981 (struct linux_target_ops) <breakpoint_len>: Remove.
4982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4985 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4987 * linux-cris-low.c (cris_get_pc): Remove void arg.
4989 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4991 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4994 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4996 * inferiors.c (thread_pid_matches_callback): New function.
4997 (find_thread_process): New function.
4998 (remove_thread): Reset current_thread.
4999 (remove_process): Assert threads have been removed first.
5001 2015-10-15 Yao Qi <yao.qi@linaro.org>
5003 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5005 (aarch64_remove_point): Likewise.
5006 * regcache.c (regcache_register_size): New function.
5008 2015-10-12 Yao Qi <yao.qi@linaro.org>
5010 * linux-aarch64-low.c: Update all callers as emit_load_store
5011 is renamed to aarch64_emit_load_store.
5013 2015-10-12 Yao Qi <yao.qi@linaro.org>
5015 * linux-aarch64-low.c: Update all callers of function renaming
5016 from emit_insn to aarch64_emit_insn.
5018 2015-10-12 Yao Qi <yao.qi@linaro.org>
5020 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5021 arch/aarch64-insn.h.
5022 (struct aarch64_memory_operand): Likewise.
5024 (emit_insn): Move to arch/aarch64-insn.c.
5025 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5026 (emit_load_store): Move to arch/aarch64-insn.c.
5027 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5028 (can_encode_int32): Remove.
5030 2015-10-12 Yao Qi <yao.qi@linaro.org>
5032 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5033 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5034 (aarch64_relocate_instruction): Likewise.
5035 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5036 (struct aarch64_insn_visitor): Likewise.
5038 2015-10-12 Yao Qi <yao.qi@linaro.org>
5040 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5041 (struct aarch64_insn_visitor): New.
5042 (struct aarch64_insn_relocation_data): New.
5043 (aarch64_ftrace_insn_reloc_b): New function.
5044 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5045 (aarch64_ftrace_insn_reloc_cb): Likewise.
5046 (aarch64_ftrace_insn_reloc_tb): Likewise.
5047 (aarch64_ftrace_insn_reloc_adr): Likewise.
5048 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5049 (aarch64_ftrace_insn_reloc_others): Likewise.
5051 (aarch64_relocate_instruction): Use visitor.
5053 2015-10-12 Yao Qi <yao.qi@linaro.org>
5055 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5056 int. Add argument buf.
5057 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5058 aarch64_relocate_instruction.
5060 2015-10-12 Yao Qi <yao.qi@linaro.org>
5062 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5063 argument insn. Remove local variable insn. Don't call
5065 (aarch64_install_fast_tracepoint_jump_pad): Call
5068 2015-09-30 Yao Qi <yao.qi@linaro.org>
5070 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5071 (emit_load_store_pair): Likewise.
5073 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5075 * dll.c (match_dll): Add cast(s).
5076 (unloaded_dll): Likewise.
5077 * linux-low.c (second_thread_of_pid_p): Likewise.
5078 (delete_lwp_callback): Likewise.
5079 (count_events_callback): Likewise.
5080 (select_event_lwp_callback): Likewise.
5081 (linux_set_resume_request): Likewise.
5082 * server.c (accumulate_file_name_length): Likewise.
5083 (emit_dll_description): Likewise.
5084 (handle_qxfer_threads_worker): Likewise.
5085 (visit_actioned_threads): Likewise.
5086 * thread-db.c (any_thread_of): Likewise.
5087 * tracepoint.c (same_process_p): Likewise.
5088 (match_blocktype): Likewise.
5089 (build_traceframe_info_xml): Likewise.
5091 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5093 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5095 (gdb_unparse_agent_expr): Likewise.
5096 * hostio.c (require_data): Likewise.
5097 (handle_pread): Likewise.
5098 * linux-low.c (disable_regset): Likewise.
5099 (fetch_register): Likewise.
5100 (store_register): Likewise.
5101 (get_dynamic): Likewise.
5102 (linux_qxfer_libraries_svr4): Likewise.
5103 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5104 (set_fast_tracepoint_jump): Likewise.
5105 (uninsert_fast_tracepoint_jumps_at): Likewise.
5106 (reinsert_fast_tracepoint_jumps_at): Likewise.
5107 (validate_inserted_breakpoint): Likewise.
5108 (clone_agent_expr): Likewise.
5109 * regcache.c (init_register_cache): Likewise.
5110 * remote-utils.c (putpkt_binary_1): Likewise.
5111 (decode_M_packet): Likewise.
5112 (decode_X_packet): Likewise.
5113 (look_up_one_symbol): Likewise.
5114 (relocate_instruction): Likewise.
5115 (monitor_output): Likewise.
5116 * server.c (handle_search_memory): Likewise.
5117 (handle_qxfer_exec_file): Likewise.
5118 (handle_qxfer_libraries): Likewise.
5119 (handle_qxfer): Likewise.
5120 (handle_query): Likewise.
5121 (handle_v_cont): Likewise.
5122 (handle_v_run): Likewise.
5123 (captured_main): Likewise.
5124 * target.c (write_inferior_memory): Likewise.
5125 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5126 * tracepoint.c (init_trace_buffer): Likewise.
5127 (add_tracepoint_action): Likewise.
5128 (add_traceframe): Likewise.
5129 (add_traceframe_block): Likewise.
5130 (cmd_qtdpsrc): Likewise.
5131 (cmd_qtdv): Likewise.
5132 (cmd_qtstatus): Likewise.
5133 (response_source): Likewise.
5134 (response_tsv): Likewise.
5135 (cmd_qtnotes): Likewise.
5136 (gdb_collect): Likewise.
5137 (initialize_tracepoint): Likewise.
5139 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5141 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5142 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5143 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5145 (enum aarch64_condition_codes): New enum.
5146 (w0): New static global.
5149 (struct aarch64_memory_operand) <type>: New
5150 MEMORY_OPERAND_POSTINDEX type.
5151 (postindex_memory_operand): New helper function.
5152 (emit_ret): New function.
5153 (emit_load_store_pair): New function, factored out of emit_stp
5154 with support for MEMORY_OPERAND_POSTINDEX.
5155 (emit_stp): Rewrite using emit_load_store_pair.
5156 (emit_ldp): New function.
5157 (emit_load_store): Likewise.
5158 (emit_ldr): Mention post-index instruction in comment.
5159 (emit_ldrh): New function.
5160 (emit_ldrb): New function.
5161 (emit_ldrsw): Mention post-index instruction in comment.
5162 (emit_str): Likewise.
5163 (emit_subs): New function.
5164 (emit_cmp): Likewise.
5165 (emit_and): Likewise.
5166 (emit_orr): Likewise.
5167 (emit_orn): Likewise.
5168 (emit_eor): Likewise.
5169 (emit_mvn): Likewise.
5170 (emit_lslv): Likewise.
5171 (emit_lsrv): Likewise.
5172 (emit_asrv): Likewise.
5173 (emit_mul): Likewise.
5174 (emit_sbfm): Likewise.
5175 (emit_sbfx): Likewise.
5176 (emit_ubfm): Likewise.
5177 (emit_ubfx): Likewise.
5178 (emit_csinc): Likewise.
5179 (emit_cset): Likewise.
5180 (emit_nop): Likewise.
5181 (emit_ops_insns): New helper function.
5182 (emit_pop): Likewise.
5183 (emit_push): Likewise.
5184 (aarch64_emit_prologue): New function.
5185 (aarch64_emit_epilogue): Likewise.
5186 (aarch64_emit_add): Likewise.
5187 (aarch64_emit_sub): Likewise.
5188 (aarch64_emit_mul): Likewise.
5189 (aarch64_emit_lsh): Likewise.
5190 (aarch64_emit_rsh_signed): Likewise.
5191 (aarch64_emit_rsh_unsigned): Likewise.
5192 (aarch64_emit_ext): Likewise.
5193 (aarch64_emit_log_not): Likewise.
5194 (aarch64_emit_bit_and): Likewise.
5195 (aarch64_emit_bit_or): Likewise.
5196 (aarch64_emit_bit_xor): Likewise.
5197 (aarch64_emit_bit_not): Likewise.
5198 (aarch64_emit_equal): Likewise.
5199 (aarch64_emit_less_signed): Likewise.
5200 (aarch64_emit_less_unsigned): Likewise.
5201 (aarch64_emit_ref): Likewise.
5202 (aarch64_emit_if_goto): Likewise.
5203 (aarch64_emit_goto): Likewise.
5204 (aarch64_write_goto_address): Likewise.
5205 (aarch64_emit_const): Likewise.
5206 (aarch64_emit_call): Likewise.
5207 (aarch64_emit_reg): Likewise.
5208 (aarch64_emit_pop): Likewise.
5209 (aarch64_emit_stack_flush): Likewise.
5210 (aarch64_emit_zero_ext): Likewise.
5211 (aarch64_emit_swap): Likewise.
5212 (aarch64_emit_stack_adjust): Likewise.
5213 (aarch64_emit_int_call_1): Likewise.
5214 (aarch64_emit_void_call_2): Likewise.
5215 (aarch64_emit_eq_goto): Likewise.
5216 (aarch64_emit_ne_goto): Likewise.
5217 (aarch64_emit_lt_goto): Likewise.
5218 (aarch64_emit_le_goto): Likewise.
5219 (aarch64_emit_gt_goto): Likewise.
5220 (aarch64_emit_ge_got): Likewise.
5221 (aarch64_emit_ops_impl): New static global variable.
5222 (aarch64_emit_ops): New target function, return
5223 &aarch64_emit_ops_impl.
5224 (struct linux_target_ops): Install it.
5226 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5228 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5229 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5231 * linux-aarch64-ipa.c: New file.
5232 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5234 (aarch64_get_thread_area): New target method.
5235 (extract_signed_bitfield): New helper function.
5236 (aarch64_decode_ldr_literal): New function.
5237 (enum aarch64_opcodes): New enum.
5238 (struct aarch64_register): New struct.
5239 (struct aarch64_operand): New struct.
5240 (x0): New static global.
5249 (aarch64_register): New helper function.
5250 (register_operand): Likewise.
5251 (immediate_operand): Likewise.
5252 (struct aarch64_memory_operand): New struct.
5253 (offset_memory_operand): New helper function.
5254 (preindex_memory_operand): Likewise.
5255 (enum aarch64_system_control_registers): New enum.
5256 (ENCODE): New macro.
5257 (emit_insn): New helper function.
5258 (emit_b): New function.
5259 (emit_bcond): Likewise.
5260 (emit_cb): Likewise.
5261 (emit_tb): Likewise.
5262 (emit_blr): Likewise.
5263 (emit_stp): Likewise.
5264 (emit_ldp_q_offset): Likewise.
5265 (emit_stp_q_offset): Likewise.
5266 (emit_load_store): Likewise.
5267 (emit_ldr): Likewise.
5268 (emit_ldrsw): Likewise.
5269 (emit_str): Likewise.
5270 (emit_ldaxr): Likewise.
5271 (emit_stxr): Likewise.
5272 (emit_stlr): Likewise.
5273 (emit_data_processing_reg): Likewise.
5274 (emit_data_processing): Likewise.
5275 (emit_add): Likewise.
5276 (emit_sub): Likewise.
5277 (emit_mov): Likewise.
5278 (emit_movk): Likewise.
5279 (emit_mov_addr): Likewise.
5280 (emit_mrs): Likewise.
5281 (emit_msr): Likewise.
5282 (emit_sevl): Likewise.
5283 (emit_wfe): Likewise.
5284 (append_insns): Likewise.
5285 (can_encode_int32_in): New helper function.
5286 (aarch64_relocate_instruction): New function.
5287 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5288 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5289 (struct linux_target_ops): Install aarch64_get_thread_area,
5290 aarch64_install_fast_tracepoint_jump_pad and
5291 aarch64_get_min_fast_tracepoint_insn_len.
5293 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5295 * Makefile.in (aarch64-insn.o): New rule.
5296 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5298 2015-09-21 Yao Qi <yao.qi@linaro.org>
5300 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5302 2015-09-21 Yao Qi <yao.qi@linaro.org>
5304 * tracepoint.c (max_jump_pad_size): Remove.
5306 2015-09-18 Yao Qi <yao.qi@linaro.org>
5308 * linux-aarch64-low.c: Don't include sys/uio.h.
5309 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5311 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5313 * tracepoint.c (eval_result_type): Change prototype.
5314 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5316 2015-09-15 Pedro Alves <palves@redhat.com>
5318 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5319 Check whether to report exec events instead of checking whether
5320 multiprocess is enabled.
5322 2015-09-15 Pedro Alves <palves@redhat.com>
5325 * remote-utils.c (prepare_resume_reply): Merge
5326 TARGET_WAITKIND_VFORK_DONE switch case with the
5327 TARGET_WAITKIND_FORKED case.
5329 2015-09-15 Yao Qi <yao.qi@linaro.org>
5331 * server.c (handle_query): Check string comparison using
5332 "else if" instead of "if".
5334 2015-09-15 Yao Qi <yao.qi@linaro.org>
5336 * server.c (vCont_supported): New global variable.
5337 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5338 matches. Append ";vContSupported+" to own_buf.
5339 (handle_v_requests): Append ";s;S" to own_buf if target supports
5340 hardware single step or vCont_supported is false.
5341 (capture_main): Set vCont_supported to zero.
5343 2015-09-15 Yao Qi <yao.qi@linaro.org>
5345 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5347 (linux_supports_hardware_single_step): ... New function.
5348 (linux_target_ops): Update.
5349 * lynx-low.c (lynx_target_ops): Set field
5350 supports_hardware_single_step to target_can_do_hardware_single_step.
5351 * nto-low.c (nto_target_ops): Likewise.
5352 * spu-low.c (spu_target_ops): Likewise.
5353 * win32-low.c (win32_target_ops): Likewise.
5354 * target.c (target_can_do_hardware_single_step): New function.
5355 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5356 Remove. <supports_hardware_single_step>: New field.
5357 (target_supports_conditional_breakpoints): Remove.
5358 (target_supports_hardware_single_step): New macro.
5359 (target_can_do_hardware_single_step): Declare.
5360 * server.c (handle_query): Use target_supports_hardware_single_step
5361 instead of target_supports_conditional_breakpoints.
5363 2015-09-15 Yao Qi <yao.qi@linaro.org>
5365 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5367 (struct linux_target_ops the_low_target): Install
5368 aarch64_linux_siginfo_fixup.
5370 2015-09-11 Don Breazeal <donb@codesourcery.com>
5371 Luis Machado <lgustavo@codesourcery.com>
5373 * linux-low.c (linux_mourn): Static declaration.
5374 (linux_arch_setup): Move in front of
5375 handle_extended_wait.
5376 (linux_arch_setup_thread): New function.
5377 (handle_extended_wait): Handle exec events. Call
5378 linux_arch_setup_thread. Make event_lwp argument a
5379 pointer-to-a-pointer.
5380 (check_zombie_leaders): Do not check stopped threads.
5381 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5382 (linux_low_filter_event): Add lwp and thread for exec'ing
5383 non-leader thread if leader thread has been deleted.
5384 Refactor code into linux_arch_setup_thread and call it.
5385 Pass child lwp pointer by reference to handle_extended_wait.
5386 (linux_wait_for_event_filtered): Update comment.
5387 (linux_wait_1): Prevent clobbering exec event status.
5388 (linux_supports_exec_events): New function.
5389 (linux_target_ops) <supports_exec_events>: Initialize new member.
5390 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5392 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5393 * server.c (report_exec_events): New global variable.
5394 (handle_query): Handle qSupported query for exec-events feature.
5395 (captured_main): Initialize report_exec_events.
5396 * server.h (report_exec_events): Declare new global variable.
5397 * target.h (struct target_ops) <supports_exec_events>: New
5399 (target_supports_exec_events): New macro.
5400 * win32-low.c (win32_target_ops) <supports_exec_events>:
5401 Initialize new member.
5403 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5405 * linux-low.c (linux_low_enable_btrace): Remove.
5406 (linux_target_ops): Replace linux_low_enable_btrace with
5407 linux_enable_btrace.
5409 2015-09-03 Yao Qi <yao.qi@linaro.org>
5411 * linux-aarch64-low.c (aarch64_insert_point): Call
5412 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5415 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5417 * linux-low.c (check_stopped_by_breakpoint): Use
5418 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5420 2015-08-27 Pedro Alves <palves@redhat.com>
5422 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5424 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5426 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5427 the XNEW-family equivalent.
5428 (compile_bytecodes): Likewise.
5429 * dll.c (loaded_dll): Likewise.
5430 * event-loop.c (append_callback_event): Likewise.
5431 (create_file_handler): Likewise.
5432 (create_file_event): Likewise.
5433 * hostio.c (handle_open): Likewise.
5434 * inferiors.c (add_thread): Likewise.
5435 (add_process): Likewise.
5436 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5437 * linux-arm-low.c (arm_new_process): Likewise.
5438 (arm_new_thread): Likewise.
5439 * linux-low.c (add_to_pid_list): Likewise.
5440 (linux_add_process): Likewise.
5441 (handle_extended_wait): Likewise.
5442 (add_lwp): Likewise.
5443 (enqueue_one_deferred_signal): Likewise.
5444 (enqueue_pending_signal): Likewise.
5445 (linux_resume_one_lwp_throw): Likewise.
5446 (linux_resume_one_thread): Likewise.
5447 (linux_read_memory): Likewise.
5448 (linux_write_memory): Likewise.
5449 * linux-mips-low.c (mips_linux_new_process): Likewise.
5450 (mips_linux_new_thread): Likewise.
5451 (mips_add_watchpoint): Likewise.
5452 * linux-x86-low.c (initialize_low_arch): Likewise.
5453 * lynx-low.c (lynx_add_process): Likewise.
5454 * mem-break.c (set_raw_breakpoint_at): Likewise.
5455 (set_breakpoint): Likewise.
5456 (add_condition_to_breakpoint): Likewise.
5457 (add_commands_to_breakpoint): Likewise.
5458 (clone_agent_expr): Likewise.
5459 (clone_one_breakpoint): Likewise.
5460 * regcache.c (new_register_cache): Likewise.
5461 * remote-utils.c (look_up_one_symbol): Likewise.
5462 * server.c (queue_stop_reply): Likewise.
5463 (start_inferior): Likewise.
5464 (queue_stop_reply_callback): Likewise.
5465 (handle_target_event): Likewise.
5466 * spu-low.c (fetch_ppc_memory): Likewise.
5467 (store_ppc_memory): Likewise.
5468 * target.c (set_target_ops): Likewise.
5469 * thread-db.c (thread_db_load_search): Likewise.
5470 (try_thread_db_load_1): Likewise.
5471 * tracepoint.c (add_tracepoint): Likewise.
5472 (add_tracepoint_action): Likewise.
5473 (create_trace_state_variable): Likewise.
5474 (cmd_qtdpsrc): Likewise.
5475 (cmd_qtro): Likewise.
5476 (add_while_stepping_state): Likewise.
5477 * win32-low.c (child_add_thread): Likewise.
5478 (get_image_name): Likewise.
5480 2015-08-25 Yao Qi <yao.qi@linaro.org>
5482 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5484 2015-08-25 Yao Qi <yao.qi@linaro.org>
5486 * Makefile.in (aarch64-linux.o): New rule.
5487 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5489 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5490 (aarch64_init_debug_reg_state): Make it extern.
5491 (aarch64_linux_prepare_to_resume): Remove.
5493 2015-08-25 Yao Qi <yao.qi@linaro.org>
5495 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5496 lwp_arch_private_info and ptid_of_lwp.
5498 2015-08-25 Yao Qi <yao.qi@linaro.org>
5500 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5501 Find proc_info by find_process_pid. All callers updated.
5503 2015-08-25 Yao Qi <yao.qi@linaro.org>
5505 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5507 (debug_reg_change_callback): Remove.
5508 (aarch64_notify_debug_reg_change): Remove.
5510 2015-08-25 Yao Qi <yao.qi@linaro.org>
5512 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5513 Call current_lwp_ptid.
5515 2015-08-25 Yao Qi <yao.qi@linaro.org>
5517 * linux-aarch64-low.c (debug_reg_change_callback): Use
5520 2015-08-25 Yao Qi <yao.qi@linaro.org>
5522 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5524 2015-08-25 Yao Qi <yao.qi@linaro.org>
5526 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5528 2015-08-25 Yao Qi <yao.qi@linaro.org>
5530 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5533 2015-08-25 Yao Qi <yao.qi@linaro.org>
5535 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5537 (debug_reg_change_callback): Remove argument entry and add argument
5538 lwp. Remove local variable thread. Don't print thread id in the
5539 debugging output. Don't check whether pid of thread equals to pid.
5540 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5541 iterate_over_lwps instead find_inferior.
5543 2015-08-24 Pedro Alves <palves@redhat.com>
5545 * inferiors.c (get_first_process): New function.
5546 * inferiors.h (get_first_process): New declaration.
5547 * remote-utils.c (read_ptid): Default to the first process in the
5548 list, instead of to the current thread's process.
5550 2015-08-24 Pedro Alves <palves@redhat.com>
5552 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5553 * event-loop.c: Likewise.
5554 * remote-utils.c: Likewise.
5555 * tracepoint.c: Likewise.
5557 2015-08-24 Pedro Alves <palves@redhat.com>
5559 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5562 2015-08-21 Pedro Alves <palves@redhat.com>
5564 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5565 instead of literal 1.
5567 2015-08-21 Pedro Alves <palves@redhat.com>
5569 * tdesc.c (default_description): Explicitly zero-initialize.
5571 2015-08-21 Pedro Alves <palves@redhat.com>
5574 * inferiors.c (remove_thread): Discard any pending stop reply for
5576 * server.c (remove_all_on_match_pid): Rename to ...
5577 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5579 (discard_queued_stop_replies): Change parameter to a ptid. Now
5581 (handle_v_kill, kill_inferior_callback, captured_main)
5582 (process_serial_event): Adjust.
5583 * server.h (discard_queued_stop_replies): Declare.
5585 2015-08-21 Pedro Alves <palves@redhat.com>
5587 * linux-low.c (wait_for_sigstop): Always switch to no thread
5588 selected if the previously current thread dies.
5589 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5590 process instead of the current thread's.
5591 * remote-utils.c (input_interrupt): Don't check if there's no
5593 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5594 current thread to the general thread fails, error out.
5595 (handle_qxfer_auxv, handle_qxfer_libraries)
5596 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5597 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5598 (handle_query): Check if there's a thread selected instead of
5599 checking whether there's any thread in the thread list.
5600 (handle_qxfer_threads, handle_qxfer_btrace)
5601 (handle_qxfer_btrace_conf): Don't error out early if there's no
5602 thread in the thread list.
5603 (handle_v_cont, myresume): Don't set the current thread to the
5605 (process_serial_event) <Hg handling>: Also set thread_id if the
5606 previous general thread is still alive.
5607 (process_serial_event) <g/G handling>: If setting the current
5608 thread to the general thread fails, error out.
5609 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5610 thread's lwp instead of the current thread's.
5611 * target.c (set_desired_thread): If the desired thread was not
5612 found, leave the current thread pointing to NULL. Return an int
5613 (boolean) indicating success.
5614 * target.h (set_desired_thread): Change return type to int.
5616 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5618 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5619 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5621 (ps_get_thread_area): New function.
5623 2015-08-19 Gary Benson <gbenson@redhat.com>
5625 * hostio.c (handle_pread): Do not attempt to read more data
5626 than hostio_reply_with_data can fit in a packet.
5628 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5630 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5632 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5634 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5636 2015-08-06 Pedro Alves <palves@redhat.com>
5638 * tracepoint.c (expr_eval_result): Now an int.
5640 2015-08-06 Pedro Alves <palves@redhat.com>
5642 * gdbthread.h (struct regcache): Forward declare.
5643 (struct thread_info) <regcache_data>: Now a struct regcache
5645 * inferiors.c (inferior_regcache_data)
5646 (set_inferior_regcache_data): Now work with struct regcache
5648 * inferiors.h (struct regcache): Forward declare.
5649 (inferior_regcache_data, set_inferior_regcache_data): Now work
5650 with struct regcache pointers.
5651 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5652 (free_register_cache_thread): Remove struct regcache pointer
5655 2015-08-06 Pedro Alves <palves@redhat.com>
5657 * server.c (captured_main): On error, print the exception message
5658 to stderr, and if run_once is set, throw a quit.
5660 2015-08-06 Pedro Alves <palves@redhat.com>
5662 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5665 2015-08-06 Pedro Alves <palves@redhat.com>
5667 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5668 reading beyond the passed in buffer length.
5670 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5672 * tracepoint.c (symbol_list) <required>: Remove.
5674 2015-08-06 Pedro Alves <palves@redhat.com>
5676 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5677 count if stopping and suspending threads.
5678 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5679 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5680 (linux_detach): Complete an ongoing step-over.
5681 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5683 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5684 (linux_wait_1): If passing a signal to the inferior after
5685 finishing a step-over, unsuspend and re-resume all lwps. If we
5686 see a single-step event but the thread should be continuing, don't
5687 pass the trap to gdb.
5688 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5689 internal_error instead of gdb_assert.
5690 (enqueue_pending_signal): New function.
5691 (check_ptrace_stopped_lwp_gone): Add debug output.
5692 (start_step_over): Use internal_error instead of gdb_assert.
5693 (complete_ongoing_step_over): New function.
5694 (linux_resume_one_thread): Don't resume a suspended thread.
5695 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5698 2015-08-06 Pedro Alves <palves@redhat.com>
5700 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5701 (linux_thread_alive): Use lwp_is_marked_dead.
5702 (extended_event_reported): Delete.
5703 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5704 instead of extended_event_reported.
5705 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5707 (lwp_is_marked_dead): New function.
5708 (lwp_running): Use lwp_is_marked_dead.
5709 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5712 2015-08-06 Pedro Alves <palves@redhat.com>
5714 * linux-low.c (linux_wait_1): Move fork event output out of the
5715 !report_to_gdb check. Pass event_child->waitstatus to
5716 target_waitstatus_to_string instead of ourstatus.
5718 2015-08-04 Yao Qi <yao.qi@linaro.org>
5720 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5721 if current_thread is 32 bit.
5723 2015-08-04 Yao Qi <yao.qi@linaro.org>
5725 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5726 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5727 * server.c (extended_protocol): Remove "static".
5728 * server.h (extended_protocol): Declare it.
5730 2015-08-04 Yao Qi <yao.qi@linaro.org>
5732 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5733 both aarch64 and aarch32.
5734 (aarch64_set_pc): Likewise.
5736 2015-08-04 Yao Qi <yao.qi@linaro.org>
5738 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5739 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5740 arm-with-neon.xml to srv_xmlfiles.
5741 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5742 (is_64bit_tdesc): New function.
5743 (aarch64_linux_read_description): New function.
5744 (aarch64_arch_setup): Call aarch64_linux_read_description.
5745 (regs_info): Rename to regs_info_aarch64.
5746 (aarch64_regs_info): Return right regs_info.
5747 (initialize_low_arch): Call initialize_low_arch_aarch32.
5749 2015-08-04 Yao Qi <yao.qi@linaro.org>
5751 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5752 * linux-aarch32-low.c: New file.
5753 * linux-aarch32-low.h: New file.
5754 * linux-arm-low.c (arm_fill_gregset): Move it to
5755 linux-aarch32-low.c.
5756 (arm_store_gregset): Likewise.
5757 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5758 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5759 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5760 (regs_info): Rename to regs_info_arm.
5761 (arm_regs_info): Return regs_info_aarch32 if
5762 have_ptrace_getregset is 1 and target description is
5763 arm_with_neon or arm_with_vfpv3.
5764 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5765 Call initialize_low_arch_aarch32 instead.
5767 2015-08-04 Yao Qi <yao.qi@linaro.org>
5769 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5770 * linux-low.c: ... here.
5771 * linux-low.h (have_ptrace_getregset): Declare it.
5773 2015-08-04 Pedro Alves <palves@redhat.com>
5775 * thread-db.c (struct thread_db): Use new typedefs.
5776 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5778 (disable_thread_event_reporting): Cast result of dlsym to
5779 destination function pointer type.
5780 (thread_db_mourn): Use td_ta_delete_ftype.
5782 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5784 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5786 (CDX_BREAKPOINT): Define for R2.
5787 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5788 (the_low_target): Add comments.
5790 2015-07-30 Yao Qi <yao.qi@linaro.org>
5792 * linux-arm-low.c (arm_hwcap): Remove it.
5793 (arm_read_description): New local variable arm_hwcap. Don't
5794 set arm_hwcap to zero.
5796 2015-07-30 Yao Qi <yao.qi@linaro.org>
5798 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5799 Use regcache->tdesc instead.
5800 (arm_store_wmmxregset): Likewise.
5801 (arm_fill_vfpregset): Likewise.
5802 (arm_store_vfpregset): Likewise.
5804 2015-07-30 Yao Qi <yao.qi@linaro.org>
5806 * linux-arm-low.c: Include arch/arm.h.
5807 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5808 (arm_store_gregset): Likewise.
5810 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5812 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5813 ptrace's 4th parameter.
5815 2015-07-27 Yao Qi <yao.qi@linaro.org>
5817 * configure.srv (case aarch64*-*-linux*): Don't set
5820 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5822 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5824 * linux-arm-low.c: Likewise.
5825 * linux-cris-low.c: Likewise.
5826 * linux-crisv32-low.c: Likewise.
5827 * linux-low.c: Likewise.
5828 * linux-m68k-low.c: Likewise.
5829 * linux-mips-low.c: Likewise.
5830 * linux-nios2-low.c: Likewise.
5831 * linux-s390-low.c: Likewise.
5832 * linux-sparc-low.c: Likewise.
5833 * linux-tic6x-low.c: Likewise.
5834 * linux-tile-low.c: Likewise.
5835 * linux-x86-low.c: Likewise.
5837 2015-07-24 Pedro Alves <palves@redhat.com>
5839 * config.in: Regenerate.
5840 * configure: Regenerate.
5842 2015-07-24 Pedro Alves <palves@redhat.com>
5844 * acinclude.m4: Include ../ptrace.m4.
5845 * configure.ac: Call GDB_AC_PTRACE.
5846 * config.in, configure: Regenerate.
5848 2015-07-24 Yao Qi <yao.qi@linaro.org>
5850 * linux-low.c (linux_create_inferior): Remove setting to
5851 proc->priv->new_inferior.
5852 (linux_attach): Likewise.
5853 (linux_low_filter_event): Likewise.
5854 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5856 2015-07-24 Yao Qi <yao.qi@linaro.org>
5858 * linux-low.c (linux_arch_setup): New function.
5859 (linux_low_filter_event): If proc->tdesc is NULL and
5860 proc->attached is true, call the_low_target.arch_setup.
5861 Otherwise, keep status pending, and return.
5862 (linux_resume_one_lwp_throw): Don't call get_pc if
5863 thread->while_stepping isn't NULL. Don't call
5864 get_thread_regcache if proc->tdesc is NULL.
5865 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5866 (linux_target_ops): Install arch_setup.
5867 * server.c (start_inferior): Call the_target->arch_setup.
5868 * target.h (struct target_ops) <arch_setup>: New field.
5869 (target_arch_setup): New marco.
5870 * lynx-low.c (lynx_target_ops): Update.
5871 * nto-low.c (nto_target_ops): Update.
5872 * spu-low.c (spu_target_ops): Update.
5873 * win32-low.c (win32_target_ops): Update.
5875 2015-07-24 Yao Qi <yao.qi@linaro.org>
5877 * linux-low.c (linux_add_process): Don't set
5878 proc->priv->new_inferior.
5879 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5880 (linux_attach): Likewise.
5882 2015-07-24 Yao Qi <yao.qi@linaro.org>
5884 * server.c (start_inferior): Code refactor.
5886 2015-07-24 Yao Qi <yao.qi@linaro.org>
5888 * server.c (process_serial_event): Set general_thread.
5890 2015-07-21 Yao Qi <yao.qi@linaro.org>
5892 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5893 aarch64_linux_get_debug_reg_capacity.
5895 2015-07-17 Yao Qi <yao.qi@linaro.org>
5897 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5898 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5899 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5900 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5901 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5902 (AARCH64_HWP_ALIGNMENT): Likewise.
5903 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5904 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5905 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5906 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5907 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5908 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5909 (struct aarch64_debug_reg_state): Likewise.
5910 (struct arch_lwp_info): Likewise.
5911 (aarch64_align_watchpoint): Likewise.
5912 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5913 (aarch64_watchpoint_length): Likewise.
5914 (aarch64_point_encode_ctrl_reg): Likewise
5915 (aarch64_point_is_aligned): Likewise.
5916 (aarch64_align_watchpoint): Likewise.
5917 (aarch64_linux_set_debug_regs):
5918 (aarch64_dr_state_insert_one_point): Likewise.
5919 (aarch64_dr_state_remove_one_point): Likewise.
5920 (aarch64_handle_breakpoint): Likewise.
5921 (aarch64_handle_aligned_watchpoint): Likewise.
5922 (aarch64_handle_unaligned_watchpoint): Likewise.
5923 (aarch64_handle_watchpoint): Likewise.
5925 2015-07-17 Yao Qi <yao.qi@linaro.org>
5927 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5928 and don't aarch64_get_debug_reg_state. All callers update.
5929 (aarch64_handle_aligned_watchpoint): Likewise.
5930 (aarch64_handle_unaligned_watchpoint): Likewise.
5931 (aarch64_handle_watchpoint): Likewise.
5932 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5933 (aarch64_remove_point): Likewise.
5935 2015-07-17 Yao Qi <yao.qi@linaro.org>
5937 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5939 (aarch64_handle_unaligned_watchpoint): Likewise.
5941 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5943 Revert the previous 3 commits:
5944 Move gdb_regex* to common/
5945 Move linux_find_memory_regions_full & co.
5946 gdbserver build-id attribute generator
5948 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5949 Jan Kratochvil <jan.kratochvil@redhat.com>
5951 gdbserver build-id attribute generator.
5952 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5953 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5954 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5956 (get_dynamic): Use find_pdhr to traverse program headers.
5957 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5958 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5959 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5960 (get_hex_build_id): New.
5961 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5962 to reply XML document.
5964 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5965 Jan Kratochvil <jan.kratochvil@redhat.com>
5967 * target.c: Include target/target-utils.h and fcntl.h.
5968 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5969 (target_fileio_read_stralloc): New functions.
5971 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5973 * Makefile.in (OBS): Add gdb_regex.o.
5975 * config.in: Rebuilt.
5976 * configure: Rebuilt.
5978 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5981 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5982 * Makefile.in (OBS): Add target-utils.o.
5983 (linux-maps.o, target-utils.o): New.
5984 * configure.srv (srv_linux_obj): Add linux-maps.o.
5986 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5988 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5990 (the_low_target): Install it.
5992 2015-07-14 Pedro Alves <palves@redhat.com>
5994 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5995 Instead, ignore ECHILD, and throw an error for other errnos.
5997 2015-07-10 Pedro Alves <palves@redhat.com>
5999 * event-loop.c (struct callback_event) <data>: Change type to
6000 gdb_client_data instance instead of gdb_client_data pointer.
6001 (append_callback_event): Adjust.
6003 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6005 * linux-aarch64-low.c: Add comments for each linux_target_ops
6006 method. Remove comments already covered in target_ops and
6007 linux_target_ops definitions.
6008 (the_low_target): Add comments for each unimplemented method.
6010 2015-07-09 Yao Qi <yao.qi@linaro.org>
6012 * linux-aarch64-low.c (aarch64_regmap): Remove.
6013 (aarch64_usrregs_info): Remove.
6014 (regs_info): Set field usrregs to NULL.
6016 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6018 * linux-low.c: Include "rsp-low.h"
6019 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6020 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6021 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6022 (handle_btrace_enable_pt): New.
6023 (handle_btrace_general_set): Support "pt".
6024 (handle_btrace_conf_general_set): Support "pt:size".
6026 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6028 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6031 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6033 * linux-aarch64-low.c: Remove comment about endianness.
6034 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6035 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6038 2015-06-24 Gary Benson <gbenson@redhat.com>
6040 * linux-i386-ipa.c (stdint.h): Do not include.
6041 * lynx-i386-low.c (stdint.h): Likewise.
6042 * lynx-ppc-low.c (stdint.h): Likewise.
6043 * mem-break.c (stdint.h): Likewise.
6044 * thread-db.c (stdint.h): Likewise.
6045 * tracepoint.c (stdint.h): Likewise.
6046 * win32-low.c (stdint.h): Likewise.
6048 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6050 * server.c (write_qxfer_response): Update call to
6051 remote_escape_output.
6053 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6054 Jan Kratochvil <jan.kratochvil@redhat.com>
6056 Merge multiple hex conversions.
6057 * gdbreplay.c (tohex): Rename to 'fromhex'.
6058 (logchar): Use fromhex.
6060 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6062 * server.c (handle_qxfer_libraries): Set `version' attribute for
6065 2015-06-10 Gary Benson <gbenson@redhat.com>
6067 * target.h (struct target_ops) <multifs_open>: New field.
6068 <multifs_unlink>: Likewise.
6069 <multifs_readlink>: Likewise.
6070 * linux-low.c (nat/linux-namespaces.h): New include.
6071 (linux_target_ops): Initialize the_target->multifs_open,
6072 the_target->multifs_unlink and the_target->multifs_readlink.
6073 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6074 * hostio.c (hostio_fs_pid): New static variable.
6075 (hostio_handle_new_gdb_connection): New function.
6076 (handle_setfs): Likewise.
6077 (handle_open): Use the_target->multifs_open as appropriate.
6078 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6079 (handle_readlink): Use the_target->multifs_readlink as
6081 (handle_vFile): Handle vFile:setfs packets.
6082 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6083 after target_handle_new_gdb_connection.
6085 2015-06-10 Gary Benson <gbenson@redhat.com>
6087 * configure.ac (AC_CHECK_FUNCS): Add setns.
6088 * config.in: Regenerate.
6089 * configure: Likewise.
6090 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6091 (linux-namespaces.o): New rule.
6092 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6094 2015-06-09 Gary Benson <gbenson@redhat.com>
6096 * hostio.c (handle_open): Process mode argument with
6097 fileio_to_host_mode.
6099 2015-06-01 Yao Qi <yao.qi@linaro.org>
6101 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6102 * linux-x86-low.c: Likewise.
6104 2015-05-28 Don Breazeal <donb@codesourcery.com>
6106 * linux-low.c (handle_extended_wait): Initialize
6107 thread_info.last_resume_kind for new fork children.
6109 2015-05-15 Pedro Alves <palves@redhat.com>
6111 * target.h (target_handle_new_gdb_connection): Rewrite using if
6112 wrapped in do/while.
6114 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6116 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6117 * configure, config.in: Regenerate.
6118 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6121 2015-05-12 Don Breazeal <donb@codesourcery.com>
6123 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6124 PTRACE_EVENT_VFORK_DONE.
6125 (linux_low_ptrace_options, extended_event_reported): Add vfork
6127 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6128 and "vforkdone" for RSP 'T' Stop Reply Packet.
6129 * server.h (report_vfork_events): Declare
6132 2015-05-12 Don Breazeal <donb@codesourcery.com>
6134 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6135 (the_low_target) <new_fork>: Initialize new member.
6136 * linux-arm-low.c (arm_new_fork): New function.
6137 (the_low_target) <new_fork>: Initialize new member.
6138 * linux-low.c (handle_extended_wait): Call new target function
6140 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6141 * linux-mips-low.c (mips_add_watchpoint): New function
6142 extracted from mips_insert_point.
6143 (the_low_target) <new_fork>: Initialize new member.
6144 (mips_linux_new_fork): New function.
6145 (mips_insert_point): Call mips_add_watchpoint.
6146 * linux-x86-low.c (x86_linux_new_fork): New function.
6147 (the_low_target) <new_fork>: Initialize new member.
6149 2015-05-12 Don Breazeal <donb@codesourcery.com>
6151 * linux-low.c (handle_extended_wait): Implement return value,
6152 rename argument 'event_child' to 'event_lwp', handle
6153 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6154 (linux_low_ptrace_options): New function.
6155 (linux_low_filter_event): Call linux_low_ptrace_options,
6156 use different argument fo linux_enable_event_reporting,
6157 use return value from handle_extended_wait.
6158 (extended_event_reported): New function.
6159 (linux_wait_1): Call extended_event_reported and set
6160 status to report fork events.
6161 (linux_write_memory): Add pid to debug message.
6162 (reset_lwp_ptrace_options_callback): New function.
6163 (linux_handle_new_gdb_connection): New function.
6164 (linux_target_ops): Initialize new structure member.
6165 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6166 * lynx-low.c: Initialize new structure member.
6167 * remote-utils.c (prepare_resume_reply): Implement stop reason
6168 "fork" for "T" stop message.
6169 * server.c (handle_query): Call handle_new_gdb_connection.
6170 * server.h (report_fork_events): Declare global flag.
6171 * target.h (struct target_ops) <handle_new_gdb_connection>:
6173 (target_handle_new_gdb_connection): New macro.
6174 * win32-low.c: Initialize new structure member.
6176 2015-05-12 Don Breazeal <donb@codesourcery.com>
6178 * mem-break.c (APPEND_TO_LIST): Define macro.
6179 (clone_agent_expr): New function.
6180 (clone_one_breakpoint): New function.
6181 (clone_all_breakpoints): New function.
6182 * mem-break.h: Declare new functions.
6184 2015-05-12 Don Breazeal <donb@codesourcery.com>
6186 * linux-low.c (linux_supports_fork_events): New function.
6187 (linux_supports_vfork_events): New function.
6188 (linux_target_ops): Initialize new structure members.
6189 (initialize_low): Call linux_check_ptrace_features.
6190 * lynx-low.c (lynx_target_ops): Initialize new structure
6192 * server.c (report_fork_events, report_vfork_events):
6194 (handle_query): Add new features to qSupported packet and
6196 (captured_main): Initialize new global variables.
6197 * target.h (struct target_ops) <supports_fork_events>:
6199 <supports_vfork_events>: New member.
6200 (target_supports_fork_events): New macro.
6201 (target_supports_vfork_events): New macro.
6202 * win32-low.c (win32_target_ops): Initialize new structure
6205 2015-05-12 Gary Benson <gbenson@redhat.com>
6207 * server.c (handle_qxfer_exec_file): Use current process
6210 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6212 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6213 Remove HAVE_PTRACE_GETREGS conditionals.
6214 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6215 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6217 2015-05-08 Yao Qi <yao.qi@linaro.org>
6219 * linux-low.c (linux_supports_conditional_breakpoints): New
6221 (linux_target_ops): Install new target method.
6222 * lynx-low.c (lynx_target_ops): Install NULL hook for
6223 supports_conditional_breakpoints.
6224 * nto-low.c (nto_target_ops): Likewise.
6225 * spu-low.c (spu_target_ops): Likewise.
6226 * win32-low.c (win32_target_ops): Likewise.
6227 * server.c (handle_query): Check
6228 target_supports_conditional_breakpoints.
6229 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6231 (target_supports_conditional_breakpoints): New macro.
6233 2015-05-06 Pedro Alves <palves@redhat.com>
6236 * server.c (start_inferior): If the process exits, mourn it.
6238 2015-04-21 Gary Benson <gbenson@redhat.com>
6240 * hostio.c (fileio_open_flags_to_host): Factored out to
6241 fileio_to_host_openflags in common/fileio.c. Single use
6244 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6246 * linux-xtensa-low.c (xtensa_fill_gregset)
6247 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6250 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6252 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6253 (regs_info): Replace usrregs pointer with NULL.
6255 2015-04-17 Gary Benson <gbenson@redhat.com>
6257 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6258 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6259 * server.c (handle_qxfer_exec_file): New function.
6260 (qxfer_packets): Add exec-file entry.
6261 (handle_query): Report qXfer:exec-file:read as supported packet.
6263 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6265 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6267 2015-04-09 Gary Benson <gbenson@redhat.com>
6269 * hostio-errno.c (errno_to_fileio_error): Remove function.
6270 Update caller to use remote_fileio_to_fio_error.
6272 2015-04-09 Yao Qi <yao.qi@linaro.org>
6274 * linux-low.c (linux_insert_point): Call
6275 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6276 (linux_remove_point): Call remove_memory_breakpoint if type is
6278 * linux-x86-low.c (x86_insert_point): Don't call
6279 insert_memory_breakpoint.
6280 (x86_remove_point): Don't call remove_memory_breakpoint.
6282 2015-04-01 Pedro Alves <palves@redhat.com>
6283 Cleber Rosa <crosa@redhat.com>
6285 * server.c (gdbserver_usage): Reorganize and extend the usage
6288 2015-03-24 Pedro Alves <palves@redhat.com>
6290 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6291 output. Also dump TRAP_TRACE.
6292 (linux_low_filter_event): In debug output, distinguish a
6293 resume_stop SIGSTOP from a delayed SIGSTOP.
6295 2015-03-24 Gary Benson <gbenson@redhat.com>
6297 * linux-x86-low.c (x86_linux_new_thread): Moved to
6299 (x86_linux_prepare_to_resume): Likewise.
6301 2015-03-24 Gary Benson <gbenson@redhat.com>
6303 * Makefile.in (x86-linux-dregs.o): New rule.
6304 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6305 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6306 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6307 (x86_linux_dr_get): Likewise.
6308 (x86_linux_dr_set): Likewise.
6309 (update_debug_registers_callback): Likewise.
6310 (x86_linux_dr_set_addr): Likewise.
6311 (x86_linux_dr_get_addr): Likewise.
6312 (x86_linux_dr_set_control): Likewise.
6313 (x86_linux_dr_get_control): Likewise.
6314 (x86_linux_dr_get_status): Likewise.
6315 (x86_linux_update_debug_registers): Likewise.
6317 2015-03-24 Gary Benson <gbenson@redhat.com>
6319 * linux-x86-low.c (x86_linux_update_debug_registers):
6320 New function, factored out from...
6321 (x86_linux_prepare_to_resume): ...this.
6323 2015-03-24 Gary Benson <gbenson@redhat.com>
6325 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6326 (x86_linux_dr_set): Likewise.
6327 (update_debug_registers_callback): Likewise.
6328 (x86_linux_dr_set_addr): Likewise.
6329 (x86_linux_dr_get_addr): Likewise.
6330 (x86_linux_dr_set_control): Likewise.
6331 (x86_linux_dr_get_control): Likewise.
6332 (x86_linux_dr_get_status): Likewise.
6333 (x86_linux_prepare_to_resume): Likewise.
6335 2015-03-24 Gary Benson <gbenson@redhat.com>
6337 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6338 Use perror_with_name. Pass string through gettext.
6339 (x86_linux_dr_set): Likewise.
6341 2015-03-24 Gary Benson <gbenson@redhat.com>
6343 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6344 (x86_linux_dr_set_addr): ...this.
6345 (x86_dr_low_get_addr): Rename to...
6346 (x86_linux_dr_get_addr): ...this.
6347 (x86_dr_low_set_control): Rename to...
6348 (x86_linux_dr_set_control): ...this.
6349 (x86_dr_low_get_control): Rename to...
6350 (x86_linux_dr_get_control): ...this.
6351 (x86_dr_low_get_status): Rename to...
6352 (x86_linux_dr_get_status): ...this.
6353 (x86_dr_low): Update with new function names.
6355 2015-03-24 Gary Benson <gbenson@redhat.com>
6357 * Makefile.in (x86-linux.o): New rule.
6358 * configure.srv: Add x86-linux.o to relevant targets.
6359 * linux-low.c (lwp_set_arch_private_info): New function.
6360 (lwp_arch_private_info): Likewise.
6361 * linux-x86-low.c: Include nat/x86-linux.h.
6362 (arch_lwp_info): Removed structure.
6363 (update_debug_registers_callback):
6364 Use lwp_set_debug_registers_changed.
6365 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6366 and lwp_set_debug_registers_changed.
6367 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6369 2015-03-24 Gary Benson <gbenson@redhat.com>
6371 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6372 * linux-arm-low.c (arm_new_thread): Likewise.
6373 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6374 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6375 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6376 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6378 2015-03-24 Gary Benson <gbenson@redhat.com>
6380 * linux-low.c (ptid_of_lwp): New function.
6381 (lwp_is_stopped): Likewise.
6382 (lwp_stop_reason): Likewise.
6383 * linux-x86-low.c (update_debug_registers_callback):
6385 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6388 2015-03-24 Gary Benson <gbenson@redhat.com>
6390 * linux-low.h (linux_stop_lwp): Remove declaration.
6392 2015-03-24 Gary Benson <gbenson@redhat.com>
6394 * linux-low.h: Include nat/linux-nat.h.
6395 * linux-low.c (iterate_over_lwps_args): New structure.
6396 (iterate_over_lwps_filter): New function.
6397 (iterate_over_lwps): Likewise.
6398 * linux-x86-low.c (update_debug_registers_callback):
6399 Update signature to what iterate_over_lwps expects.
6400 Remove PID check that iterate_over_lwps now performs.
6401 (x86_dr_low_set_addr): Use iterate_over_lwps.
6402 (x86_dr_low_set_control): Likewise.
6404 2015-03-24 Gary Benson <gbenson@redhat.com>
6406 * linux-x86-low.c (x86_debug_reg_state): New function.
6407 (x86_linux_prepare_to_resume): Use the above.
6409 2015-03-24 Gary Benson <gbenson@redhat.com>
6411 * linux-low.c (current_lwp_ptid): New function.
6412 * linux-x86-low.c: Include nat/linux-nat.h.
6413 (x86_dr_low_get_addr): Use current_lwp_ptid.
6414 (x86_dr_low_get_control): Likewise.
6415 (x86_dr_low_get_status): Likewise.
6417 2015-03-20 Pedro Alves <palves@redhat.com>
6419 * tracepoint.c (cmd_qtstatus): Make "str" const.
6421 2015-03-20 Pedro Alves <palves@redhat.com>
6423 * server.c (handle_general_set): Make "req_str" const.
6425 2015-03-19 Pedro Alves <palves@redhat.com>
6427 * linux-low.c (linux_resume_one_lwp): Rename to ...
6428 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6429 instead call perror_with_name.
6430 (check_ptrace_stopped_lwp_gone): New function.
6431 (linux_resume_one_lwp): Reimplement as wrapper around
6432 linux_resume_one_lwp_throw that swallows errors if the LWP is
6435 2015-03-19 Pedro Alves <palves@redhat.com>
6437 * linux-low.c (count_events_callback, select_event_lwp_callback):
6438 No longer check whether the thread has resume_stop as last resume
6441 2015-03-19 Pedro Alves <palves@redhat.com>
6443 * linux-low.c (count_events_callback, select_event_lwp_callback):
6444 Use the lwp's status_pending_p field, not the thread's.
6446 2015-03-19 Pedro Alves <palves@redhat.com>
6448 * linux-low.c (select_event_lwp_callback): Update comments to
6449 no longer mention SIGTRAP.
6451 2015-03-18 Gary Benson <gbenson@redhat.com>
6453 * server.c (handle_query): Do not report vFile:fstat as supported.
6455 2015-03-11 Gary Benson <gbenson@redhat.com>
6457 * hostio.c (sys/types.h): New include.
6458 (sys/stat.h): Likewise.
6459 (common-remote-fileio.h): Likewise.
6460 (handle_fstat): New function.
6461 (handle_vFile): Handle vFile:fstat packets.
6463 2015-03-11 Gary Benson <gbenson@redhat.com>
6465 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6466 struct stat.st_blocks and struct stat.st_blksize.
6467 * configure: Regenerate.
6468 * config.in: Likewise.
6469 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6470 (OBS): Add common-remote-fileio.o.
6471 (common-remote-fileio.o): New rule.
6473 2015-03-09 Pedro Alves <palves@redhat.com>
6475 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6476 'struct sockaddr' pointer in 'accept' call.
6478 2015-03-09 Pedro Alves <palves@redhat.com>
6481 2015-03-07 Pedro Alves <palves@redhat.com>
6482 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6483 or <winsock2.h> here. Instead include "gdb_socket.h".
6484 (remote_open): Use union gdb_sockaddr_u.
6485 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6486 or <winsock2.h> here. Instead include "gdb_socket.h".
6487 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6488 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6490 (init_named_socket, gdb_agent_helper_thread): Use union
6493 2015-03-07 Pedro Alves <palves@redhat.com>
6495 * configure.ac (build_warnings): Move
6496 -Wdeclaration-after-statement to the C-specific set.
6497 * configure: Regenerate.
6499 2015-03-07 Pedro Alves <palves@redhat.com>
6501 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6502 or <winsock2.h> here. Instead include "gdb_socket.h".
6503 (remote_open): Use union gdb_sockaddr_u.
6504 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6505 or <winsock2.h> here. Instead include "gdb_socket.h".
6506 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6507 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6509 (init_named_socket, gdb_agent_helper_thread): Use union
6512 2015-03-07 Pedro Alves <palves@redhat.com>
6514 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6517 2015-03-06 Yao Qi <yao.qi@linaro.org>
6519 * linux-aarch64-low.c (aarch64_insert_point): Use
6520 show_debug_regs as a boolean.
6521 (aarch64_remove_point): Likewise.
6523 2015-03-05 Pedro Alves <palves@redhat.com>
6525 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6526 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6527 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6528 * nto-low.c (nto_target_ops): Likewise.
6529 * spu-low.c (spu_target_ops): Likewise.
6530 * win32-low.c (win32_target_ops): Likewise.
6532 2015-03-04 Pedro Alves <palves@redhat.com>
6534 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6535 Decide whether a breakpoint triggered based on the SIGTRAP's
6537 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6538 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6539 (linux_low_filter_event): Check for breakpoints before checking
6541 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6543 (linux_stopped_by_sw_breakpoint)
6544 (linux_supports_stopped_by_sw_breakpoint)
6545 (linux_stopped_by_hw_breakpoint)
6546 (linux_supports_stopped_by_hw_breakpoint): New functions.
6547 (linux_target_ops): Install new target methods.
6549 2015-03-04 Pedro Alves <palves@redhat.com>
6551 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6552 * server.c (swbreak_feature, hwbreak_feature): New globals.
6553 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6554 (captured_main): Clear swbreak_feature and hwbreak_feature.
6555 * server.h (swbreak_feature, hwbreak_feature): Declare.
6556 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6557 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6558 supports_stopped_by_hw_breakpoint>: New fields.
6559 (target_supports_stopped_by_sw_breakpoint)
6560 (target_stopped_by_sw_breakpoint)
6561 (target_supports_stopped_by_hw_breakpoint)
6562 (target_stopped_by_hw_breakpoint): Declare.
6564 2015-03-04 Pedro Alves <palves@redhat.com>
6566 enum lwp_stop_reason -> enum target_stop_reason
6567 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6568 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6569 (linux_wait_1, stuck_in_jump_pad_callback)
6570 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6571 (linux_stopped_by_watchpoint):
6572 * linux-low.h (enum lwp_stop_reason): Delete.
6573 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6574 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6576 2015-03-04 Yao Qi <yao.qi@linaro.org>
6578 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6580 2015-03-03 Gary Benson <gbenson@redhat.com>
6582 * hostio.c (handle_vFile): Fix prefix lengths.
6584 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6586 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6589 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6591 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6592 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6593 (clean): Add "rm -f" for above C files.
6594 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6595 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6596 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6597 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6598 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6599 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6600 (init_registers_s390x_vx_linux64)
6601 (init_registers_s390x_tevx_linux64)
6602 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6603 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6605 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6606 (s390_store_vxrs_high): New functions.
6607 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6609 (s390_arch_setup): Add logic for selecting one of the new target
6610 descriptions. Activate the new vector regsets if applicable.
6611 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6612 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6613 and init_registers_s390x_tevx_linux64.
6615 2015-03-01 Pedro Alves <palves@redhat.com>
6617 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6620 2015-02-27 Pedro Alves <palves@redhat.com>
6622 * linux-x86-low.c (u_debugreg_offset): New function.
6623 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6625 2015-02-27 Pedro Alves <palves@redhat.com>
6627 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6628 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6629 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6630 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6631 (ps_lsetfpregs, ps_getpid)
6632 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6633 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6634 (ps_lsetxregs, ps_plog): Declare.
6636 2015-02-27 Pedro Alves <palves@redhat.com>
6638 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6639 IP_AGENT_EXPORT_FUNC.
6640 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6641 IP_AGENT_EXPORT_FUNC.
6642 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6643 (IP_AGENT_EXPORT): Delete.
6644 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6645 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6646 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6647 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6648 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6649 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6650 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6651 (traceframe_read_count, traceframe_write_count)
6652 (traceframes_created, trace_state_variables, get_raw_reg)
6653 (get_trace_state_variable_value, set_trace_state_variable_value)
6654 (ust_loaded, helper_thread_id, cmd_buf): Use
6655 IPA_SYM_EXPORTED_NAME.
6656 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6657 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6658 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6659 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6660 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6661 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6662 EXTERN_C_PUSH/EXTERN_C_POP.
6663 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6664 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6665 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6666 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6667 (traceframe_write_count, traceframe_read_count)
6668 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6669 (about_to_request_buffer_space, get_trace_state_variable_value)
6670 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6671 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6672 EXTERN_C_PUSH/EXTERN_C_POP.
6673 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6674 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6675 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6676 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6677 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6678 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6679 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6680 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6682 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6683 (IP_AGENT_EXPORT_VAR_DECL): Define.
6685 (gdb_agent_get_raw_reg): Declare.
6687 2015-02-27 Tom Tromey <tromey@redhat.com>
6688 Pedro Alves <palves@redhat.com>
6690 Rename symbols whose names are reserved C++ keywords throughout.
6692 2015-02-27 Pedro Alves <palves@redhat.com>
6694 * Makefile.in (COMPILER): New, get it from autoconf.
6695 (CXX): Get from autoconf instead.
6696 (COMPILE.pre): Use COMPILER.
6697 (CC-LD): Rename to ...
6698 (CC_LD): ... this. Use COMPILER.
6699 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6700 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6701 * acinclude.m4: Include build-with-cxx.m4.
6702 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6703 Disable -Werror by default if building in C++ mode.
6704 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6705 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6706 the C++ compiler. Save/restore CXXFLAGS too.
6707 * configure: Regenerate.
6709 2015-02-27 Pedro Alves <palves@redhat.com>
6711 * acinclude.m4: Include libiberty.m4.
6712 * configure.ac: Call libiberty_INIT.
6713 * config.in, configure: Regenerate.
6715 2015-02-26 Pedro Alves <palves@redhat.com>
6717 * linux-low.c (linux_wait_1): When incrementing the PC past a
6718 program breakpoint always use the_low_target.breakpoint_len as
6719 increment, rather than the maximum between that and
6720 the_low_target.decr_pc_after_break.
6722 2015-02-23 Pedro Alves <palves@redhat.com>
6724 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6725 thread was doing a step-over; always adjust the PC if
6726 we stepped over a permanent breakpoint.
6727 (linux_wait_1): If we stepped over breakpoint that was on top of a
6728 permanent breakpoint, manually advance the PC past it.
6730 2015-02-23 Pedro Alves <palves@redhat.com>
6732 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6734 (x86_fill_gregset, x86_store_gregset): Use it when handling
6737 2015-02-20 Pedro Alves <palves@redhat.com>
6739 * thread-db.c: Include "nat/linux-procfs.h".
6740 (thread_db_init): Skip listing new threads if the kernel supports
6741 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6743 2015-02-20 Pedro Alves <palves@redhat.com>
6745 * linux-low.c (status_pending_p_callback): Use ptid_match.
6747 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6749 PR breakpoints/16812
6750 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6751 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6752 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6754 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6756 PR breakpoints/15956
6757 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6759 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6761 * linux-low.c (linux_low_btrace_conf): Print size.
6762 * server.c (handle_btrace_conf_general_set): New.
6763 (hanle_general_set): Call handle_btrace_conf_general_set.
6764 (handle_query): Report Qbtrace-conf:bts:size as supported.
6766 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6768 * linux-low.c (linux_low_enable_btrace): Update parameters.
6769 (linux_low_btrace_conf): New.
6770 (linux_target_ops)<to_btrace_conf>: Initialize.
6771 * server.c (current_btrace_conf): New.
6772 (handle_btrace_enable): Rename to ...
6773 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6774 to target_enable_btrace. Update comment. Update users.
6775 (handle_qxfer_btrace_conf): New.
6776 (qxfer_packets): Add btrace-conf entry.
6777 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6778 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6779 (target_ops)<read_btrace_conf>: New.
6780 (target_enable_btrace): Update parameters.
6781 (target_read_btrace_conf): New.
6783 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6785 * server.c (handle_btrace_general_set): Remove call to
6786 target_supports_btrace.
6787 (supported_btrace_packets): New.
6788 (handle_query): Call supported_btrace_packets.
6789 * target.h: include btrace-common.h.
6790 (btrace_target_info): Removed.
6791 (supports_btrace, target_supports_btrace): Update parameters.
6793 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6795 * Makefile.in (SFILES): Add common/btrace-common.c.
6796 (OBS): Add common/btrace-common.o.
6797 (btrace-common.o): Add build rules.
6798 * linux-low: Include btrace-common.h.
6799 (linux_low_read_btrace): Use struct btrace_data. Call
6800 btrace_data_init and btrace_data_fini.
6802 2015-02-06 Pedro Alves <palves@redhat.com>
6804 * thread-db.c (find_new_threads_callback): Add debug output.
6806 2015-02-04 Pedro Alves <palves@redhat.com>
6808 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6809 (resume_stopped_resumed_lwps): New function.
6810 (linux_wait_for_event_filtered): Use it.
6812 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6814 * Makefile.in (SFILES): Add linux-personality.c.
6815 (linux-personality.o): New rule.
6816 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6817 list of objects to be built.
6818 * linux-low.c: Include nat/linux-personality.h.
6819 (linux_create_inferior): Remove code to disable address space
6820 randomization (moved to ../nat/linux-personality.c). Create
6821 cleanup to disable address space randomization.
6823 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6825 * Makefile.in (posix-strerror.o): New rule.
6826 (mingw-strerror.o): Likewise.
6827 * configure: Regenerated.
6828 * configure.ac: Source file ../common/common.host. Initialize new
6829 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6831 2015-01-14 Yao Qi <yao@codesourcery.com>
6833 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6834 (ppc-linux.o): New rule.
6835 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6836 * configure.ac: AC_CHECK_FUNCS(getauxval).
6837 * config.in: Re-generated.
6838 * configure: Re-generated.
6839 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6840 ppc64_64bit_inferior_p
6842 2015-01-14 Yao Qi <yao@codesourcery.com>
6844 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6845 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6846 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6847 (PT_ORIG_R3, PT_TRAP): Likewise.
6848 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6849 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6850 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6852 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6854 * i387-fp.c (i387_cache_to_xsave): In look over
6855 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6856 zmmh_low_space field by use of zmmh_high_space.
6858 2015-01-09 Pedro Alves <palves@redhat.com>
6860 * linux-low.c (step_over_bkpt): Move higher up in the file.
6861 (handle_extended_wait): Don't store the stop_pc here.
6862 (get_stop_pc): Adjust comments and rename to ...
6863 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6864 stopped for a software breakpoint or hardware breakpoint.
6865 (thread_still_has_status_pending_p): New function.
6866 (status_pending_p_callback): Use
6867 thread_still_has_status_pending_p. If the event is no longer
6868 interesting, resume the LWP.
6869 (handle_tracepoints): Add assert.
6870 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6871 (wstatus_maybe_breakpoint): New function.
6872 (cancel_breakpoint): Delete function.
6873 (check_stopped_by_watchpoint): New function, factored out from
6874 linux_low_filter_event.
6875 (lp_status_maybe_breakpoint): Delete function.
6876 (linux_low_filter_event): Remove filter_ptid argument.
6877 Leave thread group exits pending here. Store the LWP's stop PC.
6878 Always leave events pending.
6879 (linux_wait_for_event_filtered): Pull all events out of the
6880 kernel, and leave them all pending.
6881 (count_events_callback, select_event_lwp_callback): Consider all
6883 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6884 (select_event_lwp): Only give preference to the stepping LWP in
6885 all-stop mode. Adjust comments.
6886 (ignore_event): New function.
6887 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6888 references to cancel_breakpoints. Adjust to renames. Also give
6889 equal priority to all LWPs that have had events in non-stop mode.
6890 If reporting a software breakpoint event, unadjust the LWP's PC.
6891 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6892 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6894 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6895 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6896 (linux_stopped_by_watchpoint): Adjust.
6897 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6898 * linux-low.h (enum lwp_stop_reason): New.
6899 (struct lwp_info) <stop_pc>: Adjust comment.
6900 <stopped_by_watchpoint>: Delete field.
6901 <stop_reason>: New field.
6902 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6903 * mem-break.c (software_breakpoint_inserted_here)
6904 (hardware_breakpoint_inserted_here): New function.
6905 * mem-break.h (software_breakpoint_inserted_here)
6906 (hardware_breakpoint_inserted_here): Declare.
6907 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6908 (cancel_breakpoints): Delete.
6909 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6910 (upload_fast_traceframes): Remove references to
6913 2015-01-09 Pedro Alves <palves@redhat.com>
6915 * thread-db.c (find_new_threads_callback): Ignore thread if the
6916 kernel thread ID is -1.
6918 2015-01-09 Pedro Alves <palves@redhat.com>
6920 * linux-low.c (linux_attach_fail_reason_string): Move to
6921 nat/linux-ptrace.c, and rename.
6922 (linux_attach_lwp): Update comment.
6923 (attach_proc_task_lwp_callback): New function.
6924 (linux_attach): Adjust to rename and use
6925 linux_proc_attach_tgid_threads.
6926 (linux_attach_fail_reason_string): Delete declaration.
6928 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6930 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6931 * server.c (gdbserver_version): Likewise.
6933 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6935 * remote-utils.c: Include ctype.h.
6936 (input_interrupt): Explicitly handle the case when the char
6937 received is the NUL byte. Improve the printing of non-ASCII
6940 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6942 * linux-low.c (linux_low_filter_event): Update call to
6943 linux_enable_event_reporting following the addition of
6944 a new parameter to that function.
6946 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6949 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6950 (AARCH64_FPCR_REGNO): Likewise.
6951 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6952 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6953 (aarch64_store_fpregset): Likewise.
6955 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6957 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6958 Remove FIXME comment about assumption about N.
6960 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6962 * configure.ac: If large-file support is disabled in GDBserver,
6963 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6964 * configure: Regenerate.
6966 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6968 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6969 warning upon ENODATA from ptrace.
6970 * linux-s390-low.c (s390_store_tdb): New.
6971 (s390_regsets): Add regset for NT_S390_TDB.
6973 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6975 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6976 without a fill_function.
6977 * linux-s390-low.c (s390_fill_last_break): Remove.
6978 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6979 (s390_arch_setup): Use regset's size instead of fill_function for
6982 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6984 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6985 the regset's store function when ptrace returned an error.
6986 * regcache.c (get_thread_regcache): Invalidate register cache
6987 before fetching inferior's registers.
6989 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6991 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6992 while-loop as for-loop.
6993 (regsets_store_inferior_registers): Likewise.
6995 2014-11-28 Yao Qi <yao@codesourcery.com>
6997 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6998 * config.in, configure: Re-generate.
6999 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7002 2014-11-21 Yao Qi <yao@codesourcery.com>
7004 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7005 (AC_CHECK_HEADERS): Remove malloc.h.
7006 * configure: Re-generated.
7007 * config.in: Re-generated.
7008 * server.h: Don't include alloca.h and malloc.h.
7009 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7010 Don't include malloc.h.
7012 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7014 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7015 corresponding ERRNO check in same block.
7017 2014-11-12 Pedro Alves <palves@redhat.com>
7019 * server.c (cont_thread): Update comment.
7020 (start_inferior, attach_inferior): No longer clear cont_thread.
7021 (handle_v_cont): No longer set cont_thread.
7022 (captured_main): Clear cont_thread each time a GDB connects.
7024 2014-11-12 Pedro Alves <palves@redhat.com>
7026 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7027 thread, and don't resume all threads if the Hc thread has exited.
7029 2014-11-12 Pedro Alves <palves@redhat.com>
7031 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7032 the process group instead of to a specific LWP.
7034 2014-10-15 Pedro Alves <palves@redhat.com>
7037 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7039 (arm_set_thread_context): Delete.
7040 (the_low_target): Adjust.
7041 * win32-i386-low.c (debug_registers_changed)
7042 (debug_registers_used): Delete.
7043 (update_debug_registers_callback): New function.
7044 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7045 needing to update their debug registers.
7046 (win32_get_current_dr): New function.
7047 (x86_dr_low_get_addr, x86_dr_low_get_control)
7048 (x86_dr_low_get_status): Fetch the debug register from the thread
7050 (i386_initial_stuff): Adjust.
7051 (i386_get_thread_context): Remove current_event parameter. Don't
7052 clear debug_registers_changed nor copy DR values to
7054 (i386_set_thread_context): Delete.
7055 (i386_prepare_to_resume): New function.
7056 (i386_thread_added): Mark the thread as needing to update irs
7058 (the_low_target): Remove i386_set_thread_context and install
7059 i386_prepare_to_resume.
7060 * win32-low.c (win32_get_thread_context): Adjust.
7061 (win32_set_thread_context): Use SetThreadContext
7063 (win32_prepare_to_resume): New function.
7064 (win32_require_context): New function, factored out from ...
7065 (thread_rec): ... this.
7066 (continue_one_thread): Call win32_prepare_to_resume on each thread
7067 we're about to continue.
7068 (win32_resume): Call win32_prepare_to_resume on the event thread.
7069 * win32-low.h (struct win32_thread_info)
7070 <debug_registers_changed>: New field.
7071 (struct win32_target_ops): Change prototype of set_thread_context,
7072 delete set_thread_context and add prepare_to_resume.
7073 (win32_require_context): New declaration.
7075 2014-10-08 Gary Benson <gbenson@redhat.com>
7077 * server.h: Do not include common-exceptions.h.
7079 2014-10-08 Gary Benson <gbenson@redhat.com>
7081 * server.h: Do not include cleanups.h.
7083 2014-09-30 James Hogan <james.hogan@imgtec.com>
7085 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7088 2014-09-23 Yao Qi <yao@codesourcery.com>
7090 * linux-low.c (lp_status_maybe_breakpoint): New function.
7091 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7092 (count_events_callback): Likewise.
7093 (select_event_lwp_callback): Likewise.
7094 (cancel_breakpoints_callback): Likewise.
7096 2014-09-19 Don Breazeal <donb@codesourcery.com>
7098 * linux-low.c (handle_extended_wait): Call
7099 linux_ptrace_get_extended_event.
7100 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7101 linux_is_extended_waitstatus.
7103 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7105 * Makefile.in (CPPFLAGS): Define.
7106 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7107 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7109 2014-09-16 Gary Benson <gbenson@redhat.com>
7111 * inferiors.h (current_inferior): Renamed as...
7112 (current_thread): New variable. All uses updated.
7113 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7114 (maybe_move_out_of_jump_pad): Likewise.
7115 (cancel_breakpoint): Likewise.
7116 (linux_low_filter_event): Likewise.
7117 (wait_for_sigstop): Likewise.
7118 (linux_resume_one_lwp): Likewise.
7119 (need_step_over_p): Likewise.
7120 (start_step_over): Likewise.
7121 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7122 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7123 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7124 and save_inferior as saved_thread.
7125 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7127 (regcache_invalidate_thread): Likewise.
7128 * remote-utils.c (prepare_resume_reply): Likewise.
7129 * thread-db.c (thread_db_get_tls_address): Likewise.
7130 (disable_thread_event_reporting): Likewise.
7131 (remove_thread_event_breakpoints): Likewise.
7132 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7134 * target.h (set_desired_inferior): Renamed as...
7135 (set_desired_thread): New declaration. All uses updated.
7136 * server.c (myresume): Updated comment to reference thread instead
7138 (handle_serial_event): Likewise.
7139 (handle_target_event): Likewise.
7141 2014-09-12 Tom Tromey <tromey@redhat.com>
7142 Gary Benson <gbenson@redhat.com>
7144 * regcache.h: Include common-regcache.h.
7145 (regcache_read_pc): Don't declare.
7146 * regcache.c (get_thread_regcache_for_ptid): New function.
7148 2014-09-11 Tom Tromey <tromey@redhat.com>
7149 Gary Benson <gbenson@redhat.com>
7151 * symbol.c: New file.
7152 * Makefile.in (SFILES): Add symbol.c.
7153 (OBS): Add symbol.o.
7155 2014-09-11 Gary Benson <gbenson@redhat.com>
7157 * target.c (target_stop_ptid, target_continue_ptid): New
7160 2014-09-11 Tom Tromey <tromey@redhat.com>
7161 Gary Benson <gbenson@redhat.com>
7163 * target.h: Include target/target.h.
7164 * target.c (target_read_memory, target_read_uint32)
7165 (target_write_memory): New functions.
7167 2014-09-11 Gary Benson <gbenson@redhat.com>
7169 * server.h (debug_hw_points): Don't declare.
7170 * server.c (debug_hw_points): Don't define. Replace all uses
7171 with show_debug_regs.
7172 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7173 all uses with show_debug_regs.
7175 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7177 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7178 endianness into account.
7179 (ppc_supply_ptrace_register): Likewise.
7181 2014-09-03 James Hogan <james.hogan@imgtec.com>
7183 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7184 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7186 2014-09-03 Gary Benson <gbenson@redhat.com>
7188 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7189 ALL_DEBUG_ADDRESS_REGISTERS.
7191 2014-09-02 Gary Benson <gbenson@redhat.com>
7193 * i386-low.h: Renamed as...
7194 * x86-low.h: New file. All type, function and variable name
7195 prefixes changed from "i386_" to "x86_". All references updated.
7196 * i386-low.c: Renamed as...
7197 * x86-low.c: New file. All type, function and variable name
7198 prefixes changed from "i386_" to "x86_". All references updated.
7200 2014-09-02 Gary Benson <gbenson@redhat.com>
7202 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7203 (x86_linux_new_thread): Likewise.
7205 2014-08-29 Gary Benson <gbenson@redhat.com>
7207 * server.h (setjmp.h): Do not include.
7208 (toplevel): Do not declare.
7209 (common-exceptions.h): Include.
7210 (cleanups.h): Likewise.
7211 * server.c (toplevel): Do not define.
7212 (exit_code): New static global.
7213 (detach_or_kill_for_exit_cleanup): New function.
7214 (main): New function. Original main renamed to...
7215 (captured_main): New function.
7216 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7218 2014-08-29 Gary Benson <gbenson@redhat.com>
7220 * Makefile.in (SFILES): Add common/common-exceptions.c.
7221 (OBS): Add common-exceptions.o.
7222 (common-exceptions.o): New rule.
7223 * utils.c (prepare_to_throw_exception): New function.
7225 2014-08-29 Gary Benson <gbenson@redhat.com>
7227 * config.in: Regenerate.
7228 * configure: Likewise.
7230 2014-08-29 Gary Benson <gbenson@redhat.com>
7232 * Makefile.in (SFILES): Add common/cleanups.c.
7234 (cleanups.o): New rule.
7236 2014-08-29 Gary Benson <gbenson@redhat.com>
7238 * utils.c (internal_vwarning): New function.
7240 2014-08-28 Gary Benson <gbenson@redhat.com>
7242 * utils.h (fatal): Remove declaration.
7243 * utils.c (fatal): Remove function.
7245 2014-08-28 Gary Benson <gbenson@redhat.com>
7247 * tracepoint.c (gdb_agent_init): Replace fatal with
7249 (initialize_tracepoint): Likewise.
7251 2014-08-28 Gary Benson <gbenson@redhat.com>
7253 * remote-utils.c (remote_prepare): Replace fatal with error.
7255 2014-08-28 Gary Benson <gbenson@redhat.com>
7257 * linux-low.c (linux_async): Replace fatal with warning.
7259 (linux_start_non_stop): Return -1 if linux_async failed.
7261 2014-08-28 Gary Benson <gbenson@redhat.com>
7263 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7265 (i386_dr_low_get_addr): Remove vague comment.
7266 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7269 2014-08-28 Gary Benson <gbenson@redhat.com>
7271 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7272 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7274 (linux_resume_one_lwp): Likewise.
7275 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7277 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7278 with internal_error.
7279 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7280 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7281 (find_register_by_name): Replace fatal with internal_error.
7282 (find_regno): Likewise.
7283 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7284 * thread-db.c (thread_db_create_event): Likewise.
7285 (thread_db_load_search): Likewise.
7286 (try_thread_db_load_1): Likewise.
7287 * tracepoint.c (get_jump_space_head): Replace fatal with
7289 (claim_trampoline_space): Likewise.
7290 (have_fast_tracepoint_trampoline_buffer): Likewise.
7291 (cmd_qtstart): Likewise.
7292 (stop_tracing): Likewise.
7293 (fast_tracepoint_collecting): Likewise.
7294 (target_malloc): Likewise.
7295 (download_tracepoint): Likewise.
7296 (download_trace_state_variables): Replace check with gdb_assert.
7297 (upload_fast_traceframes): Replace fatal with internal_error.
7299 2014-08-19 Tom Tromey <tromey@redhat.com>
7300 Gary Benson <gbenson@redhat.com>
7302 * Makefile.in (SFILES): Add common/common-debug.c.
7303 (OBS): Add common-debug.o.
7304 (common-debug.o): New rule.
7305 * debug.h (debug_printf): Don't declare.
7306 * debug.c (debug_printf): Renamed and rewritten as...
7307 (debug_vprintf): New function.
7309 2014-08-19 Gary Benson <gbenson@redhat.com>
7311 * utils.h: Do not include print-utils.h.
7313 2014-08-19 Tom Tromey <tromey@redhat.com>
7314 Gary Benson <gbenson@redhat.com>
7316 * server.h: Add static assertion.
7317 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7319 2014-08-19 Tom Tromey <tromey@redhat.com>
7320 Gary Benson <gbenson@redhat.com>
7322 * Makefile.in (SFILES): Add common/errors.c.
7323 (OBS): Add errors.o.
7324 (IPA_OBS): Add errors-ipa.o.
7325 (errors.o): New rule.
7326 (errors-ipa.o): Likewise.
7327 * utils.h (perror_with_name, error, warning): Don't declare.
7328 * utils.c (warning): Renamed and rewritten as...
7329 (vwarning): New function.
7330 (error): Renamed and rewritten as...
7331 (verror): New function.
7332 (internal_error): Renamed and rewritten as...
7333 (internal_verror): New function.
7335 2014-08-07 Gary Benson <gbenson@redhat.com>
7337 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7338 * configure: Regenerate.
7339 * config.in: Likewise.
7340 * server.h: Do not include errno.h.
7341 * event-loop.c: Likewise.
7342 * hostio-errno.c: Likewise.
7343 * linux-low.c: Likewise.
7344 * remote-utils.c: Likewise.
7345 * spu-low.c: Likewise.
7346 * utils.c: Likewise.
7347 * gdbreplay.c: Unconditionally include errno.h.
7349 2014-08-07 Gary Benson <gbenson@redhat.com>
7351 * server.h: Do not include string.h.
7352 * event-loop.c: Likewise.
7353 * linux-low.c: Likewise.
7354 * regcache.c: Likewise.
7355 * remote-utils.c: Likewise.
7356 * spu-low.c: Likewise.
7357 * utils.c: Likewise.
7359 2014-08-07 Gary Benson <gbenson@redhat.com>
7361 * server.h: Do not include gdb_assert.h.
7363 2014-08-07 Gary Benson <gbenson@redhat.com>
7365 * server.h: Do not include common-utils.h.
7367 2014-08-07 Gary Benson <gbenson@redhat.com>
7369 * server.h: Do not include ptid.h.
7370 * notif.h: Likewise.
7372 2014-08-07 Gary Benson <gbenson@redhat.com>
7374 * server.h: Do not include gdb_locale.h.
7376 2014-08-07 Gary Benson <gbenson@redhat.com>
7378 * server.h: Do not include gdb/signals.h.
7379 * win32-low.c: Likewise.
7381 2014-08-07 Gary Benson <gbenson@redhat.com>
7383 * server.h: Do not include pathmax.h.
7385 2014-08-07 Gary Benson <gbenson@redhat.com>
7387 * server.h: Do not include libiberty.h.
7388 * linux-bfin-low.c: Likewise.
7390 2014-08-07 Gary Benson <gbenson@redhat.com>
7392 * server.h: Do not include ansidecl.h.
7394 2014-08-07 Gary Benson <gbenson@redhat.com>
7396 * linux-x86-low.c: Do not include stddef.h.
7397 * lynx-ppc-low.c: Likewise.
7398 * tracepoint.c: Likewise.
7400 2014-08-07 Gary Benson <gbenson@redhat.com>
7402 * server.h: Do not include stdarg.h.
7403 * nto-low.c: Likewise.
7405 2014-08-07 Gary Benson <gbenson@redhat.com>
7407 * server.h: Do not include stdlib.h.
7408 * inferiors.c: Likewise.
7409 * linux-low.c: Likewise.
7410 * regcache.c: Likewise.
7411 * spu-low.c: Likewise.
7412 * tracepoint.c: Likewise.
7413 * utils.c: Likewise.
7415 2014-08-07 Gary Benson <gbenson@redhat.com>
7417 * server.h: Do not include stdio.h.
7418 * linux-low.c: Likewise.
7419 * remote-utils.c: Likewise.
7420 * spu-low.c: Likewise.
7421 * utils.c: Likewise.
7422 * wincecompat.c: Likewise.
7424 2014-08-06 Gary Benson <gbenson@redhat.com>
7426 * regcache.c (init_register_cache): Move conditionals inside if.
7428 2014-08-06 Gary Benson <gbenson@redhat.com>
7430 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7432 2014-07-31 Gary Benson <gbenson@redhat.com>
7434 * ax.h: Do not include server.h.
7435 * gdbthread.h: Likewise.
7436 * lynx-low.h: Likewise.
7437 * notif.h: Likewise.
7439 2014-07-30 Gary Benson <gbenson@redhat.com>
7441 * server.h: Include common-defs.h.
7442 Do not include config.h or build-gnulib-gdbserver/config.h.
7444 2014-07-30 Gary Benson <gbenson@redhat.com>
7446 * hostio-errno.c: Move server.h to top of includes list.
7447 * inferiors.c: Likewise.
7448 * linux-x86-low.c: Likewise.
7449 * notif.c: Include server.h.
7451 2014-07-24 Tom Tromey <tromey@redhat.com>
7452 Gary Benson <gbenson@redhat.com>
7454 * server.h (CORE_ADDR): Now unsigned.
7456 2014-07-16 Pedro Alves <palves@redhat.com>
7458 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7460 2014-07-15 Pedro Alves <palves@redhat.com>
7462 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7465 2014-07-11 Pedro Alves <palves@redhat.com>
7467 * linux-low.c (kill_wait_lwp): New function, based on
7468 kill_one_lwp_callback, but use my_waitpid directly.
7469 (kill_one_lwp_callback, linux_kill): Use it.
7471 2014-06-23 Pedro Alves <palves@redhat.com>
7473 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7474 before setting DR0..DR3.
7476 2014-06-20 Gary Benson <gbenson@redhat.com>
7478 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7479 * configure: Regenerated.
7480 * config.in: Likewise.
7482 2014-06-20 Gary Benson <gbenson@redhat.com>
7484 * Makefile.in (SFILES): Update locations for files moved
7486 (object file files): Reordered.
7488 2014-06-20 Gary Benson <gbenson@redhat.com>
7490 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7491 (i386_dr_low_set_addr): Likewise.
7492 (i386_dr_low_get_addr): Likewise.
7493 (i386_dr_low_can_set_control): Likewise.
7494 (i386_dr_low_set_control): Likewise.
7495 (i386_dr_low_get_control): Likewise.
7496 (i386_dr_low_get_status): Likewise.
7497 (i386_get_debug_register_length): Likewise.
7498 * linux-x86-low.c (i386_dr_low_set_addr):
7499 Changed signature. Made static.
7500 (i386_dr_low_get_addr): Likewise.
7501 (i386_dr_low_set_control): Likewise.
7502 (i386_dr_low_get_control): Likewise.
7503 (i386_dr_low_get_status): Likewise.
7504 (i386_dr_low): New global variable.
7505 * win32-i386-low.c (i386_dr_low_set_addr):
7506 Changed signature. Made static.
7507 (i386_dr_low_get_addr): Likewise.
7508 (i386_dr_low_set_control): Likewise.
7509 (i386_dr_low_get_control): Likewise.
7510 (i386_dr_low_get_status): Likewise.
7511 (i386_dr_low): New global variable.
7513 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7515 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7516 * Makefile.in (AR, AR_FLAGS): Define.
7517 * configure: Regenerate.
7519 2014-06-19 Gary Benson <gbenson@redhat.com>
7521 * Makefile.in (i386-dregs.o): New rule.
7522 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7523 * i386-low.c (target.h): Remove include.
7524 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7525 (DR_CONTROL_SHIFT): Likewise.
7526 (DR_CONTROL_SIZE): Likewise.
7527 (DR_RW_EXECUTE): Likewise.
7528 (DR_RW_WRITE): Likewise.
7529 (DR_RW_READ): Likewise.
7530 (DR_RW_IORW): Likewise.
7531 (DR_LEN_1): Likewise.
7532 (DR_LEN_2): Likewise.
7533 (DR_LEN_4): Likewise.
7534 (DR_LEN_8): Likewise.
7535 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7536 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7537 (DR_ENABLE_SIZE): Likewise.
7538 (DR_LOCAL_SLOWDOWN): Likewise.
7539 (DR_GLOBAL_SLOWDOWN): Likewise.
7540 (DR_CONTROL_RESERVED): Likewise.
7541 (I386_DR_CONTROL_MASK): Likewise.
7542 (I386_DR_VACANT): Likewise.
7543 (I386_DR_LOCAL_ENABLE): Likewise.
7544 (I386_DR_GLOBAL_ENABLE): Likewise.
7545 (I386_DR_DISABLE): Likewise.
7546 (I386_DR_SET_RW_LEN): Likewise.
7547 (I386_DR_GET_RW_LEN): Likewise.
7548 (I386_DR_WATCH_HIT): Likewise.
7549 (i386_wp_op_t): Likewise.
7550 (i386_show_dr): Likewise.
7551 (i386_length_and_rw_bits): Likewise.
7552 (i386_insert_aligned_watchpoint): Likewise.
7553 (i386_remove_aligned_watchpoint): Likewise.
7554 (i386_handle_nonaligned_watchpoint): Likewise.
7555 i386_update_inferior_debug_regs(): Likewise.
7556 (i386_dr_insert_watchpoint): Likewise.
7557 (i386_dr_remove_watchpoint): Likewise.
7558 (i386_dr_region_ok_for_watchpoint): Likewise.
7559 (i386_dr_stopped_data_address): Likewise.
7560 (i386_dr_stopped_by_watchpoint): Likewise.
7562 2014-06-19 Gary Benson <gbenson@redhat.com>
7564 * i386-low.c (i386_dr_show): Renamed to
7565 i386_show_dr and made static. All uses updated.
7566 (i386_dr_length_and_rw_bits): Renamed to
7567 i386_length_and_rw_bits and made static.
7569 (i386_dr_insert_aligned_watchpoint): Renamed to
7570 i386_insert_aligned_watchpoint and made static.
7572 (i386_dr_remove_aligned_watchpoint): Renamed to
7573 i386_remove_aligned_watchpoint and made static.
7575 (i386_dr_update_inferior_debug_regs): Renamed to
7576 i386_update_inferior_debug_regs and made static.
7579 2014-06-18 Gary Benson <gbenson@redhat.com>
7581 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7582 (i386_dr_low_can_set_control): Likewise.
7583 (i386_get_debug_register_length): Likewise.
7584 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7585 (i386_dr_low_can_set_control): Likewise.
7586 (i386_get_debug_register_length): Likewise.
7588 2014-06-17 Gary Benson <gbenson@redhat.com>
7590 * i386-low.h (i386-dregs.h): New include.
7591 (DR_FIRSTADDR): Now in i386-dregs.h.
7592 (DR_LASTADDR): Likewise.
7593 (DR_NADDR): Likewise.
7594 (DR_STATUS): Likewise.
7595 (DR_CONTROL): Likewise.
7596 (i386_debug_reg_state): Likewise.
7597 (i386_dr_insert_watchpoint): Likewise.
7598 (i386_dr_remove_watchpoint): Likewise.
7599 (i386_dr_region_ok_for_watchpoint): Likewise.
7600 (i386_dr_stopped_data_address): Likewise.
7601 (i386_dr_stopped_by_watchpoint): Likewise.
7602 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7604 2014-06-18 Gary Benson <gbenson@redhat.com>
7606 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7607 i386_dr_insert_watchpoint.
7608 (i386_low_remove_watchpoint): Renamed to
7609 i386_dr_remove_watchpoint.
7610 (i386_low_region_ok_for_watchpoint): Renamed to
7611 i386_dr_region_ok_for_watchpoint.
7612 (i386_low_stopped_data_address): Renamed to
7613 i386_dr_stopped_data_address.
7614 (i386_low_stopped_by_watchpoint): Renamed to
7615 i386_dr_stopped_by_watchpoint.
7616 * i386-low.c (i386_show_dr): Renamed to
7617 i386_dr_show and made nonstatic. All uses updated.
7618 (i386_length_and_rw_bits): Renamed to
7619 i386_dr_length_and_rw_bits and made nonstatic.
7621 (i386_insert_aligned_watchpoint): Renamed to
7622 i386_dr_insert_aligned_watchpoint and made nonstatic.
7624 (i386_remove_aligned_watchpoint): Renamed to
7625 i386_dr_remove_aligned_watchpoint and made nonstatic.
7627 (i386_update_inferior_debug_regs): Renamed to
7628 i386_dr_update_inferior_debug_regs and made nonstatic.
7630 (i386_low_insert_watchpoint): Renamed to
7631 i386_dr_insert_watchpoint. All uses updated.
7632 (i386_low_remove_watchpoint): Renamed to
7633 i386_dr_remove_watchpoint. All uses updated.
7634 (i386_low_region_ok_for_watchpoint): Renamed to
7635 i386_dr_region_ok_for_watchpoint. All uses updated.
7636 (i386_low_stopped_data_address): Renamed to
7637 i386_dr_stopped_data_address. All uses updated.
7638 (i386_low_stopped_by_watchpoint): Renamed to
7639 i386_dr_stopped_by_watchpoint. All uses updated.
7641 2014-06-18 Gary Benson <gbenson@redhat.com>
7643 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7644 (i386_dr_low_can_set_control): Likewise.
7645 (i386_insert_aligned_watchpoint): New check.
7647 2014-06-18 Gary Benson <gbenson@redhat.com>
7649 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7652 2014-06-18 Gary Benson <gbenson@redhat.com>
7654 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7655 instead of fatal and error.
7656 (i386_handle_nonaligned_watchpoint): Likewise.
7658 2014-06-18 Gary Benson <gbenson@redhat.com>
7660 * i386-low.c (i386_get_debug_register_length): New macro.
7661 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7662 (i386_show_dr): Use debug_printf instead of fprintf. Use
7663 phex to format values.
7665 2014-06-18 Gary Benson <gbenson@redhat.com>
7667 * i386-low.h: Comment changes.
7668 * i386-low.c: Likewise.
7670 2014-06-18 Gary Benson <gbenson@redhat.com>
7672 * i386-low.c: Whitespace changes.
7674 2014-06-12 Tom Tromey <tromey@redhat.com>
7676 * utils.c (freeargv): Remove.
7678 2014-06-12 Tom Tromey <tromey@redhat.com>
7680 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7681 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7682 (parse_debug_format_options): Likewise.
7683 (gdbserver_usage): Likewise.
7684 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7685 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7686 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7688 ($(LIBGNU)): Depend on libiberty.
7689 (all-lib): Recurse into all subdirs.
7690 (install-only): Invoke "install" target in subdirs.
7691 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7693 * configure: Rebuild.
7694 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7695 for vasprintf, vsnprintf, or gettimeofday.
7696 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7699 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7701 * development.sh: Delete.
7702 * Makefile.in (config.status): Adjust dependency on development.sh.
7703 * configure.ac: Adjust development.sh source call.
7704 * configure: Regenerate.
7706 2014-06-02 Pedro Alves <palves@redhat.com>
7708 * ax.c (gdb_free_agent_expr): New function.
7709 * ax.h (gdb_free_agent_expr): New declaration.
7710 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7712 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7714 (clear_breakpoint_conditions_and_commands): New function.
7715 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7716 (clear_breakpoint_conditions_and_commands): New declaration.
7718 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7720 * linux-aarch64-low.c (asm/ptrace.h): Include.
7722 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7724 Fix TLS access for -static -pthread.
7725 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7726 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7727 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7729 2014-05-20 Pedro Alves <palves@redhat.com>
7731 * linux-aarch64-low.c (aarch64_insert_point)
7732 (aarch64_remove_point): No longer check whether the type is
7733 supported here. Adjust to new interface.
7734 (the_low_target): Install aarch64_supports_z_point_type as
7735 supports_z_point_type method.
7736 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7737 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7738 instead of a Z packet char. Adjust.
7739 (arm_supports_z_point_type): New function.
7740 (arm_insert_point, arm_remove_point): Adjust to new interface.
7741 (the_low_target): Install arm_supports_z_point_type.
7742 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7743 (cris_insert_point, cris_remove_point): Adjust to new interface.
7744 Don't check whether the type is supported here.
7745 (the_low_target): Install cris_supports_z_point_type.
7746 * linux-low.c (linux_supports_z_point_type): New function.
7747 (linux_insert_point, linux_remove_point): Adjust to new interface.
7748 * linux-low.h (struct linux_target_ops) <insert_point,
7749 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7750 raw_breakpoint pointer parameter.
7751 <supports_z_point_type>: New method.
7752 * linux-mips-low.c (mips_supports_z_point_type): New function.
7753 (mips_insert_point, mips_remove_point): Adjust to new interface.
7754 Use mips_supports_z_point_type.
7755 (the_low_target): Install mips_supports_z_point_type.
7756 * linux-ppc-low.c (the_low_target): Install NULL as
7757 supports_z_point_type method.
7758 * linux-s390-low.c (the_low_target): Install NULL as
7759 supports_z_point_type method.
7760 * linux-sparc-low.c (the_low_target): Install NULL as
7761 supports_z_point_type method.
7762 * linux-x86-low.c (x86_supports_z_point_type): New function.
7763 (x86_insert_point): Adjust to new insert_point interface. Use
7764 insert_memory_breakpoint. Adjust to new
7765 i386_low_insert_watchpoint interface.
7766 (x86_remove_point): Adjust to remove_point interface. Use
7767 remove_memory_breakpoint. Adjust to new
7768 i386_low_remove_watchpoint interface.
7769 (the_low_target): Install x86_supports_z_point_type.
7770 * lynx-low.c (lynx_target_ops): Install NULL as
7771 supports_z_point_type callback.
7772 * nto-low.c (nto_supports_z_point_type): New.
7773 (nto_insert_point, nto_remove_point): Adjust to new interface.
7774 (nto_target_ops): Install nto_supports_z_point_type.
7775 * mem-break.c: Adjust intro comment.
7776 (struct raw_breakpoint) <raw_type, size>: New fields.
7777 <inserted>: Update comment.
7778 <shlib_disabled>: Delete field.
7779 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7780 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7781 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7782 (raw_bkpt_type_to_target_hw_bp_type): New function.
7783 (find_enabled_raw_code_breakpoint_at): New function.
7784 (find_raw_breakpoint_at): New type and size parameters. Use them.
7785 (insert_memory_breakpoint): New function, based off
7786 set_raw_breakpoint_at.
7787 (remove_memory_breakpoint): New function.
7788 (set_raw_breakpoint_at): Reimplement.
7789 (set_breakpoint): New, based on set_breakpoint_at.
7790 (set_breakpoint_at): Reimplement.
7791 (delete_raw_breakpoint): Go through the_target->remove_point
7792 instead of assuming memory breakpoints.
7793 (find_gdb_breakpoint_at): Delete.
7794 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7795 (find_gdb_breakpoint): New function.
7796 (set_gdb_breakpoint_at): Delete.
7797 (z_type_supported): New function.
7798 (set_gdb_breakpoint_1): New function, loosely based off
7799 set_gdb_breakpoint_at.
7800 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7801 (delete_gdb_breakpoint_at): Delete.
7802 (delete_gdb_breakpoint_1): New function, loosely based off
7803 delete_gdb_breakpoint_at.
7804 (delete_gdb_breakpoint): New function.
7805 (clear_gdb_breakpoint_conditions): Rename to ...
7806 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7808 (add_condition_to_breakpoint): Make static.
7809 (add_breakpoint_condition): Take a struct breakpoint pointer
7810 instead of an address. Adjust.
7811 (gdb_condition_true_at_breakpoint): Rename to ...
7812 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7814 (gdb_condition_true_at_breakpoint): Reimplement.
7815 (add_breakpoint_commands): Take a struct breakpoint pointer
7816 instead of an address. Adjust.
7817 (gdb_no_commands_at_breakpoint): Rename to ...
7818 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7819 parameter. Return true if no breakpoint was found. Change debug
7821 (gdb_no_commands_at_breakpoint): Reimplement.
7822 (run_breakpoint_commands): Rename to ...
7823 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7824 and change return type to boolean.
7825 (run_breakpoint_commands): New function.
7826 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7827 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7828 breakpoint. Go through the_target->remove_point instead of
7829 assuming memory breakpoint.
7830 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7831 software and hardware breakpoints.
7832 (reinsert_raw_breakpoint): Go through the_target->insert_point
7833 instead of assuming memory breakpoint.
7834 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7835 software and hardware breakpoints.
7836 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7837 Check both software and hardware breakpoints.
7838 (validate_inserted_breakpoint): Assert the breakpoint is a
7839 software breakpoint. Set the inserted flag to -1 instead of
7840 setting shlib_disabled.
7841 (delete_disabled_breakpoints): Adjust.
7842 (validate_breakpoints): Only validate software breakpoints.
7843 Adjust to inserted flag change.
7844 (check_mem_read, check_mem_write): Skip breakpoint types other
7845 than software breakpoints. Adjust to inserted flag change.
7846 * mem-break.h (enum raw_bkpt_type): New enum.
7847 (raw_breakpoint, struct process_info): Forward declare.
7848 (Z_packet_to_target_hw_bp_type): Delete declaration.
7849 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7850 (set_gdb_breakpoint, delete_gdb_breakpoint)
7851 (clear_breakpoint_conditions): New declarations.
7852 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7853 (breakpoint_inserted_here): Update comment.
7854 (add_breakpoint_condition, add_breakpoint_commands): Replace
7855 address parameter with a breakpoint pointer parameter.
7856 (gdb_breakpoint_here): Update comment.
7857 (delete_gdb_breakpoint_at): Delete.
7858 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7859 * server.c (process_point_options): Take a struct breakpoint
7860 pointer instead of an address. Adjust.
7861 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7862 delete_gdb_breakpoint.
7863 * spu-low.c (spu_target_ops): Install NULL as
7864 supports_z_point_type method.
7865 * target.h: Include mem-break.h.
7866 (struct target_ops) <prepare_to_access_memory>: Update comment.
7867 <supports_z_point_type>: New field.
7868 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7869 instead of a char. Also take a raw breakpoint pointer.
7870 * win32-arm-low.c (the_low_target): Install NULL as
7871 supports_z_point_type.
7872 * win32-i386-low.c (i386_supports_z_point_type): New function.
7873 (i386_insert_point, i386_remove_point): Adjust to new interface.
7874 (the_low_target): Install i386_supports_z_point_type.
7875 * win32-low.c (win32_supports_z_point_type): New function.
7876 (win32_insert_point, win32_remove_point): Adjust to new interface.
7877 (win32_target_ops): Install win32_supports_z_point_type.
7878 * win32-low.h (struct win32_target_ops):
7879 <supports_z_point_type>: New method.
7880 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7881 instead of a char. Also take a raw breakpoint pointer.
7883 2014-05-20 Pedro Alves <palves@redhat.com>
7885 * mem-break.h: Include break-common.h.
7886 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7887 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7888 (Z_packet_to_target_hw_bp_type): New declaration.
7889 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7890 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7891 (Z_PACKET_ACCESS_WP): Delete macros.
7892 (Z_packet_to_hw_type): Delete function.
7893 * i386-low.h: Don't include break-common.h here.
7894 (Z_packet_to_hw_type): Delete declaration.
7895 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7896 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7897 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7898 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7899 * linux-aarch64-low.c: Don't include break-common.h here.
7900 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7901 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7902 (Z_packet_to_target_hw_bp_type): Delete function.
7903 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7905 (mips_insert_point, mips_remove_point): Use
7906 Z_packet_to_target_hw_bp_type.
7908 2014-05-20 Pedro Alves <palves@redhat.com>
7910 * linux-aarch64-low.c: Include break-common.h.
7911 (enum target_point_type): Delete.
7912 (Z_packet_to_point_type): Rename to ...
7913 (Z_packet_to_target_hw_bp_type): ... this, and return a
7914 target_hw_bp_type instead.
7915 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7916 instead of an enum target_point_type.
7917 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7919 (aarch64_dr_state_insert_one_point)
7920 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7921 (aarch64_handle_aligned_watchpoint)
7922 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7923 Take an enum target_hw_bp_type instead of an enum
7925 (aarch64_supports_z_point_type): New function.
7926 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7927 use Z_packet_to_target_hw_bp_type.
7929 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7931 * configure.ac: Only use -Werror by default when DEVELOPMENT
7933 * configure: Regenerate.
7935 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7937 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7938 * linux-x86-low.c (X86_64_USER_REGS): New.
7939 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7941 2014-04-28 Yao Qi <yao@codesourcery.com>
7943 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7946 2014-04-25 Pedro Alves <palves@redhat.com>
7949 * linux-low.c (linux_attach_fail_reason_string): New function.
7950 (linux_attach_lwp): Delete.
7951 (linux_attach_lwp_1): Rename to ...
7952 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7953 argument. Remove "initial" parameter. Return int instead of
7954 void. Don't error or warn here.
7955 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7956 failure to attach to the tgid. Call warning when failing to
7958 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7959 argument. Remove "initial" parameter. Return int instead of
7960 void. Don't error or warn here.
7961 (linux_attach_fail_reason_string): New declaration.
7962 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7963 interface change. Use linux_attach_fail_reason_string.
7965 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7966 Walfred Tedeschi <walfred.tedeschi@intel.com>
7968 * Makefile.in: Added rules to handle new files
7969 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7970 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7971 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7972 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7973 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7974 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7976 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7977 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7978 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7979 i386/x32-avx512.xml.
7980 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7981 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7982 i386/x32-avx512-linux.xml.
7983 * i387-fp.c (num_avx512_k_registers): New constant for number
7985 (num_avx512_zmmh_low_registers): New constant for number of
7986 lower ZMM registers (0-15).
7987 (num_avx512_zmmh_high_registers): New constant for number of
7988 higher ZMM registers (16-31).
7989 (num_avx512_ymmh_registers): New contant for number of higher
7990 YMM registers (ymm16-31 added by avx521 on x86_64).
7991 (num_avx512_xmm_registers): New constant for number of higher
7992 XMM registers (xmm16-31 added by AVX512 on x86_64).
7993 (struct i387_xsave): Add space for AVX512 registers.
7994 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7995 Add code to handle AVX512 registers.
7996 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7997 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7998 prototypei from generated file.
7999 (tdesc_amd64_avx512_linux): Likewise.
8000 (init_registers_x32_avx512_linux): Likewise.
8001 (tdesc_x32_avx512_linux): Likewise.
8002 (init_registers_i386_avx512_linux): Likewise.
8003 (tdesc_i386_avx512_linux): Likewise.
8004 (x86_64_regmap): Add AVX512 registers.
8005 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8007 (initialize_low_arch): Add code to initialize AVX512 registers.
8009 2014-04-23 Pedro Alves <palves@redhat.com>
8011 * mem-break.c (find_gdb_breakpoint_at): Make static.
8012 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8014 2014-04-23 Pedro Alves <palves@redhat.com>
8016 * i386-low.c: Don't include break-common.h here.
8017 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8018 prototype to take target_hw_bp_type as argument instead of a Z
8020 * i386-low.h: Include break-common.h here.
8021 (Z_packet_to_hw_type): Declare.
8022 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8024 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8025 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8026 (x86_remove_point): Convert the packet number to a
8027 target_hw_bp_type before calling i386_low_remove_watchpoint.
8028 * win32-i386-low.c (i386_insert_point): Convert the packet number
8029 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8030 (i386_remove_point): Convert the packet number to a
8031 target_hw_bp_type before calling i386_low_remove_watchpoint.
8033 2014-04-23 Pedro Alves <palves@redhat.com>
8035 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8037 2014-04-10 Pedro Alves <palves@redhat.com>
8039 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8040 Check if the condition or command is NULL before checking if the
8041 breakpoint is known. On success, return true.
8042 * mem-break.h (add_breakpoint_condition): Document return.
8043 (add_breakpoint_commands): Add describing comment.
8044 * server.c (skip_to_semicolon): New function.
8045 (process_point_options): Use it.
8047 2014-04-09 Pedro Alves <palves@redhat.com>
8049 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8052 2014-02-27 Pedro Alves <palves@redhat.com>
8055 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8057 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8059 (last_thread_of_process_p): Take a PID argument instead of a
8061 (linux_wait_for_lwp): Delete.
8062 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8064 (linux_low_filter_event): New function, party factored out from
8065 linux_wait_for_event.
8066 (linux_wait_for_event): Rename to ...
8067 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8068 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8069 sigsuspend. Check for zombie leaders.
8070 (linux_wait_for_event): Reimplement as wrapper around
8071 linux_wait_for_event_filtered.
8072 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8073 a normal or signal exit is seen, it's the whole process exiting.
8074 (wait_for_sigstop): No longer a for_each_inferior callback.
8075 Rewrite on top of linux_wait_for_event_filtered.
8076 (stop_all_lwps): Call wait_for_sigstop directly.
8077 * server.c (resume, handle_target_event): Handle
8078 TARGET_WAITKIND_NO_RESUMED.
8080 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8082 * win32-low.c (psapi_get_dll_name,
8083 * win32_CreateToolhelp32Snapshot): Delete.
8084 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8085 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8087 (handle_load_dll): Add function description.
8088 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8090 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8092 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8094 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8095 base address when calling win32_add_one_solib.
8096 (handle_load_dll): Delete local variable load_addr.
8097 Remove 0x1000 offset applied to DLL base address when calling
8098 win32_add_one_solib.
8099 (handle_unload_dll): Add comment.
8101 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8103 * win32-low.c (win32_add_all_dlls): Renames
8104 win32_ensure_ntdll_loaded. Rewrite function documentation.
8105 Adjust implementation to always load all DLLs.
8106 Add 0x1000 offset to DLL base address when calling
8107 win32_add_one_solib.
8108 (child_initialization_done): New static global.
8109 (do_initial_child_stuff): Set child_initialization_done to
8110 zero during child initialization, and 1 after. Replace call
8111 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8113 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8114 (handle_unload_dll): Add function documentation.
8115 (get_child_debug_event): Ignore load and unload DLL events
8116 during child initialization.
8118 2014-02-20 Doug Evans <dje@google.com>
8120 Remove global all_lwps.
8121 * inferiors.h (ptid_of): Move here from linux-low.h.
8122 (pid_of, lwpid_of): Ditto.
8123 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8124 parameter is a struct thread_info * now.
8125 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8126 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8127 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8129 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8130 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8131 * linux-arm-low.c (update_registers_callback): Update, "entry"
8132 parameter is a struct thread_info * now.
8133 Fetch lwpid from current_inferior directly.
8134 (arm_insert_point): Pass &all_threads to find_inferior instead of
8136 (arm_remove_point): Ditto.
8137 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8138 (arm_prepare_to_resume): Fetch pid from thread.
8139 (arm_read_description): Fetch lwpid from current_inferior directly.
8140 * linux-low.c (all_lwps): Delete.
8141 (delete_lwp): Delete call to remove_inferior.
8142 (handle_extended_wait): Fetch lwpid from thread.
8143 (add_lwp): Don't set lwp->entry.id. Remove call to
8144 add_inferior_to_list.
8145 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8146 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8147 (kill_one_lwp_callback): Ditto.
8148 (linux_kill): Don't dereference NULL pointer.
8149 Fetch ptid,lwpid from thread.
8150 (get_detach_signal): Fetch ptid from thread.
8151 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8152 Simplify call to regcache_invalidate_thread.
8153 (delete_lwp_callback): Update, "entry" parameter is a
8154 struct thread_info * now. Fetch pid from thread.
8155 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8156 (status_pending_p_callback): Update, "entry" parameter is a
8157 struct thread_info * now. Fetch ptid from thread.
8158 (find_lwp_pid): Update, "entry" parameter is a
8159 struct thread_info * now.
8160 (linux_wait_for_lwp): Fetch pid from thread.
8161 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8162 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8163 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8164 (dequeue_one_deferred_signal): Ditto.
8165 (cancel_breakpoint): Fetch ptid from current_inferior.
8166 (linux_wait_for_event): Pass &all_threads to find_inferior,
8167 not &all_lwps. Fetch ptid, lwpid from thread.
8168 (count_events_callback): Update, "entry" parameter is a
8169 struct thread_info * now.
8170 (select_singlestep_lwp_callback): Ditto.
8171 (select_event_lwp_callback): Ditto.
8172 (cancel_breakpoints_callback): Ditto.
8173 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8175 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8176 (unsuspend_one_lwp): Update, "entry" parameter is a
8177 struct thread_info * now.
8178 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8180 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8181 Fetch lwpid from thread, not lwp.
8182 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8183 Pass &all_threads to find_inferior, not &all_lwps.
8184 (send_sigstop): Fetch lwpid from thread, not lwp.
8185 (send_sigstop_callback): Update, "entry" parameter is a
8186 struct thread_info * now.
8187 (suspend_and_send_sigstop_callback): Ditto.
8188 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8189 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8190 struct thread_info * now.
8191 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8193 (lwp_running): Update, "entry" parameter is a
8194 struct thread_info * now.
8195 (stop_all_lwps): Fetch ptid from thread.
8196 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8197 (linux_resume_one_lwp): Fetch lwpid from thread.
8198 (linux_set_resume_request): Update, "entry" parameter is a
8199 struct thread_info * now. Fetch pid, lwpid from thread.
8200 (resume_status_pending_p): Update, "entry" parameter is a
8201 struct thread_info * now.
8202 (need_step_over_p): Ditto. Fetch lwpid from thread.
8203 (start_step_over): Fetch lwpid from thread.
8204 (linux_resume_one_thread): Update, "entry" parameter is a
8205 struct thread_info * now. Fetch lwpid from thread.
8206 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8207 (proceed_one_lwp): Update, "entry" parameter is a
8208 struct thread_info * now. Fetch lwpid from thread.
8209 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8210 struct thread_info * now.
8211 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8212 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8213 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8215 (regsets_store_inferior_registers): Ditto.
8216 (fetch_register, store_register): Ditto.
8217 (linux_read_memory, linux_write_memory): Ditto.
8218 (linux_request_interrupt): Ditto.
8219 (linux_read_auxv): Ditto.
8220 (linux_xfer_siginfo): Ditto.
8221 (linux_qxfer_spu): Ditto.
8222 (linux_qxfer_libraries_svr4): Ditto.
8223 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8224 moved to inferiors.h.
8226 (get_thread_lwp): Update.
8227 (struct lwp_info): Delete member "entry". Simplify comment for
8230 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8231 current_inferior directly.
8232 (update_watch_registers_callback): Update, "entry" parameter is a
8233 struct thread_info * now. Fetch pid from thread.
8234 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8235 (mips_insert_point): Fetch lwpid from current_inferior.
8236 Pass &all_threads to find_inferior, not &all_lwps.
8237 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8238 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8240 (mips_stopped_data_address): Ditto.
8241 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8243 * linux-tile-low.c (tile_arch_setup): Ditto.
8244 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8245 (update_debug_registers_callback): Update, "entry" parameter is a
8246 struct thread_info * now. Fetch pid from thread.
8247 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8248 Pass &all_threads to find_inferior, not &all_lwps.
8249 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8250 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8251 Pass &all_threads to find_inferior, not &all_lwps.
8252 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8253 (i386_dr_low_get_status): Ditto.
8254 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8255 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8256 (x86_linux_read_description): Ditto.
8257 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8259 2014-02-20 Doug Evans <dje@google.com>
8261 * inferiors.c (get_first_inferior): Fix buglet.
8263 2014-02-19 Doug Evans <dje@google.com>
8265 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8266 * inferiors.c (add_thread): Change result type to struct thread_info *.
8267 All callers updated.
8268 (add_lwp): Call add_thread here instead of in callers.
8269 All callers updated.
8270 * linux-low.h (get_lwp_thread): Rewrite.
8271 (struct lwp_info): New member "thread".
8273 2014-02-19 Doug Evans <dje@google.com>
8275 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8276 All callers updated.
8278 2014-02-19 Doug Evans <dje@google.com>
8280 * inferiors.c (add_thread): Fix whitespace.
8282 2014-02-19 Doug Evans <dje@google.com>
8284 * dll.c (clear_dlls): Replace accessing list implemention details
8286 * gdbthread.h (get_first_thread): Declare.
8287 * inferiors.c (for_each_inferior_with_data): New function.
8288 (get_first_thread): New function.
8289 (find_thread_ptid): Simplify.
8290 (get_first_inferior): New function.
8291 (clear_list): Delete.
8292 (one_inferior_p): New function.
8293 (clear_inferior_list): New function.
8294 (clear_inferiors): Update.
8295 * inferiors.h (for_each_inferior_with_data): Declare.
8296 (clear_inferior_list): Declare.
8297 (one_inferior_p): Declare.
8298 (get_first_inferior): Declare.
8299 * linux-low.c (linux_wait_for_event): Replace accessing list
8300 implemention details with API function.
8301 * server.c (target_running): Ditto.
8302 (accumulate_file_name_length): New function.
8303 (emit_dll_description): New function.
8304 (handle_qxfer_libraries): Replace accessing list implemention
8305 details with API function.
8306 (handle_qxfer_threads_worker): New function.
8307 (handle_qxfer_threads_proper): Replace accessing list implemention
8308 details with API function.
8309 (handle_query): Ditto.
8310 (visit_actioned_threads_callback_ftype): New typedef.
8311 (visit_actioned_threads_data): New struct.
8312 (visit_actioned_threads): Rewrite to be find_inferior callback.
8313 (resume): Call find_inferior.
8314 (handle_status): Replace accessing list implemention
8315 details with API function.
8316 (process_serial_event): Replace accessing list implemention details
8318 * target.c (set_desired_inferior): Replace accessing list implemention
8319 details with API function.
8320 * tracepoint.c (same_process_p): New function.
8321 (gdb_agent_about_to_close): Replace accessing list implemention
8322 details with API function.
8323 * win32-low.c (child_delete_thread): Replace accessing list
8324 implemention details with API function.
8325 (match_dll_by_basename): New function.
8326 (dll_is_loaded_by_basename): New function.
8327 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8328 details call to dll_is_loaded_by_basename.
8330 2014-02-19 Doug Evans <dje@google.com>
8332 * dll.h (struct dll_info): Add comment.
8333 * gdbthread.h (struct thread_info): Add comment.
8334 (current_ptid): Simplify.
8335 * inferiors.c (add_process): Update.
8336 (remove_process): Update.
8337 * inferiors.h (struct process_info): Rename member "head" to "entry".
8338 * linux-low.c (delete_lwp): Update.
8340 (last_thread_of_process_p): Update.
8341 (kill_one_lwp_callback, linux_kill): Update.
8342 (status_pending_p_callback): Update.
8343 (wait_for_sigstop): Update. Simplify read of ptid.
8344 (start_step_over): Update.
8345 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8346 (get_lwp_thread): Update.
8347 (struct lwp_info): Rename member "head" to "entry".
8348 * regcache.h (inferior_list_entry): Delete.
8349 * server.c (kill_inferior_callback): Update.
8350 (detach_or_kill_inferior_callback): Update.
8351 (print_started_pid): Update.
8352 (print_attached_pid): Update.
8353 (process_serial_event): Simplify read of ptid.
8354 * thread-db.c (thread_db_create_event): Update.
8355 (thread_db_get_tls_address): Update.
8356 * win32-low.c (current_inferior_ptid): Simplify.
8358 2014-02-19 Tom Tromey <tromey@redhat.com>
8360 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8362 (target_supports_btrace): Update.
8364 2014-02-14 Yao Qi <yao@codesourcery.com>
8366 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8367 (rsp-low-ipa.o): New target.
8369 2014-02-12 Tom Tromey <tromey@redhat.com>
8371 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8372 convert_ascii_to_int.
8373 * regcache.c (registers_to_string): Likewise.
8374 * remote-utils.c (decode_M_packet): Likewise.
8375 * server.c (process_serial_event): Likewise.
8377 2014-02-12 Tom Tromey <tromey@redhat.com>
8379 * server.c (handle_query, handle_v_run): Use hex2bin, not
8381 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8383 2014-02-12 Tom Tromey <tromey@redhat.com>
8385 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8386 convert_int_to_ascii.
8387 * regcache.c (registers_to_string, collect_register_as_string):
8389 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8391 * server.c (process_serial_event): Likewise.
8392 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8393 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8395 2014-02-12 Tom Tromey <tromey@redhat.com>
8397 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8398 bin2hex, not hexify.
8399 * tracepoint.c (cmd_qtstatus): Likewise.
8401 2014-02-12 Tom Tromey <tromey@redhat.com>
8403 * remote-utils.c (monitor_output): Pass explicit length to
8406 2014-02-12 Tom Tromey <tromey@redhat.com>
8408 * tracepoint.c: Include rsp-low.h.
8409 * server.c: Include rsp-low.h.
8410 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8411 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8413 * remote-utils.c: Include rsp-low.h.
8414 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8415 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8416 (convert_int_to_ascii, convert_ascii_to_int): Move to
8418 * regcache.c: Include rsp-low.h.
8419 * ax.c: Include rsp-low.h.
8420 * Makefile.in (SFILES): Add common/rsp-low.c.
8421 (OBS): Add rsp-low.o.
8422 (rsp-low.o): New target.
8424 2014-02-12 Tom Tromey <tromey@redhat.com>
8426 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8427 Include print-utils.h.
8428 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8429 (plongest, thirty_two, phex_nz): Remove.
8430 * Makefile.in (SFILES): Add common/print-utils.c.
8431 (OBS): Add print-utils.o.
8432 (print-utils-ipa.o): New target.
8433 (print-utils.o): New target.
8434 (IPA_OBJS): Add print-utils-ipa.o.
8436 2014-02-06 Tom Tromey <tromey@redhat.com>
8438 * Makefile.in (SFILES): Fix indentation.
8440 2014-02-05 Doug Evans <dje@google.com>
8442 * linux-low.c (linux_wait_for_event): Improve comment.
8443 (linux_wait_1): Keep current_inferior in sync with event_child.
8445 2014-01-22 Doug Evans <dje@google.com>
8447 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8449 2014-01-22 Doug Evans <dje@google.com>
8451 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8452 * configure: Regenerate.
8453 * config.in: Regenerate.
8454 * Makefile.in (SFILES): Add debug.c.
8456 * debug.c: New file.
8457 * debug.h: New file.
8458 * linux-aarch64-low.c (*): Update all debugging printfs to use
8459 debug_printf instead of fprintf.
8460 * linux-arm-low.c (*): Ditto.
8461 * linux-cris-low.c (*): Ditto.
8462 * linux-crisv32-low.c (*): Ditto.
8463 * linux-m32r-low.c (*): Ditto.
8464 * linux-sparc-low.c (*): Ditto.
8465 * linux-x86.c (*): Ditto.
8466 * linux-low.c (*): Ditto.
8467 (linux_wait_1): Add calls to debug_enter, debug_exit.
8468 (linux_wait): Remove redundant debugging printf.
8469 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8470 (linux_resume, unstop_all_lwps): Ditto.
8471 * mem-break.c (*): Update all debugging printfs to use
8472 debug_printf instead of fprintf.
8473 * remote-utils.c (*): Ditto.
8474 * thread-db.c (*): Ditto.
8475 * server.c #include <ctype.h>, "gdb_vecs.h".
8476 (debug_threads): Moved to debug.c.
8477 (*): Update all debugging printfs to use debug_printf instead of
8479 (start_inferior): Replace call to fflush with call to debug_flush.
8480 (monitor_show_help): Mention set debug-format.
8481 (parse_debug_format_options): New function.
8482 (handle_monitor_command): Handle "monitor set debug-format".
8483 (gdbserver_usage): Mention --debug-format.
8484 (main): Parse --debug-format.
8485 * server.h (debug_threads): Declaration moved to debug.h.
8487 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8488 trace_debug_1 that uses debug_printf.
8489 (tracepoint_look_up_symbols): Update all debugging printfs to use
8490 debug_printf instead of fprintf.
8492 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8494 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8497 2014-01-17 Pedro Alves <palves@redhat.com>
8500 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8501 defined after including gdb_proc_service.h.
8503 2014-01-16 Doug Evans <dje@google.com>
8505 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8506 (match_dll): Use it.
8508 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8510 * target.h (target_ops) <read_btrace>: Change parameters and
8511 return type to allow error reporting.
8512 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8513 trace reading errors on.
8514 * linux-low.c (linux_low_read_btrace): Pass trace reading
8516 (linux_low_disable_btrace): New.
8518 2014-01-15 Doug Evans <dje@google.com>
8520 * inferiors.c (thread_id_to_gdb_id): Delete.
8521 * inferiors.h (thread_id_to_gdb_id): Delete.
8523 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8525 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8526 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8529 2014-01-08 Pedro Alves <palves@redhat.com>
8531 * server.c (handle_status): Don't discard previous queued stop
8532 replies or thread's pending status here.
8533 (main) <disconnection>: Do it here instead.
8535 2014-01-08 Pedro Alves <palves@redhat.com>
8537 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8538 * server.c (visit_actioned_threads, handle_pending_status): New
8540 (handle_v_cont): Factor out parts to ...
8541 (resume): ... this new function. If in all-stop, and a thread
8542 being resumed has a pending status, report it without actually
8544 (myresume): Adjust to use the new 'resume' function.
8545 (clear_pending_status_callback, set_pending_status_callback)
8546 (find_status_pending_thread_callback): New functions.
8547 (handle_status): Handle the case of multiple threads having
8548 interesting statuses to report. Report threads' real last signal
8549 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8550 with an interesting thread to report the status for, instead of
8551 always reporting the status of the first thread.
8553 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8555 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8556 * gdbreplay.c (gdbreplay_version): Likewise.
8558 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8560 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8561 iov.iov_len with the real length in use.
8563 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8565 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8566 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8567 for all targets that use win32-low.c.
8568 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8569 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8571 2013-12-13 Pedro Alves <palves@redhat.com>
8573 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8574 if equal to TARGET_WAITKIND_LOADED.
8575 * win32-low.c (cached_status): New static global.
8576 (win32_wait): Add declaration.
8577 (do_initial_child_stuff): Flush all initial pending debug events
8578 up to the initial breakpoint.
8579 (win32_wait): If CACHED_STATUS was set, return that instead
8580 of doing a real wait. Remove the code resuming the execution
8581 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8582 during the initial phase. Also remove the code changing
8583 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8584 TARGET_WAITKIND_STOPPED.
8586 2013-12-11 Yao Qi <yao@codesourcery.com>
8588 * notif.c (handle_notif_ack): Return 0 if no notification
8591 2013-11-20 Doug Evans <dje@google.com>
8593 * linux-low.c (linux_set_resume_request): Fix comment.
8595 2013-11-20 Doug Evans <dje@google.com>
8597 * linux-low.c (resume_status_pending_p): Tweak comment.
8599 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8601 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8602 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8603 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8604 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8605 (srv_amd64_regobj): Add amd64-mpx.o.
8606 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8607 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8608 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8609 * i387-fp.c (num_pl_bnd_register) Added constant.
8610 (num_pl_bnd_cfg_registers) Added constant.
8611 (struct i387_xsave) Added reserved area and MPX fields.
8612 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8613 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8615 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8616 (init_registers_amd64_mpx_linux): Declare new function.
8617 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8618 (x86_64_regmap): Add MPX registers.
8619 (x86_linux_read_description): Add MPX case.
8620 (initialize_low_arch): Initialize MPX targets.
8622 2013-11-18 Tom Tromey <tromey@redhat.com>
8624 * configure: Rebuild.
8625 * configure.ac: Don't check for stdlib.h.
8626 * gdbreplay.c: Unconditionally include stdlib.h.
8628 2013-11-18 Tom Tromey <tromey@redhat.com>
8630 * config.in: Rebuild.
8631 * configure: Rebuild.
8632 * configure.ac: Don't use AC_HEADER_DIRENT.
8634 2013-11-18 Tom Tromey <tromey@redhat.com>
8636 * server.h: Don't check HAVE_STRING_H.
8637 * gdbreplay.c: Don't check HAVE_STRING_H.
8638 * configure: Rebuild.
8640 2013-11-18 Tom Tromey <tromey@redhat.com>
8642 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8645 2013-11-08 Tom Tromey <tromey@redhat.com>
8647 * configure, config.in: Rebuild.
8648 * configure.ac: Remove unused configury.
8650 2013-11-08 Tom Tromey <tromey@redhat.com>
8652 * acinclude.m4: Include common.m4, codeset.m4.
8653 * configure, config.in: Rebuild.
8654 * configure.ac: Use GDB_AC_COMMON.
8656 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8658 * linux-s390-low.c (HWCAP_S390_TE): New define.
8659 (s390_arch_setup): Consider the TE field in the HWCAP for
8660 determining 'have_regset_tdb'.
8662 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8665 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8668 2013-10-02 Pedro Alves <palves@redhat.com>
8670 * server.c (process_serial_event): Don't output "GDBserver
8671 exiting" if GDB is connected through stdio.
8672 * target.c (mywait): Likewise, be silent if GDB is connected
8675 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8677 * lynx-low.c (lynx_add_threads_after_attach): New function.
8678 (lynx_attach): Remove call to add_thread. Add call to
8679 lynx_add_threads_after_attach instead.
8681 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8683 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8684 * config.in, configure: Regenerated.
8686 2013-09-18 Yao Qi <yao@codesourcery.com>
8689 * server.c (start_inferior): Clear 'resume_info'.
8691 2013-09-16 Jiong Wang <jiwang@tilera.com>
8693 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8696 2013-09-16 Jiong Wang <jiwang@tilera.com>
8698 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8699 linux-tile-low.o to srv_tgtobj.
8701 2013-09-16 Will Newton <will.newton@linaro.org>
8703 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8706 2013-09-06 Pedro Alves <palves@redhat.com>
8708 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8709 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8710 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8711 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8712 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8713 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8715 2013-09-06 Pedro Alves <palves@redhat.com>
8717 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8718 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8720 2013-09-06 Pedro Alves <palves@redhat.com>
8722 * linux-amd64-ipa.c: Include tracepoint.h.
8723 * linux-i386-ipa.c: Include tracepoint.h.
8725 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8727 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8728 (ps_get_thread_area): New function.
8730 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8732 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8733 (initialize_low_arch): Call init_registers_crisv32 rather than
8734 init_register_crisv32.
8736 2013-09-05 Pedro Alves <palves@redhat.com>
8738 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8740 * hostio.h: ... this new file.
8741 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8742 win32-low.c: Include hostio.h.
8744 2013-09-05 Pedro Alves <palves@redhat.com>
8746 * server.h (gdb_client_data, handler_func, callback_handler_func)
8747 (delete_file_handler, add_file_handler, append_callback_event)
8748 (delete_callback_event, start_event_loop, initialize_event_loop):
8749 Move to event-loop.h and include it.
8750 * event-loop.h: New file.
8752 2013-09-05 Pedro Alves <palves@redhat.com>
8754 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8755 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8756 (loaded_dll, unloaded_dll): Move to ...
8757 * dll.h: ... this new file.
8758 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8760 2013-09-05 Pedro Alves <palves@redhat.com>
8762 * server.h (current_process, get_thread_process, all_processes)
8763 (add_inferior_to_list, for_each_inferior, current_inferior)
8764 (remove_inferior, add_process, remove_process, find_process_pid)
8765 (have_started_inferiors_p, have_attached_inferiors_p)
8766 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8767 (clear_inferiors, find_inferior, find_inferior_id)
8768 (inferior_target_data, set_inferior_target_data)
8769 (inferior_regcache_data, set_inferior_regcache_data): Move to
8770 inferiors.h, and include it.
8771 * inferiors.h: New file.
8773 2013-09-05 Pedro Alves <palves@redhat.com>
8775 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8779 2013-09-05 Pedro Alves <palves@redhat.com>
8781 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8783 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8784 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8785 (handle_tracepoint_general_set, handle_tracepoint_query)
8786 (tracepoint_finished_step, tracepoint_was_hit)
8787 (release_while_stepping_state_list, current_traceframe)
8788 (in_readonly_region, traceframe_read_mem)
8789 (fetch_traceframe_registers, traceframe_read_sdata)
8790 (traceframe_read_info, struct fast_tpoint_collect_status)
8791 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8792 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8793 (supply_fast_tracepoint_registers)
8794 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8795 (ipa_tdesc, claim_trampoline_space)
8796 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8797 (agent_mem_read, agent_get_trace_state_variable_value)
8798 (agent_set_trace_state_variable_value, agent_tsv_read)
8799 (agent_mem_read_string, get_raw_reg_func_addr)
8800 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8801 * tracepoint.h: ... this new file.
8803 2013-09-05 Pedro Alves <palves@redhat.com>
8805 * server.h (perror_with_name, error, fatal, warning, paddress)
8806 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8808 * utils.h: New file.
8810 2013-09-05 Pedro Alves <palves@redhat.com>
8812 * server.h (remote_debug, noack_mode, transport_is_reliable)
8813 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8814 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8815 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8816 (write_enn, initialize_async_io, enable_async_io)
8817 (disable_async_io, check_remote_input_interrupt_request)
8818 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8819 (dead_thread_notify, prepare_resume_reply)
8820 (decode_address_to_semicolon, decode_address, decode_m_packet)
8821 (decode_M_packet, decode_X_packet, decode_xfer_write)
8822 (decode_search_memory_packet, unhexify, hexify)
8823 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8824 (look_up_one_symbol, relocate_instruction)
8825 (monitor_output): Move to remote-utils.h, and include it.
8826 * remote-utils.h: New file.
8828 2013-09-05 Pedro Alves <palves@redhat.com>
8830 * server.h (_): Delete.
8832 2013-09-02 Pedro Alves <palves@redhat.com>
8834 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8835 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8837 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8839 2013-09-02 Pierre Muller <muller@sourceware.org>
8841 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8842 or WriteProcessMemory complete successfully and handle
8843 ERROR_PARTIAL_COPY error.
8845 2013-09-02 Pedro Alves <palves@redhat.com>
8847 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8848 error instead of EIO.
8850 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8853 * linux-low.c: Include filestuff.h.
8854 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8855 * lynx-low.c: Include filestuff.h.
8856 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8857 * server.c: Include filestuff.h.
8858 (main): Call notice_open_fds.
8859 * spu-low.c: Include filestuff.h.
8860 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8862 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8864 * Makefile.in: Explain why ../target and ../nat are not
8865 listed as include file search paths.
8866 (linux-waitpid.o): New object file rule.
8867 * configure.srv (srv_native_linux_obj): New variable.
8868 Replace all occurrences of linux native object files with
8869 $srv_native_linux_obj.
8870 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8871 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8872 (linux_enable_event_reporting): Remove declaration.
8873 (my_waitpid): Moved to common/linux-waitpid.c.
8874 (linux_wait_for_event): Pass ptid when calling
8875 linux_enable_event_reporting.
8876 (linux_supports_tracefork_flag): Remove.
8877 (linux_enable_event_reporting): Likewise.
8878 (linux_tracefork_grandchild): Remove.
8879 (STACK_SIZE): Moved to common/linux-ptrace.c.
8880 (linux_tracefork_child): Remove.
8881 (linux_test_for_tracefork): Remove.
8882 (linux_look_up_symbols): Call linux_supports_traceclone.
8883 (initialize_low): Remove call to linux_test_for_tracefork.
8884 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8885 common/linux-ptrace.h.
8886 (PTRACE_TYPE_ARG4): Likewise.
8887 Include linux-ptrace.h.
8889 2013-08-21 Pedro Alves <palves@redhat.com>
8891 * config.in: Renegerate.
8893 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8895 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8896 (SFILES): Remove $(srcdir)/common/target-common.c and
8897 add $(srcdir)/target/waitstatus.c.
8898 (OBS): Remove target-common.o and add waitstatus.o.
8899 (server_h): Remove $(srcdir)/../common/target-common.h and
8900 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8901 and $(srcdir)/../target/waitstatus.h.
8902 (target-common.o): Remove.
8903 (waitstatus.o): New target object file.
8904 * target.h: Do not include target-common.h and
8905 include target/resume.h, target/wait.h and
8906 target/waitstatus.h.
8908 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8910 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8911 to PTRACE_TYPE_ARG3.
8912 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8913 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8915 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8916 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8918 2013-07-27 Jie Zhang <jie@codesourcery.com>
8919 Daniel Jacobowitz <dan@codesourcery.com>
8920 Yao Qi <yao@codesourcery.com>
8922 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8923 (mips-linux-watch.o): New rule.
8924 (mips_linux_watch_h): New variable.
8925 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8927 * linux-mips-low.c: Include mips-linux-watch.h.
8928 (struct arch_process_info, struct arch_lwp_info): New.
8929 (update_watch_registers_callback): New function.
8930 (mips_linux_new_process, mips_linux_new_thread) New functions.
8931 (mips_linux_prepare_to_resume, mips_insert_point): New
8933 (mips_remove_point, mips_stopped_by_watchpoint): New
8935 (rsp_bp_type_to_target_hw_bp_type): New function.
8936 (mips_stopped_data_address): New function.
8937 (the_low_target): Add watchpoint support functions.
8939 2013-07-27 Yao Qi <yao@codesourcery.com>
8941 * i386-low.c: Include break-common.h.
8942 (enum target_hw_bp_type): Remove.
8944 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8946 * Makefile.in (SFILES): /common/target-common.c.
8947 (OBS): Add target-common.o.
8948 (server_h): Add $(srcdir)/../common/target-common.h.
8949 (target-common.o): New target.
8950 * server.c (queue_stop_reply_callback): Free
8951 status string after use.
8952 * target.c (target_waitstatus_to_string): Remove.
8953 * target.h: Include target-common.h.
8954 (resume_kind): Likewise.
8955 (target_waitkind): Likewise.
8956 (target_waitstatus): Likewise.
8957 (TARGET_WNOHANG): Likewise.
8959 2013-07-04 Yao Qi <yao@codesourcery.com>
8961 * Makefile.in (host_alias): Use @host_noncanonical@.
8962 (target_alias): Use @target_noncanonical@.
8963 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8964 ACX_NONCANONICAL_HOST.
8965 * configure: Regenerated.
8968 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8970 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8971 * configure: Rebuild.
8972 * Makefile.in (version_host, version_target): Get from configure.
8973 (version.c): Use $(version_host) and $(version_target).
8975 2013-07-03 Pedro Alves <palves@redhat.com>
8977 * Makefile.in (config.status): Depend on development.sh.
8978 * acinclude.m4: Include libmcheck.m4.
8979 * configure: Regenerate.
8981 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8983 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8984 attribute inside the parentheses.
8985 (winapi_DebugSetProcessKillOnExit): Ditto.
8986 (winapi_DebugBreakProcess): Ditto.
8987 (winapi_GenerateConsoleCtrlEvent): Ditto.
8989 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8991 * notif.h (notif_event): Add a dummy member to avoid compiler
8994 2013-07-01 Pedro Alves <palves@redhat.com>
8996 * hostio.c (HOSTIO_PATH_MAX): Define.
8997 (require_filename, handle_open, handle_unlink, handle_readlink):
9000 2013-07-01 Pedro Alves <palves@redhat.com>
9002 * server.h: Include "pathmax.h".
9003 * linux-low.c: Don't include sys/param.h.
9004 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9006 * win32-low.c: Don't include sys/param.h.
9007 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9009 2013-07-01 Pedro Alves <palves@redhat.com>
9011 * event-loop.c: Don't check HAVE_UNISTD_H before including
9013 * gdbreplay.c: Likewise.
9014 * remote-utils.c: Likewise.
9015 * server.c: Likewise.
9016 * configure.ac: Don't check for unistd.h.
9017 * configure: Regenerate.
9019 2013-06-28 Tom Tromey <tromey@redhat.com>
9021 * Makefile.in (version.c): Use version.in, not
9024 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9026 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9027 * configure: Rebuild.
9028 * Makefile.in (version_host, version_target): Get from configure.
9029 (version.c): Use $(version_host) and $(version_target).
9031 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9033 Fix trace-status to output user name without trailing colon.
9034 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9036 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9038 Fix trace-status to output proper start-time and stop-time.
9039 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9040 output start time and stop time in hex as gdb expects.
9042 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9044 * tracepoint.c (build_traceframe_info_xml): Output trace state
9045 variables present in the trace buffer.
9047 2013-06-24 Tom Tromey <tromey@redhat.com>
9049 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9051 (version.o): Remove.
9052 * gdbreplay.c: Include version.h.
9053 (version, host_name): Don't declare.
9054 * server.h: Include version.h.
9055 (version, host_name): Don't declare.
9057 2013-06-12 Pedro Alves <palves@redhat.com>
9059 * linux-x86-low.c (linux_is_elf64): Delete global.
9060 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9061 with local linux_pid_exe_is_elf_64_file use.
9063 2013-06-11 Pedro Alves <palves@redhat.com>
9065 * linux-low.c (regset_disabled, disable_regset): New functions.
9066 (regsets_fetch_inferior_registers)
9067 (regsets_store_inferior_registers): Use them.
9068 (initialize_regsets_info); Don't allocate the disabled_regsets
9070 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9073 2013-06-11 Pedro Alves <palves@redhat.com>
9075 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9078 2013-06-11 Pedro Alves <palves@redhat.com>
9080 * linux-x86-low.c (initialize_low_arch): Call
9081 init_registers_x32_avx_linux.
9083 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9085 Fix compatibility with Android Bionic.
9086 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9089 2013-06-07 Pedro Alves <palves@redhat.com>
9092 * Makefile.in (OBS): Add tdesc.o.
9093 (IPA_OBJS): Add tdesc-ipa.o.
9094 (tdesc-ipa.o): New rule.
9095 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9097 * linux-low.c (new_inferior): Delete.
9098 (disabled_regsets, num_regsets): Delete.
9099 (linux_add_process): Adjust to set the new per-process
9101 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9102 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9103 was a stop. When calling arch_setup, switch the current inferior
9104 to the thread that got an event.
9105 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9106 (regsets_fetch_inferior_registers)
9107 (regsets_store_inferior_registers): New regsets_info parameter.
9109 (linux_register_in_regsets): New regs_info parameter. Adjust to
9111 (register_addr, fetch_register, store_register): New usrregs_info
9112 parameter. Adjust to use it.
9113 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9114 parameter regs_info. Adjust to use it.
9115 (linux_fetch_registers): Get the current inferior's regs_info, and
9117 (linux_store_registers): Ditto.
9118 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9119 (initialize_low): Don't initialize the target_regsets here. Call
9120 initialize_low_arch.
9121 * linux-low.h (target_regsets): Delete declaration.
9122 (struct regsets_info): New.
9123 (struct usrregs_info): New.
9124 (struct regs_info): New.
9125 (struct process_info_private) <new_inferior>: New field.
9126 (struct linux_target_ops): Delete the num_regs, regmap, and
9127 regset_bitmap fields. New field regs_info.
9128 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9129 * i387-fp.c (num_xmm_registers): Delete.
9130 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9131 calls to new interface.
9132 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9133 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9134 Infer the number of xmm registers from the regcache's target
9136 * i387-fp.h (num_xmm_registers): Delete.
9137 * inferiors.c (add_thread): Don't install the thread's regcache
9139 * proc-service.c (gregset_info): Fetch the current inferior's
9140 regs_info. Adjust to use it.
9141 * regcache.c: Include tdesc.h.
9142 (register_bytes, reg_defs, num_registers)
9143 (gdbserver_expedite_regs): Delete.
9144 (get_thread_regcache): If the thread doesn't have a regcache yet,
9145 create one, instead of aborting gdbserver.
9146 (regcache_invalidate_one): Rename to ...
9147 (regcache_invalidate_thread): ... this.
9148 (regcache_invalidate_one): New.
9149 (regcache_invalidate): Only invalidate registers of the current
9151 (init_register_cache): Add target_desc parameter, and use it.
9152 (new_register_cache): Ditto. Assert the target description has a
9153 non zero registers_size.
9154 (regcache_cpy): Add assertions. Adjust.
9155 (realloc_register_cache, set_register_cache): Delete.
9156 (registers_to_string, registers_from_string): Adjust.
9157 (find_register_by_name, find_regno, find_register_by_number)
9158 (register_cache_size): Add target_desc parameter, and use it.
9159 (free_register_cache_thread, free_register_cache_thread_one)
9160 (regcache_release, register_cache_size): New.
9161 (register_size): Add target_desc parameter, and use it.
9162 (register_data, supply_register, supply_register_zeroed)
9163 (supply_regblock, supply_register_by_name, collect_register)
9164 (collect_register_as_string, collect_register_by_name): Adjust.
9165 * regcache.h (struct target_desc): Forward declare.
9166 (struct regcache) <tdesc>: New field.
9167 (init_register_cache, new_register_cache): Add target_desc
9169 (regcache_invalidate_thread): Declare.
9170 (regcache_invalidate_one): Delete declaration.
9171 (regcache_release): Declare.
9172 (find_register_by_number, register_cache_size, register_size)
9173 (find_regno): Add target_desc parameter.
9174 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9176 * remote-utils.c: Include tdesc.h.
9177 (outreg, prepare_resume_reply): Adjust.
9178 * server.c: Include tdesc.h.
9179 (gdbserver_xmltarget): Delete declaration.
9180 (get_features_xml, process_serial_event): Adjust.
9181 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9183 (struct process_info) <tdesc>: New field.
9184 (ipa_tdesc): Declare.
9185 * tdesc.c: New file.
9186 * tdesc.h: New file.
9187 * tracepoint.c: Include tdesc.h.
9188 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9189 (get_context_regcache): Adjust to pass ipa_tdesc down.
9190 (do_action_at_tracepoint): Adjust to get the register cache size
9191 from the context regcache's description.
9192 (traceframe_walk_blocks): Adjust to get the register cache size
9193 from the current trace frame's description.
9194 (traceframe_get_pc): Adjust to get current trace frame's
9195 description and pass it down.
9196 (gdb_collect): Adjust to get the register cache size from the
9198 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9199 (gdbserver_xmltarget): Delete.
9200 (initialize_low_tracepoint): Set the ipa's target description.
9201 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9202 (initialize_low_tracepoint): Set the ipa's target description.
9203 * linux-x86-low.c: Include tdesc.h.
9204 [__x86_64__] (is_64bit_tdesc): New.
9205 (ps_get_thread_area, x86_get_thread_area): Use it.
9206 (i386_cannot_store_register): Rename to ...
9207 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9208 (i386_cannot_fetch_register): Rename to ...
9209 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9210 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9212 (target_regsets): Rename to ...
9213 (x86_regsets): ... this.
9214 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9216 (x86_siginfo_fixup): Use is_64bit_tdesc.
9217 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9218 (tdesc_x32_avx_linux, tdesc_x32_linux)
9219 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9221 (x86_linux_update_xmltarget): Delete.
9222 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9223 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9224 (AMD64_LINUX_USER64_CS): New.
9225 (x86_linux_read_description): New, based on
9226 x86_linux_update_xmltarget.
9227 (same_process_callback): New.
9228 (x86_arch_setup_process_callback): New.
9229 (x86_linux_update_xmltarget): New.
9230 (x86_regsets_info): New.
9231 (amd64_linux_regs_info): New.
9232 (i386_linux_usrregs_info): New.
9233 (i386_linux_regs_info): New.
9234 (x86_linux_regs_info): New.
9235 (x86_arch_setup): Reimplement.
9236 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9237 (x86_emit_ops): Ditto.
9238 (the_low_target): Adjust. Install x86_linux_regs_info,
9239 x86_cannot_fetch_register, and x86_cannot_store_register.
9240 (initialize_low_arch): New.
9241 * linux-ia64-low.c (tdesc_ia64): Declare.
9242 (ia64_fetch_register): Adjust.
9243 (ia64_usrregs_info, regs_info): New globals.
9244 (ia64_regs_info): New function.
9245 (the_low_target): Adjust.
9246 (initialize_low_arch): New function.
9247 * linux-sparc-low.c (tdesc_sparc64): Declare.
9248 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9250 (sparc_arch_setup): New function.
9251 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9252 (the_low_target): Adjust.
9253 (initialize_low_arch): New function.
9254 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9255 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9256 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9257 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9258 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9259 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9260 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9261 (tdesc_powerpc_isa205_vsx64l): Declare.
9262 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9263 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9264 (ppc_set_pc, ppc_get_hwcap): Adjust.
9265 (ppc_usrregs_info): Forward declare.
9266 (!__powerpc64__) ppc_regmap_adjusted: New global.
9267 (ppc_arch_setup): Adjust to the current process'es target
9269 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9270 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9271 (ppc_store_evrregset): Adjust.
9272 (target_regsets): Rename to ...
9273 (ppc_regsets): ... this, and make static.
9274 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9275 (ppc_regs_info): New function.
9276 (the_low_target): Adjust.
9277 (initialize_low_arch): New function.
9278 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9279 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9280 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9281 (tdesc_s390x_linux64v2): Declare.
9282 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9283 (s390_fill_gregset, s390_store_last_break): Adjust.
9284 (target_regsets): Rename to ...
9285 (s390_regsets): ... this, and make static.
9286 (s390_get_pc, s390_set_pc): Adjust.
9287 (s390_get_hwcap): New target_desc parameter, and use it.
9288 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9289 (s390_arch_setup): Adjust to set the current process'es target
9290 description. Don't adjust the regmap.
9291 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9292 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9293 (regs_info_3264): New globals.
9294 (s390_regs_info): New function.
9295 (the_low_target): Adjust.
9296 (initialize_low_arch): New function.
9297 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9298 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9299 [__mips64] (init_registers_mips_linux)
9300 (init_registers_mips_dsp_linux): Delete defines.
9301 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9302 (have_dsp): New global.
9303 (mips_read_description): New, based on mips_arch_setup.
9304 (mips_arch_setup): Reimplement.
9305 (get_usrregs_info): New function.
9306 (mips_cannot_fetch_register, mips_cannot_store_register)
9307 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9308 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9309 (target_regsets): Rename to ...
9310 (mips_regsets): ... this, and make static.
9311 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9312 (dsp_regs_info, regs_info): New globals.
9313 (mips_regs_info): New function.
9314 (the_low_target): Adjust.
9315 (initialize_low_arch): New function.
9316 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9317 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9319 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9320 (arm_read_description): New, with bits factored from
9322 (arm_arch_setup): Reimplement.
9323 (target_regsets): Rename to ...
9324 (arm_regsets): ... this, and make static.
9325 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9326 (arm_regs_info): New function.
9327 (the_low_target): Adjust.
9328 (initialize_low_arch): New function.
9329 * linux-m68k-low.c (tdesc_m68k): Declare.
9330 (target_regsets): Rename to ...
9331 (m68k_regsets): ... this, and make static.
9332 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9333 (m68k_regs_info): New function.
9334 (m68k_arch_setup): New function.
9335 (the_low_target): Adjust.
9336 (initialize_low_arch): New function.
9337 * linux-sh-low.c (tdesc_sharch): Declare.
9338 (target_regsets): Rename to ...
9339 (sh_regsets): ... this, and make static.
9340 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9341 (sh_regs_info, sh_arch_setup): New functions.
9342 (the_low_target): Adjust.
9343 (initialize_low_arch): New function.
9344 * linux-bfin-low.c (tdesc_bfin): Declare.
9345 (bfin_arch_setup): New function.
9346 (bfin_usrregs_info, regs_info): New globals.
9347 (bfin_regs_info): New function.
9348 (the_low_target): Adjust.
9349 (initialize_low_arch): New function.
9350 * linux-cris-low.c (tdesc_cris): Declare.
9351 (cris_arch_setup): New function.
9352 (cris_usrregs_info, regs_info): New globals.
9353 (cris_regs_info): New function.
9354 (the_low_target): Adjust.
9355 (initialize_low_arch): New function.
9356 * linux-cris-low.c (tdesc_crisv32): Declare.
9357 (cris_arch_setup): New function.
9358 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9359 (cris_regs_info): New function.
9360 (the_low_target): Adjust.
9361 (initialize_low_arch): New function.
9362 * linux-m32r-low.c (tdesc_m32r): Declare.
9363 (m32r_arch_setup): New function.
9364 (m32r_usrregs_info, regs_info): New globals.
9365 (m32r_regs_info): Adjust.
9366 (initialize_low_arch): New function.
9367 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9368 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9369 (tic6x_usrregs_info): Forward declare.
9370 (tic6x_read_description): New function, based on ...
9371 (tic6x_arch_setup): ... this. Reimplement.
9372 (target_regsets): Rename to ...
9373 (tic6x_regsets): ... this, and make static.
9374 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9375 (tic6x_regs_info): New function.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9379 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9380 (target_regsets): Rename to ...
9381 (xtensa_regsets): ... this, and make static.
9382 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9384 (xtensa_arch_setup, xtensa_regs_info): New functions.
9385 (the_low_target): Adjust.
9386 (initialize_low_arch): New function.
9387 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9388 (nios2_arch_setup): Set the current process'es tdesc.
9389 (target_regsets): Rename to ...
9390 (nios2_regsets): ... this.
9391 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9392 (nios2_regs_info): New function.
9393 (the_low_target): Adjust.
9394 (initialize_low_arch): New function.
9395 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9396 (aarch64_arch_setup): Set the current process'es tdesc.
9397 (target_regsets): Rename to ...
9398 (aarch64_regsets): ... this.
9399 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9400 (aarch64_regs_info): New function.
9401 (the_low_target): Adjust.
9402 (initialize_low_arch): New function.
9403 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9405 (target_regsets): Rename to ...
9406 (tile_regsets): ... this.
9407 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9408 (tile_regs_info): New function.
9409 (tile_arch_setup): Set the current process'es tdesc.
9410 (the_low_target): Adjust.
9411 (initialize_low_arch): New function.
9412 * spu-low.c (tdesc_spu): Declare.
9413 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9414 * win32-arm-low.c (tdesc_arm): Declare.
9415 (arm_arch_setup): New function.
9416 (the_low_target): Install arm_arch_setup instead of
9418 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9419 (init_windows_x86): Rename to ...
9420 (i386_arch_setup): ... this. Set `win32_tdesc'.
9421 (the_low_target): Adjust.
9422 * win32-low.c (win32_tdesc): New global.
9423 (child_add_thread): Don't create the thread cache here.
9424 (do_initial_child_stuff): Set the new process'es tdesc.
9425 * win32-low.h (struct target_desc): Forward declare.
9426 (win32_tdesc): Declare.
9427 * lynx-i386-low.c (tdesc_i386): Declare global.
9428 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9429 * lynx-low.c (lynx_tdesc): New global.
9430 (lynx_add_process): Set the new process'es tdesc.
9431 * lynx-low.h (struct target_desc): Forward declare.
9432 (lynx_tdesc): Declare global.
9433 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9434 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9435 * nto-low.c (nto_tdesc): New global.
9436 (do_attach): Set the new process'es tdesc.
9437 * nto-low.h (struct target_desc): Forward declare.
9438 (nto_tdesc): Declare.
9439 * nto-x86-low.c (tdesc_i386): Declare.
9440 (nto_x86_arch_setup): Set `nto_tdesc'.
9442 2013-06-04 Gary Benson <gbenson@redhat.com>
9444 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9445 to qSupported response when appropriate.
9446 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9447 with nonzero-length annex.
9448 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9449 arguments supplied in annex.
9451 2013-05-31 Doug Evans <dje@google.com>
9454 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9455 64 bits in 64-cross-32 environment.
9457 2013-05-28 Pedro Alves <palves@redhat.com>
9459 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9460 (aarch64-without-fpu.c): Delete rule.
9461 * configure.srv (aarch64*-*-linux*): Remove references to
9462 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9463 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9466 2013-05-24 Pedro Alves <palves@redhat.com>
9468 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9469 instead of strchr/decode_address. Error if the range isn't split
9470 with a ','. Don't assume there's be a ':' in the action.
9472 2013-05-23 Yao Qi <yao@codesourcery.com>
9473 Pedro Alves <palves@redhat.com>
9475 * linux-low.c (lwp_in_step_range): New function.
9476 (linux_wait_1): If the thread was range stepping and stopped
9477 outside the stepping range, report the stop to GDB. Otherwise,
9478 continue stepping. Add range stepping debug output.
9479 (linux_set_resume_request): Copy the step range from the resume
9481 (linux_supports_range_stepping): New.
9482 (linux_target_ops) <supports_range_stepping>: Set to
9483 linux_supports_range_stepping.
9484 * linux-low.h (struct linux_target_ops)
9485 <supports_range_stepping>: New field.
9486 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9487 * linux-x86-low.c (x86_supports_range_stepping): New.
9488 (the_low_target) <supports_range_stepping>: Set to
9489 x86_supports_range_stepping.
9490 * server.c (handle_v_cont): Handle 'r' action.
9491 (handle_v_requests): Append ";r" if the target supports range
9493 * target.h (struct thread_resume) <step_range_start,
9494 step_range_end>: New fields.
9495 (struct target_ops) <supports_range_stepping>:
9497 (target_supports_range_stepping): New macro.
9499 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9501 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9502 confusion in comment.
9504 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9506 * lynx-low.c (struct process_info_private): New type.
9507 (lynx_add_process): New function.
9508 (lynx_create_inferior, lynx_attach): Replace calls to
9509 add_process by calls to lynx_add_process.
9510 (lynx_resume): If PTID is null, then try using
9511 current_process()->private->last_wait_event_ptid.
9513 (lynx_clear_inferiors): Delete. The contents of that function
9514 has been inlined in lynx_mourn;
9515 (lynx_wait_1): Save the ptid in the process's private data.
9516 (lynx_mourn): Free the process' private data. Replace call
9517 to lynx_clear_inferiors by call to clear_inferiors.
9519 2013-05-17 Yao Qi <yao@codesourcery.com>
9521 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9524 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9526 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9527 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9528 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9529 PT_TEXT_END_ADDR guards. Update comments.
9530 (linux_target_op) <read_offsets>: Conditionally define to
9531 linux_read_offsets if the target is UCLIBC and if it defines
9532 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9534 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9535 Andrew Jenner <andrew@codesourcery.com>
9537 * Makefile.in (SFILES): Add linux-nios2-low.c.
9538 (clean): Add action to delete nios2-linux.c.
9539 (nios2-linux.c): New rule.
9540 * configure.srv: Add nios2*-*-linux*.
9541 * linux-nios2-low.c: New.
9543 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9545 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9547 2013-04-25 Hui Zhu <hui@codesourcery.com>
9550 * ax.c (ax_printf): Add fflush.
9552 2013-04-22 Tom Tromey <tromey@redhat.com>
9554 * Makefile.in (SFILES): Add filestuff.c.
9555 (OBS): Add filestuff.o.
9556 (filestuff.o): New target.
9557 * config.in, configure: Rebuild.
9558 * configure.ac: Check for fdwalk, pipe2.
9560 2013-04-17 Pedro Alves <palves@redhat.com>
9562 * configure.ac (USE_THREAD_DB): Delete variable.
9563 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9564 Don't AC_SUBST USE_THREAD_DB.
9565 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9566 * config.in, configure: Regenerate.
9568 2013-04-16 Pedro Alves <palves@redhat.com>
9570 * linux-low.h (struct lwp_info) <thread_known>: Move under
9571 the USE_THREAD_DB #ifdef.
9573 2013-04-16 Pedro Alves <palves@redhat.com>
9575 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9576 (linux-low.o): Delete rule.
9577 * linux-low.h: Always include "gdb_thread_db.h" instead of
9578 conditionally including thread_db.h.
9579 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9582 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9584 * Makefile.in (install-only): Fix make install regression.
9586 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9588 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9589 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9591 * gdbserver.1: Remove.
9593 2013-03-22 Pedro Alves <palves@redhat.com>
9595 * linux-low.c (handle_extended_wait): Don't call
9596 linux_enable_event_reporting.
9598 2013-03-15 Tony Theodore <tonyt@logyst.com>
9601 * Makefile.in (SHELL): Use @SHELL@.
9603 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9605 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9608 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9610 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9611 Remove extraneous NULL element.
9613 2013-03-13 Yao Qi <yao@codesourcery.com>
9615 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9616 'V' block in trace frame.
9618 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9620 * target.h (struct target_ops): Add btrace ops.
9621 (target_supports_btrace): New macro.
9622 (target_enable_btrace): New macro.
9623 (target_disable_btrace): New macro.
9624 (target_read_btrace): New macro.
9625 * gdbthread.h (struct thread_info): Add btrace field.
9626 * server.c: Include btrace-common.h.
9627 (handle_btrace_general_set): New function.
9628 (handle_btrace_enable): New function.
9629 (handle_btrace_disable): New function.
9630 (handle_general_set): Call handle_btrace_general_set.
9631 (handle_qxfer_btrace): New function.
9632 (struct qxfer qxfer_packets[]): Add btrace entry.
9633 * inferiors.c (remove_thread): Disable btrace.
9634 * linux-low: Include linux-btrace.h.
9635 (linux_low_enable_btrace): New function.
9636 (linux_low_read_btrace): New function.
9637 (linux_target_ops): Add btrace ops.
9638 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9639 Add srv_linux_btrace=yes.
9640 (x86_64-*-linux*): Add linux-btrace.o.
9641 Add srv_linux_btrace=yes.
9642 * configure.ac: Define HAVE_LINUX_BTRACE.
9643 * config.in: Regenerated.
9644 * configure: Regenerated.
9646 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9648 * server.c (handle_qxfer): Preserve error message if -3 is
9650 (qxfer): Document the -3 return value.
9652 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9654 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9655 (linux_btrace_h): New variable.
9656 (linux-btrace.o): New rule.
9658 2013-03-08 Stan Shebs <stan@codesourcery.com>
9659 Hafiz Abid Qadeer <abidh@codesourcery.com>
9661 * tracepoint.c (trace_buffer_size): New global.
9662 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9663 (init_trace_buffer): Change to one-argument function. Allocate
9664 trace buffer memory.
9665 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9666 handle QTBuffer:size packet.
9667 (cmd_bigqtbuffer_size): New function.
9668 (initialize_tracepoint): Call init_trace_buffer with
9669 DEFAULT_TRACE_BUFFER_SIZE.
9670 * server.c (handle_query): Add QTBuffer:size in the
9673 2013-03-07 Yao Qi <yao@codesourcery.com>
9675 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9676 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9678 (cmd_qtsp): Adjust condition. Do post increment.
9679 Set cur_action and cur_step_action back to 0.
9681 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9684 * linux-low.c (linux_write_memory): Return early success if LEN is
9687 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9689 * configure.srv: Add x86_64-*-cygwin* as target.
9691 2013-02-28 Tom Tromey <tromey@redhat.com>
9693 * configure.ac: Invoke AC_SYS_LARGEFILE.
9694 * configure, config.in: Rebuild.
9696 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9698 * win32-low.c: Throughout, fix format strings and casts of
9699 printf-like functions to avoid type related warnings on all
9701 (get_child_debug_event): Print dwDebugEventCode as hex since
9702 that's how it's usually documented.
9704 2013-02-28 Yao Qi <yao@codesourcery.com>
9706 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9709 2013-02-27 Jiong Wang <jiwang@tilera.com>
9711 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9712 (reg-tilegx32.c): New rule.
9713 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9714 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9715 different register info initializer according to elf class.
9716 (init_registers_tilgx32): New function. The tilegx32 register info
9718 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9719 (tile_store_gregset): Likewise.
9721 2013-02-27 Yao Qi <yao@codesourcery.com>
9723 * server.c (process_point_options): Print debug message when
9724 debug_threads is true.
9726 2013-02-26 Yao Qi <yao@codesourcery.com>
9728 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9730 2013-02-19 Pedro Alves <palves@redhat.com>
9731 Kai Tietz <ktietz@redhat.com>
9735 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9736 instead of strtoul to extract address from packet.
9737 (process_serial_event) <'z'>: Likewise.
9739 2013-02-18 Yao Qi <yao@codesourcery.com>
9741 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9743 2013-02-14 Pedro Alves <palves@redhat.com>
9747 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9748 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9750 2013-02-14 Pedro Alves <palves@redhat.com>
9752 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9754 2013-02-14 Pedro Alves <palves@redhat.com>
9756 * tracepoint.c (save_string): Delete.
9757 (add_tracepoint_action): Use savestring instead of save_string.
9759 2013-02-12 Pedro Alves <palves@redhat.com>
9761 * linux-xtensa-low.c: Ditto.
9762 * xtensa-xtregs.c: Ditto.
9764 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9766 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9769 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9771 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9772 aarch64_num_wp_regs and aarch64_num_bp_regs to
9773 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9775 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9777 * linux-aarch64-low.c (ps_get_thread_area): Replace
9778 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9780 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9781 Marcus Shawcroft <marcus.shawcroft@arm.com>
9782 Nigel Stephens <nigel.stephens@arm.com>
9783 Yufeng Zhang <yufeng.zhang@arm.com>
9785 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9786 (aarch64.c, aarch64-without-fpu.c): New targets.
9787 * configure.srv (aarch64*-*-linux*): New.
9788 * linux-aarch64-low.c: New file.
9790 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9792 * linux-low.c (handle_extended_wait, linux_create_inferior)
9793 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9794 (dequeue_one_deferred_signal, linux_resume_one_thread)
9795 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9796 (linux_tracefork_grandchild, linux_test_for_tracefork)
9797 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9798 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9799 where the argument is 0.
9801 2013-01-25 Yao Qi <yao@codesourcery.com>
9803 * event-loop.c: Include "queue.h".
9804 (gdb_event_p): New typedef.
9805 (struct gdb_event) <next_event>: Remove.
9806 (event_queue): Change to QUEUE(gdb_event_p).
9807 (async_queue_event): Remove.
9808 (gdb_event_xfree): New.
9809 (initialize_event_loop): New.
9810 (process_event): Use API from QUEUE.
9811 (wait_for_event): Likewise.
9812 * server.c (main): Call initialize_event_loop.
9813 * server.h (initialize_event_loop): Declare.
9815 2013-01-18 Yao Qi <yao@codesourcery.com>
9817 * ax.h (struct eval_agent_expr_context): New.
9818 (gdb_eval_agent_expr): Update declaration.
9819 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9820 TFRAME. Add new argument CTX.
9821 * server.h (struct eval_agent_expr_context): Declare.
9822 (agent_mem_read, agent_tsv_read): Update declaration.
9823 (agent_mem_read_string): Likewise.
9824 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9825 (add_traceframe_block): Add new argument TPOINT.
9826 Increase TPOINT->traceframe_usage.
9827 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9828 eval_tracepoint_agent_expr.
9829 (condition_true_at_tracepoint): Likewise.
9830 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9831 (agent_mem_read_string, agent_tsv_read): Likewise.
9833 2013-01-16 Yao Qi <yao@codesourcery.com>
9835 * linux-low.c (linux_resume_one_lwp): Don't check
9836 'lwp->bp_reinsert != 0'.
9838 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9839 Pedro Alves <palves@redhat.com>
9841 * lynx-low.c (ptrace_request_to_str): Define a temporary
9842 macro and use it to simplify this function's implementation.
9844 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9846 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9849 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9851 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9853 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9855 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9857 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9859 * lynx-low.c (lynx_resume): Use the resume_info parameter
9860 to determine the ptid for the lynx_ptrace call, unless
9861 it is equal to minus_one_ptid, in which case we use the
9862 ptid of the current_inferior.
9863 (lynx_wait_1): After having received a thread create/exit
9864 event, resume the inferior's execution using the signaling
9865 thread's ptid, rather than the old ptid.
9867 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9869 * lynx-low.c (lynx_resume): Delete variable ret.
9871 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9873 * gdbreplay.c (gdbreplay_version): Update copyright year.
9874 * server.c (gdbserver_version): Likewise.
9876 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9878 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9881 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9883 * lynx-low.c (ptrace_request_to_str): Add handling for
9886 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9888 * lynx-low.c (lynx_attach): Delete variable new_process.
9890 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9892 * lynx-low.c (lynx_create_inferior): Delete variable
9895 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9897 * lynx-low.c (ptrace_request_to_str): Do not handle
9898 PTRACE_GETTHREADLIST if this macro does not exist.
9900 2012-12-15 Yao Qi <yao@codesourcery.com>
9902 * Makefile.in (OBS): Add notif.o.
9903 * notif.c, notif.h: New.
9904 * server.c: Include "notif.h".
9905 (struct vstop_notif) <next>: Remove.
9907 (queue_stop_reply): Update.
9908 (push_event, send_next_stop_reply): Remove.
9909 (discard_queued_stop_replies): Update.
9910 (notif_stop): New variable.
9911 (handle_v_stopped): Remove.
9912 (handle_v_requests): Don't call handle_v_stopped. Call
9913 handle_ack_notif instead.
9914 (queue_stop_reply_callback): Call notif_event_enque instead
9915 of queue_stop_reply.
9916 (handle_status): Don't call send_next_stop_reply, call
9917 notif_write_event instead.
9918 (kill_inferior_callback): Likewise.
9919 (detach_or_kill_inferior_callback): Likewise.
9920 (main): Call initialize_notif.
9921 (process_serial_event): Call QUEUE_is_empty.
9922 (handle_target_event): Call notif_push instead of push event.
9923 * server.h (push_event): Remove declaration.
9925 2012-12-10 Tom Tromey <tromey@redhat.com>
9927 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9928 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9931 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9932 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9933 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9934 (amd64-linux-ipa.o, ax.o): Rewrite.
9935 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9936 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9937 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9938 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9939 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9940 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9941 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9942 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9943 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9944 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9945 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9946 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9947 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9948 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9949 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9950 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9951 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9952 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9953 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9954 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9955 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9956 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9957 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9958 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9959 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9960 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9961 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9962 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9963 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9964 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9965 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9966 (reg-tilegx.o): Remove.
9967 (all_object_files): New macro.
9968 Include .deps files.
9969 * aclocal.m4, configure: Rebuild.
9970 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9971 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9972 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9974 2012-12-05 Tom Tromey <tromey@redhat.com>
9977 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9979 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9981 * configure.ac: Check for linux/perf_event.h.
9982 * config.in: Regenerated.
9983 * configure: Regenerated.
9985 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9987 * hostio.c (handle_readlink): Decrease buffer size
9988 parameter passed to readlink by one byte.
9990 2012-11-26 Yao Qi <yao@codesourcery.com>
9992 * configure.ac (build_warnings): Append '-Wempty-body'.
9993 * configure: Regenerated.
9994 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9997 2012-11-15 Pierre Muller <muller@sourceware.org>
9999 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10000 * config.in: Regenerate.
10001 * configure: Regenerate.
10002 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10003 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10004 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10005 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10007 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10008 instead of <sys/wait.h> header.
10009 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10011 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10013 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10014 (various make rules): Remove -DGDBSERVER
10016 2012-11-09 Yao Qi <yao@codesourcery.com>
10018 * spu-low.c (current_ptid): Move it to ..
10019 * gdbthread.h: ... here. New.
10020 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10021 * server.c (myresume, process_serial_event): Likewise.
10022 * thread-db.c (thread_db_find_new_threads): Likewise.
10023 * tracepoint.c (run_inferior_command): Likewise.
10025 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10027 * server.c (handle_search_memory_1): Include access length in
10030 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10032 * linux-crisv32-low.c: Fix compile errors.
10034 2012-09-04 Yao Qi <yao@codesourcery.com>
10036 * tracepoint.c (cmd_qtsv): Adjust debug message.
10037 Don't check CUR_TPOINT.
10039 2012-08-28 Yao Qi <yao@codesourcery.com>
10041 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10042 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10043 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10044 Remove declarations of xmalloc, xreallloc, xstrdup and
10046 * Makefile.in (libiberty_h): New.
10047 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10048 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10050 2012-08-23 Yao Qi <yao@codesourcery.com>
10052 * server.h: Remove declaration of 'xsnprintf'.
10054 2012-08-22 Keith Seitz <keiths@redhat.com>
10056 * server.h: Include build-gnulib-gbserver/config.h.
10057 * gdbreplay.c: Likewise.
10059 2012-08-08 Doug Evans <dje@google.com>
10061 * Makefile.in (SFILES): Add gdb_vecs.c.
10062 (OBS): Add gdb_vecs.o.
10063 (gdb_vecs_h, host_defs_h): New variables.
10064 (thread-db.o): Add $(gdb_vecs_h) dependency.
10065 (gdb_vecs.o): New rule.
10066 * thread-db.c: #include "gdb_vecs.h".
10067 (thread_db_load_search): Use a vector to iterate over path elements.
10068 Handle text appearing after "$pdir".
10070 * configure.ac: Add check for strstr.
10071 * config.in: Regenerate.
10072 * configure: Regenerate.
10074 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10076 * hostio.c (handle_pread): If pread fails, fall back to attempting
10078 (handle_pwrite): Likewise for pwrite.
10080 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10082 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10083 between unsupported TYPE and unimplementable ADDR/LEN combination.
10084 (arm_insert_point): Act on new return value.
10086 2012-07-31 Pedro Alves <palves@redhat.com>
10088 * server.c (process_point_options): Only skip tokens if we find
10089 one that is unrecognized. Don't treat 'X' specially while
10090 skipping unrecognized tokens.
10092 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10094 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10095 to 4-byte-align HW breakpoint addresses for Thumb.
10097 2012-07-27 Yao Qi <yao@codesourcery.com>
10101 * server.h: Declare gdb_agent_about_to_close.
10102 * target.c (kill_inferior): Include "agent.h".
10103 New. Send command 'kill'.
10104 * target.h (kill_inferior): Removed macro.
10105 * tracepoint.c (gdb_agent_about_to_close): New.
10106 (gdb_agent_helper_thread): Handle command 'close'.
10107 Wait endlessly until the inferior stops.
10108 Install gdb_agent_remove_socket to atexit hook.
10109 (agent_socket_name): New static variable.
10110 (gdb_agent_socket_init): Replace local variable 'name' with
10111 'agent_socket_name'.
10112 (gdb_agent_remove_socket): New.
10114 2012-07-27 Yao Qi <yao@codesourcery.com>
10116 * server.c (process_point_options): Stop at 'X' when parsing.
10118 2012-07-19 Michael Eager <eager@eagercon.com>
10120 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10122 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10123 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10124 hardware breakpoint.
10126 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10128 * gdbserver/linux-low.c (initialize_low): Call
10129 linux_ptrace_init_warnings.
10131 2012-07-02 Doug Evans <dje@google.com>
10133 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10136 2012-07-02 Stan Shebs <stan@codesourcery.com>
10138 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10139 (ax.o): Add it to build rule.
10141 (OBS): Add format.o.
10142 (IPA_OBS): Add format.o.
10143 * server.c (handle_query): Claim support for breakpoint commands.
10144 (process_point_options): Add command case.
10145 (process_serial_event): Leave running if there are printfs in
10147 * mem-break.h (any_persistent_commands): Declare.
10148 (add_breakpoint_commands): Declare.
10149 (gdb_no_commands_at_breakpoint): Declare.
10150 (run_breakpoint_commands): Declare.
10151 * mem-break.c (struct point_command_list): New struct.
10152 (struct breakpoint): New field command_list.
10153 (any_persistent_commands): New function.
10154 (add_commands_to_breakpoint): New function.
10155 (add_breakpoint_commands): New function.
10156 (gdb_no_commands_at_breakpoint): New function.
10157 (run_breakpoint_commands): New function.
10158 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10160 * ax.c: Include format.h.
10161 (ax_printf): New function.
10162 (gdb_eval_agent_expr): Add printf opcode.
10164 2012-06-13 Yao Qi <yao@codesourcery.com>
10166 * server.c (start_inferior): Remove duplicated writes to fields
10167 'last_resume_kind' and 'last_status' of 'current_inferior'.
10169 2012-06-12 Yao Qi <yao@codesourcery.com>
10170 Pedro Alves <palves@redhat.com>
10172 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10174 * server.c (handle_v_cont): Extend comment.
10176 2012-06-11 Yao Qi <yao@codesourcery.com>
10178 * linux-low.c (linux_attach): Add 'static'.
10180 2012-06-06 Yao Qi <yao@codesourcery.com>
10182 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10184 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10186 Fix gcc -flto compilation warning.
10187 * server.c (main): Make variable multi_mode and attach volatile.
10189 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10191 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10192 if the platform doesn't know about it.
10194 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10196 * Makefile.in (SFILES): Add linux-tile-low.c.
10197 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10198 * configure.srv: Handle tilegx-*-linux*.
10199 * linux-tile-low.c: New file.
10201 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10203 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10205 2012-05-24 Pedro Alves <palves@redhat.com>
10209 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10211 2012-05-24 Pedro Alves <palves@redhat.com>
10215 Replace target_signal with gdb_signal throughout.
10217 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10219 * linux-low.c (linux_store_registers): Avoid the copying sequence
10220 when no data has been retrieved by ptrace.
10222 2012-05-22 Will Deacon <will.deacon@arm.com>
10224 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10225 Include asm/ptrace.h.
10226 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10229 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10231 * linux-low.c (linux_store_registers): Don't re-retrieve data
10232 with ptrace that has already been obtained from /proc. Always
10233 copy any data retrieved with ptrace to the buffer supplied.
10235 2012-05-11 Yao Qi <yao@codesourcery.com>
10236 Pedro Alves <palves@redhat.com>
10238 * linux-low.c (enum stopping_threads_kind): New.
10239 (stopping_threads): Change type to `enum stopping_threads_kind'.
10240 (handle_extended_wait): If stopping and suspending threads, leave
10241 the new_lwp suspended too.
10242 (linux_wait_for_event): Adjust.
10243 (stop_all_lwps): Set `stopping_threads' to
10244 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10245 whether we're suspending threads or just stopping them. Assert no
10248 2012-04-29 Yao Qi <yao@codesourcery.com>
10250 * server.h: Move some code to ...
10251 * gdbthread.h: ... here. New.
10252 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10253 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10254 (nto-low.o, win32-low.o): Likewise.
10255 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10256 * regcache.c, remote-utils.c, server.c: Likewise.
10257 * target.c, tracepoint.c, win32-low.c: Likewise.
10259 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10261 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10262 (PTRACE_ARG4_TYPE): Likewise.
10263 (PTRACE_XFER_TYPE): Likewise.
10264 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10265 ptrace to PTRACE_ARG3_TYPE.
10266 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10267 (PTRACE_ARG4_TYPE): Likewise.
10268 (PTRACE_XFER_TYPE): Likewise.
10269 (linux_detach_one_lwp): Cast fourth argument of
10270 ptrace to long then PTRACE_ARG4_TYPE.
10271 (regsets_fetch_inferior_registers): Cast third argument of
10272 ptrace to long then PTRACE_ARG3_TYPE.
10273 (regsets_store_inferior_registers): Likewise.
10275 2012-04-20 Pedro Alves <palves@redhat.com>
10277 * configure: Regenerate.
10279 2012-04-19 Pedro Alves <palves@redhat.com>
10281 * Makefile.in (GNULIB_BUILDDIR): New.
10282 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10283 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10284 (all, install-only, uninstall, clean-info, all-lib, clean): No
10285 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10286 (maintainer-clean realclean distclean): Use subdir_do.
10288 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10289 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10290 * acinclude.m4: Include acx_configure_dir.m4.
10291 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10292 calls. Call AC_PROG_RANLIB. Configure gnulib using
10295 (GNULIB_STDINT_H): Adjust.
10296 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10297 * gdbreplay.c: Include build-gnulib/config.h.
10298 * server.h: Likewise.
10299 * aclocal.m4: Regenerate.
10300 * config.in: Regenerate.
10301 * configure: Regenerate.
10303 2012-04-19 Pedro Alves <palves@redhat.com>
10305 * Makefile.in (LIBGNU, INCGNU): Adjust.
10306 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10307 (all, install-only, uninstall, clean-info, all-lib, clean)
10308 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10309 * configure.ac: Adjust AC_OUTPUT output.
10310 * aclocal.m4: Regenerate.
10311 * configure: Regenerate.
10313 2012-04-19 Pedro Alves <palves@redhat.com>
10315 * Makefile.in (generated_files): New.
10316 (server_h): Remove the explicit dependency on config.h, and depend
10317 on $generated_files.
10319 2012-04-19 Pedro Alves <palves@redhat.com>
10321 * Makefile.in (INCGNU): Add -Ignulib.
10323 2012-04-19 Pedro Alves <palves@redhat.com>
10325 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10326 (INCGNU): ... this, and spell out -I here.
10327 (GNULIB_LIB): Rename to ...
10328 (LIBGNU): ... this.
10329 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10331 2012-04-19 Pedro Alves <palves@redhat.com>
10333 * config.in: Regenerate.
10335 2012-04-19 Pedro Alves <palves@redhat.com>
10337 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10338 * server.h (memmem): Remove declaration.
10339 * config.in: Regenerate.
10340 * configure: Regenerate.
10342 2012-04-19 Yao Qi <yao@codesourcery.com>
10344 * Makefile.in (SFILES): Add common/vec.c.
10348 2012-04-19 Yao Qi <yao@codesourcery.com>
10350 * remote-utils.c (prepare_resume_reply): Replace with macro
10351 target_core_of_thread.
10352 * server.c (handle_qxfer_threads_proper): Likewise.
10353 * target.h (traget_core_of_thread): New macro.
10355 2012-04-18 Pedro Alves <palves@redhat.com>
10357 * aclocal.m4: Regenerate.
10358 * configure: Regenerate.
10360 2012-04-16 Yao Qi <yao@codesourcery.com>
10362 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10363 duplicated on address.
10365 2012-04-16 Yao Qi <yao@codesourcery.com>
10367 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10368 (struct tracepoint_action_ops) <send>: New field.
10369 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10370 (agent_expr_send, x_tracepoint_action_send): New.
10371 (l_tracepoint_action_send): New.
10372 (cmd_qtdp): Download and install tracepoint
10373 according to `use_agent'.
10374 (run_inferior_command): Add one more parameter `len'.
10376 (tracepoint_send_agent): New.
10377 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10379 2012-04-16 Yao Qi <yao@codesourcery.com>
10381 * tracepoint.c (download_tracepoints): Moved to ...
10382 (cmd_qtstart): ... here.
10384 2012-04-14 Yao Qi <yao@codesourcery.com>
10386 * tracepoint.c: Include inttypes.h.
10387 (struct collect_memory_action): Use sized types.
10388 (struct tracepoint): Likewise.
10389 (cmd_qtdp, stop_tracing): Update print specifiers.
10390 (cmd_qtp, response_tracepoint): Likewise.
10391 (collect_data_at_tracepoint): Likewise.
10392 (collect_data_at_step): Likewise.
10394 2012-04-14 Yao Qi <yao@codesourcery.com>
10396 Import gnulib module inttypes.
10397 * aclocal.m4, config.in, configure: Regenerated.
10399 2012-04-14 Yao Qi <yao@codesourcery.com>
10401 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10402 Makefile and config.status at last.
10404 2012-04-13 Yao Qi <yao@codesourcery.com>
10406 * tracepoint.c: Include stdint.h unconditionally.
10408 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10410 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10411 on BFD_HAVE_SYS_PROCFS_TYPE.
10412 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10413 * configure: Regenerate.
10414 * config.in: Likewise.
10416 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10418 * Makefile.in (clean): Also remove x32.c x32-linux.c
10419 x32-avx.c x32-avx-linux.c.
10420 (x32.o): New target.
10422 (x32-linux.o): Likewise.
10423 (x32-linux.c): Likewise.
10424 (x32-avx.o): Likewise.
10425 (x32-avx.c): Likewise.
10426 (x32-avx-linux.o): Likewise.
10427 (x32-avx-linux.c): Likewise.
10429 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10430 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10431 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10432 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10433 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10434 i386/x32-avx-linux.xml.
10436 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10437 (init_registers_x32_avx_linux): Likwise.
10438 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10439 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10441 2012-04-13 Pedro Alves <palves@redhat.com>
10443 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10444 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10445 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10446 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10449 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10451 * linux-x86-low.c (compat_x32_clock_t): New.
10452 (compat_x32_siginfo_t): Likewise.
10453 (compat_x32_siginfo_from_siginfo): Likewise.
10454 (siginfo_from_compat_x32_siginfo): Likewise.
10455 (linux_is_elf64): Likewise.
10456 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10457 and siginfo_from_compat_x32_siginfo for x32.
10458 (x86_arch_setup): Set linux_is_elf64.
10460 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10463 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10465 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10466 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10467 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10468 compatible with process.
10470 2012-04-12 Yao Qi <yao@codesourcery.com>
10472 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10473 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10474 (install-only, install-info, clean): Handle sub dir gnulib.
10475 (all-lib, am--refresh): New targets.
10476 (memmem.o): Remove target.
10477 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10478 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10479 (AC_REPLACE_FUNCS): Remove memmem.
10480 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10481 (AC_OUTPUT): Generate Makefile in gnulib/.
10482 * aclocal.m4, config.in, configure: Regenerated.
10484 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10486 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10488 2012-04-05 Pedro Alves <palves@redhat.com>
10490 -Werror=strict-aliasing
10492 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10495 2012-04-04 Pedro Alves <palves@redhat.com>
10497 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10498 (sparc_store_gregset_from_stack, sparc_store_gregset)
10499 (sparc_breakpoint_at): Fix formatting.
10501 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10503 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10505 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10506 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10507 * config.in: Regenerate.
10508 * configure: Likewise.
10510 2012-03-29 Pedro Alves <palves@redhat.com>
10512 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10513 Correct ptrace arguments.
10515 2012-03-28 Pedro Alves <palves@redhat.com>
10517 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10518 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10519 (IA64_FR1_REGNUM): New defines.
10520 (ia64_fetch_register): New.
10521 (the_low_target): Install it.
10522 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10524 * linux-low.c (linux_fetch_registers): Try the
10525 the_low_target.fetch_register hook first.
10527 * linux-arm-low.c (the_low_target): Adjust.
10528 * linux-bfin-low.c (the_low_target): Adjust.
10529 * linux-cris-low.c (the_low_target): Adjust.
10530 * linux-crisv32-low.c (the_low_target): Adjust.
10531 * linux-m32r-low.c (the_low_target): Adjust.
10532 * linux-m68k-low.c (the_low_target): Adjust.
10533 * linux-mips-low.c (the_low_target): Adjust.
10534 * linux-ppc-low.c (the_low_target): Adjust.
10535 * linux-s390-low.c (the_low_target): Adjust.
10536 * linux-sh-low.c (the_low_target): Adjust.
10537 * linux-sparc-low.c (the_low_target): Adjust.
10538 * linux-tic6x-low.c (the_low_target): Adjust.
10539 * linux-x86-low.c (the_low_target): Adjust.
10540 * linux-xtensa-low.c (the_low_target): Adjust.
10542 2012-03-26 Pedro Alves <palves@redhat.com>
10544 * server.c (handle_qxfer_libraries): Don't bail early if
10545 the_target->qxfer_libraries_svr4 is not NULL.
10547 2012-03-26 Pedro Alves <palves@redhat.com>
10549 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10551 2012-03-23 Pedro Alves <palves@redhat.com>
10553 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10554 "library-list-svr4" element's start tag when the the DSO list is
10557 2012-03-23 Pedro Alves <palves@redhat.com>
10559 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10560 a variable whose type size is the same as the inferior's pointer
10563 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10565 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10567 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10568 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10569 * linux-low.h: Include <signal.h>.
10570 (struct siginfo): Remove forward declaration.
10571 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10574 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10576 * .gitignore: Ignore more files.
10578 2012-03-19 Pedro Alves <palves@redhat.com>
10579 Jan Kratochvil <jan.kratochvil@redhat.com>
10581 * server.c (cont_thread, general_thread): Add describing comments.
10582 (start_inferior): Clear `cont_thread'.
10583 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10586 2012-03-15 Yao Qi <yao@codesourcery.com>
10588 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10590 (cmd_qtdp): ... here.
10592 2012-03-15 Yao Qi <yao@codesourcery.com>
10594 * tracepoint.c (struct tracepoint_action_ops): New.
10595 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10596 (m_tracepoint_action_download): New.
10597 (r_tracepoint_action_download): New.
10598 (x_tracepoint_action_download): New.
10599 (l_tracepoint_action_download): New.
10600 (add_tracepoint_action): Install `action->ops' according type.
10601 (download_tracepoint_1): Move code `download' function pointer
10602 of various tracepoint_action_ops.
10604 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10606 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10607 linux_ptrace_attach_warnings.
10609 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10611 * Makefile.in (linux-ptrace.o): New.
10612 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10613 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10614 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10615 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10616 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10618 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10620 2012-03-08 Yao Qi <yao@codesourcery.com>
10621 Pedro Alves <palves@redhat.com>
10623 Fix PR server/13392.
10624 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10625 offset of JMP insn.
10626 * tracepoint.c (remove_tracepoint): New.
10627 (cmd_qtdp): Call remove_tracepoint when failed to install.
10629 2012-03-07 Pedro Alves <palves@redhat.com>
10631 * linux-low.c (get_detach_signal): New.
10632 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10633 Pass on pending signals to PTRACE_DETACH. Check the result of the
10635 * server.c (program_signals, program_signals_p): New.
10636 (handle_general_set): Handle QProgramSignals.
10637 * server.h (program_signals, program_signals_p): Declare.
10639 2012-03-05 Pedro Alves <palves@redhat.com>
10640 Jan Kratochvil <jan.kratochvil@redhat.com>
10642 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10645 2012-03-03 Yao Qi <yao@codesourcery.com>
10647 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10648 agent_look_up_symbols.
10650 2012-03-03 Yao Qi <yao@codesourcery.com>
10652 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10653 (linux-x86-low.o): Likewise.
10654 * server.h: Remove in_process_agent_loaded.
10655 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10659 2012-03-03 Yao Qi <yao@codesourcery.com>
10661 * tracepoint.c (gdb_agent_capability): New global.
10662 (in_process_agent_loaded_ust): Renamed to
10663 `in_process_agent_supports_ust'.
10665 (in_process_agent_supports_ust): Call agent_capability_check.
10666 (clear_installed_tracepoints): Assert that agent supports
10669 2012-03-03 Yao Qi <yao@codesourcery.com>
10671 * linux-low.c (linux_supports_agent): New.
10672 (linux_target_ops): Initialize field `supports_agent' with
10673 linux_supports_agent.
10674 * target.h (struct target_ops) <supports_agent>: New.
10675 (target_supports_agent): New macro.
10676 * server.c (handle_general_set): Handle packet 'QAgent'.
10677 (handle_query): Send `QAgent+'.
10678 * Makefile.in (server.o): Depends on agent.h.
10680 2012-03-03 Yao Qi <yao@codesourcery.com>
10682 * Makefile.in (OBS): Add agent.o.
10683 Add new rule for agent.o.
10684 Track dependence of tracepoint.c on agent.h.
10685 * tracepoint.c (run_inferior_command_1):
10686 (run_inferior_command): Call agent_run_command.
10687 (gdb_ust_connect_sync_socket): Deleted. Move it to
10689 (resume_thread, stop_thread): Likewise.
10690 (gdb_ust_socket_init): Renamed to ...
10691 (gdb_agent_socket_init): ... New.
10692 (gdb_ust_thread): Renamed to ...
10693 (gdb_agent_helper_thread): ... New.
10694 (gdb_ust_init): Move some code to ...
10695 (gdb_agent_init): ... here. New.
10696 [HAVE_UST]: Call gdb_ust_init.
10697 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10698 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10699 * config.in, configure: Regenerated.
10701 2012-03-02 Pedro Alves <palves@redhat.com>
10703 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10704 * linux-low.c (struct simple_pid_list): New.
10705 (stopped_pids): New a struct simple_pid_list pointer.
10706 (add_to_pid_list, pull_pid_from_list): New.
10707 (handle_extended_wait): Don't assume the first signal new children
10708 report is SIGSTOP. Adjust call to pull_pid_from_list.
10709 (linux_wait_for_lwp): Adjust.
10711 2012-03-02 Yao Qi <yao@codesourcery.com>
10713 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10716 2012-03-02 Yao Qi <yao@codesourcery.com>
10718 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10719 `stop_pc' and `tpoint'. Update caller.
10721 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10723 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10724 * linux-low.c (use_linux_regsets): New macro.
10725 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10726 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10727 (linux_register_in_regsets): New function.
10728 (usr_fetch_inferior_registers): Skip registers covered by
10730 (usr_store_inferior_registers): Likewise.
10731 (usr_fetch_inferior_registers): New macro.
10732 (usr_store_inferior_registers): Likewise.
10733 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10734 (linux_store_registers): Likewise.
10735 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10737 (init_registers_mips64_dsp_linux): Likewise.
10738 (init_registers_mips_linux): New macro.
10739 (init_registers_mips_dsp_linux): Likewise.
10740 (mips_dsp_num_regs): Likewise.
10741 (DSP_BASE, DSP_CONTROL): New fallback macros.
10742 (mips_base_regs): New macro.
10743 (mips_regmap): Use it. Fix the size.
10744 (mips_dsp_regmap): New variable.
10745 (mips_dsp_regset_bitmap): Likewise.
10746 (mips_arch_setup): New function.
10747 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10749 (mips_cannot_store_register): Likewise.
10750 (the_low_target): Update .arch_setup, .num_regs and .regmap
10751 initializers. Add .regset_bitmap initializer.
10752 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10754 * linux-bfin-low.c (the_low_target): Likewise.
10755 * linux-cris-low.c (the_low_target): Likewise.
10756 * linux-crisv32-low.c (the_low_target): Likewise.
10757 * linux-ia64-low.c (the_low_target): Likewise.
10758 * linux-m32r-low.c (the_low_target): Likewise.
10759 * linux-m68k-low.c (the_low_target): Likewise.
10760 * linux-ppc-low.c (the_low_target): Likewise.
10761 * linux-s390-low.c (the_low_target): Likewise.
10762 * linux-sh-low.c (the_low_target): Likewise.
10763 * linux-sparc-low.c (the_low_target): Likewise.
10764 * linux-tic6x-low.c (the_low_target): Likewise.
10765 * linux-x86-low.c (the_low_target): Likewise.
10766 * linux-xtensa-low.c (the_low_target): Likewise.
10767 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10768 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10769 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10771 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10772 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10774 2012-02-29 Yao Qi <yao@codesourcery.com>
10775 Pedro Alves <palves@redhat.com>
10777 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10778 `step_over_finished' is true.
10780 2012-02-27 Pedro Alves <palves@redhat.com>
10782 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10783 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10785 2012-02-27 Pedro Alves <palves@redhat.com>
10788 * linux-low.c (pid_is_stopped): New.
10789 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10791 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10793 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10796 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10798 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10800 2012-02-24 Luis Machado <lgustavo@codesourcery>
10802 * server.c (handle_query): Advertise support for target-side
10803 breakpoint condition evaluation.
10804 (process_point_options): New function.
10805 (process_serial_event): When inserting a breakpoint, check for
10806 a target-side condition that should be evaluated.
10808 * mem-break.c: Include regcache.h and ax.h.
10809 (point_cond_list_t): New data structure.
10810 (breakpoint) <cond_list>: New field.
10811 (find_gdb_breakpoint_at): Make non-static.
10812 (delete_gdb_breakpoint_at): Clear any target-side
10814 (clear_gdb_breakpoint_conditions): New function.
10815 (add_condition_to_breakpoint): Likewise.
10816 (add_breakpoint_condition): Likewise.
10817 (gdb_condition_true_at_breakpoint): Likewise.
10818 (gdb_breakpoint_here): Return result directly instead
10819 of going through a local variable.
10821 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10822 (clear_gdb_breakpoint_conditions): Likewise.
10823 (add_breakpoint_condition): Likewise.
10824 (gdb_condition_true_at_breakpoint): Likewise.
10826 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10827 (need_step_over_p): Take target-side breakpoint condition into
10830 2012-02-24 Luis Machado <lgustavo@codesourcery>
10832 * server.h: Include tracepoint.h.
10833 (agent_mem_read, agent_get_trace_state_variable_value,
10834 agent_set_trace_state_variable_value,
10835 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10836 get_set_tsv_func_addr): New prototypes.
10838 * ax.h: New include file.
10839 * ax.c: New source file.
10841 * tracepoint.c: Include ax.h.
10842 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10843 agent_expr, eval_result_type): Move to ax.h.
10844 (parse_agent_expr): Rename to ...
10845 (gdb_parse_agent_expr): ... this, make it non-static and move
10847 (unparse_agent_expr) Rename to ...
10848 (gdb_unparse_agent_expr): ... this, make it non-static and move
10850 (eval_agent_expr): Rename to ...
10851 (eval_tracepoint_agent_expr): ... this.
10852 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10853 forward declarations.
10854 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10855 (agent_get_trace_state_variable_value): New function.
10856 (agent_set_trace_state_variable_value): New function.
10857 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10858 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10859 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10860 (condition_true_at_tracepoint): Likewise.
10861 (parse_agent_expr): Rename to ...
10862 (gdb_parse_agent_expr): ... this and move to ax.c.
10863 (unparse_agent_expr): Rename to ...
10864 (gdb_unparse_agent_expr): ... this and move to ax.c.
10865 (gdb_agent_op_name): Move to ax.c.
10866 (eval_agent_expr): Rename to ...
10867 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10869 (eval_tracepoint_agent_expr): New function.
10870 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10872 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10874 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10875 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10876 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10877 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10878 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10879 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10880 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10881 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10882 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10883 (compile_bytecodes): Remove forward declaration.
10884 (is_goto_target): Move to ax.c.
10885 (compile_bytecodes): Move to ax.c and call
10886 agent_get_trace_state_variable_value (...) and
10887 agent_set_trace_state_variable_value (...).
10889 * Makefile.in: Update ax.c and IPA dependencies.
10891 2012-02-24 Pedro Alves <palves@redhat.com>
10893 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10894 (cmd_bigqtbuffer_circular): ... this. Only handle
10895 'QTBuffer:circular:'.
10896 (handle_tracepoint_general_set): Adjust.
10898 2012-02-16 Yao Qi <yao@codesourcery.com>
10900 * inferiors.c: Move code to ...
10901 * dll.c: .... here. New.
10902 * server.h: Declare clear_dlls.
10903 * Makefile.in (SFILES): Add dll.c.
10907 2012-02-11 Yao Qi <yao@codesourcery.com>
10909 * server.c: (handle_monitor_command): Add a new parameter
10911 (handle_query): Update caller.
10913 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10915 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10916 * configure, config.in: Regenerate.
10917 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10920 2012-02-02 Pedro Alves <palves@redhat.com>
10922 Try SIGKILL first, then PTRACE_KILL.
10923 * linux-low.c (linux_kill_one_lwp): New.
10924 (linux_kill_one_lwp): Rename to ...
10925 (kill_one_lwp_callback): ... this. Use the new
10926 linux_kill_one_lwp.
10928 2012-02-02 Pedro Alves <palves@redhat.com>
10930 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10933 2012-01-27 Pedro Alves <palves@redhat.com>
10935 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10936 (elf_64_file_p): Make static.
10937 (linux_pid_exe_is_elf_64_file): New.
10938 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10939 Delete declarations.
10940 (linux_pid_exe_is_elf_64_file): Declare.
10941 * linux-x86-low.c (x86_arch_setup): Use
10942 linux_pid_exe_is_elf_64_file.
10944 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10946 * linux-low.c (linux_wait_for_event_1): Rename to ...
10947 (linux_wait_for_event): ... here and merge it with former
10948 linux_wait_for_event - new variable wait_ptid, use it.
10949 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10951 2012-01-23 Pedro Alves <palves@redhat.com>
10953 * server.c (main): Avoid yet another case of infinite loop while
10954 detaching/killing after a longjmp.
10956 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10959 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10961 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10963 * hostio.c (handle_readlink): New function.
10964 (handle_vFile): Call it to handle "vFile:readlink" packets.
10966 2012-01-20 Pedro Alves <palves@redhat.com>
10967 Ulrich Weigand <ulrich.weigand@linaro.org>
10969 * server.c (handle_v_requests): Only support vAttach and vRun to
10970 start multiple processes when in extended protocol mode.
10972 2012-01-17 Pedro Alves <palves@redhat.com>
10974 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10975 memalign plus mprotect to allocate the scratch buffer.
10977 2012-01-13 Pedro Alves <palves@redhat.com>
10979 * server.c (attach_inferior): Clear `cont_thread'.
10981 2012-01-13 Pedro Alves <palves@redhat.com>
10983 * server.c (main): Avoid infinite loop while detaching/killing
10986 2012-01-09 Doug Evans <dje@google.com>
10988 * server.c (start_inferior): Set last_ptid in --wrapper case.
10990 2012-01-06 Yao Qi <yao@codesourcery.com>
10992 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10994 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10996 2012-01-04 Yao Qi <yao@codesourcery.com>
10998 * tracepoint.c (cmd_qtdp): Print debug message
10999 for static tracepoint.
11001 2012-01-04 Yao Qi <yao@codesourcery.com>
11003 * tracepoint.c (trace_vdebug): Differentiate debug message
11004 between gdbserver and IPA.
11006 2012-01-03 Yao Qi <yao@codesourcery.com>
11008 * tracepoint.c (tracepoint_was_hit): Don't collect for
11011 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11013 * terminal.h: Reformat copyright header.
11015 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11017 * server.c (gdbserver_version): Update copyright year.
11018 * gdbreplay.c (gdbreplay_version): Likewise.
11020 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11022 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11025 2011-12-18 Hui Zhu <teawater@gmail.com>
11026 * linux-low.c (linux_create_inferior): Save return value to ret.
11028 2011-12-18 Hui Zhu <teawater@gmail.com>
11030 * linux-low.c (linux_create_inferior): Save return value to ret.
11032 2011-12-16 Doug Evans <dje@google.com>
11034 * linux-low.c (linux_create_inferior): If stdio connection,
11035 redirect stdin from /dev/null, stdout to stderr.
11036 * remote-utils.c (remote_is_stdio): New static global.
11037 (remote_connection_is_stdio): New function.
11038 (remote_prepare): Handle stdio connection.
11039 (remote_open): Ditto.
11040 (remote_close): Don't close stdin for stdio connections.
11041 (read_prim,write_prim): New functions. Replace all calls to
11042 read/write to these.
11043 * server.c (main): Watch for "-" argument. Move call to
11044 remote_prepare before start_inferior.
11045 * server.h (STDIO_CONNECTION_NAME): New macro.
11046 (remote_connection_is_stdio): Declare.
11048 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11049 in debugging output.
11051 2011-12-15 Yao Qi <yao@codesourcery.com>
11053 * tracepoint.c: Include sys/syscall.h.
11054 (gdb_ust_thread): Remove preprocessor conditional.
11056 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11058 * linux-low.c (linux_detach_one_lwp): Call
11059 the_low_target.prepare_to_resume before detaching.
11061 2011-12-14 Yao Qi <yao@codesourcery.com>
11063 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11066 2011-12-14 Yao Qi <yao@codesourcery.com>
11068 * i386-low.c (i386_low_stopped_data_address): Initialize local
11069 variable `control'.
11071 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11075 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11076 DR_CONTROL unless necessary. Extend comments.
11077 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11078 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11080 2011-12-13 Yao Qi <yao@codesourcery.com>
11082 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11084 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11086 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11088 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11089 Print new debug message for such case.
11091 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11093 Fix overlapping memcpy.
11094 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11095 the read_inferior_memory transfer.
11096 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11097 write_inferior_memory transfer.
11098 (set_fast_tracepoint_jump): New variable buf. Use it for the
11099 read_inferior_memory and write_inferior_memory transfers.
11100 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11101 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11102 Use it for the write_inferior_memory transfer.
11103 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11106 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11108 * linux-low.c (fetch_register, store_register): Make code
11109 consistent, fix formatting.
11111 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11113 * linux-low.c (usr_store_inferior_registers): Factor out code
11114 to handle individual registers into...
11115 (store_register): ... this new function.
11117 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11119 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11120 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11121 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11122 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11123 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11124 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11125 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11126 (srv_xmlfiles): Add new XML files.
11128 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11130 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11131 (init_registers_s390_linux32v1): Add prototype.
11132 (init_registers_s390_linux32v2): Likewise.
11133 (init_registers_s390_linux64v1): Likewise.
11134 (init_registers_s390_linux64v2): Likewise.
11135 (init_registers_s390x_linux64v1): Likewise.
11136 (init_registers_s390x_linux64v2): Likewise.
11137 (s390_num_regs): Increment to 52.
11138 (s390_regmap): Add orig_r2 register.
11139 (s390_num_regs_3264): Increment to 68.
11140 (s390_regmap_3264): Add orig_r2 register.
11141 (s390_collect_ptrace_register): Handle orig_r2 register.
11142 (s390_supply_ptrace_register): Likewise.
11143 (s390_fill_last_break): New function.
11144 (s390_store_last_break): Likewise.
11145 (s390_fill_system_call): New function.
11146 (s390_store_system_call): Likewise.
11147 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11149 (s390_check_regset): New function.
11150 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11151 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11152 Update target_regsets for available register sets.
11154 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11155 Jan Kratochvil <jan.kratochvil@redhat.com>
11157 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11158 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11160 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11161 * linux-low.h (struct process_info_private): New member r_debug.
11162 * server.c (handle_qxfer_libraries): Call
11163 the_target->qxfer_libraries_svr4.
11164 (handle_qxfer_libraries_svr4): New function.
11165 (qxfer_packets): New entry "libraries-svr4".
11166 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11167 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11168 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11169 PACKET_qXfer_libraries_svr4.
11171 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11173 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11174 PSW address/mask between 8-byte and 16-byte formats.
11175 (s390_supply_ptrace_register): Likewise.
11176 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11177 basic addressing mode bit.
11179 2011-11-24 Stan Shebs <stan@codesourcery.com>
11181 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11183 2011-11-17 Stan Shebs <stan@codesourcery.com>
11185 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11186 (tracing_start_time): New global.
11187 (tracing_stop_time): New global.
11188 (tracing_user_name): New global.
11189 (tracing_notes): New global.
11190 (tracing_stop_note): New global.
11191 (cmd_qtstart): Set traceframe_usage, start_time.
11192 (stop_tracing): Set stop_time.
11193 (cmd_qtstatus): Report additional status.
11194 (cmd_qtp): New function.
11195 (handle_tracepoint_query): Call it.
11196 (cmd_qtnotes): New function.
11197 (handle_tracepoint_general_set): Call it.
11198 (get_timestamp): Rename from tsv_get_timestamp.
11200 2011-11-14 Stan Shebs <stan@codesourcery.com>
11201 Kwok Cheung Yeung <kcy@codesourcery.com>
11203 * linux-x86-low.c (small_jump_insn): New.
11204 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11205 trampoline and error message, build a trampoline and issue a small
11206 jump instruction to it.
11207 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11208 trampoline and error message.
11209 (x86_get_min_fast_tracepoint_insn_len): New.
11210 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11211 * linux-low.h (struct linux_target_ops): Add arguments to
11212 install_fast_tracepoint_jump_pad operation, add new operation.
11213 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11215 (linux_get_min_fast_tracepoint_insn_len): New function.
11216 (linux_target_op): Add new operation.
11217 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11218 (gdb_trampoline_buffer_end): Ditto.
11219 (gdb_trampoline_buffer_error): Ditto.
11220 (struct ipa_sym_addresses): Add fields for new IPA variables.
11221 (symbol_list): Add entries for new IPA variables.
11222 (struct tracepoint): Add fields to hold the address range of the
11223 trampoline used by the tracepoint.
11224 (trampoline_buffer_head): New static variable.
11225 (trampoline_buffer_tail): Ditto.
11226 (claim_trampoline_space): New function.
11227 (have_fast_tracepoint_trampoline_buffer): New function.
11228 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11230 (install_fast_tracepoint): Ditto, also add error buffer argument.
11231 (cmd_qtminftpilen): New function.
11232 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11233 (fast_tracepoint_from_trampoline_address): New function.
11234 (fast_tracepoint_collecting): Handle trampoline as part of jump
11236 (set_trampoline_buffer_space): New function.
11237 (initialize_tracepoint): Initialize new IPA variables.
11238 * target.h (struct target_ops): Add arguments to
11239 install_fast_tracepoint_jump_pad operation, add new
11240 get_min_fast_tracepoint_insn_len operation.
11241 (target_get_min_fast_tracepoint_insn_len): New.
11242 (install_fast_tracepoint_jump_pad): Add arguments.
11243 * server.h (IPA_BUFSIZ): Define.
11244 * linux-i386-ipa.c: Include extra header files.
11245 (initialize_fast_tracepoint_trampoline_buffer): New function.
11246 (initialize_low_tracepoint): Call it.
11247 * server.h (set_trampoline_buffer_space): Declare.
11248 (claim_trampoline_space): Ditto.
11249 (have_fast_tracepoint_trampoline_buffer): Ditto.
11251 2011-11-14 Yao Qi <yao@codesourcery.com>
11253 * server.c (handle_query): Handle InstallInTrace for qSupported.
11254 * tracepoint.c (add_tracepoint): Sort list.
11255 (install_tracepoint, download_tracepoint): New.
11256 (cmd_qtdp): Call them to install and download tracepoints.
11257 (sort_tracepoints): Removed.
11258 (cmd_qtstart): Update.
11260 2011-11-14 Yao Qi <yao@codesourcery.com>
11262 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11263 * mem-break.h: Declare.
11264 * tracepoint.c (cmd_qtstart): Move some code to ...
11265 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11267 (download_tracepoints): Move some code to ...
11268 (download_tracepoint_1): ... here. New.
11270 2011-11-08 Yao Qi <yao@codesourcery.com>
11272 * remote-utils.c (relocate_instruction): A comment fix.
11274 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11276 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11277 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11278 dr_status_mirror and dr_control_mirror from debug_reg_state.
11279 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11280 (i386_initial_stuff): Remove use of deleted globals.
11281 (i386_get_thread_context, i386_set_thread_context,
11282 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11283 from debug_reg_state.
11285 2011-11-05 Yao Qi <yao@codesourcery.com>
11287 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11288 address as TPOINT's.
11290 2011-11-02 Stan Shebs <stan@codesourcery.com>
11292 * tracepoint.c (agent_mem_read_string): New function.
11293 (eval_agent_expr): Call it for tracenz.
11294 * server.c (handle_query): Report support for tracenz.
11296 2011-11-02 Yao Qi <yao@codesourcery.com>
11298 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11300 2011-11-02 Yao Qi <yao@codesourcery.com>
11302 * target.h: Fix a typo in comment.
11304 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11306 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11307 clobber the breakpoints' shadows with fast tracepoint jumps.
11308 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11309 * target.c (write_inferior_memory): Also pass MYADDR down to
11312 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11314 * configure.ac: Check support for personality routine.
11315 * configure: Regenerate.
11316 * config.in: Likewise.
11317 * linux-low.c: Include <sys/personality.h>.
11318 Define ADDR_NO_RANDOMIZE if necessary.
11319 (linux_create_inferior): Disable address space randomization when
11320 forking inferior, if requested.
11321 (linux_supports_disable_randomization): New function.
11322 (linux_target_ops): Install it.
11323 * server.h (disable_randomization): Declare.
11324 * server.c (disable_randomization): New global variable.
11325 (handle_general_set): Handle QDisableRandomization.
11326 (handle_query): Likewise for qSupported.
11327 (main): Support --disable-randomization and --no-disable-randomization
11328 command line arguments.
11329 * target.h (struct target_ops): Add supports_disable_randomization.
11330 (target_supports_disable_randomization): New macro.
11332 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11334 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11336 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11337 [!PT_GETDSBT] (target_loadmap): New definition.
11338 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11339 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11340 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11341 and PT_GETDSBT to LINUX_LOADMAP.
11342 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11343 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11345 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11347 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11348 (arm_linux_hwbp_cap): New static variable.
11349 (arm_linux_get_hwbp_cap): Replace by ...
11350 (arm_linux_init_hwbp_cap): ... this new function.
11351 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11352 (arm_linux_get_hw_watchpoint_count): Likewise.
11353 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11354 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11355 (arm_prepare_to_resume): Use perror_with_name instead of error.
11357 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11359 * linux-arm-low.c: Include <signal.h>.
11360 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11361 (struct arm_linux_hwbp_cap): New data type.
11362 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11363 (struct arm_linux_hw_breakpoint): New data type.
11364 (MAX_BPTS, MAX_WPTS): Define.
11365 (struct arch_process_info, struct arch_lwp_info): New data types.
11366 (arm_linux_get_hwbp_cap): New function.
11367 (arm_linux_get_hw_breakpoint_count): Likewise.
11368 (arm_linux_get_hw_watchpoint_count): Likewise.
11369 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11370 (arm_hwbp_control_initialize): Likewise.
11371 (arm_hwbp_control_is_enabled): Likewise.
11372 (arm_hwbp_control_is_initialized): Likewise.
11373 (arm_hwbp_control_disable): Likewise.
11374 (arm_linux_hw_breakpoint_equal): Likewise.
11375 (arm_linux_hw_point_initialize): Likewise.
11376 (struct update_registers_data): New data structure.
11377 (update_registers_callback: New function.
11378 (arm_insert_point): Likewise.
11379 (arm_remove_point): Likewise.
11380 (arm_stopped_by_watchpoint): Likewise.
11381 (arm_stopped_data_address): Likewise.
11382 (arm_new_process): Likewise.
11383 (arm_new_thread): Likewise.
11384 (arm_prepare_to_resume): Likewise.
11385 (the_low_target): Register arm_insert_point, arm_remove_point,
11386 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11387 arm_new_thread, and arm_prepare_to_resume.
11389 2011-09-15 Stan Shebs <stan@codesourcery.com>
11391 * server.h (struct emit_ops): Add compare-goto fields.
11392 * tracepoint.c (gdb_agent_op_sizes): New table.
11393 (emit_eq_goto): New function.
11394 (emit_ne_goto): New function.
11395 (emit_lt_goto): New function.
11396 (emit_le_goto): New function.
11397 (emit_gt_goto): New function.
11398 (emit_ge_goto): New function.
11399 (is_goto_target): New function.
11400 (compile_bytecodes): Recognize special cases of compare-goto
11401 combinations and call specialized emitters for them.
11402 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11403 (amd64_emit_ne_goto): New function.
11404 (amd64_emit_lt_goto): New function.
11405 (amd64_emit_le_goto): New function.
11406 (amd64_emit_gt_goto): New function.
11407 (amd64_emit_ge_goto): New function.
11408 (amd64_emit_ops): Add the new functions.
11409 (i386_emit_eq_goto): New function.
11410 (i386_emit_ne_goto): New function.
11411 (i386_emit_lt_goto): New function.
11412 (i386_emit_le_goto): New function.
11413 (i386_emit_gt_goto): New function.
11414 (i386_emit_ge_goto): New function.
11415 (i386_emit_ops): Add the new functions.
11417 2011-09-08 Stan Shebs <stan@codesourcery.com>
11419 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11420 (i386_emit_epilogue): Restore %ebx.
11422 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11424 * server.c (step_thread): Remove definition.
11425 (process_serial_event): Don't handle Hs.
11426 * server.h (step_thread): Remove declaration.
11427 * target.c (set_desired_inferior): Remove use of step_thread.
11429 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11431 * linux-low.c: Include linux-procfs.h.
11432 (linux_attach_lwp_1): Update comments.
11433 (linux_attach): Scan for existing threads when attaching to a
11434 process that is the tgid.
11435 * Makefile.in: Update dependencies.
11437 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11439 * configure.srv: Add linux-procfs.o dependencies.
11441 2011-08-14 Yao Qi <yao@codesourcery.com>
11443 * target.h (struct target_ops): Fix indent.
11444 * win32-low.c (win32_target_ops): Fix comment.
11446 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11447 Yao Qi <yao@codesourcery.com>
11449 * Makefile.in (clean): Remove tic6x-*.c files.
11450 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11451 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11452 (tic6x-c64xp-linux.c): Likewise.
11453 * configure.srv: Add support for tic6x-*-uclinux.
11454 * linux-tic6x-low.c: New.
11455 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11457 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11458 Yao Qi <yao@codesourcery.com>
11460 * target.h (struct target_ops): Add read_loadmap.
11461 * linux-low.c (struct target_loadseg): New type.
11462 (struct target_loadmap): New type.
11463 (linux_read_loadmap): New function.
11464 (linux_target_ops): Add linux_read_loadmap.
11465 * server.c (handle_query): Support qXfer:fdpic:read packet.
11466 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11469 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11471 * win32-low.c: Include <stdint.h>.
11473 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11475 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11476 to the inferior here.
11477 (i386_remove_aligned_watchpoint): Ditto.
11478 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11479 fit part of the watchpoint in the debug registers.
11480 (i386_update_inferior_debug_regs): New.
11481 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11482 registers, and only update the inferior on success.
11483 (i386_low_remove_watchpoint): Ditto.
11485 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11487 * linux-low.c (compare_ints, unique, list_threads, show_process,
11488 linux_core_of_thread): Delete.
11489 (linux_target_ops): Change linux_core_of_thread to
11490 linux_common_core_of_thread.
11491 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11492 * utils.c (malloc_failure): Change type of argument.
11493 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11494 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11495 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11496 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11497 (IPA_OBJS): Add common-utils-ipa.o.
11498 (ptid_h, linux_osdata_h): New macros.
11499 (server_h): Add common/common-utils.h, common/xml-utils.h,
11500 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11502 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11503 ptid.o, buffer.o): New rules.
11504 (linux-low.o): Add common/linux-osdata.h as a dependency.
11505 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11506 * configure.ac: Add AC_HEADER_DIRENT check.
11507 * config.in: Regenerate.
11508 * configure: Regenerate.
11509 * remote-utils.c (xml_escape_text): Delete.
11510 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11511 buffer_xml_printf): Move to common/buffer.c.
11512 * server.c (main): Remove call to initialize_inferiors.
11513 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11514 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11515 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11516 internal_error, gdb_assert, gdb_assert_fail): Delete.
11517 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11518 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11520 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11521 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11522 initialize_inferiors): Delete.
11524 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11526 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11529 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11531 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11533 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11535 2011-05-26 Yao Qi <yao@codesourcery.com>
11537 * Makefile.in (thread-db.o): Track dependence to
11538 common/gdb_thread_db.h.
11539 * thread-db.c: include gdb_thread_db.h from right place.
11541 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11543 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11544 __FILE__ and __LINE__ to internal_error.
11546 2011-05-13 Doug Evans <dje@google.com>
11548 * thread-db.c (try_thread_db_load_from_sdir): New function.
11549 (try_thread_db_load_from_dir): New function.
11550 (thread_db_load_search): Handle $sdir, ignore $pdir.
11551 Remove trying of system directories if search of
11552 libthread-db-search-path fails, that is now done via $sdir.
11554 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11556 * server.c (handle_query): Add EnableDisableTracepoints to the list
11557 of supported features.
11558 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11560 (cmd_qtenable_disable): New.
11561 (cmd_qtstart): Install tracepoints even if disabled.
11562 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11563 receiving a QTEnable or QTDisable packet.
11564 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11565 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11567 (gdb_probe): Skip data collection if static tracepoint is disabled.
11569 2011-05-10 Doug Evans <dje@google.com>
11571 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11573 2011-05-04 Doug Evans <dje@google.com>
11575 * linux-low.c (linux_join): Skip process lookup.
11576 * spu-low.c (spu_join): Ditto.
11577 * server.c (join_inferiors_callback): Delete.
11578 (process_serial_event): For 'D' packet (detach) call join_inferior
11581 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11583 * README: Don't mention xscale*-*-linux*.
11584 * configure.srv (xscale*-*-linux*): Don't handle target.
11586 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11588 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11590 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11591 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11592 (i386_emit_void_call_2): Likewise.
11594 2011-04-26 Yao Qi <yao@codesourcery.com>
11596 * linux-low.c: Move common macros to linux-ptrace.h.
11597 Include linux-ptrace.h.
11598 * Makefile.in (linux_ptrace_h): New.
11599 (linux-low.o): Depends on linux-ptrace.h.
11601 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11603 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11604 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11605 (remote_prepare): New function with most of the TCP code from ...
11606 (remote_open): ... here. Detect PORT here unconditionally. Move also
11607 setting transport_is_reliable.
11608 * server.c (run_once): New variable.
11609 (gdbserver_usage): Document it.
11610 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11611 the first run if RUN_ONCE.
11612 * server.h (run_once, remote_prepare): New declarations.
11614 2011-04-19 Tom Tromey <tromey@redhat.com>
11616 * win32-low.c (handle_load_dll): Remove duplicate "the".
11618 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11620 Remove support for old Cygwin 1.5 versions.
11621 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11622 function to avoid warning.
11623 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11626 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11628 * gdbserver/server.h (Macro _): Define it if not available.
11630 2011-03-14 Michael Snyder <msnyder@vmware.com>
11632 * hostio.c (handle_close): Remove unnecessary null test.
11634 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11636 * Makefile.in (maintainer-clean realclean distclean): Remove
11637 "make ... subdir_do" command.
11639 2011-03-10 Michael Snyder <msnyder@vmware.com>
11641 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11643 * server.c (handle_v_run): Free alloced buffer on early return.
11645 2011-03-09 Yao Qi <yao@codesourcery.com>
11648 2011-03-04 Yao Qi <yao@codesourcery.com>
11650 * Makefile.in: Remove GNU make feature --directory.
11652 2011-03-05 Yao Qi <yao@codesourcery.com>
11654 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11655 (subdir_do): New make target. Copied from gdb/Makefile.
11656 (maintainer-clean, realclean, distclean, clean): Call corresponding
11657 make targets in common/Makefile.
11659 2011-02-11 Yao Qi <yao@codesourcery.com>
11661 * configure.ac: Call AC_PROG_RANLIB.
11662 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11663 * configure: Regenerate.
11665 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11667 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11669 2011-03-06 Yao Qi <yao@codesourcery.com>
11671 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11673 2011-03-05 Yao Qi <yao@codesourcery.com>
11675 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11676 (subdir_do): New make target. Copied from gdb/Makefile.
11677 (maintainer-clean, realclean, distclean, clean): Call corresponding
11678 make targets in common/Makefile.
11680 2011-03-04 Yao Qi <yao@codesourcery.com>
11682 * Makefile.in: Remove GNU make feature --directory.
11684 2011-03-04 Michael Snyder <msnyder@vmware.com>
11686 * server.c (queue_stop_reply): Call xmalloc not malloc.
11688 2011-03-02 Michael Snyder <msnyder@vmware.com>
11690 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11692 2011-02-28 Michael Snyder <msnyder@vmware.com>
11694 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11695 (cmd_qtframe): Ditto.
11696 (cmd_qtbuffer): Ditto.
11697 (cmd_bigqtbuffer): Ditto.
11699 * utils.c (decimal2str): Initialize 'width' to nine, then
11700 don't mess with it.
11702 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11704 * hostio.c (require_data): Free *data, not data.
11706 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11708 * hostio.c (require_data): Use free, not xfree.
11710 2011-02-27 Michael Snyder <msnyder@vmware.com>
11712 * server.c (handle_query): Discard unused value.
11714 * hostio.c (require_data): Free malloc memory before returning
11717 2011-02-26 Michael Snyder <msnyder@vmware.com>
11719 * linux-low.c (list_threads): Call closedir for dirent.
11721 2011-02-27 Michael Snyder <msnyder@vmware.com>
11723 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11724 a case statement falls through.
11726 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11728 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11731 2011-02-26 Michael Snyder <msnyder@vmware.com>
11733 * utils.c (decimal2str): Eliminate dead code and dead param.
11734 (pulongest): Drop dead param from call to decimal2str.
11737 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11739 Revert the following patch (not approved yet):
11740 2011-02-21 Hui Zhu <teawater@gmail.com>
11741 * tracepoint.c (tp_printf): New function.
11742 (eval_agent_expr): Handle gdb_agent_op_printf.
11744 2011-02-21 Hui Zhu <teawater@gmail.com>
11746 * tracepoint.c (tp_printf): New function.
11747 (eval_agent_expr): Handle gdb_agent_op_printf.
11749 2011-02-18 Tom Tromey <tromey@redhat.com>
11751 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11752 (tracepoint.o): Likewise.
11753 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11754 (gdb_agent_op_names): Likewise.
11756 2011-02-18 Tom Tromey <tromey@redhat.com>
11758 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11759 gdb_agent_op_rot>: New constants.
11760 (gdb_agent_op_names): Add pick and roll.
11761 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11764 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11766 * aclocal.m4: Regenerated with aclocal-1.11.1.
11768 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11770 * server.c (handle_qxfer_traceframe_info): New.
11771 (qxfer_packets): Register "traceframe-info".
11772 (handle_query): Report support for qXfer:traceframe-info:read+.
11773 * tracepoint.c (match_blocktype): New.
11774 (traceframe_find_block_type): Rename to ...
11775 (traceframe_walk_blocks): ... this. Add callback filter argument,
11777 (traceframe_find_block_type): New, reimplemented on top of
11778 traceframe_walk_blocks.
11779 (build_traceframe_info_xml): New.
11780 (traceframe_read_info): New.
11781 * server.h (traceframe_read_info): Declare.
11783 2011-02-11 Yao Qi <yao@codesourcery.com>
11785 * configure.ac: Call AC_PROG_RANLIB.
11786 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11787 * configure: Regenerate.
11789 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11791 * server.c (gdb_read_memory): Change return semantics to allow
11793 (handle_search_memory_1): Adjust.
11794 (process_serial_event) <'m' packet>: Handle partial transfers.
11795 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11797 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11799 * regcache.c (init_register_cache): Initialize
11800 regcache->register_status.
11801 (free_register_cache): Release regcache->register_status.
11802 (regcache_cpy): Copy register_status.
11803 (registers_to_string): Print 'x's for unavailable registers.
11804 (supply_register): Mark the register's status valid or
11805 unavailable, depending on whether a buffer was passed in or not.
11806 (supply_register_zeroed): New.
11807 (supply_regblock): Mark the registers' status valid or
11808 unavailable, depending on whether a buffer was passed in or not.
11809 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11810 (struct regcache): New `register_status' field.
11811 (supply_register_zeroed): Declare.
11812 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11813 supply_register_zeroed, rather than passing a NULL buffer to
11815 * tracepoint.c (fetch_traceframe_registers): Update comment.
11817 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11819 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11822 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11824 * server.h (decode_xfer_write): Change prototype.
11825 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11826 and don't extract the annex here.
11827 * server.c (decode_xfer_read): Remove `annex' parameter,
11828 and don't extract the annex here.
11829 (decode_xfer): New.
11830 (struct qxfer): New.
11831 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11832 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11833 (handle_qxfer_statictrace): New functions, abstracted out from
11834 handle_query, and made to use the struct qxfer interface.
11835 (handle_threads_qxfer_proper): Rename to ...
11836 (handle_qxfer_threads_proper): ... this.
11837 (handle_threads_qxfer): Rename to ...
11838 (handle_qxfer_threads): ... this. Adjust.
11839 (qxfer_packets): New array.
11840 (handle_qxfer): New function.
11841 (handle_query): Use handle_qxfer.
11843 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11845 * gdbreplay.c: Shorten lines of >= 80 columns.
11846 * linux-low.c: Ditto.
11847 * linux-ppc-low.c: Ditto.
11848 * linux-s390-low.c: Ditto.
11849 * linux-sparc-low.c: Ditto.
11850 * linux-x86-low.c: Ditto.
11851 * linux-xtensa-low.c: Ditto.
11852 * mem-break.c: Ditto.
11853 * nto-low.c: Ditto.
11854 * regcache.h: Ditto.
11855 * remote-utils.c: Ditto.
11858 * thread-db.c: Ditto.
11859 * tracepoint.c: Ditto.
11861 * win32-low.h: Ditto.
11863 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11865 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11868 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11870 * server.c (gdbserver_version): Update copyright year in version
11872 * gdbreplay.c (gdbreplay_version): Ditto.
11874 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11876 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11877 * linux-bfin-low.c: New file.
11878 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11879 PT_DATA_ADDR for BFIN targets.
11880 * Makefile.in (SFILES): Add linux-bfin-low.c.
11881 (clean): Remove reg-bfin.c.
11882 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11883 * README: Mention supported Blackfin targets.
11885 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11887 * .gitignore: New file.
11889 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11891 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11893 2010-10-22 Jie Zhang <jie@codesourcery.com>
11895 * Makefile.in: Add FLAGS_TO_PASS variable.
11896 (install): Remove dependency of install-only and recursively
11897 invoke make for install-only.
11899 2010-10-04 Doug Evans <dje@google.com>
11901 * Makefile.in (uninstall): Use $(DESTDIR).
11903 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11907 * linux-x86-low.c (compat_siginfo_from_siginfo)
11908 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11909 si_code is < 0. Check for si_code == SI_TIMER before checking for
11912 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11914 * lynx-i386-low.c: New file.
11915 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11917 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11919 * lynx-low.c (ptrace_request_to_str): Remove handling for
11920 request values that have been removed in LynxOS 5.x.
11922 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11924 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11927 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11929 * configure.ac: Add --enable-inprocess-agent option.
11930 * configure: Rebuilt.
11932 2010-09-06 Yao Qi <yao@codesourcery.com>
11934 * linux-low.c (linux_kill): Remove unused variable.
11935 (linux_stabilize_threads): Likewise.
11936 * server.c (start_inferior): Likewise.
11937 (queue_stop_reply_callback): Likewise.
11938 * tracepoint.c (do_action_at_tracepoint): Likewise.
11940 2010-09-06 Yao Qi <yao@codesourcery.com>
11942 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11945 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11947 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11949 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11951 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11954 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11956 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11957 gdbserver/lynx-ppc-low.c: New files.
11958 * Makefile.in (lynx_low_h): New variable.
11959 (lynx-low.o, lynx-ppc-low.o): New rules.
11960 * configure.ac: On LynxOS, link with -lnetinet.
11961 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11962 * configure: regenerate.
11964 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11966 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11967 * configure.ac: Add check for vasprintf and vsnprintf.
11968 * configure, config.in: Regenerate.
11969 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11971 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11973 * gdbreplay.c: Move include of alloca.h up, next to include of
11975 * server.h: Add include of malloc.h.
11976 * mem-break.c: Remove include of malloc.h.
11977 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11979 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11981 * Makefile.in (memmem.o): Build with -Wno-error.
11983 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11985 * utils.c (xsnprintf): Make non-static.
11986 * server.h: Add xsnprintf declaration.
11987 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11988 replace calls to snprintf by calls to xsnprintf throughout.
11990 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11992 * configure.ac: Add configure check for alloca.
11993 * configure, config.in: Regenerate.
11994 * server.h: Include alloca.h if it exists.
11995 * gdbreplay.c: Include alloca.h if it exists.
11997 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11999 * linux-low.c (__SIGRTMIN): Define if not already defined.
12000 (linux_create_inferior): Check for __ANDROID__ rather than
12002 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12003 are already deferred.
12004 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12005 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12006 stopped and already has a pending signal to report.
12007 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12008 a pending signal to report or is moving out of a jump pad.
12009 (linux_init_signals): Check for __ANDROID__ rather than
12012 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12014 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12015 debug_threads check. Avoid a linear search when not doing debug
12018 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12020 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12021 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12022 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12023 (process_event): Change local fd's type to gdb_fildes_t.
12024 (create_file_handler): Adjust prototype.
12025 (delete_file_handler): Adjust prototype.
12026 (handle_file_event): Adjust prototype. Use pfildes.
12027 (create_file_event): Adjsut prototype.
12028 * remote-utils.c (remote_desc, listen_desc): Change type to
12030 * server.h: New gdb_fildes_t typedef.
12031 [USE_WIN32API]: Include winsock2.h.
12032 (delete_file_handler, add_file_handler): Adjust prototypes.
12033 (pfildes): Declare.
12034 * utils.c (pfildes): New.
12036 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12038 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12039 * configure: Regenerate.
12041 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12043 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12044 (linux_done_accessing_memory): ... this.
12045 (linux_target_ops): Adjust.
12046 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12047 * nto-low.c (nto_target_ops): Adjust comment.
12048 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12049 * spu-low.c (spu_target_ops): Adjust comment.
12050 * target.h (target_ops): Rename unprepare_to_access_memory field
12051 to done_accessing_memory.
12052 (unprepare_to_access_memory): Rename to ...
12053 (done_accessing_memory): ... this.
12055 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12057 * linux-low.c (linux_prepare_to_access_memory): New.
12058 (linux_unprepare_to_access_memory): New.
12059 (linux_target_ops): Install them.
12060 * server.c (read_memory): Rename to ...
12061 (gdb_read_memory): ... this. Use
12062 prepare_to_access_memory/prepare_to_access_memory.
12063 (write_memory): Rename to ...
12064 (gdb_write_memory): ... this. Use
12065 prepare_to_access_memory/prepare_to_access_memory.
12066 (handle_search_memory_1): Adjust.
12067 (process_serial_event): Adjust.
12068 * target.h (struct target_ops): New fields
12069 prepare_to_access_memory and unprepare_to_access_memory.
12070 (prepare_to_access_memory, unprepare_to_access_memory): New.
12071 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12072 prepare_to_access_memory/prepare_to_access_memory.
12073 * nto-low.c (nto_target_ops): Adjust.
12074 * spu-low.c (spu_target_ops): Adjust.
12075 * win32-low.c (win32_target_ops): Adjust.
12077 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12079 * Makefile.in (WARN_CFLAGS): Get it from configure.
12080 (WERROR_CFLAGS): New.
12081 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12082 * configure.ac: Introduce --enable-werror, which adds -Werror to
12083 the compiler command line. Enabled by default. Disable with
12084 --disable-werror. Add -Wdeclaration-after-statement
12085 Wpointer-arith and -Wformat-nonliteral to warning flags.
12086 * configure: Regenerate.
12088 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12090 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12092 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12094 * gdbreplay.c (remote_error): New.
12096 (expect): Use gdbchar. Check for error reading from GDB.
12097 Clarify sync error output.
12098 (play): Check for errors writing to GDB.
12099 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12100 * remote-utils.c (getpkt): Check for errors writing to the remote
12103 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12105 * linux-low.c (linux_wait_1): Move non-debugging code out of
12106 `debug_threads' control.
12108 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12110 * linux-low.c (linux_wait_1): Don't set last_status here.
12111 * server.c (push_event, queue_stop_reply_callback): Assert we're
12112 not pushing a TARGET_WAITKIND_IGNORE event.
12113 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12114 (myresume, handle_target_event): Set the thread's last_resume_kind
12115 and last_status from the target returned status.
12117 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12121 * linux-x86-low.c (update_debug_registers_callback): New.
12122 (i386_dr_low_set_addr): Use it.
12123 (i386_dr_low_get_addr): New.
12124 (i386_dr_low_set_control): Use update_debug_registers_callback.
12125 (i386_dr_low_get_control): New.
12126 (i386_dr_low_get_status): Adjust.
12127 * linux-low.c (linux_stop_lwp): New.
12128 * linux-low.h (linux_stop_lwp): Declare.
12130 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12131 argument instead of a i386_debug_reg_state.
12132 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12133 a i386_debug_reg_state.
12134 (i386_insert_aligned_watchpoint): Adjust.
12135 (i386_remove_aligned_watchpoint): Adjust.
12136 (i386_low_stopped_data_address): Read the debug registers from the
12137 inferior instead of from the mirrors.
12138 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12139 (i386_dr_low_get_addr): Declare.
12140 (i386_dr_low_get_control): Declare.
12141 (i386_dr_low_get_status): Change prototype.
12143 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12144 (i386_dr_low_get_addr): New.
12145 (i386_dr_low_get_control): New.
12146 (i386_dr_low_get_status): Adjust prototype. Return
12148 (i386_initial_stuff): Clear dr_status_mirror and
12150 (i386_get_thread_context): Adjust.
12151 (i386_set_thread_context): Adjust.
12152 (i386_thread_added): Adjust.
12154 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12156 * linux-low.h (linux_thread_area): Delete declaration.
12158 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12160 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12161 after its termination.
12163 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12165 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12166 (gdb_wants_all_stopped): Delete.
12167 (linux_wait_1): Don't call them.
12168 * server.c (handle_v_cont): Tag all threads as want-stopped.
12169 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12170 stopped as "client-wants-stopped".
12172 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12174 * Makefile.in (signals_h): New.
12175 (server_h): Depend on it.
12176 (server.o): Don't depend on $(signals_def).
12177 (signals.o): Depend on $(signals_def).
12179 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12181 * Makefile.in (signals_def): New.
12182 (server_h): Append include/gdb/signals.h and signals_def.
12183 (server.o): Append signals_def.
12185 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12187 * server.c (handle_target_event): Use target_signal_to_host for
12188 resume_info.sig initialization.
12189 * target.h (struct thread_resume) <sig>: New comment.
12191 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12193 * server.c (handle_query): strcpy() the returned string from paddress()
12194 instead of sprintf().
12195 * utils.c (paddress): Return phex_nz().
12197 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12199 * server.c (handle_v_cont): Call mourn_inferior if process
12201 (myresume): Likewise.
12203 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12205 Static tracepoints, and integration with UST.
12207 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12208 * mem-break.c (uninsert_all_breakpoints)
12209 (reinsert_all_breakpoints): New.
12210 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12211 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12212 (gdb_agent_ust_loaded, helper_thread_id)
12213 (gdb_agent_helper_thread_id): New macros.
12214 (struct ipa_sym_addresses): Add addr_ust_loaded,
12215 addr_helper_thread_id, addr_cmd_buf.
12216 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12217 (in_process_agent_loaded_ust): New.
12218 (write_e_ust_not_loaded): New.
12219 (maybe_write_ipa_ust_not_loaded): New.
12220 (struct collect_static_trace_data_action): New.
12221 (enum tracepoint_type) <static_tracepoint>: New.
12222 (struct tracepoint) <handle>: Mention static tracepoints.
12223 (struct static_tracepoint_ctx): New.
12224 (CMD_BUF_SIZE): New.
12225 (add_tracepoint_action): Handle static tracepoint actions.
12226 (unprobe_marker_at): New.
12227 (clear_installed_tracepoints): Handle static tracepoints.
12228 (cmd_qtdp): Handle static tracepoints.
12229 (probe_marker_at): New.
12230 (cmd_qtstart): Handle static tracepoints.
12231 (response_tracepoint): Handle static tracepoints.
12232 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12233 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12234 (get_context_regcache): Handle static tracepoints.
12235 (do_action_at_tracepoint): Handle static tracepoint actions.
12236 (traceframe_find_block_type): Handle static trace data blocks.
12237 (traceframe_read_sdata): New.
12238 (download_tracepoints): Download static tracepoint actions.
12239 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12240 (GDB_PROBE_NAME): New.
12242 (GET_UST_SYM): New.
12245 (ust_marker_to_static_tracepoint): New.
12247 (collect_ust_data_at_tracepoint): New.
12248 (gdb_ust_probe): New.
12249 (UNIX_PATH_MAX, SOCK_DIR): New.
12250 (gdb_ust_connect_sync_socket): New.
12251 (resume_thread, stop_thread): New.
12252 (run_inferior_command): New.
12253 (init_named_socket): New.
12254 (gdb_ust_socket_init): New.
12255 (cstr_to_hexstr): New.
12257 (first_marker, next_marker): New.
12258 (response_ust_marker): New.
12259 (cmd_qtfstm, cmd_qtsstm): New.
12260 (unprobe_marker_at, probe_marker_at): New.
12261 (cmd_qtstmat, gdb_ust_thread): New.
12262 (gdb_ust_init): New.
12263 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12264 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12265 (ST_REGENTRY): New.
12266 (x86_64_st_collect_regmap): New.
12267 (X86_64_NUM_ST_COLLECT_GREGS): New.
12268 (AMD64_RIP_REGNUM): New.
12269 (supply_static_tracepoint_registers): New.
12270 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12271 (ST_REGENTRY): New.
12272 (i386_st_collect_regmap): New.
12273 (i386_NUM_ST_COLLECT_GREGS): New.
12274 (supply_static_tracepoint_registers): New.
12275 * server.c (handle_query): Handle qXfer:statictrace:read.
12276 <qSupported>: Report support for StaticTracepoints, and
12277 qXfer:statictrace:read features.
12278 * server.h (traceframe_read_sdata)
12279 (supply_static_tracepoint_registers): Declare.
12280 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12281 (unpack_varlen_hex): Include in IPA build.
12282 * Makefile.in (ustlibs, ustinc): New.
12283 (IPA_OBJS): Add remote-utils-ipa.o.
12284 ($(IPA_LIB)): Link -ldl and -lpthread.
12286 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12287 * config.in, configure: Regenerate.
12289 2010-06-20 Ian Lance Taylor <iant@google.com>
12290 Pedro Alves <pedro@codesourcery.com>
12292 * linux-x86-low.c (always_true): Delete.
12293 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12294 trying to fool the compiler with always_true.
12296 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12298 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12299 conditions in gdbserver.
12301 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12303 * spu-low.c (spu_read_memory): Wrap around local store limit.
12304 (spu_write_memory): Likewise.
12306 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12308 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12309 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12311 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12313 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12314 uses with LONGEST uses.
12316 2010-06-14 Stan Shebs <stan@codesourcery.com>
12317 Pedro Alves <pedro@codesourcery.com>
12321 * linux-x86-low.c: Include limits.h.
12323 (always_true): New.
12326 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12327 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12328 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12329 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12330 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12331 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12332 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12333 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12334 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12335 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12336 (amd64_emit_void_call_2): New.
12337 (amd64_emit_ops): New.
12338 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12339 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12340 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12341 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12342 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12343 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12344 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12345 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12346 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12347 (i386_emit_stack_adjust, i386_emit_int_call_1)
12348 (i386_emit_void_call_2): New.
12349 (i386_emit_ops): New.
12350 (x86_emit_ops): New.
12351 (the_low_target): Install x86_emit_ops.
12352 * server.h (struct emit_ops): New.
12353 (get_raw_reg_func_addr): Declare.
12354 (current_insn_ptr, emit_error): Declare.
12355 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12356 (set_trace_state_variable_value): New defines.
12357 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12358 addr_get_trace_state_variable_value and
12359 addr_set_trace_state_variable_value.
12360 (symbol_list): New fields for get_raw_reg,
12361 get_trace_state_variable_value and set_trace_state_variable_value.
12362 (condfn): New typedef.
12363 (struct tracepoint): New field `compiled_cond'.
12364 (do_action_at_tracepoint): Clear compiled_cond.
12365 (get_trace_state_variable_value, set_trace_state_variable_value):
12367 (condition_true_at_tracepoint): If there's a compiled condition,
12369 (current_insn_ptr, emit_error): New globals.
12370 (struct bytecode_address): New.
12371 (get_raw_reg_func_addr): New.
12372 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12373 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12374 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12375 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12376 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12377 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12378 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12379 (compile_tracepoint_condition, compile_bytecodes): New.
12380 * target.h (emit_ops): Forward declare.
12381 (struct target_ops): New field emit_ops.
12382 (target_emit_ops): New.
12383 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12384 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12385 * linux-low.c (linux_emit_ops): New.
12386 (linux_target_ops): Install it.
12387 * linux-low.h (struct linux_target_ops): New field emit_ops.
12389 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12391 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12392 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12394 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12395 Stan Shebs <stan@codesourcery.com>
12397 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12398 (all): Depend on $(extra_libraries).
12399 (install-only): Install the IPA.
12400 (IPA_OBJS, IPA_LIB): New.
12401 (clean): Remove the IPA lib.
12402 (IPAGENT_CFLAGS): New.
12403 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12404 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12405 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12406 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12407 * configure.ac: Check for atomic builtins support in the compiler.
12408 (IPA_DEPFILES, extra_libraries): Define.
12409 * configure.srv (ipa_obj): Add description.
12410 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12411 (i[34567]86-*-linux*): Set ipa_obj.
12412 (x86_64-*-linux*): Set ipa_obj.
12413 * linux-low.c (stabilizing_threads): New.
12414 (supports_fast_tracepoints): New.
12415 (linux_detach): Stabilize threads before detaching.
12416 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12417 the lwp is either not stabilizing, or is moving out of a jump pad.
12418 (linux_fast_tracepoint_collecting): New.
12419 (maybe_move_out_of_jump_pad): New.
12420 (enqueue_one_deferred_signal): New.
12421 (dequeue_one_deferred_signal): New.
12422 (linux_wait_for_event_1): If moving out of a jump pad, defer
12423 pending signals to later.
12424 (linux_stabilize_threads): New.
12425 (linux_wait_1): Check if threads need moving out of jump pads, and
12427 (stuck_in_jump_pad_callback): New.
12428 (move_out_of_jump_pad_callback): New.
12429 (lwp_running): New.
12430 (linux_resume_one_lwp): Handle moving out of jump pads.
12431 (linux_set_resume_request): Dequeue deferred signals.
12432 (need_step_over_p): Also step over fast tracepoint jumps.
12433 (start_step_over): Also uninsert fast tracepoint jumps.
12434 (finish_step_over): Also reinsert fast tracepoint jumps.
12435 (linux_install_fast_tracepoint_jump): New.
12436 (linux_target_ops): Install linux_stabilize_threads and
12437 linux_install_fast_tracepoint_jump_pad.
12438 * linux-low.h (linux_target_ops) <get_thread_area,
12439 install_fast_tracepoint_jump_pad>: New fields.
12440 (struct lwp_info) <collecting_fast_tracepoint,
12441 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12442 (linux_get_thread_area): Declare.
12443 * linux-x86-low.c (jump_insn): New.
12444 (x86_get_thread_area): New.
12445 (append_insns): New.
12446 (push_opcode): New.
12447 (amd64_install_fast_tracepoint_jump_pad): New.
12448 (i386_install_fast_tracepoint_jump_pad): New.
12449 (x86_install_fast_tracepoint_jump_pad): New.
12450 (the_low_target): Install x86_get_thread_area and
12451 x86_install_fast_tracepoint_jump_pad.
12452 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12453 (struct fast_tracepoint_jump): New.
12454 (fast_tracepoint_jump_insn): New.
12455 (fast_tracepoint_jump_shadow): New.
12456 (find_fast_tracepoint_jump_at): New.
12457 (fast_tracepoint_jump_here): New.
12458 (delete_fast_tracepoint_jump): New.
12459 (set_fast_tracepoint_jump): New.
12460 (uninsert_fast_tracepoint_jumps_at): New.
12461 (reinsert_fast_tracepoint_jumps_at): New.
12462 (set_breakpoint_at): Use write_inferior_memory.
12463 (uninsert_raw_breakpoint): Use write_inferior_memory.
12464 (check_mem_read): Mask out fast tracepoint jumps.
12465 (check_mem_write): Mask out fast tracepoint jumps.
12466 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12467 (set_fast_tracepoint_jump): Declare.
12468 (delete_fast_tracepoint_jump)
12469 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12470 (reinsert_fast_tracepoint_jumps_at): Declare.
12471 * regcache.c: Don't compile many functions when building the
12472 in-process agent library.
12473 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12474 the register buffer in the heap.
12475 (free_register_cache): If the register buffer isn't owned by the
12476 regcache, don't free it.
12477 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12478 pre-existing register caches.
12479 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12481 (convert_ascii_to_int): : Constify `from' parameter type.
12482 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12483 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12484 the needed buffer in-place.
12485 (relocate_instruction): New.
12486 * server.c (handle_query) <qSymbols>: If the target supports
12487 tracepoints, give it a chance of looking up symbols. Report
12488 support for fast tracepoints.
12489 (handle_status): Stabilize threads.
12490 (process_serial_event): Adjust.
12491 * server.h (struct fast_tracepoint_jump): Forward declare.
12492 (struct process_info) <fast_tracepoint_jumps>: New field.
12493 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12494 (decode_X_packet, decode_M_packet): Adjust.
12495 (relocate_instruction): Declare.
12496 (in_process_agent_loaded): Declare.
12497 (tracepoint_look_up_symbols): Declare.
12498 (struct fast_tpoint_collect_status): Declare.
12499 (fast_tracepoint_collecting): Declare.
12500 (force_unlock_trace_buffer): Declare.
12501 (handle_tracepoint_bkpts): Declare.
12502 (initialize_low_tracepoint)
12503 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12504 * target.h (struct target_ops) <stabilize_threads,
12505 install_fast_tracepoint_jump_pad>: New fields.
12506 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12507 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12508 [HAVE_STDINT_H]: Include stdint.h.
12509 (trace_debug_1): Rename to ...
12510 (trace_vdebug): ... this.
12511 (trace_debug): Rename to ...
12512 (trace_debug_1): ... this. Add `level' parameter.
12513 (trace_debug): New.
12514 (ATTR_USED, ATTR_NOINLINE): New.
12515 (IP_AGENT_EXPORT): New.
12516 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12517 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12518 (about_to_request_buffer_space, trace_buffer_is_full)
12519 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12520 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12521 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12522 (traceframe_write_count, traceframes_created)
12523 (trace_state_variables)
12524 New renaming defines.
12525 (struct ipa_sym_addresses): New.
12526 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12527 (symbol_list): New.
12528 (ipa_sym_addrs): New.
12529 (all_tracepoint_symbols_looked_up): New.
12530 (in_process_agent_loaded): New.
12531 (write_e_ipa_not_loaded): New.
12532 (maybe_write_ipa_not_loaded): New.
12533 (tracepoint_look_up_symbols): New.
12534 (debug_threads) [IN_PROCESS_AGENT]: New.
12535 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12536 (UNKNOWN_SIDE_EFFECTS): New.
12537 (stop_tracing): New.
12538 (flush_trace_buffer): New.
12539 (stop_tracing_bkpt): New.
12540 (flush_trace_buffer_bkpt): New.
12541 (read_inferior_integer): New.
12542 (read_inferior_uinteger): New.
12543 (read_inferior_data_pointer): New.
12544 (write_inferior_data_pointer): New.
12545 (write_inferior_integer): New.
12546 (write_inferior_uinteger): New.
12547 (struct collect_static_trace_data_action): Delete.
12548 (enum tracepoint_type): New.
12549 (struct tracepoint) <type>: New field `type'.
12550 <actions_str, step_actions, step_actions_str>: Only include in
12552 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12553 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12554 (tracepoints): Use IP_AGENT_EXPORT.
12555 (last_tracepoint): Don't include in the IPA.
12556 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12557 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12558 (alloced_trace_state_variables): New.
12559 (trace_state_variables): Use IP_AGENT_EXPORT.
12560 (traceframe_t): Delete unused variable.
12561 (circular_trace_buffer): Don't include in the IPA.
12562 (trace_buffer_start): Delete.
12563 (struct trace_buffer_control): New.
12564 (trace_buffer_free): Delete.
12565 (struct ipa_trace_buffer_control): New.
12566 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12567 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12569 (trace_buffer_ctrl): New.
12570 (TRACE_BUFFER_CTRL_CURR): New.
12571 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12572 Reimplement as macros.
12573 (trace_buffer_wrap): Delete.
12574 (traceframe_write_count, traceframe_read_count)
12575 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12576 (struct tracepoint_hit_ctx) <type>: New field.
12577 (struct fast_tracepoint_ctx): New.
12578 (memory_barrier): New.
12580 (record_tracepoint_error): Update atomically in the IPA.
12581 (clear_inferior_trace_buffer): New.
12582 (about_to_request_buffer_space): New.
12583 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12584 updating the same buffer.
12585 (add_tracepoint): Default the tracepoint's type to trap
12586 tracepoint, and orig_size to -1.
12587 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12588 internal variables.
12589 (create_trace_state_variable): New parameter `gdb'. Handle it.
12590 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12591 (cmd_qtdp): Handle fast tracepoints.
12592 (cmd_qtdv): Adjust.
12593 (max_jump_pad_size): New.
12594 (gdb_jump_pad_head): New.
12595 (get_jump_space_head): New.
12596 (claim_jump_space): New.
12597 (sort_tracepoints): New.
12598 (MAX_JUMP_SIZE): New.
12599 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12601 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12602 support. Upload fast traceframes, and delete internal IPA
12604 (stop_tracing_handler): New.
12605 (flush_trace_buffer_handler): New.
12606 (cmd_qtstop): Upload fast tracepoints.
12607 (response_tracepoint): Handle fast tracepoints.
12608 (tracepoint_finished_step): Upload fast traceframes. Set the
12609 tracepoint hit context's tracepoint type.
12610 (handle_tracepoint_bkpts): New.
12611 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12612 type. Add comment about fast tracepoints.
12613 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12614 non-existing action_str field.
12615 (get_context_regcache): Handle fast tracepoints.
12616 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12618 (fast_tracepoint_from_jump_pad_address): New.
12619 (fast_tracepoint_from_ipa_tpoint_address): New.
12620 (collecting_t): New.
12621 (force_unlock_trace_buffer): New.
12622 (fast_tracepoint_collecting): New.
12624 (gdb_collect): New.
12625 (write_inferior_data_ptr): New.
12626 (target_tp_heap): New.
12627 (target_malloc): New.
12628 (download_agent_expr): New.
12630 (download_tracepoints): New.
12631 (download_trace_state_variables): New.
12632 (upload_fast_traceframes): New.
12633 (IPA_FIRST_TRACEFRAME): New.
12634 (IPA_NEXT_TRACEFRAME_1): New.
12635 (IPA_NEXT_TRACEFRAME): New.
12636 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12637 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12638 (gdb_jump_pad_buffer_end): New.
12639 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12640 (initialize_tracepoint): Adjust.
12641 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12642 buffer. Initialize the low module.
12643 * utils.c (PREFIX, TOOLNAME): New.
12644 (malloc_failure): Use PREFIX.
12645 (error): In the IPA, an error causes an exit.
12646 (fatal, warning): Use PREFIX.
12647 (internal_error): Use TOOLNAME.
12648 (NUMCELLS): Increase to 10.
12649 * configure, config.in: Regenerate.
12651 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12653 * server.c (handle_query) <qSupported>: Do two passes over the
12654 qSupported string to avoid nesting strtok.
12656 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12658 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12660 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12661 -Wl,--dynamic-list.
12662 * configure: Regenerate.
12663 * proc-service.list: New.
12665 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12667 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12670 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12672 * gdbreplay.c (remote_open): Check error return from socket() call by
12673 its equality to -1 not by it being negative.
12674 * remote-utils.c (remote_open): Likewise.
12676 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12678 * config.h: Regenerate.
12680 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12682 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12683 doesn't provide PTRACE_GET_THREAD_AREA.
12685 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12687 * linux-m68k-low.c: Include <asm/ptrace.h>
12688 (ps_get_thread_area): Implement.
12690 2010-05-03 Doug Evans <dje@google.com>
12692 * event-loop.c (struct callback_event): New struct.
12693 (callback_list): New global.
12694 (append_callback_event, delete_callback_event): New functions.
12695 (process_callback): New function.
12696 (start_event_loop): Call it.
12697 * remote-utils.c (NOT_SCHEDULED): Define.
12698 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12699 moved out of readchar.
12700 (readchar): Rewrite. Call reschedule before returning.
12701 (reset_readchar): New function.
12702 (remote_close): Call it.
12703 (process_remaining, reschedule): New functions.
12704 * server.h (callback_handler_func): New typedef.
12705 (append_callback_event, delete_callback_event): Declare.
12707 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12709 * proc-service.c (ps_pglobal_lookup): Use
12710 thread_db_look_up_one_symbol.
12711 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12712 parameter. Use it instead of all_symbols_looked_up.
12713 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12715 (all_symbols_looked_up): Don't declare.
12716 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12717 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12719 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12720 Set all_symbols_looked_up here.
12721 (thread_db_look_up_one_symbol): New.
12722 (thread_db_get_tls_address): Adjust.
12723 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12724 thread_db object on the heap, and tentatively set it in the
12726 (thread_db_init): Don't set all_symbols_looked_up here.
12727 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12729 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12731 * linux-low.c (linux_kill, linux_detach): Adjust.
12732 (status_pending_p_callback): Remove redundant statement. Check
12733 for !TARGET_WAITIKIND_IGNORE, instead of
12734 TARGET_WAITKIND_STOPPED.
12735 (handle_tracepoints): Make sure LWP is locked. Adjust.
12736 (linux_wait_for_event_1): Adjust.
12737 (linux_cancel_breakpoints): New.
12738 (unsuspend_one_lwp): New.
12739 (unsuspend_all_lwps): New.
12740 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12741 (send_sigstop_callback): Change return type to int, add new
12742 `except' parameter and handle it.
12743 (suspend_and_send_sigstop_callback): New.
12744 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12745 pass them down. If SUSPEND, also increment the lwp's suspend
12747 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12748 (need_step_over_p): Don't consider suspended LWPs.
12749 (start_step_over): Adjust.
12750 (proceed_one_lwp): Change return type to int, add new `except'
12751 parameter and handle it.
12752 (unsuspend_and_proceed_one_lwp): New.
12753 (proceed_all_lwps): Use find_inferior instead of
12755 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12756 also decrement the suspend count of LWPs. Pass `except' down,
12757 instead of hacking its suspend count.
12758 (linux_pause_all): Add `freeze' parameter. Adjust.
12759 (linux_unpause_all): New.
12760 (linux_target_ops): Install linux_unpause_all.
12761 * server.c (handle_status): Adjust.
12762 * target.h (struct target_ops): New fields `unpause_all' and
12763 `cancel_breakpoints'. Add new parameter to `pause_all'.
12764 (pause_all): Add new `freeze' parameter.
12765 (unpause_all): New.
12766 (cancel_breakpoints): New.
12767 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12768 cancel breakpoints.
12769 (cmd_qtstart): Pause threads.
12770 (stop_tracing): Pause threads, and cancel breakpoints.
12771 * win32-low.c (win32_target_ops): Adjust.
12773 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12775 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12776 the inferior right away from here...
12777 (linux_wait_1): ... to here, and adjust to check the thread's
12778 last_resume_kind instead of the lwp's step or stop_expected flags.
12780 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12782 * README: Use consistent `GDB' and `GDBserver' spellings.
12784 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12786 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12787 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12788 (linux_detach_one_lwp): Assume the lwp is stopped.
12789 (any_thread_of): Delete.
12790 (linux_detach): Stop all lwps here. Don't blindly delete all
12792 (delete_lwp_callback): New.
12793 (linux_mourn): Delete all lwps of the process that is gone.
12794 (linux_wait_1): Don't delete the last lwp of the process here.
12795 * mem-break.h (mark_breakpoints_out): Declare.
12796 * mem-break.c (mark_breakpoints_out): New.
12797 (free_all_breakpoints): Use it.
12798 * server.c (handle_target_event): If the process is gone, mark
12800 * thread-db.c (struct thread_db) <create_bp>: New field.
12801 (thread_db_enable_reporting): Fix prototype. Store a thread event
12802 breakpoint reference in the thread_db struct.
12803 (thread_db_load_search): Clear the thread_db object.
12804 (try_thread_db_load_1): Ditto.
12805 (switch_to_process): New.
12806 (disable_thread_event_reporting): Use it.
12807 (remove_thread_event_breakpoints): New.
12808 (thread_db_detach, thread_db_mourn): Use it.
12810 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12812 * linux-low.c (linux_enable_event_reporting): New.
12813 (linux_wait_for_event_1, handle_extended_wait): Use it.
12815 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12817 * linux-low.c (linux_kill_one_lwp, linux_kill)
12818 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12819 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12820 SIGSTOP even if the LWP is stopped.
12821 (send_sigstop_callback): New.
12822 (stop_all_lwps): Use send_sigstop_callback instead.
12823 (linux_resume_one_thread): Adjust.
12824 (proceed_one_lwp): Still proceed an LWP that the client has
12825 requested to stop, if we haven't reported it as stopped yet. Make
12826 sure that LWPs the client want stopped, have a pending SIGSTOP.
12828 2010-04-26 Doug Evans <dje@google.com>
12830 * server.c (handle_general_set): Make static.
12832 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12833 Print received char after testing for error/eof instead of before.
12834 (input_interrupt): Tweak comment.
12836 2010-04-23 Doug Evans <dje@google.com>
12838 * server.c (start_inferior): Print inferior argv if --debug.
12840 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12842 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12843 * nto-x86-low.c: Include server.h
12845 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12847 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12848 be consistent with other sources of this directory.
12849 (init_registers_amd64): Correct name of source file of this function
12852 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12854 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12855 64-bit executables.
12857 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12859 * win32-i386-low.c: Add 64-bit support.
12860 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12861 (init_registers_amd64): Declare.
12862 (mappings): Add 64-bit version of array.
12863 (init_windows_x86): New function.
12864 (the_low_target): Change init_arch field to init_windows_x86.
12866 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12868 * win32-low.c: Adapt to support also 64-bit architecture.
12869 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12870 (get_image_name): Use SIZE_T type for local variable `done'.
12871 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12872 (toolhelp_get_dll_name): Idem.
12873 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12874 Use uintptr_t typecast to avoid warning.
12875 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12876 (handle_exception): Use phex_nz to avoid warning.
12877 (win32_wait): Remove unused local variable `process'.
12879 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12881 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12884 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12886 * configure.ac: Use `ws2_32' library for srv_mingw.
12887 * configure: Regenerate.
12888 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12889 * remote-utils.c: Likewise.
12891 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12893 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12894 if __x86_64__ is defined.
12896 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12898 * configure: Regenerate.
12900 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12902 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12903 * target.h (target_ops): New get_tib_address field.
12904 * win32-low.h (win32_thread_info): Add thread_local_base field.
12905 * win32-low.c (child_add_thread): Add tlb argument.
12906 Set thread_local_base field to TLB.
12907 (get_child_debug_event): Adapt to child_add_thread change.
12908 (win32_get_tib_address): New function.
12909 (win32_target_ops): Set get_tib_address field to
12910 win32_get_tib_address.
12911 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12913 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12915 * linux-low.c (linux_mourn): Also remove the process.
12916 * server.c (handle_target_event): Don't remove the process here.
12917 * nto-low.c (nto_mourn): New.
12918 (nto_target_ops): Install it.
12919 * spu-low.c (spu_mourn): New.
12920 (spu_target_ops): Install it.
12921 * win32-low.c (win32_mourn): New.
12922 (win32_target_ops): Install it.
12924 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12926 * server.h (buffer_xml_printf): Remove redundant `;'.
12928 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12930 * regcache.c (set_register_cache): Invalidate regcaches before
12931 changing the register cache layout.
12932 (regcache_invalidate_one): Allow a NULL regcache.
12933 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12934 regcaches before changing the register cache layout or the target
12937 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12939 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12940 variable warning on Linux/x86-64.
12942 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12944 GDBserver disconnected tracing support.
12946 * linux-low.c (linux_remove_process): Delete.
12947 (add_lwp): Don't set last_resume_kind here.
12948 (linux_kill): Use `mourn'.
12949 (linux_detach): Use `thread_db_detach', and `mourn'.
12950 (linux_mourn): New.
12951 (linux_attach_lwp_1): Adjust comment.
12952 (linux_attach): last_resume_kind moved the thread_info; adjust.
12953 (status_pending_p_callback): Adjust.
12954 (linux_wait_for_event_1): Adjust.
12955 (count_events_callback, select_singlestep_lwp_callback)
12956 (select_event_lwp_callback, cancel_breakpoints_callback)
12957 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12958 (proceed_one_lwp): Adjust.
12959 (linux_async): Add debug output.
12960 (linux_thread_stopped): New.
12961 (linux_pause_all): New.
12962 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12964 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12965 (thread_db_free): Delete declaration.
12966 (thread_db_detach, thread_db_mourn): Declare.
12967 * thread-db.c (thread_db_init): Use thread_db_mourn.
12968 (thread_db_free): Delete, split in two.
12969 (disable_thread_event_reporting): New.
12970 (thread_db_detach): New.
12971 (thread_db_mourn): New.
12973 * server.h (struct thread_info) <last_resume_kind>: New field.
12974 <attached>: Add comment.
12975 <gdb_detached>: New field.
12976 (handler_func): Change return type to int.
12977 (handle_serial_event, handle_target_event): Ditto.
12978 (gdb_connected): Declare.
12980 (disconnected_tracing): Declare.
12981 (stop_tracing): Declare.
12983 * server.c (handle_query) <qSupported>: Report support for
12984 disconnected tracing.
12985 (queue_stop_reply_callback): Account for running threads.
12986 (gdb_wants_thread_stopped): New.
12987 (gdb_wants_all_threads_stopped): New.
12988 (gdb_reattached_process): New.
12989 (handle_status): Clear the `gdb_detached' flag of all processes.
12990 In all-stop, stop all threads.
12991 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12992 (process_serial_event): If the remote connection breaks, or if an
12993 exit was forced with "monitor exit", force an event loop exit.
12994 Handle disconnected tracing on detach.
12995 (handle_serial_event): Adjust.
12996 (handle_target_event): If GDB isn't connected, forward events back
12997 to the inferior, unless the last process exited, in which case,
12998 exit gdbserver. Adjust interface.
13000 * remote-utils.c (remote_open): Don't block in accept. Instead
13001 register an event loop source on the listen socket file
13002 descriptor. Refactor bits into ...
13003 (listen_desc): ... this new global.
13004 (gdb_connected): ... this new function.
13005 (enable_async_notification): ... this new function.
13006 (handle_accept_event): ... this new function.
13007 (remote_close): Clear remote_desc.
13009 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13011 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13013 (mourn_inferior): Define.
13014 (target_process_qsupported): Avoid the dangling else problem.
13015 (thread_stopped): Define.
13016 (pause_all): Define.
13017 (target_waitstatus_to_string): Declare.
13018 * target.c (target_waitstatus_to_string): New.
13020 * tracepoint.c (tracing): Make extern.
13021 (disconnected_tracing): New.
13022 (stop_tracing): Make extern. Handle tracing stops due to GDB
13024 (cmd_qtdisconnected): New.
13025 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13026 (handle_tracepoint_general_set): Handle QTDisconnected.
13028 * event-loop.c (event_handler_func): Change return type to int.
13029 (process_event): Bail out if the event handler wants the event
13031 (handle_file_event): Ditto.
13032 (start_event_loop): Bail out if the event handler wants the event
13035 * nto-low.c (nto_target_ops): Adjust.
13036 * spu-low.c (spu_wait): Don't remove the process here.
13037 (spu_target_ops): Adjust.
13038 * win32-low.c (win32_wait): Don't remove the process here.
13039 (win32_target_ops): Adjust.
13041 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13043 * regcache.c (realloc_register_cache): Invalidate inferior's
13044 regcache before recreating it.
13046 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13048 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13050 2010-04-09 Stan Shebs <stan@codesourcery.com>
13051 Pedro Alves <pedro@codesourcery.com>
13053 * server.h (LONGEST): New.
13054 (struct thread_info) <while_stepping>: New field.
13055 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13057 (initialize_tracepoint, handle_tracepoint_general_set)
13058 (handle_tracepoint_query, tracepoint_finished_step)
13059 (tracepoint_was_hit, release_while_stepping_state_list):
13060 (current_traceframe): Declare.
13061 * server.c (handle_general_set): Handle tracepoint packets.
13062 (read_memory): New.
13063 (write_memory): New.
13064 (handle_search_memory_1): Use read_memory.
13065 (handle_query): Report support for conditional tracepoints, trace
13066 state variables, and tracepoint sources. Handle tracepoint
13068 (main): Initialize the tracepoints module.
13069 (process_serial_event): Handle traceframe reads/writes.
13071 * linux-low.c (handle_tracepoints): New.
13072 (linux_wait_1): Call it.
13073 (linux_resume_one_lwp): Handle while-stepping.
13074 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13075 (linux_target_ops): Install them.
13076 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13078 * linux-x86-low.c (x86_supports_tracepoints): New.
13079 (the_low_target). Install it.
13081 * mem-break.h (delete_breakpoint): Declare.
13082 * mem-break.c (delete_breakpoint): Make external.
13084 * target.h (struct target_ops): Add `supports_tracepoints',
13085 `read_pc', and `write_pc' fields.
13086 (target_supports_tracepoints): Define.
13087 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13090 * regcache.h (struct regcache) <registers_owned>: New field.
13091 (init_register_cache, regcache_cpy): Declare.
13092 (regcache_read_pc, regcache_write_pc): Declare.
13093 (register_cache_size): Declare.
13094 (supply_regblock): Declare.
13095 * regcache.c (init_register_cache): New.
13096 (new_register_cache): Use it.
13097 (regcache_cpy): New.
13098 (register_cache_size): New.
13099 (supply_regblock): New.
13100 (regcache_read_pc, regcache_write_pc): New.
13102 * tracepoint.c: New.
13104 * Makefile.in (OBS): Add tracepoint.o.
13105 (tracepoint.o): New rule.
13107 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13109 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13111 (i386-mmx.c): Likewise.
13112 (i386-mmx-linux.o): Likewise.
13113 (i386-mmx-linux.c): Likewise.
13115 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13116 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13117 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13118 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13120 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13121 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13122 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13124 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13126 * Makefile.in (clean): Updated.
13128 (i386-avx.c): Likewise.
13129 (i386-avx-linux.o): Likewise.
13130 (i386-avx-linux.c): Likewise.
13131 (amd64-avx.o): Likewise.
13132 (amd64-avx.c): Likewise.
13133 (amd64-avx-linux.o): Likewise.
13134 (amd64-avx-linux.c): Likewise.
13136 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13137 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13138 (srv_amd64_regobj): Add amd64-avx.o.
13139 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13140 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13141 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13142 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13143 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13144 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13145 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13147 * i387-fp.c: Include "i386-xstate.h".
13149 (i387_cache_to_xsave): Likewise.
13150 (i387_xsave_to_cache): Likewise.
13151 (x86_xcr0): Likewise.
13153 * i387-fp.h (i387_cache_to_xsave): Likewise.
13154 (i387_xsave_to_cache): Likewise.
13155 (x86_xcr0): Likewise.
13157 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13158 * linux-crisv32-low.c (target_regsets): Likewise.
13159 * linux-m68k-low.c (target_regsets): Likewise.
13160 * linux-mips-low.c (target_regsets): Likewise.
13161 * linux-ppc-low.c (target_regsets): Likewise.
13162 * linux-s390-low.c (target_regsets): Likewise.
13163 * linux-sh-low.c (target_regsets): Likewise.
13164 * linux-sparc-low.c (target_regsets): Likewise.
13165 * linux-xtensa-low.c (target_regsets): Likewise.
13167 * linux-low.c: Include <sys/uio.h>.
13168 (regsets_fetch_inferior_registers): Support nt_type.
13169 (regsets_store_inferior_registers): Likewise.
13170 (linux_process_qsupported): New.
13171 (linux_target_ops): Add linux_process_qsupported.
13173 * linux-low.h (regset_info): Add nt_type.
13174 (linux_target_ops): Add process_qsupported.
13176 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13178 (init_registers_i386_avx_linux): New.
13179 (init_registers_amd64_avx_linux): Likewise.
13180 (xmltarget_i386_linux_no_xml): Likewise.
13181 (xmltarget_amd64_linux_no_xml): Likewise.
13182 (PTRACE_GETREGSET): Likewise.
13183 (PTRACE_SETREGSET): Likewise.
13184 (x86_fill_xstateregset): Likewise.
13185 (x86_store_xstateregset): Likewise.
13186 (use_xml): Likewise.
13187 (x86_linux_update_xmltarget): Likewise.
13188 (x86_linux_process_qsupported): Likewise.
13189 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13190 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13191 init_registers_i386_linux here. Call
13192 x86_linux_update_xmltarget.
13193 (the_low_target): Add x86_linux_process_qsupported.
13195 * server.c (handle_query): Call target_process_qsupported.
13197 * target.h (target_ops): Add process_qsupported.
13198 (target_process_qsupported): New.
13200 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13202 * inferiors.c (add_thread): Set last_status kind to
13203 TARGET_WAITKIND_IGNORE.
13204 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13205 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13206 (linux_wait_1): Move `thread' local definition to block that uses
13207 it. Don't NULL initialize `event_child'.
13208 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13209 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13210 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13212 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13214 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13215 an extended waitstatus, or by a watchpoint.
13216 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13217 thread was stepping or has been stopped by a watchpoint.
13219 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13221 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13222 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13223 of another, then delete the previous, and validate all
13225 (validate_inserted_breakpoint): New.
13226 (delete_disabled_breakpoints): New.
13227 (validate_breakpoints): New.
13228 (check_mem_read): Validate breakpoints before trusting their
13229 shadow. Delete disabled breakpoints.
13230 (check_mem_write): Validate breakpoints before trusting they
13231 should be inserted. Delete disabled breakpoints.
13232 * mem-break.h (validate_breakpoints):
13233 * server.c (handle_query): Validate breakpoints when we see a
13236 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13238 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13239 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13240 if we could tell there's a GDB breakpoint at stop_pc.
13241 (need_step_over_p): Don't do a step over if we find a GDB
13242 breakpoint at the resume PC.
13244 * mem-break.c (struct raw_breakpoint): New.
13245 (enum bkpt_type): New type `gdb_breakpoint'.
13246 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13247 fields. New field `raw'.
13248 (find_raw_breakpoint_at): New.
13249 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13250 breakpoint instead.
13251 (set_breakpoint_at): Adjust.
13252 (delete_raw_breakpoint): New.
13253 (release_breakpoint): New.
13254 (delete_breakpoint): Rename to...
13255 (delete_breakpoint_1): ... this. Add proc parameter. Use
13256 release_breakpoint. Return ENOENT.
13257 (delete_breakpoint): Reimplement.
13258 (find_breakpoint_at): Delete.
13259 (find_gdb_breakpoint_at): New.
13260 (delete_breakpoint_at): Delete.
13261 (set_gdb_breakpoint_at): New.
13262 (delete_gdb_breakpoint_at): New.
13263 (gdb_breakpoint_here): New.
13264 (set_reinsert_breakpoint): Use release_breakpoint.
13265 (uninsert_breakpoint): Rename to ...
13266 (uninsert_raw_breakpoint): ... this.
13267 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13268 (reinsert_raw_breakpoint): Change parameter type to
13270 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13272 (check_breakpoints): Adjust. Use release_breakpoint.
13273 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13274 (breakpoint_inserted_here): Ditto.
13275 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13276 Don't trust the breakpoint's shadow if it is not inserted.
13277 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13278 (delete_all_breakpoints): Adjust.
13279 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13280 use delete_breakpoint_1.
13282 * mem-break.h (breakpoints_supported): Delete declaration.
13283 (set_gdb_breakpoint_at): Declare.
13284 (gdb_breakpoint_here): Declare.
13285 (delete_breakpoint_at): Delete.
13286 (delete_gdb_breakpoint_at): Declare.
13288 * server.h (struct raw_breakpoint): Forward declare.
13289 (struct process_info): New field `raw_breakpoints'.
13291 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13294 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13296 * linux-low.c (status_pending_p_callback): Fix comment.
13297 (linux_wait_for_event_1): Move most of the internal breakpoint
13298 handling from here...
13299 (linux_wait_1): ... to here.
13300 (count_events_callback): New.
13301 (select_singlestep_lwp_callback): New.
13302 (select_event_lwp_callback): New.
13303 (cancel_breakpoints_callback): New.
13304 (select_event_lwp): New.
13305 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13306 priority to all LWPs that have had events that should be reported
13307 to the client. Cancel breakpoints when about to reporting the
13308 event to the client, not while stopping lwps. No longer cancel
13309 finished single-steps here.
13310 (cancel_finished_single_step): Delete.
13311 (cancel_finished_single_steps): Delete.
13313 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13315 * mem-break.c (enum bkpt_type): New.
13316 (struct breakpoint): New field `type'.
13317 (set_breakpoint_at): Change return type to struct breakpoint
13318 pointer. Set type to `other_breakpoint' by default.
13319 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13320 in the breakpoint list.
13321 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13322 (reinsert_breakpoint): Rename to ...
13323 (reinsert_raw_breakpoint): ... this.
13324 (reinsert_breakpoints_at): Adjust.
13325 * mem-break.h (struct breakpoint): Declare.
13326 (set_breakpoint_at): Change return type to struct breakpoint
13329 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13331 * server.c (handle_query): Assign, not compare.
13333 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13335 Teach linux gdbserver to step-over-breakpoints.
13337 * linux-low.c (can_hardware_single_step): New.
13338 (supports_breakpoints): New.
13339 (handle_extended_wait): If stopping threads, read the stop pc of
13340 the new cloned LWP.
13342 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13343 low target doesn't support retrieving the PC.
13344 (add_lwp): Set last_resume_kind to resume_continue.
13345 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13346 (linux_attach): Don't clear stop_expected. Set the lwp's
13347 last_resume_kind to resume_stop.
13348 (linux_detach_one_lwp): Don't check for removed breakpoints.
13349 (check_removed_breakpoint): Delete.
13350 (status_pending_p): Rename to ...
13351 (status_pending_p_callback): ... this. Don't check for removed
13352 breakpoints. Don't consider threads that are stopped from GDB's
13354 (linux_wait_for_lwp): Always read the stop_pc here.
13355 (cancel_breakpoint): New.
13356 (step_over_bkpt): New global.
13357 (linux_wait_for_event_1): Implement stepping over breakpoints.
13358 (gdb_wants_lwp_stopped): New.
13359 (gdb_wants_all_stopped): New.
13360 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13361 single-step traps here. Store the thread's last reported target
13363 (send_sigstop): Don't clear stop_expected. Always set it,
13365 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13366 (cancel_finished_single_step): New.
13367 (cancel_finished_single_steps): New.
13368 (wait_for_sigstop): Don't cancel finished single-step traps here.
13369 (linux_resume_one_lwp): Don't check for removed breakpoints.
13370 Don't set `step' on non-hardware step archs.
13371 (linux_set_resume_request): Ignore resume_stop requests if already
13372 stopping or stopped. Set the lwp's last_resume_kind.
13373 (resume_status_pending_p): Don't check for removed breakpoints.
13374 (need_step_over_p): New.
13375 (start_step_over): New.
13376 (finish_step_over): New.
13377 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13378 requests. Clear the thread's last reported target waitstatus.
13379 Don't use the `suspended' flag. Don't consider pending breakpoints.
13380 (linux_resume): Start a step-over if necessary.
13381 (proceed_one_lwp): New.
13382 (proceed_all_lwps): New.
13383 (unstop_all_lwps): New.
13384 * linux-low.h (struct lwp_info): Rewrite comment for the
13385 `suspended' flag. Add the `stop_pc' field. Delete the
13386 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13387 Add `'last_resume_kind' and `need_step_over' fields.
13388 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13389 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13390 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13391 (set_raw_breakpoint_at): New.
13392 (set_breakpoint_at): Rewrite to use it.
13393 (reinsert_breakpoint_handler): Delete.
13394 (set_reinsert_breakpoint): New.
13395 (reinsert_breakpoint_by_bp): Delete.
13396 (delete_reinsert_breakpoints): New.
13397 (uninsert_breakpoint): Rewrite.
13398 (uninsert_breakpoints_at): New.
13399 (reinsert_breakpoint): Rewrite.
13400 (reinsert_breakpoints_at): New.
13401 (check_breakpoints): Rewrite.
13402 (breakpoint_here): New.
13403 (breakpoint_inserted_here): New.
13404 (check_mem_read): Adjust.
13405 * mem-break.h (breakpoints_supported, breakpoint_here)
13406 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13407 (reinsert_breakpoint_by_bp): Delete declaration.
13408 (delete_reinsert_breakpoints): Declare.
13409 (reinsert_breakpoint): Delete declaration.
13410 (reinsert_breakpoints_at): Declare.
13411 (uninsert_breakpoint): Delete declaration.
13412 (uninsert_breakpoints_at): Declare.
13413 (check_breakpoints): Adjust prototype.
13414 * server.h: Adjust include order.
13415 (struct thread_info): Declare here. Add a `last_status' field.
13417 2010-03-23 Michael Snyder <msnyder@vmware.com>
13419 * server.c (crc32): New function.
13420 (handle_query): Add handling for 'qCRC:' request.
13422 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13424 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13425 lwp had been stopped by a watchpoint.
13427 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13429 * server.h (internal_error): Declare.
13430 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13431 * utils.c (internal_error): New function.
13433 2010-03-15 Andreas Schwab <schwab@redhat.com>
13435 * configure.srv: Fix typo setting srv_regobj.
13437 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13439 * linux-low.c (fetch_register): Avoid passing a non string literal
13441 (usr_store_inferior_registers): Ditto.
13443 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13445 * linux-low.c (linux_write_memory): Bail out early if peeking
13448 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13450 * linux-low.h (struct lwp_info): New fields
13451 `stopped_by_watchpoint' and `stopped_data_address'.
13452 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13453 here, and cache them in the lwp object.
13454 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13456 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13458 (linux_stopped_by_watchpoint): Rewrite.
13459 (linux_stopped_data_address): Rewrite.
13461 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13463 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13464 switching the current inferior, not before.
13466 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13468 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13469 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13470 i386-linux.c and amd64-linux.c.
13471 (reg-i386.o): Removed.
13472 (reg-i386.c): Likewise.
13473 (reg-i386-linux.o): Likewise.
13474 (reg-i386-linux.c): Likewise.
13475 (reg-x86-64.o): Likewise.
13476 (reg-x86-64.c): Likewise.
13477 (reg-x86-64-linux.o): Likewise.
13478 (reg-x86-64-linux.c): Likewise.
13480 (i386.c): Likewise.
13481 (i386-linux.o): Likewise.
13482 (i386-linux.c): Likewise.
13483 (amd64.o): Likewise.
13484 (amd64.c): Likewise.
13485 (amd64-linux.o): Likewise.
13486 (amd64-linux.c): Likewise.
13488 * configure.srv (srv_i386_regobj): New.
13489 (srv_i386_linux_regobj): Likewise.
13490 (srv_amd64_regobj): Likewise.
13491 (srv_amd64_linux_regobj): Likewise.
13492 (srv_i386_32bit_xmlfiles): Likewise.
13493 (srv_i386_64bit_xmlfiles): Likewise.
13494 (srv_i386_xmlfiles): Likewise.
13495 (srv_amd64_xmlfiles): Likewise.
13496 (srv_i386_linux_xmlfiles): Likewise.
13497 (srv_amd64_linux_xmlfiles): Likewise.
13498 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13499 srv_xmlfiles to $srv_i386_xmlfiles.
13500 (i[34567]86-*-mingw32ce*): Likewise.
13501 (i[34567]86-*-mingw*): Likewise.
13502 (i[34567]86-*-nto*): Likewise.
13503 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13504 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13505 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13506 (x86_64-*-linux*): Likewise.
13508 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13509 (init_registers_amd64_linux): New.
13510 (x86_arch_setup): Replace init_registers_x86_64_linux with
13511 init_registers_amd64_linux.
13513 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13515 * configure.ac: Check for libdl. If it is not available link against
13516 static libthread_db.
13517 * configure: Regenerate.
13519 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13523 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13524 handing a read watchpoint.
13525 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13527 2010-02-12 Doug Evans <dje@google.com>
13529 * linux-low.c (linux_supports_tracefork_flag): Document.
13530 (linux_look_up_symbols): Add comment.
13532 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13534 * regcache.c (supply_register): Clear regcache if buf is NULL.
13536 2010-02-02 Nicolas Roche <roche@sourceware.org>
13537 Joel Brobecker <brobecker@adacore.com>
13539 * inferiors.c (find_inferior): Add function documentation.
13540 (unloaded_dll): Handle the case where the unloaded dll has not
13541 been previously registered in the dll list.
13543 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13545 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13546 (thumb2_breakpoint): New.
13547 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13549 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13551 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13552 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13555 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13557 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13559 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13561 * linux-s390-low.c (s390_collect_ptrace_register)
13562 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13564 2010-01-21 Doug Evans <dje@google.com>
13566 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13567 (PTRACE_ARG4_TYPE): New macro.
13568 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13569 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13570 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13571 (usr_store_inferior_registers): Ditto.
13572 (linux_read_memory, linux_write_memory): Ditto.
13573 (linux_test_for_tracefork): Ditto.
13575 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13576 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13578 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13580 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13583 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13585 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13586 prototype to take a regcache. Adjust.
13588 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13590 * regcache.h (struct thread_info): Forward declare.
13591 (struct regcache): New.
13592 (new_register_cache): Adjust prototype.
13593 (get_thread_regcache): Declare.
13594 (free_register_cache): Adjust prototype.
13595 (registers_to_string, registers_from_string): Ditto.
13596 (supply_register, supply_register_by_name, collect_register)
13597 (collect_register_as_string, collect_register_by_name): Ditto.
13598 * regcache.c (struct inferior_regcache_data): Delete.
13599 (get_regcache): Rename to ...
13600 (get_thread_regcache): ... this. Adjust. Switch inferior before
13601 fetching registers.
13602 (regcache_invalidate_one): Adjust.
13603 (regcache_invalidate): Fix prototype.
13604 (new_register_cache): Return the new register cache.
13605 (free_register_cache): Change prototype.
13606 (realloc_register_cache): Adjust.
13607 (registers_to_string): Change prototype to take a regcache. Adjust.
13608 (registers_from_string): Ditto.
13609 (register_data): Ditto.
13610 (supply_register): Ditto.
13611 (supply_register_by_name): Ditto.
13612 (collect_register): Ditto.
13613 (collect_register_as_string): Ditto.
13614 (collect_register_by_name): Ditto.
13615 * server.c (process_serial_event): Adjust.
13616 * linux-low.h (regset_fill_func, regset_store_func): Change
13618 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13620 * linux-low.c (get_stop_pc): Adjust.
13621 (check_removed_breakpoint): Adjust.
13622 (linux_wait_for_event): Adjust.
13623 (linux_resume_one_lwp): Adjust.
13624 (fetch_register): Add regcache parameter. Adjust.
13625 (usr_store_inferior_registers): Ditto.
13626 (regsets_fetch_inferior_registers): Ditto.
13627 (regsets_store_inferior_registers): Ditto.
13628 (linux_fetch_registers, linux_store_registers): Ditto.
13629 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13631 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13633 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13634 prototype to take a regcache.
13635 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13636 * remote-utils.c (convert_ascii_to_int, outreg)
13637 (prepare_resume_reply): Change prototype to take a regcache.
13639 * target.h (struct target_ops) <fetch_registers, store_registers>:
13640 Change prototype to take a regcache.
13641 (fetch_inferior_registers, store_inferior_registers): Change
13642 prototype to take a regcache. Adjust.
13643 * proc-service.c (ps_lgetregs): Adjust.
13644 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13645 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13646 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13647 take a regcache. Adjust.
13648 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13649 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13650 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13651 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13652 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13653 (cris_cannot_fetch_register):
13654 (cris_breakpoint_at): Change prototype to take a regcache.
13656 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13657 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13658 to take a regcache. Adjust.
13659 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13661 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13662 take a regcache. Adjust.
13663 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13664 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13665 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13666 * linux-mips-low.c (mips_get_pc):
13667 (mips_set_pc): Change prototype to take a regcache. Adjust.
13668 (mips_reinsert_addr): Adjust.
13669 (mips_collect_register): Change prototype to take a regcache.
13671 (mips_supply_register):
13672 (mips_collect_register_32bit, mips_supply_register_32bit)
13673 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13674 (mips_store_fpregset): Ditto.
13675 * linux-ppc-low.c (ppc_supply_ptrace_register)
13676 (ppc_supply_ptrace_register): Ditto.
13677 (parse_spufs_run): Adjust.
13678 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13679 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13680 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13681 take a regcache. Adjust.
13682 * linux-s390-low.c (s390_collect_ptrace_register)
13683 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13684 (s390_set_pc): Change prototype to take a regcache. Adjust.
13685 (s390_arch_setup): Adjust.
13686 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13687 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13688 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13689 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13690 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13692 (sparc_breakpoint_at): Adjust.
13693 * linux-xtensa-low.c (xtensa_fill_gregset):
13694 (xtensa_store_gregset):
13695 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13696 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13697 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13698 prototype to take a regcache. Adjust.
13699 * win32-arm-low.c (arm_fetch_inferior_register)
13700 (arm_store_inferior_register): Change prototype to take a
13702 * win32-i386-low.c (i386_fetch_inferior_register)
13703 (i386_store_inferior_register): Change prototype to take a
13705 * win32-low.c (child_fetch_inferior_registers)
13706 (child_store_inferior_registers): Change prototype to take a
13708 (win32_wait): Adjust.
13709 (win32_fetch_inferior_registers): Change prototype to take a
13711 (win32_store_inferior_registers): Adjust.
13712 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13713 store_inferior_register>: Change prototype to take a regcache.
13715 2010-01-20 Doug Evans <dje@google.com>
13717 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13719 (linux_wait_for_event1, linux_init_signals): Ditto.
13720 (W_STOPCODE): Provide definition if missing.
13722 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13724 * linux-low.c (linux_core_of_thread): New.
13725 (compare_ints, show_process, list_threads): New.
13726 (linux_qxfer_osdata): Report threads and cores.
13727 (linux_target_op): Register linux_core_of_thread.
13728 * remote-utils.c (prepare_resume_reply): Report the core.
13729 (buffer_xml_printf): Support %d specifier.
13730 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13732 (handle_query): Handle qXfer:threads. Announce availability
13734 * target.h (struct target_ops): New field core_of_thread.
13736 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13738 * Makefile.in (clean): Remove new generated files.
13739 (reg-s390.o, reg-s390.c): Remove rules.
13740 (reg-s390x.o, reg-s390x.c): Likewise.
13741 (s390-linux32.o, s390-linux32.c): Add rules.
13742 (s390-linux64.o, s390-linux64.c): Likewise.
13743 (s390x-linux64.o, s390x-linux64.c): Likewise.
13744 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13745 * linux-s390-low.c: Include <elf.h>.
13746 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13747 (init_registers_s390): Remove prototype.
13748 (init_registers_s390x): Likewise.
13749 (init_registers_s390_linux32): Add prototype.
13750 (init_registers_s390_linux64): Likewise.
13751 (init_registers_s390x_linux64): Likewise.
13752 (s390_num_regs_3264): New define.
13753 (s390_regmap_3264): New global variable.
13754 (s390_cannot_fetch_register): Remove obsolete check.
13755 (s390_cannot_store_register): Likewise.
13756 (s390_collect_ptrace_register): Handle upper/lower register halves.
13757 (s390_supply_ptrace_register): Likewise.
13758 (s390_fill_gregset): Update to register number changes.
13759 (s390_get_hwcap): New routine.
13760 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13761 Install appropriate regmap and register set.
13763 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13765 * server.c (gdbserver_version): Update copyright year to 2010.
13766 * gdbreplay.c (gdbreplay_version): Likewise.
13768 2009-12-28 Doug Evans <dje@google.com>
13770 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13771 elf/external.h. Include <elf.h> instead but only if necessary.
13773 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13775 * linux-low.c (linux_remove_process): Remove `detaching'
13776 parameter. Don't release/detach from thread_db here.
13777 (linux_kill): Release/detach from thread_db here, ...
13778 (linux_detach): ... and here, before actually detaching.
13779 (linux_wait_1): ... and here, when a process exits.
13780 * thread-db.c (any_thread_of): New.
13781 (thread_db_free): Switch the current inferior to a thread of the
13784 2009-12-21 Doug Evans <dje@google.com>
13786 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13788 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13789 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13790 warning ifndef __NR_tkill. Move setting of errno there too.
13791 Delete unnecessary resetting of errno after syscall.
13792 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13794 * configure.ac: Check for dladdr.
13795 * config.in: Regenerate.
13796 * configure: Regenerate.
13797 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13798 (try_thread_db_load): Update.
13800 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13802 2009-12-18 Doug Evans <dje@google.com>
13804 * event-loop.c: Include unistd.h if it exists.
13806 * linux-low.c (my_waitpid): Move definition away from being in
13807 between linux_tracefork_child/linux_test_for_tracefork.
13809 * gdb_proc_service.h (psaddr_t): Fix type.
13810 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13811 signature to match glibc.
13813 2009-12-16 Doug Evans <dje@google.com>
13815 * linux-low.c (linux_read_memory): Fix argument to read.
13817 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13819 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13820 events, don't leave current_inferior pointing at null.
13822 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13824 * win32-low.c (LOG): Delete.
13825 (OUTMSG): Output to stderr.
13826 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13827 on compile time LOG macro.
13828 (win32_wait): Fix debug output.
13830 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13832 * win32-low.c (win32_add_one_solib): If the dll name is
13833 "ntdll.dll", prepend the system directory to the dll path.
13835 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13837 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13839 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13840 Vladimir Prus <vladimir@codesourcery.com>
13842 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13843 * configure.ac: Check for __mcoldfire__ and set
13844 gdb_cv_m68k_is_coldfire.
13845 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13846 reg-cf.o and reg-m68k.o.
13847 * configure: Regenerated.
13849 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13851 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13852 Pass it to thread_db_free.
13853 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13854 proper `detaching' argument to linux_remove_process.
13855 * linux-low.h (thread_db_free): Add `detaching' parameter.
13856 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13858 (thread_db_free): Add `detaching' parameter. Only
13859 call td_ta_clear_event if detaching from process.
13861 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13863 * thread-db.c (thread_db_free): Fix typo.
13865 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13868 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13870 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13872 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13873 with an i686 compiler.
13874 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13876 * configure: Rebuilt.
13878 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13882 * server.c (handle_search_memory_1): Correct read_addr initialization
13883 in loop for searching subsequent chunks.
13885 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13887 * configure.ac: New --with-libthread-db option.
13888 * thread-db.c: Allow direct dependence on libthread_db.
13889 (thread_db_free): Adjust.
13890 * config.in: Regenerate.
13891 * configure: Likewise.
13893 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13896 * thread-db.c (attach_thread): New function.
13897 (maybe_attach_thread): Return success/failure.
13898 (find_new_threads_callback): Adjust.
13899 (thread_db_find_new_threads): Loop until no new threads.
13901 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13903 * proc-service.c (ps_lgetregs): Formatting.
13905 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13907 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13908 * configure.ac: Adjust.
13909 * linux-low.h (struct process_info_private): Move members to struct
13911 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13912 * linux-low.c (linux_remove_process): Adjust.
13913 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13914 * server.c (handle_query): Move code ...
13915 (handle_monitor_command): ... here. New function.
13916 * target.h (struct target_ops): New member.
13917 * thread-db.c (struct thread_db): New.
13918 (libthread_db_search_path): New variable.
13919 (thread_db_create_event, thread_db_enable_reporting)
13920 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13921 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13922 (try_thread_db_load_1, dladdr_to_soname): New functions.
13923 (try_thread_db_load, thread_db_load_search): New functions.
13924 (thread_db_init): Search for libthread_db.
13925 (thread_db_free): New function.
13926 (thread_db_handle_monitor_command): Likewise.
13927 * config.in: Regenerate.
13928 * configure: Regenerate.
13930 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13932 * spu-low.c (spu_kill): Wait for inferior to terminate.
13933 Call clear_inferiors.
13934 (spu_detach): Call clear_inferiors.
13936 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13938 * aclocal.m4: Regenerate.
13939 * config.in: Likewise.
13940 * configure: Likewise.
13942 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13944 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13945 (parse_spufs_run): New function.
13946 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13947 (ppc_breakpoint_at): Handle SPU breakpoints.
13949 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13951 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13952 (SPUFS_MAGIC): Define.
13953 (spu_enumerate_spu_ids): New function.
13954 (linux_qxfer_spu): New function.
13955 (linux_target_ops): Install linux_qxfer_spu.
13957 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13959 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13960 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13961 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13962 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13963 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13964 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13965 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13966 (init_registers_powerpc_cell32l): Add prototype.
13967 (init_registers_powerpc_cell64l): Likewise.
13968 (ppc_arch_setup): Detect Cell/B.E. architecture.
13970 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13972 * Makefile.in (datarootdir): New variable.
13974 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13976 * linux-low.c (linux_write_memory): Update debugging output.
13977 * Makefile.in (clean): Add new descriptions.
13978 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13979 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13980 * configure.srv: Add new files for arm*-*-linux*.
13981 * linux-arm-low.c: Add new declarations.
13982 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13983 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13984 (HWCAP_VFPv3D16): New.
13985 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13986 instead of __IWMMXT__.
13987 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13988 (arm_arch_setup): New.
13989 (target_regsets): Remove #ifdef. Add VFP regset.
13990 (the_low_target): Use arm_arch_setup.
13992 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13994 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13995 the main thread again.
13997 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13999 Adding Neutrino gdbserver.
14000 * configure: Regenerated.
14001 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14002 * configure.srv (i[34567]86-*-nto*): New target.
14003 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14004 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14005 (nto_comctrl) [__QNX__]: New function.
14006 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14008 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14010 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14013 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14014 Pedro Alves <pedro@codesourcery.com>
14016 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14017 don't support CONTEXT_EXTENDED_REGISTERS.
14018 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14019 (the_low_target): Install them.
14020 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14021 failing with ERROR_PIPE_NOT_CONNECTED.
14023 2009-06-30 Doug Evans <dje@google.com>
14024 Pierre Muller <muller@ics.u-strasbg.fr>
14026 Add h/w watchpoint support to x86-linux, win32-i386.
14027 * Makefile.in (SFILES): Add i386-low.c
14028 (i386_low_h): Define.
14029 (i386-low.o): Add dependencies.
14030 (linux-x86-low.o): Add i386-low.h dependency.
14031 (win32-i386-low.o): Ditto.
14032 * i386-low.c: New file.
14033 * i386-low.h: New file.
14034 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14035 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14036 * linux-low.c (linux_add_process): Initialize arch_private.
14037 (linux_remove_process): Free arch_private.
14038 (add_lwp): Initialize arch_private.
14039 (delete_lwp): Free arch_private.
14040 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14042 * linux-low.h (process_info_private): New member arch_private.
14043 (lwp_info): New member arch_private.
14044 (linux_target_ops): New members new_process, new_thread,
14046 (ptid_of): New macro.
14047 * linux-x86-low.c: Include stddef.h, i386-low.h.
14048 (arch_process_info): New struct.
14049 (arch_lwp_info): New struct.
14050 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14051 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14052 (i386_dr_low_get_status): New function.
14053 (x86_insert_point, x86_remove_point): New functions.
14054 (x86_stopped_by_watchpoint): New function.
14055 (x86_stopped_data_address): New function.
14056 (x86_linux_new_process, x86_linux_new_thread): New functions.
14057 (x86_linux_prepare_to_resume): New function.
14058 (the_low_target): Add entries for insert_point, remove_point,
14059 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14061 * server.c (debug_hw_points): New global.
14062 (monitor_show_help): Document set debug-hw-points.
14063 (handle_query): Process "set debug-hw-points".
14064 * server.h (debug_hw_points): Declare.
14065 (paddress): Declare.
14066 * utils.c (NUMCELLS, CELLSIZE): New macros.
14067 (get_sell, xsnprintf, paddress): New functions.
14068 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14069 remove_point, stopped_by_watchpoint, stopped_data_address.
14070 * win32-i386-low.c: Include i386-low.h.
14071 (debug_reg_state): Replaces dr.
14072 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14073 (i386_dr_low_get_status): New function.
14074 (i386_insert_point, i386_remove_point): New functions.
14075 (i386_stopped_by_watchpoint): New function.
14076 (i386_stopped_data_address): New function.
14077 (i386_initial_stuff): Update.
14078 (get_thread_context,set_thread_context,i386_thread_added): Update.
14079 (the_low_target): Add entries for insert_point,
14080 remove_point, stopped_by_watchpoint, stopped_data_address.
14081 * win32-low.c (win32_insert_watchpoint): New function.
14082 (win32_remove_watchpoint): New function.
14083 (win32_stopped_by_watchpoint): New function.
14084 (win32_stopped_data_address): New function.
14085 (win32_target_ops): Add entries for insert_watchpoint,
14086 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14087 * win32-low.h (win32_target_ops): New members insert_point,
14088 remove_point, stopped_by_watchpoint, stopped_data_address.
14090 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14092 * server.c (process_serial_event): Re-return unsupported, not
14093 error, if the type isn't recognized. Re-allow supporting only
14094 insert or remove packets. Also call require_running for
14095 breakpoints. Add missing break statement to default case. Tidy.
14096 * target.h (struct target_ops): Rename insert_watchpoint to
14097 insert_point, and remove_watchpoint to remove_point.
14099 * linux-low.h (struct linux_target_ops): Likewise.
14100 * linux-low.c (linux_insert_watchpoint): Rename to ...
14101 (linux_insert_point): ... this. Adjust.
14102 (linux_remove_watchpoint): Rename to ...
14103 (linux_remove_point): ... this. Adjust.
14104 (linux_target_ops): Adjust.
14105 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14106 (cris_insert_point): ... this.
14107 (cris_remove_watchpoint): Rename to ...
14108 (cris_remove_point): ... this.
14109 (the_low_target): Adjust.
14111 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14113 * server.c (handle_v_kill): Pass signal_pid to
14114 kill_inferior if multi_process is zero.
14116 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14118 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14119 * target.h (target_ops): Comment for *_watchpoint to make it clear
14120 the functions can get types '0' and '1'.
14122 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14124 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14125 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14126 * regcache.c (get_regcache): Likewise.
14127 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14128 * win32-low.c (child_fetch_inferior_registers): Remove check for
14131 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14132 Pedro Alves <pedro@codesourcery.com>
14134 * target.h (struct target_ops) <supports_multi_process>: New
14136 (target_supports_multi_process): New.
14137 * server.c (handle_query): Even if GDB reports support, only
14138 enable multi-process if the target also supports it. Report
14139 multi-process support only if the target backend supports it.
14140 * linux-low.c (linux_supports_multi_process): New function.
14141 (linux_target_ops): Install it as target_supports_multi_process
14144 2009-05-24 Doug Evans <dje@google.com>
14146 Global renaming of find_thread_pid to find_thread_ptid.
14147 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14148 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14149 All callers updated.
14151 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14152 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14155 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14156 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14157 (linux_resume_one_lwp): Ditto.
14159 2009-05-23 Doug Evans <dje@google.com>
14161 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14162 from struct inferior_list_entry * to struct lwp_info *.
14163 All callers updated.
14165 2009-05-13 Doug Evans <dje@google.com>
14167 * linux-x86-low.c: Don't include assert.h.
14168 (x86_siginfo_fixup): Use fatal, not assert.
14169 (x86_arch_setup): Fix comment.
14171 2009-05-12 Doug Evans <dje@google.com>
14173 Biarch support for i386/amd64 gdbserver.
14174 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14175 Add linux-x86-low.c.
14176 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14177 (linux-x86-low.o): Add.
14178 * linux-x86-64-low.c: Delete.
14179 * linux-i386-low.c: Delete.
14180 * linux-x86-low.c: New file.
14181 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14183 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14185 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14186 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14187 (linux_child_pid_to_exec_file): New function.
14188 (elf_64_header_p, elf_64_file_p): New functions.
14189 (siginfo_fixup): New function.
14190 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14191 give target a chance to convert layout.
14192 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14193 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14195 2009-05-07 Doug Evans <dje@google.com>
14197 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14198 (regsets_store_inferior_registers): Ditto.
14200 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14204 * linux-low.c (must_set_ptrace_flags): Delete.
14205 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14207 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14208 `lwp->must_set_ptrace_flags' instead.
14209 (linux_wait_for_event_1): Set ptrace options here.
14210 (linux_wait_1): ... not here.
14212 2009-04-30 Doug Evans <dje@google.com>
14214 * inferiors.c (started_inferior_callback): New function.
14215 (attached_inferior_callback): New function.
14216 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14217 * server.c (print_started_pid, print_attached_pid): New functions.
14218 (detach_or_kill_for_exit): New function.
14219 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14220 * server.h (have_started_inferiors_p): Declare.
14221 (have_attached_inferiors_p): Declare.
14223 * inferiors.c (remove_process): Fix memory leak, free process.
14224 * linux-low.c (linux_remove_process): New function.
14225 (linux_kill): Call it instead of remove_process.
14226 (linux_detach, linux_wait_1): Ditto.
14228 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14230 * configure.srv: Add x86 Windows CE target.
14232 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14234 * inferiors.c (get_thread_process): Make global.
14235 * server.h (get_thread_process): Add prototype.
14236 * thread-db.c (find_one_thread): Use get_thread_process
14237 instead of current_process.
14238 (thread_db_get_tls_address): Do not crash if called when
14239 thread layer is not yet initialized.
14241 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14243 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14244 * spu-low.c (current_tid): Rename to ...
14245 (current_ptid): ... this.
14246 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14247 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14248 ptid_get_lwp (current_ptid) instead of current_tid.
14249 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14250 instead of current_tid. Use find_process_pid to verify pid
14251 argument is valid. Pass proper argument to remove_process.
14252 (spu_thread_alive): Compare current_ptid instead of current_tid.
14253 (spu_resume): Likewise.
14255 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14257 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14260 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14262 Implement the multiprocess extensions, and add linux multiprocess
14265 * server.h (ULONGEST): Declare.
14266 (struct ptid, ptid_t): New.
14267 (minus_one_ptid, null_ptid): Declare.
14268 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14269 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14270 (struct inferior_list_entry): Change `id' type from unsigned from
14272 (struct sym_cache, struct breakpoint, struct
14273 process_info_private): Forward declare.
14274 (struct process_info): Declare.
14275 (current_process): Declare.
14276 (all_processes): Declare.
14277 (initialize_inferiors): Declare.
14278 (add_thread): Adjust to use ptid_t.
14279 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14280 (add_process, remove_process, find_thread_pid): Declare.
14281 (find_inferior_id): Adjust to use ptid_t.
14282 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14283 (multi_process): Declare.
14284 (push_event): Adjust to use ptid_t.
14285 (read_ptid, write_ptid): Declare.
14286 (prepare_resume_reply): Adjust to use ptid_t.
14287 (clear_symbol_cache): Declare.
14288 * inferiors.c (all_processes): New.
14289 (null_ptid, minus_one_ptid): New.
14290 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14291 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14292 (add_thread): Change unsigned long to ptid. Remove gdb_id
14294 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14295 (gdb_id_to_thread): Rename to ...
14296 (find_thread_pid): ... this. Change unsigned long to ptid.
14297 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14298 (loaded_dll, pull_pid_from_list): Adjust.
14299 (add_process, remove_process, find_process_pid)
14300 (get_thread_process, current_process, initialize_inferiors): New.
14301 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14302 (struct target_waitstatus) <related_pid>: Ditto.
14303 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14304 return type to int.
14305 (struct target_ops) <join>: Add `pid' argument.
14306 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14307 (struct target_ops) <wait>: Add `ptid' field. Change return type
14309 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14310 (mywait): Add `ptid' argument. Change return type to ptid_t.
14311 (target_pid_to_str): Declare.
14312 * target.c (set_desired_inferior): Adjust to use ptids.
14313 (mywait): Add new `ptid' argument. Adjust.
14314 (target_pid_to_str): New.
14315 * mem-break.h (free_all_breakpoints): Declare.
14316 * mem-break.c (breakpoints): Delelete.
14317 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14318 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14319 to use per-process breakpoint list.
14320 (free_all_breakpoints): New.
14321 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14322 (symbol_cache, all_symbols_looked_up): Delete.
14324 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14326 (prepare_resume_reply): Change ptid argument's type from unsigned
14327 long to ptid_t. Adjust. Implement W;process and X;process.
14328 (free_sym_cache, clear_symbol_cache): New.
14329 (look_up_one_symbol): Adjust to per-process symbol cache. *
14330 * server.c (cont_thread, general_thread, step_thread): Change type
14332 (attached): Delete.
14333 (multi_process): New.
14334 (last_ptid): Change type to ptid_t.
14335 (struct vstop_notif) <ptid>: Change type to ptid_t.
14336 (queue_stop_reply, push_event): Change `ptid' argument's type to
14338 (discard_queued_stop_replies): Add `pid' argument.
14339 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14340 changes. Don't reference the `attached' global.
14341 (attach_inferior): Adjust to mywait interface changes.
14342 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14343 features. Handle and report "multiprocess+". Handle
14345 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14347 (handle_v_kill): New.
14348 (handle_v_stopped): Adjust to use target_pid_to_str.
14349 (handle_v_requests): Allow multiple attaches and runs when
14350 multiprocess extensions are in effect. Handle "vKill".
14351 (myresume): Adjust to use ptids.
14352 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14353 (handle_status): Adjust to discard_queued_stop_replies interface
14355 (first_thread_of, kill_inferior_callback)
14356 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14357 (main): Call initialize_inferiors. Adjust to use ptids, killing
14358 and detaching from all inferiors. Handle multiprocess packet
14360 * linux-low.h: Include gdb_proc_service.h.
14361 (struct process_info_private): New.
14362 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14363 <lwpid_of>: Use ptid_get_lwp.
14364 (get_lwp_thread): Adjust.
14365 (struct lwp_info): Add `dead' member.
14366 (find_lwp_pid): Declare.
14367 * linux-low.c (thread_db_active): Delete.
14368 (new_inferior): Adjust comment.
14369 (inferior_pid): Delete.
14370 (linux_add_process): New.
14371 (handle_extended_wait): Adjust.
14372 (add_lwp): Change unsigned long to ptid.
14373 (linux_create_inferior): Add process to processes table. Adjust
14374 to use ptids. Don't set new_inferior here.
14375 (linux_attach_lwp): Rename to ...
14376 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14377 it. Adjust to use ptids.
14378 (linux_attach_lwp): New.
14379 (linux_attach): Add process to processes table. Don't set
14381 (struct counter): New.
14382 (second_thread_of_pid_p, last_thread_of_process_p): New.
14383 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14384 multiple processes.
14385 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14386 processes. Remove process from process table.
14387 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14388 to multiple processes.
14389 (any_thread_of): New.
14390 (linux_detach): Add `pid' argument, and handle it. Remove process
14391 from processes table.
14392 (linux_join): Add `pid' argument. Handle it.
14393 (linux_thread_alive): Change unsighed long argument to ptid_t.
14394 Consider dead lwps as not being alive.
14395 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14396 threads we're not interested in.
14397 (same_lwp, find_lwp_pid): New.
14398 (linux_wait_for_lwp): Change `pid' argument's type from int to
14400 (linux_wait_for_event): Rename to ...
14401 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14402 from int to ptid_t. Adjust.
14403 (linux_wait_for_event): New.
14404 (linux_wait_1): Add `ptid' argument. Change return type to
14405 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14406 that exit from the process table.
14407 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14409 (mark_lwp_dead): New.
14410 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14411 stopping all threads, mark its main lwp as dead.
14412 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14414 (fetch_register, usr_store_inferior_registers)
14415 (regsets_fetch_inferior_registers)
14416 (regsets_store_inferior_registers, linux_read_memory)
14417 (linux_write_memory): Inline `inferior_pid'.
14418 (linux_look_up_symbols): Adjust to use per-process
14419 `thread_db_active'.
14420 (linux_request_interrupt): Adjust to use ptids.
14421 (linux_read_auxv): Inline `inferior_pid'.
14422 (initialize_low): Don't reference thread_db_active.
14423 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14424 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14425 (ps_getpid): Return the pid of the current inferior.
14426 * thread-db.c (proc_handle, thread_agent): Delete.
14427 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14429 (find_one_thread): Change argument type to ptid_t. Adjust to
14431 (maybe_attach_thread): Adjust to per-process data and ptids.
14432 (thread_db_find_new_threads): Ditto.
14433 (thread_db_init): Ditto.
14434 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14435 processes table. Adjust to use ptids.
14436 (spu_kill, spu_detach): Adjust interface. Remove process from
14438 (spu_join, spu_thread_alive): Adjust interface.
14439 (spu_wait): Adjust interface. Remove process from processes
14440 table. Adjust to use ptids.
14441 * win32-low.c (current_inferior_tid): Delete.
14442 (current_inferior_ptid): New.
14443 (debug_event_ptid): New.
14444 (thread_rec): Take a ptid. Adjust.
14445 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14446 (child_delete_thread): Ditto.
14447 (do_initial_child_stuff): Add `attached' argument. Add process to
14449 (child_fetch_inferior_registers, child_store_inferior_registers):
14451 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14452 (win32_attach): Pass 1 to do_initial_child_stuff.
14453 (win32_kill): Adjust interface. Remove process from processes
14455 (win32_detach): Ditto.
14456 (win32_join): Adjust interface.
14457 (win32_thread_alive): Take a ptid.
14458 (win32_resume): Adjust to use ptids.
14459 (get_child_debug_event): Ditto.
14460 (win32_wait): Adjust interface. Remove exiting process from
14463 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14465 Non-stop mode support.
14467 * server.h (non_stop): Declare.
14468 (gdb_client_data, handler_func): Declare.
14469 (delete_file_handler, add_file_handler, start_event_loop):
14471 (handle_serial_event, handle_target_event, push_event)
14472 (putpkt_notif): Declare.
14473 * target.h (enum resume_kind): New.
14474 (struct thread_resume): Replace `step' field by `kind' field.
14475 (TARGET_WNOHANG): Define.
14476 (struct target_ops) <wait>: Add `options' argument.
14477 <supports_non_stop, async, start_non_stop>: New fields.
14478 (target_supports_non_stop, target_async): New.
14479 (start_non_stop): Declare.
14480 (mywait): Add `options' argument.
14481 * target.c (mywait): Add `options' argument. Print child exit
14482 notifications here.
14483 (start_non_stop): New.
14484 * server.c (non_stop, own_buf, mem_buf): New globals.
14485 (struct vstop_notif): New.
14486 (notif_queue): New global.
14487 (queue_stop_reply, push_event, discard_queued_stop_replies)
14488 (send_next_stop_reply): New.
14489 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14491 (attach_inferior): In non-stop mode, don't wait for the target
14493 (handle_general_set): Handle QNonStop.
14494 (handle_query): When handling qC, return the current general
14495 thread, instead of the first thread of the list.
14496 (handle_query): If the backend supports non-stop mode, include
14497 QNonStop+ in the qSupported query response.
14498 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14500 (handle_v_attach, handle_v_run): Handle non-stop mode.
14501 (handle_v_stopped): New.
14502 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14503 (myresume): Adjust to use resume_kind. Handle non-stop.
14504 (queue_stop_reply_callback): New.
14505 (handle_status): Handle non-stop mode.
14506 (main): Clear non_stop flag on reconnection. Use the event-loop.
14507 Refactor serial protocol handling from here ...
14508 (process_serial_event): ... to this new function. When GDB
14509 selects any thread, select one here. In non-stop mode, wait until
14510 GDB acks all pending events before exiting.
14511 (handle_serial_event, handle_target_event): New.
14512 * remote-utils.c (remote_open): Install remote_desc in the event
14514 (remote_close): Remove remote_desc from the event loop.
14515 (putpkt_binary): Rename to...
14516 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14517 (putpkt_binary): New as wrapper around putpkt_binary_1.
14518 (putpkt_notif): New.
14519 (prepare_resume_reply): In non-stop mode, don't change the
14521 * event-loop.c: New.
14522 * Makefile.in (OBJ): Add event-loop.o.
14523 (event-loop.o): New rule.
14525 * linux-low.h (pid_of): Moved here.
14527 (get_lwp_thread): Use lwpid_of.
14528 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14529 * linux-low.c (pid_of): Delete.
14530 (inferior_pid): Use lwpid_of.
14531 (linux_event_pipe): New.
14532 (target_is_async_p): New.
14534 (handle_extended_wait): Use lwpid_of.
14535 (add_lwp): Don't set lwpid field.
14536 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14537 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14538 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14539 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14540 first. Adjust to linux_wait_for_event interface changes. Use
14542 (linux_detach): Don't delete the main lwp here.
14543 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14544 (status_pending_p): Don't consider explicitly suspended lwps.
14545 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14546 pointer. Add OPTIONS argument. Change return type to int. Use
14547 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14548 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14549 pointer. Add status pointer argument. Return a pid instead of a
14550 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14551 changes. In non-stop mode, don't switch to a random thread.
14552 (linux_wait): Rename to...
14553 (linux_wait_1): ... this. Add target_options argument, and handle
14554 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14555 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14556 clean exit and signal exit code. Don't stop all threads in
14557 non-stop mode. In all-stop mode, only stop all threads when
14558 reporting a stop to GDB. Handle explicit thread stop requests.
14559 (async_file_flush, async_file_mark): New.
14561 (send_sigstop): Use lwpid_of.
14562 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14563 interface changes. In non-stop mode, don't switch to a random
14565 (linux_resume_one_lwp): Use lwpid_of.
14566 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14567 (linux_resume_one_thread): ... this. Handle resume_stop. In
14568 non-stop mode, don't look for pending flag in all threads.
14569 (resume_status_pending_p): Don't consider explicitly suspended
14571 (my_waitpid): Reimplement. Emulate __WALL.
14572 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14574 (sigchld_handler, linux_supports_non_stop, linux_async)
14575 (linux_start_non_stop): New.
14576 (linux_target_ops): Register linux_supports_non_stop, linux_async
14577 and linux_start_non_stop.
14578 (initialize_low): Install SIGCHLD handler.
14579 * thread-db.c (thread_db_create_event, find_one_thread)
14580 (thread_db_get_tls_address): Use lwpid_of.
14581 * win32-low.c (win32_detach): Adjust to use resume_kind.
14582 (win32_wait): Add `options' argument.
14583 * spu-low.c (spu_resume): Adjust to use resume_kind.
14584 (spu_wait): Add `options' argument.
14586 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14588 Decouple target code from remote protocol.
14590 * target.h (enum target_waitkind): New.
14591 (struct target_waitstatus): New.
14592 (struct target_ops) <wait>: Return an unsigned long. Take a
14593 target_waitstatus pointer instead of a char pointer.
14594 (mywait): Likewise.
14595 * target.c (mywait): Change prototype to return an unsigned long.
14596 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14597 * server.h (thread_from_wait, old_thread_from_wait): Delete
14599 (prepare_resume_reply): Change prototype to take a
14601 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14602 (last_status, last_ptid): New.
14603 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14604 pid instead of a signal.
14605 (attach_inferior): Remove "status" and "signal" parameters.
14607 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14609 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14610 (handle_v_requests, myresume): Remove "status" and "signal"
14611 parameters. Adjust.
14612 (handle_status): New.
14613 (main): Delete local `status'. Adjust.
14614 * remote-utils.c: Include target.h.
14615 (prepare_resume_reply): Change prototype to take a
14616 target_waitstatus. Adjust.
14618 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14620 * spu-low.c (spu_wait): Adjust.
14621 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14623 (win32_wait): Adjust.
14625 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14627 * target.h (struct thread_resume): Delete leave_stopped member.
14628 (struct target_ops): Add a `n' argument to the `resume' callback.
14629 * server.c (start_inferior): Adjust.
14630 (handle_v_cont, myresume): Adjust.
14631 * linux-low.c (check_removed_breakpoint): Adjust to resume
14632 interface change, and to removed leave_stopped field.
14633 (resume_ptr): Delete.
14634 (struct thread_resume_array): New.
14635 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14636 resume interface change.
14637 (linux_continue_one_thread, linux_queue_one_thread)
14638 (resume_status_pending_p): Check if the resume field is NULL
14639 instead of checking the leave_stopped member.
14640 (linux_resume): Adjust to the target resume interface change.
14641 * spu-low.c (spu_resume): Adjust to the target resume interface
14643 * win32-low.c (win32_detach, win32_resume): Ditto.
14645 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14647 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14649 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14651 (linux_continue_one_thread): Only preserve the stepping flag if
14652 there's a pending breakpoint.
14654 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14656 * server.c (main): After the inferior having exited, call
14657 remote_close before exiting gdbserver.
14659 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14661 Fix size of FPSCR in Power 7 processors.
14662 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14663 (PPC_FEATURE_HAS_DFP): New #define.
14664 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14667 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14669 * server.c (handle_query) Whitespace and formatting.
14671 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14673 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14674 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14675 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14676 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14677 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14678 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14679 Makefile.in, configure.ac: Fix whitespace throughout.
14680 * configure: Regenerate.
14682 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14684 * inferiors.c (find_inferior): Make it safe for the callback
14685 function to delete the currently iterated inferior.
14687 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14689 * Makefile.in (linuw_low_h): Move higher.
14690 (thread-db.o): Depend on $(linux_low_h).
14692 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14694 Rename "process" to "lwp" throughout.
14696 * linux-low.c (all_processes): Rename to...
14697 (all_lwps): ... this.
14698 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14699 (add_process): Rename to ...
14700 (add_lwp): ... this. Adjust.
14701 (linux_create_inferior): Adjust.
14702 (linux_attach_lwp): Adjust.
14703 (linux_attach): Adjust.
14704 (linux_kill_one_process): Rename to ...
14705 (linux_kill_one_lwp): ... this. Adjust.
14706 (linux_kill): Adjust.
14707 (linux_detach_one_process): Rename to ...
14708 (linux_detach_one_lwp): ... this. Adjust.
14709 (linux_detach): Adjust.
14710 (check_removed_breakpoint): Adjust.
14711 (status_pending_p): Adjust.
14712 (linux_wait_for_process): Rename to ...
14713 (linux_wait_for_lwp): ... this. Adjust.
14714 (linux_wait_for_event): Adjust.
14715 (send_sigstop): Adjust.
14716 (wait_for_sigstop): Adjust.
14717 (stop_all_processes): Rename to ...
14718 (stop_all_lwps): ... this.
14719 (linux_resume_one_process): Rename to ...
14720 (linux_resume_one_lwp): ... this. Adjust.
14721 (linux_set_resume_request, linux_continue_one_thread)
14722 (linux_queue_one_thread, resume_status_pending_p)
14723 (usr_store_inferior_registers, regsets_store_inferior_registers)
14724 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14726 * linux-low.h (get_process): Rename to ...
14727 (get_lwp): ... this. Adjust.
14728 (get_thread_process): Rename to ...
14729 (get_thread_lwp): ... this. Adjust.
14730 (get_process_thread): Rename to ...
14731 (get_lwp_thread): ... this. Adjust.
14732 (struct process_info): Rename to ...
14733 (struct lwp_info): ... this.
14734 (all_processes): Rename to ...
14735 (all_lwps): ... this.
14736 * proc-service.c (ps_lgetregs): Adjust.
14737 * thread-db.c (thread_db_create_event, find_one_thread)
14738 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14740 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14742 * server.c (handle_query): Handle "qAttached".
14744 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14746 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14747 GPLv3, update license URL.
14749 2009-03-01 Doug Evans <dje@google.com>
14751 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14752 (server_h): Add gdb_signals.h.
14753 (signals.o): Update.
14754 * server.h (target_signal_from_host,target_signal_to_host_p)
14755 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14757 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14759 * remote-utils.c (getpkt): Also generate remote-debug
14760 information if noack_mode is set.
14762 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14764 * server.c (handle_query): Report qXfer:siginfo:read and
14765 qXfer:siginfo:write as supported and handle them.
14766 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14767 * linux-low.c (linux_xfer_siginfo): New.
14768 (linux_target_ops): Set it.
14770 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14772 * server.c (gdbserver_usage): Mention --remote-debug.
14773 (main): Accept '--remote-debug' switch.
14775 2009-01-18 Doug Evans <dje@google.com>
14777 * regcache.c (new_register_cache): No need to check result of xcalloc.
14778 * server.c (handle_search_memory): Back out calls to xmalloc,
14779 result is checked and error is returned to user upon failure.
14780 (handle_query): Ditto. Add more checks for result of malloc.
14781 (handle_v_cont): Check result of malloc, report error back to
14783 (handle_v_run): Ditto. Call freeargv.
14784 * server.h (freeargv): Declare.
14785 * utils.c (freeargv): New fn.
14787 2009-01-15 Doug Evans <dje@google.com>
14789 * gdbreplay.c (perror_with_name): Make arg const char *.
14790 * server.h (target_signal_to_name): Make return type const char *.
14791 * thread-db.c (thread_db_err_str): Make return type const char *.
14792 * utils.c (perror_with_name): Make arg const char *.
14794 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14796 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14797 when handling a EXIT_PROCESS_DEBUG_EVENT.
14799 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14801 * gdbreplay.c (gdbreplay_version): Update copyright year.
14802 * server.c (gdbserver_version): Likewise.
14804 2009-01-05 Doug Evans <dje@google.com>
14806 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14807 (handle_extended_wait): Improve comment.
14809 2008-12-13 Doug Evans <dje@google.com>
14811 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14812 * server.h (ATTR_MALLOC): New macro.
14813 (xmalloc,xcalloc,xstrdup): Declare.
14814 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14815 * inferiors.c: Ditto.
14816 * linux-low.c: Ditto.
14817 * mem-break.c: Ditto.
14818 * regcache.c: Ditto.
14819 * remote-utils.c: Ditto.
14822 * win32-low.c: Ditto.
14824 2008-12-12 Doug Evans <dje@google.com>
14826 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14827 in debugging printf.
14829 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14831 2008-12-09 Doug Evans <dje@google.com>
14833 * linux-low.h (struct process_info): Delete member tid, unused.
14834 * thread-db.c (find_one_thread): Update.
14835 (maybe_attach_thread): Update.
14837 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14839 * target.h (struct target_ops): Add qxfer_osdata member.
14840 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14842 (linux_qxfer_osdata): New functions.
14843 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14845 * server.c (handle_query): Handle "qXfer:osdata:read:".
14846 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14847 (buffer_xml_printf): New functions.
14848 * server.h (struct buffer): New.
14849 (buffer_grow_str, buffer_grow_str0): New macros.
14850 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14851 (buffer_xml_printf): Declare.
14853 2008-11-24 Doug Evans <dje@google.com>
14855 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14857 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14859 * server.c (handle_v_run): Always use the supplied argument list.
14861 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14863 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14864 (xtensa_regmap_table): Add entry for scompare1.
14866 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14868 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14869 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14870 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14871 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14872 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14873 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14874 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14875 XML target descriptions.
14876 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14877 when inferior is running on an ISA 2.05 or later processor. Add
14878 special case to return offset for full 64-bit slot of FPSCR when
14881 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14883 * Makefile.in (SFILES, clean): Added sparc64 files.
14884 (reg-sparc64.o, reg-sparc64.c): New.
14885 * configure.srv (sparc*-*-linux*): New configuration.
14886 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14887 syscall arguments for SPARC.
14888 (regsets_store_inferior_registers): Likewise.
14889 * linux-sparc-low.c: New file.
14891 2008-10-21 Doug Evans <dje@google.com>
14893 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14894 (READLINE_DIR,READLINE_DEP): Delete.
14895 (INTERNAL_CFLAGS): Update.
14896 (LINTFLAGS): Update.
14898 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14900 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14901 whole argv from the last run, not just argv[0].
14903 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14905 * regcache.c (new_register_cache): Return NULL if the register
14906 cache size isn't known yet.
14907 (free_register_cache): Avoid dereferencing a NULL regcache.
14909 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14911 * configure.srv: Merge MIPS and MIPS64.
14913 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14915 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14917 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14919 * Makefile.in: Add required vsx dependencies.
14921 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14922 Declare init_registers_powerpc_vsx32l.
14923 Declare init_registers_powerpc_vsx64l.
14924 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14925 (ppc_arch_setup): Check for VSX in hwcap.
14926 (ppc_fill_vsxregset): New function.
14927 (ppc_store_vsxregset): New function.
14928 Add new VSX entry in regset_info target_regsets.
14930 * configure.srv: Add new VSX dependencies.
14932 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14934 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14935 (remote_open): Set or clear transport_is_reliable.
14936 (putpkt_binary): Don't expect acks in noack mode.
14937 (getpkt): Don't send ack/nac in noack mode.
14938 * server.c (handle_general_set): Handle QStartNoAckMode.
14939 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14941 (main): Reset noack_mode on every connection.
14942 * server.h (noack_mode): Declare.
14944 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14946 * Makefile.in (GDBREPLAY_OBS): New variable.
14947 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14949 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14950 Daniel Jacobowitz <dan@codesourcery.com>
14952 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14953 (usr_store_inferior_registers): Likewise.
14954 (regsets_store_inferior_registers): Likewise.
14956 2008-07-31 Rolf Jansen <rj@surtec.com>
14957 Pedro Alves <pedro@codesourcery.com>
14959 * configure.ac: Check for memmem declaration.
14960 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14961 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14962 (disable_packet_qfThreadInfo): Unconditionally compile.
14963 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14964 * configure, config.in: Regenerate.
14966 2008-07-28 Doug Kwan <dougkwan@google.com>
14968 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14969 (linux_write_memory): Remove declaration of errno.
14971 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14973 * linux-low.c (handle_extended_wait): Do not use "status"
14974 variable uninitialized.
14976 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14978 * server.c (handle_v_attach): Inhibit reporting dll changes.
14980 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14982 * remote-utils.c (prepare_resume_reply): If requested, don't
14983 output "thread:TID" in the T stop reply.
14985 * server.c (disable_packet_vCont, disable_packet_Tthread)
14986 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14987 (handle_query): If requested, disable support for qC, qfThreadInfo
14989 (handle_v_requests): If requested, disable support for vCont.
14990 (gdbserver_show_disableable): New.
14991 (main): Handle --disable-packet and --disable-packet=LIST.
14993 * server.h (disable_packet_vCont, disable_packet_Tthread)
14994 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14996 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14998 * server.c (gdbserver_usage): Mention --version.
15000 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15002 * Makefile.in (gdbreplay.o): New rule.
15004 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15006 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15007 message, not gdbserver.
15009 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15010 Nathan Sidwell <nathan@codesourcery.com>
15011 Joseph Myers <joseph@codesourcery.com>
15013 * acinclude.m4: Include ../../config/acx.m4.
15014 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15015 * configure, config.in: Regenerate.
15016 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15017 * server.c (gdbserver_version): Print PKGVERSION.
15018 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15019 (main): Adjust gdbserver_usage calls.
15020 * gdbreplay.c (version, host_name): Add declarations.
15021 (gdbreplay_version, gdbreplay_usage): New.
15022 (main): Accept --version and --help options.
15024 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15026 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15027 (arm_breakpoint_at): Handle Thumb.
15028 (the_low_target): Add comment.
15030 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15032 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15034 2008-05-09 Doug Evans <dje@google.com>
15036 * server.h (decode_search_memory_packet): Declare.
15037 * remote-utils.c (decode_search_memory_packet): New fn.
15038 * server.c (handle_search_memory_1): New fn.
15039 (handle_search_memory): New fn.
15040 (handle_query): Process qSearch:memory packets.
15042 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15044 * regcache.c (registers_length): Remove.
15045 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15046 full register packet.
15047 * regcache.h (registers_length): Remove prototype.
15048 * server.h (PBUFSIZ): Define to 16384.
15050 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15052 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15053 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15054 powerpc-64l.o, and powerpc-altivec64l.o.
15055 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15056 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15057 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15058 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15059 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15062 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15063 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15064 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15065 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15066 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15067 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15068 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15069 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15070 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15071 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15074 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15075 (init_registers_powerpc_32l): ... this new prototype.
15076 (init_registers_powerpc_32): Remove, replace by ...
15077 (init_registers_powerpc_altivec32l): ... this new prototype.
15078 (init_registers_powerpc_e500): Remove, replace by ...
15079 (init_registers_powerpc_e500l): ... this new prototype.
15080 (init_registers_ppc64): Remove, replace by ...
15081 (init_registers_powerpc_64l): ... this new prototype.
15082 (init_registers_powerpc_64): Remove, replace by ...
15083 (init_registers_powerpc_altivec64l): ... this new prototype.
15084 (ppc_num_regs): Set to 73.
15085 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15086 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15087 (ppc_cannot_store_register): Handle orig_r3 and trap.
15088 (ppc_arch_setup): Update init_registers_... calls.
15089 (ppc_fill_gregset): Handle orig_r3 and trap.
15091 * inferiors.c (clear_inferiors): Reset current_inferior.
15093 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15095 * acinclude.m4: Add override.m4.
15096 * configure: Regenerate.
15098 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15100 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15101 initial call to init_register_ppc64.
15103 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15105 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15106 single powerpc*-*-linux* case.
15107 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15109 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15111 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15112 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15114 * linux-ppc-low.c: Include <elf.h>.
15115 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15116 (ppc_hwcap): New global variable.
15117 (ppc_regmap): Remove __SPE__ #ifdef sections.
15118 (ppc_regmap_e500): New global variable.
15119 (ppc_cannot_store_register): Update __SPE__ special case.
15120 (ppc_get_hwcap): New function.
15121 (ppc_arch_setup): Use it to determine whether inferior supports
15122 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15123 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15124 Do not access registers if target does not support AltiVec.
15125 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15126 Do not access registers if target does not support SPE.
15127 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15129 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15131 * linux-low.c (disabled_regsets, num_regsets): New.
15132 (use_regsets_p): Delete.
15133 (linux_wait_for_process): Clear disabled_regsets.
15134 (regsets_fetch_inferior_registers): Check and set it.
15135 (regsets_store_inferior_registers): Likewise.
15136 (linux_fetch_registers, linux_store_registers): Do not use
15138 (initialize_low): Allocate disabled_regsets.
15140 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15142 * Makefile.in (LIBOBJS): New.
15143 (OBS): Use LIBOBJS.
15144 (memmem.o): New rule.
15145 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15146 * configure: Regenerated.
15148 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15150 * server.c (handle_query): Never return "unsupported" for
15151 qXfer:features:read queries.
15153 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15155 * server.c (get_features_xml): Fix inverted condition.
15156 (handle_query): Always support qXfer:feature:read.
15158 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15160 * server.c (wrapper_argv): New.
15161 (start_inferior): Handle wrapper_argv. If set, expect an extra
15163 (gdbserver_usage): Document --wrapper.
15164 (main): Parse --wrapper.
15166 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15168 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15169 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15170 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15171 (ppc_set_pc): Likewise.
15172 (ppc_arch_setup): New function.
15173 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15174 of collect_register.
15175 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15177 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15179 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15180 instead of linux-ppc64-low.o.
15181 * linux-ppc64-low.c: Remove file.
15182 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15183 (linux-ppc64-low.o): Remove rule.
15185 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15186 (init_registers_powerpc_64): Likewise.
15187 (ppc_regmap): Conditionally define depending on __powerpc64__.
15188 (ppc_cannot_store_register): Do not special-case "fpscr" when
15189 compiled on __powerpc64__.
15190 (ppc_collect_ptrace_register): New function.
15191 (ppc_supply_ptrace_register): New function.
15192 (ppc_breakpoint): Change type to "unsigned int".
15193 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15194 (the_low_target): Conditionally provide initializers for the
15195 arch_setup member depending on __powerpc64__. Install
15196 collect_ptrace_register and supply_ptrace_register members.
15198 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15200 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15201 * server.c (gdbserver_xmltarget): Define.
15202 (get_features_xml): Use it to replace "target.xml" and arch_string.
15204 * configure.srv: Remove srv_xmltarget. Add XML files that were
15205 mentioned there to srv_xmlfiles instead. Remove conditional tests
15206 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15207 srv_xmlfiles and srv_regobj to include all possible choices.
15208 * configure.ac (srv_xmltarget): Remove.
15209 (srv_xmlfiles): Do not add "target.xml".
15210 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15211 checks for supplementary target information.
15212 * configure: Regenerate.
15213 * Makefile.in (XML_TARGET): Remove.
15214 (target.xml): Remove rule.
15215 (clean): Do not clean up target.xml.
15216 (.PRECIOUS): Do not mention target.xml.
15218 * target.h (struct target_ops): Remove arch_string member.
15219 * linux-low.c (linux_arch_string): Remove.
15220 (linux_target_ops): Remove arch_string initializer.
15221 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15222 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15223 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15224 * spu-low.c (spu_arch_string): Remove.
15225 (spu_target_ops): Remove arch_string initializer.
15226 * win32-low.c (win32_arch_string): Remove.
15227 (win32_target_ops): Remove arch_string initializer.
15228 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15229 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15230 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15232 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15234 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15235 by collect_ptrace_register and supply_ptrace_register hooks.
15236 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15237 instead of checking for the_low_target.left_pad_xfer.
15238 (usr_store_inferior_registers): Use collect_ptrace_register callback
15239 instead of checking for the_low_target.left_pad_xfer.
15241 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15242 (s390_supply_ptrace_register): Likewise.
15243 (s390_fill_gregset): Call s390_collect_ptrace_register.
15244 (the_low_target): Update.
15246 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15247 (ppc_supply_ptrace_register): Likewise.
15248 (the_low_target): Update.
15250 * linux-i386-low.c (the_low_target): Update.
15251 * linux-x86-64-low.c (the_low_target): Update.
15253 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15255 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15256 reg-s390.o and reg-s390x.o.
15258 * linux-low.c (new_inferior): New global variable.
15259 (linux_create_inferior, linux_attach): Set it.
15260 (linux_wait_for_process): Call the_low_target.arch_setup after the
15261 target has stopped for the first time.
15262 (initialize_low): Do not call the_low_target.arch_setup.
15264 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15265 (s390_set_pc): Likewise.
15266 (s390_arch_setup): New function.
15267 (the_low_target): Use s390_arch_setup as arch_setup routine.
15269 * regcache.c (realloc_register_cache): New function.
15270 (set_register_cache): Call it for each existing regcache.
15272 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15274 * server.h (init_registers): Remove prototype.
15276 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15277 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15278 instead of init_registers ().
15279 * linux-arm-low.c (init_registers_arm): Add prototype.
15280 (init_registers_arm_with_iwmmxt): Likewise.
15281 (the_low_target): Add initializer for arch_setup field.
15282 * linux-cris-low.c (init_registers_cris): Add prototype.
15283 (the_low_target): Add initializer for arch_setup field.
15284 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15285 (the_low_target): Add initializer for arch_setup field.
15286 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15287 (the_low_target): Add initializer for arch_setup field.
15288 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15289 (the_low_target): Add initializer for arch_setup field.
15290 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15291 (the_low_target): Add initializer for arch_setup field.
15292 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15293 (the_low_target): Add initializer for arch_setup field.
15294 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15295 (init_registers_mips64_linux): Likewise.
15296 (the_low_target): Add initializer for arch_setup field.
15297 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15298 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15299 (the_low_target): Add initializer for arch_setup field.
15300 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15301 (init_registers_powerpc_64): Likewise.
15302 (the_low_target): Add initializer for arch_setup field.
15303 * linux-s390-low.c (init_registers_s390): Add prototype.
15304 (init_registers_s390x): Likewise.
15305 (the_low_target): Add initializer for arch_setup field.
15306 * linux-sh-low.c (init_registers_sh): Add prototype.
15307 (the_low_target): Add initializer for arch_setup field.
15308 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15309 (the_low_target): Add initializer for arch_setup field.
15310 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15311 (the_low_target): Add initializer for arch_setup field.
15313 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15314 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15315 instead of init_registers ().
15316 * win32-arm-low.c (init_registers_arm): Add prototype.
15317 (the_low_target): Add initializer for arch_setup field.
15318 * win32-i386-low.c (init_registers_i386): Add prototype.
15319 (the_low_target): Add initializer for arch_setup field.
15321 * spu-low.c (init_registers_spu): Add prototype.
15322 (initialize_low): Call initialie_registers_spu () instead of
15323 initialize_registers ().
15325 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15327 * server.c (handle_v_requests): When handling the vRun and vAttach
15328 packets, if already debugging a process, don't kill it. Return an
15331 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15333 * server.c (handle_query): Correct length check.
15335 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15337 * win32-low.c (do_initial_child_stuff): Add process handle
15338 parameter. Set current_process_handle and current_process_id from the
15339 parameters. Clear globals.
15340 (win32_create_inferior): Don't set current_process_handle and
15341 current_process_id here. Instead pass them on the call to
15342 do_initial_child_stuff.
15343 (win32_attach): Likewise.
15344 (win32_clear_inferiors): New.
15345 (win32_kill): Don't close the current process handle or the
15346 current thread handle here. Instead call win32_clear_inferiors.
15347 (win32_detach): Don't open a new handle to the process. Call
15348 win32_clear_inferiors.
15349 (win32_join): Don't rely on current_process_handle; open a new
15350 handle using the process id.
15351 (win32_wait): Call win32_clear_inferiors when the inferior process
15354 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15356 * server.c (monitor_show_help): Add "exit".
15358 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15360 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15361 (clean): Add reg-xtensa.c.
15362 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15363 * configure.srv (xtensa*-*-linux*) New target.
15364 * linux-xtensa-low.c: New.
15365 * xtensa-xtregs.c: New.
15367 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15369 * hostio.c: Don't include errno.h.
15370 (errno_to_fileio_errno): Move to hostio-errno.
15371 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15372 error number outputting to the target->hostio_last_error callback.
15373 (hostio_packet_error): Use FILEIO_EINVAL directly.
15374 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15375 calls to hostio_error.
15376 * hostio-errno.c: New.
15377 * server.h (hostio_last_error_from_errno): Declare.
15378 * target.h (target_ops): Add hostio_last_error member.
15379 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15380 as hostio_last_error handler.
15381 * spu-low.c (spu_target_ops): Likewise.
15382 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15383 (wince_hostio_last_error): New functions.
15384 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15385 as hostio_last_error handler.
15386 (win32_target_ops) [!_WIN32_WCE]: Register
15387 hostio_last_error_from_errno as hostio_last_error handler.
15388 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15389 (hostio-errno.o): New rule.
15390 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15391 * configure.srv (srv_hostio_err_objs): New variable. Default to
15393 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15394 * configure: Regenerate.
15396 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15398 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15399 (linux_kill, linux_detach): Clean up the process list.
15400 * remote-utils.c (remote_open): Improve port number parsing.
15401 (putpkt_binary, input_interrupt): Only send interrupts if the target
15403 * server.c (extended_protocol): Make static.
15404 (attached): Define earlier.
15405 (exit_requested, response_needed, program_argv): New variables.
15406 (target_running): New.
15407 (start_inferior): Clear attached here.
15408 (attach_inferior): Set attached here.
15409 (require_running): Define.
15410 (handle_query): Use require_running and target_running. Implement
15412 (handle_v_attach, handle_v_run): New.
15413 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15414 (gdbserver_usage): Update.
15415 (main): Redo argument parsing. Handle --debug and --multi. Handle
15416 --attach along with other options or after the port. Save
15417 program_argv. Support no initial program. Resynchronize
15418 communication with GDB after an error. Handle "monitor exit".
15419 Use require_running and target_running. Always allow the extended
15420 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15421 restart in extended mode.
15422 * README: Refer to the GDB manual. Update --attach usage.
15424 2007-12-20 Andreas Schwab <schwab@suse.de>
15426 * linux-low.c (STACK_SIZE): Define.
15427 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15428 (linux_test_for_tracefork): Likewise.
15430 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15432 * linux-low.c (linux_wait_for_event): Update messages. Do not
15433 reinsert auto-delete breakpoints.
15434 * mem-break.c (struct breakpoint): Change return type of handler to
15436 (set_breakpoint_at): Update handler type.
15437 (reinsert_breakpoint_handler): Return 1 instead of calling
15439 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15441 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15442 * mem-break.h (set_breakpoint_at): Update handler type.
15443 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15444 * win32-low.c (auto_delete_breakpoint): New.
15445 (get_child_debug_event): Use it.
15447 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15449 * configure.ac: Check for pread and pwrite.
15450 * hostio.c (handle_pread): Fall back to lseek and read.
15451 (handle_pwrite): Fall back to lseek and write.
15452 * config.in, configure: Regenerated.
15454 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15456 * server.c (myresume): Add own_buf argument.
15457 (main): Update calls.
15459 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15461 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15462 * remote-utils.c (remote_open): Do not call disable_async_io.
15463 (block_async_io): Delete.
15464 (unblock_async_io): Make static.
15465 (initialize_async_io): New.
15466 * server.c (handle_v_cont): Handle async I/O here.
15467 (myresume): Likewise. Move other common resume tasks here...
15468 (main): ... from here. Call initialize_async_io. Disable async
15469 I/O before the main loop.
15470 * server.h (initialize_async_io): Declare.
15471 (block_async_io, unblock_async_io): Delete prototypes.
15472 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15474 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15476 * remote-utils.c (readchar): Allow binary data in received messages.
15478 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15480 * win32-low.c (attaching): New global.
15481 (win32_create_inferior): Clear the `attaching' global.
15482 (win32_attach): Set the `attaching' global.
15483 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15484 attaching. Only set a breakpoint at the entry point if not
15487 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15489 * server.c (main): Don't report dll events on the initial
15490 connection on attaches.
15492 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15494 * server.c (main): Relax numerical bases supported for the pid of
15495 the --attach command line argument.
15497 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15499 * win32-low.c (win32_attach): Call OpenProcess before
15500 DebugActiveProcess, not after. Add last error output to error
15503 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15505 * win32-low.c (win32_get_thread_context)
15506 (win32_set_thread_context): New functions.
15507 (thread_rec): Use win32_get_thread_context.
15508 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15509 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15512 2007-12-03 Leo Zayas
15513 Pedro Alves <pedro_alves@portugalmail.pt>
15515 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15517 (child_add_thread): Minor cleanup.
15518 (child_continue): Resume artificially suspended threads before
15519 calling ContinueDebugEvent.
15520 (suspend_one_thread): New.
15521 (fake_breakpoint_event): New.
15522 (get_child_debug_event): Change return type to int. Check here if
15523 gdb sent an interrupt request. If a soft interrupt was requested,
15524 fake a breakpoint event. Return 0 if there is no event to handle,
15526 (win32_wait): Don't check here if gdb sent an interrupt request.
15527 Ensure there is a valid event to handle.
15528 (win32_request_interrupt): Add soft interruption method as last
15531 2007-12-03 Leo Zayas
15532 Pedro Alves <pedro_alves@portugalmail.pt>
15534 * win32-low.h (win32_thread_info): Add descriptions to the
15535 structure members. Replace `suspend_count' counter by a
15537 * win32-low.c (thread_rec): Update condition of when to get the
15538 context from the inferior. Rely on ContextFlags being set if it
15539 has already been retrieved. Only suspend the inferior thread if
15540 we haven't already. Warn if that fails.
15541 (continue_one_thread): s/suspend_count/suspended/. Only call
15542 ResumeThread once. Warn if that fails.
15544 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15546 * win32-low.c (win32_wait): Don't read from the inferior when it
15547 has already exited.
15549 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15551 * Makefile.in (win32_low_h): New variable.
15552 (win32-low.o): Add dependency on $(win32_low_h).
15553 (win32-arm-low.o, win32-i386-low.o): New rules.
15555 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15557 * hostio.c: Correct copyright year.
15559 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15561 * Makefile.in (OBS): Add hostio.o.
15562 (hostio.o): New rule.
15563 * server.h (handle_vFile): Declare.
15564 * hostio.c: New file.
15565 * server.c (handle_v_requests): Take packet_len and new_packet_len
15566 for binary packets. Call handle_vFile.
15567 (main): Update call to handle_v_requests.
15569 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15571 * linux-low.c: Include <sched.h>.
15573 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15575 * linux-low.c (linux_tracefork_grandchild): New.
15576 (linux_tracefork_child): Use clone.
15577 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15579 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15581 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15583 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15585 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15587 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15589 * inferiors.c (change_inferior_id): Delete.
15590 (add_pid_to_list, pull_pid_from_list): New.
15591 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15592 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15593 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15594 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15595 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15596 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15597 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15598 (using_threads): Always set to 1.
15599 (handle_extended_wait): New.
15600 (add_process): Do not set TID.
15601 (linux_create_inferior): Set must_set_ptrace_flags.
15602 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15603 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15604 (linux_thread_alive): Rename TID argument to LWPID.
15605 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15606 (linux_wait_for_event): Do not use TID or check using_threads. Update
15607 call to dead_thread_notify. Call handle_extended_wait.
15608 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15609 (send_sigstop): Delete sigstop_sent.
15610 (wait_for_sigstop): Avoid TID.
15611 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15612 (linux_test_for_tracefork): New.
15613 (linux_lookup_signals): Use thread_db_active and
15614 linux_supports_tracefork_flag.
15615 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15616 * linux-low.h (get_process_thread): Avoid TID.
15617 (struct process_ifo): Move thread_known and tid to the end. Remove
15619 (linux_attach_lwp, thread_db_init): Update prototypes.
15620 * server.h (change_inferior_id): Delete prototype.
15621 (add_pid_to_list, pull_pid_from_list): New prototypes.
15622 * thread-db.c (thread_db_use_events): New.
15623 (find_first_thread): Rename to...
15624 (find_one_thread): ...this. Update callers and messages. Do not
15625 call fatal. Check thread_db_use_events. Do not call
15626 change_inferior_id or new_thread_notify.
15627 (maybe_attach_thread): Update. Do not call new_thread_notify.
15628 (thread_db_init): Set thread_db_use_events. Check use_events.
15629 * utils.c (fatal, warning): Correct message prefix.
15631 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15633 * Makefile.in (clean): Remove new files.
15634 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15635 (powerpc-64.o, powerpc-64.c): New rules.
15636 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15637 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15639 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15641 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15642 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15643 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15644 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15645 (target_regsets): Add AltiVec and SPE register sets.
15646 * configure.ac: Check for AltiVec and SPE.
15647 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15648 (ppc_fill_vrregset, ppc_store_vrregset): New.
15649 (target_regsets): Add AltiVec register set.
15650 * configure: Regenerated.
15652 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15654 * linux-low.c (O_LARGEFILE): Define.
15655 (linux_read_memory): Use /proc/PID/mem.
15656 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15657 * configure, config.in: Regenerated.
15659 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15661 * linux-low.c (linux_wait_for_event): Do not pass signals while
15664 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15666 * win32-low.c (create_process): New.
15667 (win32_create_inferior): Use create_process instead of
15668 CreateProcess. If create_process failed retry appending an ".exe"
15669 suffix. Store the GetLastError result immediatelly after
15670 create_process calls and use it on the call to error.
15672 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15674 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15676 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15678 * configure.ac: Switch license to GPLv3.
15680 2007-08-01 Michael Snyder <msnyder@access-company.com>
15682 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15684 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15686 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15688 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15689 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15690 CloseToolhelp32Snapshot.
15691 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15692 CloseToolhelp32Snapshot.
15694 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15696 * server.c (main): Check for inferior exit before main loop.
15698 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15700 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15701 instead of on tmp_desc.
15703 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15704 Daniel Jacobowitz <dan@codesourcery.com>
15706 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15707 (add_thread): Minor cleanups.
15708 (clear_inferiors): Move lower in the file. Clear the DLL
15710 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15711 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15712 (xml_escape_text): New.
15713 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15715 (handle_v_cont): Report errors.
15716 (gdbserver_version): Update.
15717 (main): Correct size of own_buf. Do not report initial DLL events.
15718 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15719 (unloaded_dll, xml_escape_text): New.
15720 * win32-low.c (enum target_waitkind): Update comments.
15721 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15722 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15723 (win32_EnumProcessModules, win32_GetModuleInformation)
15724 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15725 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15726 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15727 (win32_Module32First, win32_Module32Next, load_toolhelp)
15728 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15729 (get_child_debug_event): Handle DLL events.
15730 (win32_wait): Likewise.
15732 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15734 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15735 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15737 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15739 * win32-low.c (handle_output_debug_string): Ignore event if not
15742 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15744 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15746 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15748 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15750 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15752 * inferiors.c (change_inferior_id): Add comment.
15753 * linux-low.c (check_removed_breakpoint): Add an early
15754 prototype. Improve debug output.
15755 (linux_attach): Doc update.
15756 (linux_detach_one_process, linux_detach): Clean up before releasing
15758 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15759 * linux-low.h (struct process_info): Doc improvement.
15760 * mem-break.c (delete_all_breakpoints): New.
15761 * mem-break.h (delete_all_breakpoints): New prototype.
15762 * thread-db.c (find_first_thread): New.
15763 (thread_db_create_event): Call it instead of
15764 thread_db_find_new_threads. Clean up unused variables.
15765 (maybe_attach_thread): Remove first thread handling.
15766 (thread_db_find_new_threads): Use find_first_thread.
15767 (thread_db_get_tls_address): Likewise.
15769 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15771 * thread-db.c (thread_db_find_new_threads): Add prototype.
15772 (thread_db_create_event): Check for the main thread before adding
15774 (maybe_attach_thread): Only enable event reporting if TID == 0.
15775 (thread_db_get_tls_address): Check for new threads.
15777 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15779 * linux-low.c (linux_create_inferior): Try execv before execvp.
15780 * spu-low.c (spu_create_inferior): Likewise.
15782 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15784 * linux-low.c (linux_create_inferior): Change execv to execvp.
15785 * spu-low.c (spu_create_inferior): Likewies.
15787 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15789 * Makefile.in (clean): Clean new files instead of deleted ones.
15790 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15791 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15793 * configure.srv: Specify XML files and new regformats for MIPS and
15795 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15796 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15797 an entry for the restart register.
15798 (mips_cannot_fetch_register, mips_cannot_store_register)
15799 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15800 register names to match the XML descriptions.
15801 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15802 restart register instead of $0.
15804 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15805 Markus Deuling <deuling@de.ibm.com>
15807 * remote-utils.c (decode_xfer_write): New function.
15808 * server.h (decode_xfer_write): Add prototype.
15809 * server.c (handle_query): Add PACKET_LEN argument. Support
15810 qXfer:spu:read and qXfer:spu:write packets.
15811 (main): Pass packet_len to handle_query.
15812 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15813 * target.h (target_ops): Add qxfer_spu.
15815 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15817 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15818 accessing non-seekable spufs files.
15820 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15822 * server.c (handle_query): Add reply for qC packet.
15824 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15825 Leo Zayas <lerele@champenstudios@com>
15827 * server.h (check_remote_input_interrupt_request): New function.
15828 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15829 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15830 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15831 (check_remote_input_interrupt_request): New function.
15832 * server.h (check_remote_input_interrupt_request): Declare.
15833 * win32-low.c (winapi_DebugBreakProcess,
15834 winapi_GenerateConsoleCtrlEvent): New typedefs.
15835 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15837 (win32_wait): Check for remote interrupt request
15838 with check_remote_input_interrupt_request.
15839 (win32_request_interrupt): New function.
15840 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15842 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15844 * win32-low.c (debug_registers_changed,
15845 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15846 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15847 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15848 (thread_rec): Get context using the low target.
15849 (child_add_thread): Call thread_added on the low target,
15850 which does the same thing.
15852 (do_initial_child_stuff): Remove debug registers references.
15853 Set context using the low target. Resume threads after
15854 setting the contexts.
15855 (child_continue): Remove dead variable. Remove debug
15856 registers references.
15857 (child_fetch_inferior_registers): Go through the low target.
15858 (do_child_store_inferior_registers): Remove.
15859 (child_store_inferior_registers): Go through the low target.
15860 (win32_resume): Remove debug registers references.
15861 Set context using the low target.
15862 (handle_exception): Change return type to void. Don't record
15863 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15864 first chance exception.
15865 (get_child_debug_event): Change return type to void. Remove
15866 goto loop. Always return after waiting for debug event.
15867 (win32_wait): Convert to switch statement. Handle spurious
15870 * win32-i386-low.c (debug_registers_changed,
15871 debug_registers_used): New.
15872 (initial_stuff): Rename to ...
15873 (i386_initial_stuff): ... this. Clear debug registers
15875 (store_debug_registers): Delete.
15876 (i386_get_thread_context): New.
15877 (load_debug_registers): Delete.
15878 (i386_set_thread_context): New.
15879 (i386_thread_added): New.
15880 (single_step): Rename to ...
15881 (i386_single_step): ... this.
15882 (do_fetch_inferior_registers): Rename to ...
15883 (i386_fetch_inferior_register): ... this.
15884 (i386_store_inferior_register): New.
15885 (the_low_target): Adapt to new interface.
15887 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15888 (arm_get_thread_context): New.
15889 (arm_set_thread_context): New.
15891 (do_fetch_inferior_registers): Rename to ...
15892 (arm_fetch_inferior_register): ... this.
15893 (arm_store_inferior_register): New.
15894 (arm_wince_breakpoint): Reimplement as unsigned long.
15895 (arm_wince_breakpoint_len): Define.
15896 (the_low_target): Adapt to new interface.
15898 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15899 load_debug_registers. Add get_thread_context, set_thread_context,
15900 thread_added and store_inferior_register. Rename
15901 fetch_inferior_registers to fetch_inferior_register.
15902 (regptr): Remove declaration.
15904 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15906 * linux-low.c (linux_detach): Change return type to int. Return 0.
15907 * spu-low.c (spu_detach): Likewise.
15909 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15911 * target.h (target_ops): Change return type of detach to int.
15913 (join_inferior): New.
15914 * server.c (main): Don't skip detach support on mingw32.
15915 If the inferior doesn't support detaching return error.
15916 Call join_inferior instead of using waitpid.
15917 * linux-low.c (linux_join): New.
15918 (linux_target_op): Add linux_join.
15919 * spu-low.c (spu_join): New.
15920 (spu_target_ops): Add spu_join.
15921 * win32-low.c (win32_detach): Adapt to new interface.
15922 Reopen current_process_handle before detaching. Issue a child
15923 resume before detaching.
15925 (win32_target_op): Add win32_join.
15927 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15929 * win32-low.c (win32-attach): Fix return value.
15930 * target.h (target_ops): Describe ATTACH return values.
15932 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15934 * win32-low.c (GETPROCADDRESS): Define.
15935 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15936 (winapi_DebugSetProcessKillOnExit): Likewise.
15937 (win32_create_inferior): Force usage of ansi CreateProcessA.
15938 (win32_attach): Use GETPROCADDRESS.
15939 (win32_detach): Likewise.
15941 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15943 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15945 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15947 * win32-low.c: Commit leftover changes from 2007-03-29.
15949 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15951 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15952 fields short instead of int. Add explicit padding.
15953 (i387_cache_to_fsave): Remove unnecessary casts.
15954 (i387_fsave_to_cache): Doc fix.
15955 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15957 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15959 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15960 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15962 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15964 * configure.srv (arm*-*-mingw32ce*): Move near the other
15967 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15969 * configure.ac: Add errno checking.
15970 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15971 sys/file.h and malloc.h.
15972 (AC_CHECK_DECLS): Add perror.
15973 (srv_mingwce): Handle.
15974 * configure.srv (i[34567]86-*-cygwin*): Add
15975 win32-i386-low.o to srv_tgtobj.
15976 (i[34567]86-*-mingw*): Likewise.
15977 (arm*-*-mingw32ce*): Add case.
15978 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15979 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15980 [__MINGW32CE__] (strerror): New function.
15981 [__MINGW32CE__] (errno): Define to GetLastError.
15982 [__MINGW32CE__] (COUNTOF): New macro.
15983 (remote_open): Remove extra close call.
15984 * mem-break.c (delete_breakpoint_at): New function.
15985 * mem-break.h (delete_breakpoint_at): Declare.
15986 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15987 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15988 [USE_WIN32API] (read, write): Add char* casts.
15989 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15990 * server.h: Include wincecompat.h on Windows CE.
15991 [HAVE_ERRNO_H]: Check.
15992 (perror): Declare if not declared.
15993 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15994 (perror_with_name): Remove errno declaration.
15995 * wincecompat.h: New.
15996 * wincecompat.c: New.
15997 * win32-low.h: New.
15998 * win32-arm-low.c: New.
15999 * win32-i386-low.c: New.
16000 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16001 (OUTMSG2): Make it safe.
16003 (COUNTOF): New macro.
16004 (NUM_REGS): Get it from the low target.
16005 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16006 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16007 (thread_rec): Let low target handle debug registers.
16008 (child_add_thread): Likewise.
16009 (child_init_thread_list): Likewise.
16010 (continue_one_thread): Likewise.
16012 (do_child_fetch_inferior_registers): Move to ...
16013 * win32-i386-low.c: ... here, and rename to ...
16014 (do_fetch_inferior_registers): ... this.
16015 * win32-low.c (child_fetch_inferior_registers):
16016 Go through the low target.
16017 (do_child_store_inferior_registers): Use regptr.
16018 (strwinerror): New function.
16019 (win32_create_inferior): Handle Windows CE.
16020 Use strwinerror instead of strerror on Windows error
16021 codes. Add program to the error output.
16022 Don't close the main thread handle on Windows CE.
16023 (win32_attach): Use coredll.dll on Windows CE.
16024 (win32_kill): Close current process and current
16026 (win32_detach): Use coredll.dll on Windows CE.
16027 (win32_resume): Let low target handle debug registers, and
16029 (handle_exception): Add/Remove initial breakpoint. Avoid
16030 non-existant WSTOPSIG on Windows CE.
16031 (win32_read_inferior_memory): Cast to remove warning.
16032 (win32_arch_string): Go through the low target.
16033 (initialize_low): Call set_breakpoint_data with the low
16034 target's breakpoint.
16035 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16036 FOP_REGNUM, mappings): Move to ...
16037 * win32-i386-low.c: ... here.
16038 * win32-low.c (win32_thread_info): Move to ...
16039 * win32-low.h: ... here.
16040 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16041 win32-arm-low.c and wincecompat.c.
16042 (all:): Add $EXEEXT.
16043 (install-only:): Likewise.
16044 (gdbserver:): Likewise.
16045 (gdbreplay:): Likewise.
16046 * config.in: Regenerate.
16047 * configure: Regenerate.
16049 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16051 * win32-low.c: Rename typedef thread_info to
16052 win32_thread_info throughout.
16054 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16056 * win32-i386-low.c: Rename to ...
16057 * win32-low.c: ... this.
16058 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16059 * Makefile.in: Likewise.
16061 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16063 * remote-utils.c (monitor_output): Constify msg parameter.
16064 * server.h (monitor_output): Likewise.
16065 * win32-i386-low.c (handle_output_debug_string): New.
16066 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16067 handle_output_debug_string.
16068 (get_child_debug_event): Likewise.
16070 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16072 * server.c (main): Correct strtoul check.
16074 2007-03-27 Jon Ringle <jon@ringle.org>
16076 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16078 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16080 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16082 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16084 * terminal.h: Check HAVE_SGTTY_H.
16086 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16088 * remote-utils.c (remote_open): Print out the assigned port number.
16090 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16092 * remote-utils.c (monitor_output): New function.
16093 * server.c (debug_threads): Define here.
16094 (monitor_show_help): New function.
16095 (handle_query): Handle qRcmd.
16096 (main): Do not handle 'd' packet.
16097 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16098 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16101 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16103 * Makefile.in (EXEEXT): New.
16104 (clean): Use $(EXEEXT).
16106 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16108 * target.h (target_ops): Rename send_signal to request_interrupt,
16109 and remove enum target_signal parameter.
16110 * linux-low.c (linux_request_interrupt): Rename from
16111 linux_send_signal, and always send SIGINT.
16112 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16113 and always send SIGINT.
16114 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16116 (input_interrupt): Likewise.
16118 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16120 * server.c (get_features_xml): Check if target implemented
16122 * win32-i386-low.c (win32_arch_string): New.
16123 (win32_target_ops): Add win32_arch_string as arch_string member.
16125 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16127 * spu-low.c (spu_arch_string): New.
16128 (spu_target_ops): Add spu_arch_string.
16130 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16132 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16133 * configure.ac: Do not check for terminal.h.
16134 * configure, config.in: Regenerated.
16136 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16138 * Makefile.in (OBS): Add $(XML_BUILTIN).
16139 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16141 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16142 (arm-with-iwmmxt.c): New.
16143 * config.in, configure: Regenerate.
16144 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16145 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16146 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16147 (arm*-*-linux*): Add iWMMXt and regset support.
16148 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16149 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16150 (arm_store_wmmxregset, target_regsets): New.
16151 * server.c (get_features_xml): Take annex argument. Check builtin
16153 (handle_query): Handle multiple annexes.
16155 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16157 * remote-utils.c [USE_WIN32API] (read, write): Define.
16158 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16161 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16163 * linux-i386-low.c (the_low_target): Set arch_string.
16164 * linux-x86-64-low.c (the_low_target): Likewise.
16165 * linux-low.c (linux_arch_string): New.
16166 (linux_target_ops): Add it.
16167 * linux-low.h (struct linux_target_ops): Add arch_string.
16168 * server.c (write_qxfer_response): Use const void * for DATA.
16169 (get_features_xml): New.
16170 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16171 * target.h (struct target_ops): Add arch_string method.
16173 2007-01-03 Denis Pilat <denis.pilat@st.com>
16174 Daniel Jacobowitz <dan@codesourcery.com>
16176 * linux-low.c (linux_kill): Handle being called with no threads.
16177 * win32-i386-low.c (win32_kill): Likewise.
16178 (get_child_debug_event): Clear current_process_handle.
16180 2006-12-30 Denis PILAT <denis.pilat@st.com>
16181 Daniel Jacobowitz <dan@codesourcery.com>
16183 * remote-utils.c (remote_open): Check the type of specified
16184 serial port devices before opening them.
16185 * server.c (main): Kill the inferior if an error occurs during
16186 the first remote_open.
16188 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16190 * README: Update supported targets.
16192 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16194 * Makefile.in (clean): Remove reg-mips64.c.
16195 (reg-mips64.c, reg-mips64.o): New rules.
16196 * configure.srv: Handle mips64. Include regset support for mips.
16197 * linux-mips-low.c (union mips_register): New.
16198 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16199 (mips_breakpoint, mips_breakpoint_at): Use int.
16200 (mips_collect_register, mips_supply_register)
16201 (mips_collect_register_32bit, mips_supply_register_32bit)
16202 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16203 (mips_store_fpregset, target_regsets): New.
16204 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16206 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16208 * configure.srv: Add target "spu*-*-*".
16209 * Makefile.in (clean): Remove reg-spu.c.
16210 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16211 * spu-low.c: New file.
16213 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16215 * configure.ac: Correct td_thr_tls_get_addr test.
16216 * configure: Regenerated.
16218 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16220 * linux-low.c (linux_wait_for_event): Reformat. Use the
16221 pass_signals array.
16222 * remote-utils.c (decode_address_to_semicolon): New.
16223 * server.c (pass_signals, handle_general_set): New.
16224 (handle_query): Mention QPassSignals for qSupported.
16225 (main): Call handle_general_set.
16226 * server.h (pass_signals, decode_address_to_semicolon): New.
16228 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16230 * server.c (handle_query): Correct error handling for read_auxv.
16232 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16234 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16235 and srv_linux_thread_db to yes.
16236 * linux-s390-low.c (s390_fill_gregset): New function.
16237 (target_regsets): Define data structure.
16239 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16241 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16242 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16243 * config.in, configure: Regenerated.
16244 * inferiors.c (gdb_id_to_thread): New function.
16245 (gdb_id_to_thread_id): Use it.
16246 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16247 * linux-low.h (struct process_info): Add th member.
16248 (thread_db_get_tls_address): New prototype.
16249 * remote-utils.c (decode_address): Make non-static.
16250 * server.c (handle_query): Handle qGetTLSAddr.
16251 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16252 * target.h (struct target_ops): Add get_tls_address.
16253 * thread-db.c (maybe_attach_thread): Save the thread handle.
16254 (thread_db_get_tls_address): New.
16256 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16258 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16259 (linux_resume_one_process): Take a siginfo_t *. Update all
16260 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16261 (struct pending_signals): Add a siginfo_t.
16262 (linux_wait_for_process): Always set last_status.
16263 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16264 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16265 * linux-low.h (struct process_info): Add last_status.
16267 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16269 * remote-utils.c (try_rle): New function.
16270 (putpkt_binary): Use it.
16272 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16274 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16275 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16276 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16277 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16278 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16281 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16283 * server.c (terminal_fd): New variable.
16284 (old_foreground_pgrp): Likewise.
16285 (restore_old_foreground_pgrp): New function.
16286 (start_inferior): Record the terminal file descriptor in terminal_fd
16287 and its original foreground group in old_foreground_pgrp. Register
16288 restore_old_foreground_pgrp with atexit().
16290 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16292 * server.c (handle_query): Correct qPart to qXfer.
16294 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16296 * configure.ac: Check for more headers which are missing on
16297 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16298 * configure.srv: Add Cygwin and mingw32.
16299 * remote-utils.c: Don't include headers unconditionally which
16300 are missing on mingw32. Include <winsock.h> for mingw32.
16301 (remote_open): Adjust for mingw32 support. Flush
16302 standard error after writing to it.
16303 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16304 (unblock_async_io, enable_async_io, disable_async_io)
16305 (readchar, getpkt): Update for Winsock support.
16306 (prepare_resume_reply): Expect a protocol signal number.
16307 * server.c: Disable <sys/wait.h> on mingw32.
16308 (start_inferior): Adjust for mingw32 support. Flush
16309 standard error after writing to it.
16310 (attach_inferior): Likewise. Use protocol signal
16312 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16314 * win32-i386-low.c: New file.
16315 * Makefile.in (XM_CLIBS): Set.
16316 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16317 (win32-i386-low.o): New dependency rule.
16318 * linux-low.c (linux_wait): Use target signal numbers.
16319 * target.h (struct target_ops): Doc fix.
16320 * server.h (target_signal_to_name): New prototype.
16321 * gdbreplay.c: Don't include headers unconditionally which
16322 are missing on mingw32. Include <winsock.h> for mingw32.
16323 (remote_close, remote_open): Adjust for Winsock support.
16324 * configure, config.in: Regenerated.
16326 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16328 * server.c (decode_xfer_read, write_qxfer_response): New.
16329 (handle_query): Take a packet length argument. Handle
16330 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16331 the qSupported response.
16332 (main): Update call to handle_query.
16334 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16336 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16337 (putpkt_binary): Renamed from putpkt and adjusted for binary
16339 (putpkt): New wrapper for putpkt_binary.
16340 (readchar): Don't mask off the high bit.
16341 (decode_X_packet): New function.
16342 * server.c (main): Call putpkt_binary if a handler sets the packet
16343 length. Save the length of the incoming packet. Handle 'X'.
16344 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16346 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16348 * server.c (handle_query): Handle qSupported.
16350 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16352 * remote-utils.c (all_symbols_looked_up): New variable.
16353 (look_up_one_symbol): Check it.
16354 * server.h (look_up_one_symbol): New declaration.
16355 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16357 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16359 * Makefile.in (linux-arm-low.o): Update dependencies.
16360 * linux-arm-low.c: Include "gdb_proc_service.h".
16361 (PTRACE_GET_THREAD_AREA): Define.
16362 (ps_get_thread_area): New function.
16364 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16366 * configure.srv (m68k*-*-uclinux*): New target.
16367 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16368 (linux_resume_one_process): Remove extraneous cast.
16369 (linux_read_offsets): New.
16370 (linux_target_op): Add linux_read_offsets on mmuless systems.
16371 * server.c (handle_query): Add qOffsets logic.
16372 * target.h (struct target_ops): Add read_offsets.
16374 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16376 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16377 (PTRACE_GET_THREAD_AREA): Define.
16378 (ps_get_thread_area): New function.
16379 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16380 (linux-x86-64-low.o): Update.
16382 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16384 * configure.ac: Remove checks for prfpregset_t.
16385 * gdb_proc_service.h: New file.
16386 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16387 new "gdb_proc_service.h".
16388 * proc-service.c: Likewise.
16389 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16390 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16391 * Makefile.in (gdb_proc_service_h): Updated.
16392 * configure, config.in: Regenerated.
16394 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16396 * remote-utils.c (prepare_resume_reply): Move declaration
16397 of gdb_id_from_wait to the top of the block.
16399 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16401 * linux-low.c (regsets_store_inferior_registers): Read the regset
16402 from the target before filling it.
16404 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16406 * server.c (attach_inferior): Return SIGTRAP for a successful
16409 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16411 * Makefile.in (OBS): Add version.o.
16412 (STAGESTUFF): Delete.
16413 (version.o): Add dependencies.
16414 (version.c): Replace rule.
16415 (clean): Remove version.c.
16416 * server.c (gdbserver_version): New.
16417 (gdbserver_usage): Use printf.
16418 (main): Handle --version and --help.
16419 * server.h (version, host_name): Add declarations.
16421 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16433 * linux-x86-64-low.c:
16435 * linux-s390-low.c:
16436 * linux-ppc64-low.c:
16438 * linux-mips-low.c:
16439 * linux-m68k-low.c:
16440 * linux-m32r-low.c:
16443 * linux-ia64-low.c:
16444 * linux-i386-low.c:
16445 * linux-crisv32-low.c:
16457 * gdbserver.1: Add (C) after Copyright. Update the FSF
16460 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16462 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16463 (arm_breakpoint_at): Recognize both breakpoints.
16464 (the_low_target): Use the correct breakpoint instruction.
16466 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16468 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16469 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16470 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16471 (the_low_target): Update.
16473 2005-10-25 Andreas Schwab <schwab@suse.de>
16475 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16477 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16478 (ia64_num_regs): Reduce to 462.
16480 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16482 * acinclude.m4: Correct quoting.
16483 * aclocal.m4: Regenerated.
16485 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16486 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16487 (thread_db_init): Call thread_db_err_str.
16488 * configure.ac: Check for TD_VERSION.
16489 * config.in, configure: Regenerated.
16491 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16493 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16495 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16497 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16498 is not available. Define HAVE_PTRACE_GETREGS if it is.
16499 * config.in, configure: Regenerated.
16500 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16501 * linux-i386-low.c, linux-m68k-low.c: Update to use
16502 HAVE_PTRACE_GETREGS.
16503 * linux-low.c (regsets_fetch_inferior_registers)
16504 (regsets_store_inferior_registers): Only return 0 if we processed
16506 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16507 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16509 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16511 * inferiors.c (struct thread_info): Add gdb_id.
16512 (add_thread): Add gdb_id argument.
16513 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16514 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16515 calls to add_thread.
16516 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16517 * server.c (handle_query): Use thread_to_gdb_id.
16518 (handle_v_cont, main): Use gdb_id_to_thread_id.
16519 * server.h (add_thread): Update prototype.
16520 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16523 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16525 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16526 left-padded registers.
16527 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16528 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16530 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16532 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16533 * configure: Regenerate.
16534 * config.in: Regenerate.
16535 * server.h (NEED_DECLARATION_STRERROR):
16536 Replace with !HAVE_DECL_STRERROR.
16538 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16540 * linux-low.c (linux_wait, linux_send_signal): Don't test
16541 an unsigned long variable for > 0 if it could be MAX_ULONG.
16542 * server.c (myresume): Likewise.
16543 * target.c (set_desired_inferior): Likewise.
16545 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16547 * configure.ac: Simplify and improve check for socklen_t.
16548 * configure, config.in: Regenerate.
16550 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16552 * acconfig.h: Remove.
16553 * configure.ac: Add a test for socklen_t. Use three-argument
16554 AC_DEFINE throughout.
16555 * config.in: Regenerated using autoheader 2.59.
16556 * configure: Regenerated.
16558 * gdbreplay.c (socklen_t): Provide a default.
16559 (remote_open): Use socklen_t.
16560 * remote-utils.c (socklen_t): Provide a default.
16561 (remote_open): Use socklen_t.
16562 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16565 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16567 * linux-low.c (linux_read_memory, linux_write_memory)
16568 (linux_read_auxv): Likewise.
16569 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16570 (check_mem_write): Likewise.
16571 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16573 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16574 (registers_from_string, register_data): Likewise.
16575 * server.c (handle_query, main): Likewise.
16576 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16577 (decode_M_packet): Likewise.
16578 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16579 * target.h (struct target_ops): Update read_memory, write_memory,
16581 (read_inferior_memory, write_inferior_memory): Update.
16582 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16583 to unsigned char *.
16584 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16585 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16586 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16587 linux-s390-low.c, linux-sh-low.c: Update for changes in
16588 read_inferior_memory and the_low_target->breakpoint.
16590 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16592 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16593 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16594 * configure.srv: Add powerpc64-*-linux*.
16595 * linux-ppc64-low.c: New file.
16597 2005-05-23 Orjan Friberg <orjanf@axis.com>
16599 * linux-cris-low.c: New file with support for CRIS.
16600 * linux-crisv32-low.c: Ditto for CRISv32.
16601 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16602 (clean): Add reg-cris.c and reg-crisv32.c.
16603 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16604 reg-crisv32.o, and reg-crisv32.c to make rules.
16605 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16606 recognized targets.
16608 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16610 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16611 of sizeof (PTRACE_XFER_TYPE).
16612 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16614 2005-05-12 Orjan Friberg <orjanf@axis.com>
16616 * target.h (struct target_ops): Add insert_watchpoint,
16617 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16618 pointers for hardware watchpoint support.
16619 * linux-low.h (struct linux_target_ops): Ditto.
16620 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16621 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16622 to linux_target_ops.
16623 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16625 * server.c (main): Recognize 'Z' and 'z' packets.
16627 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16629 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16630 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16631 (the_low_target): Add new members.
16633 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16635 * proc-service.c (ps_lgetregs): Search all_processes instead of
16638 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16640 * server.c (start_inferior): Change return type to int.
16641 (attach_inferior): Change sigptr to int *.
16642 (handle_v_cont, handle_v_requests): Change signal to int *.
16643 (main): Change signal to int.
16645 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16647 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16648 * configure.srv: Add m32r*-*-linux*.
16649 * linux-m32r-low.c: New file.
16651 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16653 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16655 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16657 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16658 Take unsigned long arguments for PIDs.
16659 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16660 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16661 (wait_for_sigstop, linux_resume_one_process)
16662 (regsets_fetch_inferior_registers, linux_send_signal)
16663 (linux_read_auxv): Likewise. Update the types of variables holding
16664 PIDs. Update format string specifiers.
16665 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16666 * remote-utils.c (prepare_resume_reply): Likewise.
16667 * server.c (cont_thread, general_thread, step_thread)
16668 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16670 (handle_query): Update format specifiers.
16671 (handle_v_cont, main): Use strtoul for thread IDs.
16672 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16673 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16674 (general_thread, step_thread, thread_from_wait)
16675 (old_thread_from_wait): Update.
16676 * target.h (struct thread_resume): Use unsigned long for THREAD.
16677 (struct target_ops): Use unsigned long for arguments to attach and
16680 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16682 * acinclude.m4: Include bfd/bfd.m4 directly.
16683 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16684 <agriffis@toolchain.org>.
16685 * aclocal.m4, configure: Regenerated.
16687 2005-01-07 Andrew Cagney <cagney@gnu.org>
16689 * configure.ac: Rename configure.in, require autoconf 2.59.
16690 * configure: Re-generate.
16692 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16694 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16695 LIBS when finished.
16696 * aclocal.m4: Regenerated.
16697 * configure: Regenerated.
16699 2004-11-21 Andreas Schwab <schwab@suse.de>
16701 * linux-m68k-low.c (m68k_num_gregs): Define.
16702 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16703 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16704 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16705 (m68k_breakpoint_at): New. Add to the_low_target.
16707 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16708 srv_linux_thread_db to yes.
16710 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16712 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16713 (ARCH_SET_FS): Likewise.
16714 (ARCH_GET_FS): Likewise.
16715 (ARCH_GET_GS): Likewise.
16717 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16719 * linux-i386-low.c (ps_get_thread_area): New.
16720 * linux-x86-64-low.c (ps_get_thread_area): New.
16721 * linux-low.c: Include <sys/syscall.h>.
16722 (linux_kill_one_process): Don't kill the first thread here.
16723 (linux_kill): Kill the first thread here.
16724 (kill_lwp): New function.
16725 (send_sigstop, linux_send_signal): Use it.
16726 * proc-service.c: Clean up #ifdefs.
16727 (fpregset_info): Delete.
16728 (ps_lgetregs): Update and enable implementation.
16729 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16731 * remote-utils.c (struct sym_cache, symbol_cache): New.
16732 (input_interrupt): Print a clearer message.
16733 (async_io_enabled): New variable.
16734 (enable_async_io, disable_async_io): Use it. Update comments.
16735 (look_up_one_symbol): Use the symbol cache.
16736 * thread-db.c (thread_db_look_up_symbols): New function.
16737 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16739 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16741 * configure.in: Test for -rdynamic.
16742 * configure: Regenerated.
16743 * Makefile (INTERNAL_LDFLAGS): New.
16744 (gdbserver, gdbreplay): Use it.
16746 2004-09-02 Andrew Cagney <cagney@gnu.org>
16748 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16750 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16752 * linux-low.c (linux_wait): Clear all_processes list also.
16754 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16756 * linux-low.c: Include <errno.h>. Remove extern declaration of
16759 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16761 * gdbreplay.c, server.h, utils.c: Update copyright years.
16763 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16765 * server.c (main): Print child status or termination signal from
16766 variable 'signal', not 'sig'.
16768 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16770 * linux-low.c (linux_read_memory): Change return type to
16771 int. Check for and return error from ptrace().
16772 * target.c (read_inferior_memory): Change return type to int. Pass
16773 back return status from the_target->read_memory().
16774 * target.h (struct target_ops): Adapt *read_memory() prototype.
16776 (read_inferior_memory): Adapt prototype.
16777 * server.c (main): Return an error packet if
16778 read_inferior_memory() returns an error.
16780 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16782 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16783 Unify with other clean targets.
16785 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16787 * server.c (handle_v_cont): Call set_desired_inferior.
16789 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16791 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16793 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16795 * linux-low.c (linux_wait): Unblock async I/O.
16796 (linux_resume): Block and enable async I/O.
16797 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16798 * server.h (block_async_io, unblock_async_io): Add prototypes.
16800 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16802 * remote-utils.c (remote_open): Print a status notice after
16803 opening a TCP port.
16804 * server.c (attach_inferior): Print a status notice after
16807 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16809 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16811 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16813 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16815 * server.c, target.h: Update copyright years.
16817 2004-02-25 Roland McGrath <roland@redhat.com>
16819 * target.h (struct target_ops): New member `read_auxv'.
16820 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16821 * linux-low.c (linux_read_auxv): New function.
16822 (linux_target_ops): Initialize `read_auxv' member to that.
16824 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16826 Committed by Jim Blandy <jimb@redhat.com>.
16828 * linux-s390-low.c (s390_num_regs): Update.
16829 (s390_regmap): Remove control registers. Use __s390x__ predefine
16830 instead of GPR_SIZE to distiguish s390 and s390x targets.
16832 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16834 * linux-low.c: Update copyright year.
16835 (check_removed_breakpoint): Clear pending_is_breakpoint.
16836 (linux_set_resume_request, linux_queue_one_thread)
16837 (resume_status_pending_p): New functions.
16838 (linux_continue_one_thread): Use process->resume.
16839 (linux_resume): Only resume threads if there are no pending events.
16840 * linux-low.h (struct process_info): Add resume request
16843 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16845 * regcache.c (new_register_cache): Clear the allocated register
16846 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16848 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16850 * linux-low.c (linux_resume): Take a struct thread_resume *
16852 (linux_wait): Update call.
16853 (resume_ptr): New static variable.
16854 (linux_continue_one_thread): Renamed from
16855 linux_continue_one_process. Use resume_ptr.
16856 (linux_resume): Use linux_continue_one_thread.
16857 * server.c (handle_v_cont, handle_v_requests): New functions.
16858 (myresume): New function.
16859 (main): Handle 'v' case.
16860 * target.h (struct thread_resume): New type.
16861 (struct target_ops): Change argument of "resume" to struct
16863 (myresume): Delete macro.
16865 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16867 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16868 (uninstall): Support DESTDIR.
16870 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16872 * configure.srv: Add xscale*linux copy of arm*linux entry.
16874 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16876 * linux-arm-low.c (arm_reinsert_addr): New function.
16877 (the_low_target): Add arm_reinsert_addr.
16879 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16881 * mem-break.c: Remove whitespace at end of file.
16883 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16885 * configure.in: Check whether we need to prototype strerror.
16886 * server.h: Optionally prototype strerror.
16887 * gdbreplay.c (perror_with_name): Use strerror.
16888 * linux-low.c (linux_attach_lwp): Use strerror.
16889 * utils.c (perror_with_name): Use strerror.
16890 * config.in, configure: Regenerated.
16892 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16894 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16895 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16897 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16899 * Makefile.in (SFILES): Update.
16900 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16901 low-sun3.c: Remove files.
16903 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16905 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16906 (linux_detach_one_process, linux_detach): New functions.
16907 (linux_target_ops): Add linux_detach.
16908 * server.c (main): Handle 'D' packet.
16909 * target.h (struct target_ops): Add "detach" member.
16910 (detach_inferior): Define.
16912 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16914 From Kelley Cook <kelleycook@wideopenwest.com>:
16915 * configure.srv: Accept i[34567]86 variants.
16917 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16919 * linux-low.c (linux_wait_for_event): Correct comment typos.
16920 (linux_resume_one_process): Call check_removed_breakpoint.
16921 (linux_send_signal): New function.
16922 (linux_target_ops): Add linux_send_signal.
16923 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16925 * target.h (struct target_ops): Add send_signal.
16927 2003-05-29 Jim Blandy <jimb@redhat.com>
16929 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16930 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16931 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16932 away part of the register's value.
16934 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16936 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16937 (linux_wait_for_event, linux_init_signals): Likewise.
16939 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16941 * configure.in: Check for stdlib.h.
16942 * configure: Regenerated.
16943 * config.in: Regenerated.
16945 2003-01-04 Andreas Schwab <schwab@suse.de>
16947 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16949 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16951 * Makefile.in: Remove obsolete code.
16953 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16955 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16956 defined(PT_FPR0_HI).
16958 2002-11-17 Stuart Hughes <seh@zee2.com>
16960 * linux-arm-low.c (arm_num_regs): Increase.
16961 (arm_regmap): Include status register.
16963 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16965 * linux-low.c (register_addr): Remove incorrect -1 check.
16967 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16969 * linux-low.c (linux_create_inferior): Call setpgid. Return
16971 (unstopped_p, linux_signal_pid): Remove.
16972 (linux_target_ops): Remove linux_signal_pid.
16973 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16974 global instead of target method.
16975 * target.h (struct target_ops): Remove signal_pid. Update comment
16976 for create_inferior.
16977 * server.c (signal_pid): New variable.
16978 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16979 gdbserver. Set the child to be the foreground process group.
16980 (attach_inferior): Set signal_pid.
16982 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16984 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16986 2002-08-20 Jim Blandy <jimb@redhat.com>
16988 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16991 2002-08-01 Andrew Cagney <cagney@redhat.com>
16993 * Makefile.in: Make chill references obsolete.
16995 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16997 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16998 * configure: Regenerate.
16999 * config.in: Regenerate.
17001 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17003 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17004 (perror_with_name, remote_close, remote_open, expect, play): Static.
17006 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17008 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17009 byte offsets instead of an array of indexes.
17010 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17012 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17014 * regcache.c: Add comment.
17016 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17018 * thread-db.c: New file.
17019 * proc-service.c: New file.
17020 * acinclude.m4: New file.
17021 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17022 proc-service.o, and thread-db.o.
17023 (linux-low.o): Add USE_THREAD_DB.
17024 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17025 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17026 * aclocal.m4: Regenerated.
17027 * config.in: Regenerated.
17028 * configure: Regenerated.
17029 * configure.in: Check for proc_service.h, sys/procfs.h,
17030 thread_db.h, and linux/elf.h headrs.
17031 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17032 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17033 Check for -lthread_db and thread support.
17034 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17035 PowerPC, and SuperH.
17036 * i387-fp.c: Constify arguments.
17037 * i387-fp.h: Likewise.
17038 * inferiors.c: (struct thread_info): Renamed from
17039 `struct inferior_info'. Remove PID member. Use generic inferior
17040 list header. All uses updated.
17041 (inferiors, signal_pid): Removed.
17042 (all_threads): New variable.
17043 (get_thread): Define.
17044 (add_inferior_to_list): New function.
17045 (for_each_inferior): New function.
17046 (change_inferior_id): New function.
17047 (add_inferior): Removed.
17048 (remove_inferior): New function.
17049 (add_thread): New function.
17050 (free_one_thread): New function.
17051 (remove_thread): New function.
17052 (clear_inferiors): Use for_each_inferior and free_one_thread.
17053 (find_inferior): New function.
17054 (find_inferior_id): New function.
17055 (inferior_target_data): Update argument type.
17056 (set_inferior_target_data): Likewise.
17057 (inferior_regcache_data): Likewise.
17058 (set_inferior_regcache_data): Likewise.
17059 * linux-low.c (linux_bp_reinsert): Remove.
17060 (all_processes, stopping_threads, using_thrads)
17061 (struct pending_signals, debug_threads, pid_of): New.
17062 (inferior_pid): Replace with macro.
17063 (struct inferior_linux_data): Remove.
17064 (get_stop_pc, add_process): New functions.
17065 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17066 Use add_process and add_thread.
17067 (linux_attach_lwp): New function, based on old linux_attach. Use
17068 add_process and add_thread. Set stop_expected for new threads.
17069 (linux_attach): New function.
17070 (linux_kill_one_process): New function.
17071 (linux_kill): Kill all LWPs.
17072 (linux_thread_alive): Use find_inferior_id.
17073 (check_removed_breakpoints, status_pending_p): New functions.
17074 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17075 Update. Use WNOHANG. Wait for cloned processes also. Update process
17076 struct for the found process.
17077 (linux_wait_for_event): New function.
17078 (linux_wait): Use it. Support LWPs.
17079 (send_sigstop, wait_for_sigstop, stop_all_processes)
17080 (linux_resume_one_process, linux_continue_one_process): New functions.
17081 (linux_resume): Support LWPs.
17082 (REGISTER_RAW_SIZE): Remove.
17083 (fetch_register): Use register_size instead. Call supply_register.
17084 (usr_store_inferior_registers): Likewise. Call collect_register.
17085 Fix recursive case.
17086 (regsets_fetch_inferior_registers): Improve error message.
17087 (regsets_store_inferior_registers): Add debugging.
17088 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17089 (unstopped_p, linux_signal_pid): New functions.
17090 (linux_target_ops): Add linux_signal_pid.
17091 (linux_init_signals): New function.
17092 (initialize_low): Call it. Initialize using_threads.
17093 * regcache.c (inferior_regcache_data): Add valid
17095 (get_regcache): Fetch registers lazily. Add fetch argument
17096 and update all callers.
17097 (regcache_invalidate_one, regcache_invalidate): New
17099 (new_register_cache): Renamed from create_register_cache.
17100 Return the new regcache.
17101 (free_register_cache): Change argument to a void *.
17102 (registers_to_string, registers_from_string): Call get_regcache
17103 with fetch flag set.
17104 (register_data): Make static. Pass fetch flag to get_regcache.
17105 (supply_register): Call get_regcache with fetch flag clear.
17106 (collect_register): Call get_regcache with fetch flag set.
17107 (collect_register_as_string): New function.
17108 * regcache.h: Update.
17109 * remote-utils.c (putpkt): Flush after debug output and use
17111 Handle input interrupts while waiting for an ACK.
17112 (input_interrupt): Use signal_pid method.
17113 (getpkt): Flush after debug output and use stderr.
17114 (outreg): Use collect_register_as_string.
17115 (new_thread_notify, dead_thread_notify): New functions.
17116 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17117 and general_thread.
17118 (look_up_one_symbol): Flush after debug output.
17119 * server.c (step_thread, server_waiting): New variables.
17120 (start_inferior): Don't use signal_pid. Update call to mywait.
17121 (attach_inferior): Update call to mywait.
17122 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17123 (main): Don't fetch/store registers explicitly. Use
17124 set_desired_inferior. Support proposed ``Hs'' packet. Update
17126 * server.h: Update.
17127 (struct inferior_list, struct_inferior_list_entry): New.
17128 * target.c (set_desired_inferior): New.
17129 (write_inferior_memory): Constify.
17130 (mywait): New function.
17131 * target.h: Update.
17132 (struct target_ops): New signal_pid method.
17133 (mywait): Removed macro, added prototype.
17135 * linux-low.h (regset_func): Removed.
17136 (regset_fill_func, regset_store_func): New.
17137 (enum regset_type): New.
17138 (struct regset_info): Add type field. Use new operation types.
17139 (struct linux_target_ops): stop_pc renamed to get_pc.
17140 Add decr_pc_after_break and breakpoint_at.
17141 (get_process, get_thread_proess, get_process_thread)
17142 (strut process_info, all_processes, linux_attach_lwp)
17143 (thread_db_init): New.
17145 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17146 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17147 (the_low_target): Add new members.
17148 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17149 (i386_store_fpxregset): Constify.
17150 (target_regsets): Add new kind identifier.
17151 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17152 (i386_set_pc): Add debugging.
17153 (i386_breakpoint_at): New function.
17154 (the_low_target): Add new members.
17155 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17156 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17157 (mips_breakpoint_at): New.
17158 (the_low_target): Add new members.
17159 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17160 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17161 (the_low_target): Add new members.
17162 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17163 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17164 (the_low_target): Add new members.
17165 * linux-x86-64-low.c (target_regsets): Add new kind
17168 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17170 From Martin Pool <mbp@samba.org>:
17171 * server.c (gdbserver_usage): New function.
17174 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17176 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17177 stop_at -> stop_pc.
17179 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17181 * Makefile.in: Remove obsolete code.
17183 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17185 * linux-low.c (regsets_fetch_inferior_registers),
17186 (regsets_store_inferior_registers): Removed cast to int from
17188 * regcache.h: Added declaration of struct inferior_info.
17190 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17192 * inferiors.c (struct inferior_info): Add regcache_data.
17193 (add_inferior): Call create_register_cache.
17194 (clear_inferiors): Call free_register_cache.
17195 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17196 * regcache.c (struct inferior_regcache_data): New.
17197 (registers): Remove.
17198 (get_regcache): New function.
17199 (create_register_cache, free_register_cache): New functions.
17200 (set_register_cache): Don't initialize the register cache here.
17201 (registers_to_string, registers_from_string, register_data): Call
17203 * regcache.h: Add prototypes.
17204 * server.h: Likewise.
17206 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17208 * mem-break.c: New file.
17209 * mem-break.h: New file.
17210 * Makefile.in: Add mem-break.o rule; update server.h
17212 * inferiors.c (struct inferior_info): Add target_data
17214 (clear_inferiors): Free target_data member if set.
17215 (inferior_target_data, set_inferior_target_data): New functions.
17216 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17217 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17218 * linux-low.c (linux_bp_reinsert): New variable.
17219 (struct inferior_linux_data): New.
17220 (linux_create_inferior): Use set_inferior_target_data.
17221 (linux_attach): Likewise. Call add_inferior.
17222 (linux_wait_for_one_inferior): New function.
17223 (linux_wait): Call it.
17224 (linux_write_memory): Add const.
17225 (initialize_low): Call set_breakpoint_data.
17226 * linux-low.h (struct linux_target_ops): Add breakpoint
17228 * server.c (attach_inferior): Remove extra add_inferior
17230 * server.h: Include mem-break.h. Update inferior.c
17232 * target.c (read_inferior_memory)
17233 (write_inferior_memory): New functions.
17234 * target.h (read_inferior_memory)
17235 (write_inferior_memory): Change macros to prototypes.
17236 (struct target_ops): Update comments. Add const to write_memory
17239 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17241 * linux-low.c (usr_store_inferior_registers): Support
17242 registers which are allowed to fail to store.
17243 * linux-low.h (linux_target_ops): Likewise.
17244 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17245 (ppc_cannot_store_register): FPSCR may not be storable.
17247 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17249 * server.h: Include <string.h> if HAVE_STRING_H.
17250 * ChangeLog: Correct paths in last ChangeLog entry.
17252 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17254 * linux-low.h: Remove obsolete prototypes.
17255 (struct linux_target_ops): New.
17256 (extern the_low_target): New.
17257 * linux-low.c (num_regs, regmap): Remove declarations.
17258 (register_addr): Use the_low_target explicitly.
17259 (fetch_register): Likewise.
17260 (usr_fetch_inferior_registers): Likewise.
17261 (usr_store_inferior_registers): Likewise.
17262 * linux-arm-low.c (num_regs): Remove.
17263 (arm_num_regs): Define.
17264 (arm_regmap): Renamed from regmap, made static.
17265 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17267 (arm_cannot_store_register): Renamed from cannot_store_register,
17269 (the_low_target): New.
17270 * linux-i386-low.c (num_regs): Remove.
17271 (i386_num_regs): Define.
17272 (i386_regmap): Renamed from regmap, made static.
17273 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17275 (i386_cannot_store_register): Renamed from cannot_store_register,
17277 (the_low_target): New.
17278 * linux-ia64-low.c (num_regs): Remove.
17279 (ia64_num_regs): Define.
17280 (ia64_regmap): Renamed from regmap, made static.
17281 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17283 (ia64_cannot_store_register): Renamed from cannot_store_register,
17285 (the_low_target): New.
17286 * linux-m68k-low.c (num_regs): Remove.
17287 (m68k_num_regs): Define.
17288 (m68k_regmap): Renamed from regmap, made static.
17289 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17291 (m68k_cannot_store_register): Renamed from cannot_store_register,
17293 (the_low_target): New.
17294 * linux-mips-low.c (num_regs): Remove.
17295 (mips_num_regs): Define.
17296 (mips_regmap): Renamed from regmap, made static.
17297 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17299 (mips_cannot_store_register): Renamed from cannot_store_register,
17301 (the_low_target): New.
17302 * linux-ppc-low.c (num_regs): Remove.
17303 (ppc_num_regs): Define.
17304 (ppc_regmap): Renamed from regmap, made static.
17305 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17307 (ppc_cannot_store_register): Renamed from cannot_store_register,
17309 (the_low_target): New.
17310 * linux-s390-low.c (num_regs): Remove.
17311 (s390_num_regs): Define.
17312 (s390_regmap): Renamed from regmap, made static.
17313 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17315 (s390_cannot_store_register): Renamed from cannot_store_register,
17317 (the_low_target): New.
17318 * linux-sh-low.c (num_regs): Remove.
17319 (sh_num_regs): Define.
17320 (sh_regmap): Renamed from regmap, made static.
17321 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17323 (sh_cannot_store_register): Renamed from cannot_store_register,
17325 (the_low_target): New.
17326 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17327 (the_low_target): New.
17329 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17331 * Makefile.in: Add stamp-h target.
17332 * configure.in: Create stamp-h.
17333 * configure: Regenerated.
17335 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17337 * inferiors.c: New file.
17338 * target.c: New file.
17339 * target.h: New file.
17340 * Makefile.in: Add target.o and inferiors.o. Update
17342 * linux-low.c (inferior_pid): New static variable,
17343 moved from server.c.
17344 (linux_create_inferior): Renamed from create_inferior.
17345 Call add_inferior. Return 0 on success instead of a PID.
17346 (linux_attach): Renamed from myattach.
17347 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17348 (linux_thread_alive): Renamed from mythread_alive.
17349 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17351 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17352 (regsets_store_inferior_registers): Correct error message.
17353 Add missing ``return 0''.
17354 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17355 (linux_store_registers): Renamed from store_inferior_registers.
17356 (linux_read_memory): Renamed from read_inferior_memory.
17357 (linux_write_memory): Renamed from write_inferior_memory.
17358 (linux_target_ops): New structure.
17359 (initialize_low): Call set_target_ops ().
17360 * remote-utils.c (unhexify): New function.
17361 (hexify): New function.
17362 (input_interrupt): Send signals to ``signal_pid''.
17363 * server.c (inferior_pid): Remove.
17364 (start_inferior): Update create_inferior call.
17365 (attach_inferior): Call add_inferior.
17366 (handle_query): New function.
17367 (main): Call handle_query for `q' packets.
17368 * server.h: Include "target.h". Remove obsolete prototypes.
17369 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17371 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17373 * Makefile.in: Add WARN_CFLAGS. Update configury
17375 * configure.in: Check for <string.h>
17376 * configure: Regenerate.
17377 * config.in: Regenerate.
17378 * gdbreplay.c: Include needed system headers.
17379 (remote_open): Remove strchr prototype.
17380 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17381 * regcache.c (supply_register): Change buf argument to const void *.
17382 (supply_register_by_name): Likewise.
17383 (collect_register): Change buf argument to void *.
17384 (collect_register_by_name): Likewise.
17385 * regcache.h: Add missing prototypes.
17386 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17387 * server.c (handle_query): New function.
17388 (attached): New static variable, moved out of main.
17389 (main): Quiet longjmp clobber warnings.
17390 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17391 * utils.c (error): Remove NORETURN.