1 2019-04-17 Alan Hayward <alan.hayward@arm.com>
3 * debug.c (debug_set_output): New function.
4 (debug_vprintf): Send output to debug_file.
5 (debug_flush): Likewise.
6 * debug.h (debug_set_output): New declaration.
7 * server.c (handle_monitor_command): Add debug-file option.
8 (captured_main): Likewise.
10 2019-04-17 Alan Hayward <alan.hayward@arm.com>
12 * debug.c (remote_debug): Add definition.
13 * debug.h (remote_debug): Add declaration.
14 * hostio.c (remote_debug): Remove declaration.
15 * remote-utils.c (struct ui_file): Likewise.
16 (remote_debug): Likewise.
17 * remote-utils.h (remote_debug): Likewise,
18 * server.c (remote_debug): Remove definition.
20 2019-04-10 Kevin Buettner <kevinb@redhat.com>
22 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
23 when using a 64-bit gdbserver.
25 2019-04-09 Tom Tromey <tromey@adacore.com>
27 * linux-low.c (select_event_lwp): Use find_thread_in_random.
29 2019-04-08 Tom Tromey <tom@tromey.com>
31 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
33 (linux_resume_one_lwp): Likewise.
35 2019-04-08 Tom Tromey <tom@tromey.com>
37 * gdbreplay.c: Update.
38 * linux-low.c: Update.
41 2019-04-08 Tom Tromey <tom@tromey.com>
43 * server.c: Use C++ exception handling.
44 * linux-low.c: Use C++ exception handling.
45 * gdbreplay.c: Use C++ exception handling.
47 2019-04-08 Tom Tromey <tom@tromey.com>
49 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
50 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
51 (captured_main, main): Update.
52 * gdbreplay.c (main): Update.
54 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
56 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
57 value in argument pointer, return 1 if the entry is found and 0
58 otherwise. Move comment.
59 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
60 * linux-low.h (linux_get_auxv): Declare.
61 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
63 2019-04-05 Tom Tromey <tromey@adacore.com>
65 * server.c (gdbserver_usage): Use upper-case for metasyntactic
68 2019-03-28 Alan Hayward <alan.hayward@arm.com>
70 * linux-low.c (AT_HWCAP2): Add define if not already included.
72 2019-03-26 Alan Hayward <alan.hayward@arm.com>
74 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
75 (aarch64_arch_setup): Call linux_get_hwcap.
76 * linux-arm-low.c (arm_get_hwcap): Remove function.
77 (arm_read_description): Call linux_get_hwcap.
78 * linux-low.c (linux_get_auxv): New function.
79 (linux_get_hwcap): Likewise.
80 (linux_get_hwcap2): Likewise.
81 * linux-low.h (linux_get_hwcap): New declaration.
82 (linux_get_hwcap2): Likewise.
83 * linux-ppc-low.c (ppc_get_auxv): Remove function.
84 (ppc_arch_setup): Call linux_get_hwcap.
85 * linux-s390-low.c (s390_get_hwcap): Remove function.
86 (s390_arch_setup): Call linux_get_hwcap.
88 2019-03-22 Alan Hayward <alan.hayward@arm.com>
89 Jiong Wang <jiong.wang@arm.com>
91 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
92 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
94 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
96 2019-03-22 Alan Hayward <alan.hayward@arm.com>
97 Jiong Wang <jiong.wang@arm.com>
99 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
100 (aarch64_get_hwcap): New function.
101 (aarch64_arch_setup): Read APIA hwcap.
103 2019-03-22 Alan Hayward <alan.hayward@arm.com>
104 Jiong Wang <jiong.wang@arm.com>
106 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
107 (initialize_low_tracepoint): Likewise.
108 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
109 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
110 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
111 (aarch64_linux_read_description): Likewise.
112 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
114 2019-03-12 John Baldwin <jhb@FreeBSD.org>
116 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
117 i386_create_target_description for 'segments' parameter.
118 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
119 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
120 * win32-i386-low.c (i386_arch_setup): Likewise.
122 2019-03-12 Tom Tromey <tromey@adacore.com>
124 * linux-low.c (iterate_over_lwps): Update.
126 2019-03-06 Tom Tromey <tom@tromey.com>
128 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
129 (captured_main): Use SCOPE_EXIT.
131 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
133 * configure.srv: Use '$enable_unittest' instead of '$development'
134 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
137 2019-02-27 Tom Tromey <tromey@adacore.com>
139 * gdbreplay.c (logchar): Handle \r\n.
141 2019-02-07 Alan Hayward <alan.hayward@arm.com>
143 * linux-low.c (linux_attach): Add process before lwp.
144 * server.c (attach_inferior): Check if already attached.
146 2019-02-07 Tom Tromey <tom@tromey.com>
148 * x86-tdesc.h: Rename include guard.
149 * x86-low.h: Add include guard.
150 * wincecompat.h: Rename include guard.
151 * win32-low.h: Add include guard.
152 * utils.h: Rename include guard.
153 * tracepoint.h: Rename include guard.
154 * tdesc.h: Rename include guard.
155 * target.h: Rename include guard.
156 * server.h: Rename include guard.
157 * remote-utils.h: Rename include guard.
158 * regcache.h: Rename include guard.
159 * nto-low.h: Rename include guard.
160 * notif.h: Add include guard.
161 * mem-break.h: Rename include guard.
162 * lynx-low.h: Add include guard.
163 * linux-x86-tdesc.h: Add include guard.
164 * linux-s390-tdesc.h: Add include guard.
165 * linux-ppc-tdesc-init.h: Add include guard.
166 * linux-low.h: Add include guard.
167 * linux-aarch64-tdesc.h: Add include guard.
168 * linux-aarch32-low.h: Add include guard.
169 * inferiors.h: Rename include guard.
170 * i387-fp.h: Rename include guard.
171 * hostio.h: Rename include guard.
172 * gdbthread.h: Rename include guard.
173 * gdb_proc_service.h: Rename include guard.
174 * event-loop.h: Rename include guard.
175 * dll.h: Rename include guard.
176 * debug.h: Rename include guard.
177 * ax.h: Rename include guard.
179 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
182 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
183 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
185 2019-01-25 Tom Tromey <tom@tromey.com>
187 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
189 2019-01-25 Tom Tromey <tom@tromey.com>
191 * win32-low.c: Fix common/ includes.
192 * win32-i386-low.c: Fix common/ includes.
193 * tracepoint.c: Fix common/ includes.
194 * thread-db.c: Fix common/ includes.
195 * target.h: Fix common/ includes.
196 * symbol.c: Fix common/ includes.
197 * spu-low.c: Fix common/ includes.
198 * server.h: Fix common/ includes.
199 * server.c: Fix common/ includes.
200 * remote-utils.c: Fix common/ includes.
201 * regcache.h: Fix common/ includes.
202 * regcache.c: Fix common/ includes.
203 * nto-x86-low.c: Fix common/ includes.
204 * notif.h: Fix common/ includes.
205 * mem-break.h: Fix common/ includes.
206 * lynx-low.c: Fix common/ includes.
207 * lynx-i386-low.c: Fix common/ includes.
208 * linux-x86-tdesc-selftest.c: Fix common/ includes.
209 * linux-x86-low.c: Fix common/ includes.
210 * linux-low.c: Fix common/ includes.
211 * inferiors.h: Fix common/ includes.
212 * i387-fp.c: Fix common/ includes.
213 * hostio.c: Fix common/ includes.
214 * hostio-errno.c: Fix common/ includes.
215 * gdbthread.h: Fix common/ includes.
216 * gdbreplay.c: Fix common/ includes.
217 * fork-child.c: Fix common/ includes.
218 * event-loop.c: Fix common/ includes.
220 (enum gdb_agent_op): Fix common/ includes.
222 2019-01-21 Tom Tromey <tom@tromey.com>
224 * tracepoint.c: Fix includes.
225 * remote-utils.c: Fix includes.
226 * linux-x86-low.c: Fix includes.
228 2019-01-01 Joel Brobecker <brobecker@adacore.com>
230 * gdbreplay.c (gdbreplay_version): Update copyright year in
232 * server.c (gdbserver_version): Likewise.
234 2018-12-05 Alan Hayward <alan.hayward@arm.com>
236 * linux-low.c (add_lwp): Switch ordering.
238 2018-11-29 Tom Tromey <tom@tromey.com>
240 * win32-low.c (win32_join): Take pid, not process.
241 * target.h (struct target_ops) <join>: Change argument type.
242 (join_inferior): Change argument name.
243 * spu-low.c (spu_join): Take pid, not process.
244 * server.c (handle_detach): Preserve pid before destroying
246 * lynx-low.c (lynx_join): Take pid, not process.
247 * linux-low.c (linux_join): Take pid, not process.
249 2018-11-23 Alan Hayward <alan.hayward@arm.com>
251 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
252 (aarch64_cannot_fetch_register): Likewise.
253 (struct linux_target_ops): Update references.
255 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
257 * linux-ppc-low.c: Include nat/linux-ptrace.h.
259 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
261 * configure.srv (ipa_ppc_linux_regobj): Add
262 powerpc-isa207-htm-vsx32l-ipa.o and
263 powerpc-isa207-htm-vsx64l-ipa.o.
264 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
265 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
266 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
267 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
268 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
269 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
270 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
271 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
272 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
273 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
274 (init_registers_powerpc_isa207_htm_vsx32l)
275 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
276 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
277 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
278 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
279 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
280 (ppc_store_tm_ctarregset): New functions.
281 (ppc_regsets): Add entries for HTM regsets.
282 (ppc_arch_setup): Set htm in features struct when needed. Set
283 sizes for the HTM regsets.
284 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
285 (initialize_low_arch): Call
286 init_registers_powerpc_isa207_htm_vsx32l and
287 init_registers_powerpc_isa207_htm_vsx64l.
288 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
289 PPC_TDESC_ISA207_HTM_VSX.
290 (initialize_low_tracepoint): Call
291 init_registers_powerpc_isa207_htm_vsx32l and
292 init_registers_powerpc_isa207_htm_vsx64l.
294 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
296 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
297 rs6000/power-linux-pmu.xml to srv_xmlfiles.
298 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
299 (ppc_store_pmuregset): New functions.
300 (ppc_regsets): Add entries for ebb and pmu regsets.
301 (ppc_arch_setup): Set isa207 in features struct if the ebb and
302 pmu regsets are available. Set sizes for these regsets.
304 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
306 * configure.srv (ipa_ppc_linux_regobj): Add
307 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
308 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
309 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
310 rs6000/powerpc-isa207-vsx32l.xml, and
311 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
312 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
313 <PPC_TDESC_ISA207_VSX>: New enum value.
314 (init_registers_powerpc_isa207_vsx32l): Declare.
315 (init_registers_powerpc_isa207_vsx64l): Declare.
316 * linux-ppc-low.c (ppc_fill_tarregset): New function.
317 (ppc_store_tarregset): New function.
318 (ppc_regsets): Add entry for the TAR regset.
319 (ppc_arch_setup): Set isa207 in features struct when needed. Set
320 size for the TAR regsets.
321 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
322 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
323 and init_registers_powerpc_isa207_vsx64l.
324 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
325 (initialize_low_tracepoint): Call
326 init_registers_powerpc_isa207_vsx32l and
327 init_registers_powerpc_isa207_vsx64l.
329 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
330 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
332 * configure.srv (ipa_ppc_linux_regobj): Add
333 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
334 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
335 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
336 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
337 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
338 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
339 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
340 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
341 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
342 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
343 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
344 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
345 (ppc_hwcap): Add comment.
346 (ppc_hwcap2): New global.
347 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
348 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
349 (ppc_regsets): Add entries for the DSCR and PPR regsets.
350 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
351 when needed. Set sizes for the the DSCR and PPR regsets.
352 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
353 (initialize_low_arch): Call
354 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
355 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
356 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
357 PPC_TDESC_ISA205_PPR_DSCR_VSX.
358 (initialize_low_tracepoint): Call
359 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
360 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
362 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
364 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
366 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
367 Simon Marchi <simark@simark.ca>
369 * acinclude.m4: Include "../selftest.m4".
370 * configure: Regenerate.
371 * configure.ac: Use "GDB_AC_SELFTEST".
372 * configure.srv: Use "$enable_unittests" instead of
373 "$development" when checking whether unit tests have been
375 * server.c (captured_main): Update message informing that
376 selftests have been disabled.
378 2018-10-04 Tom Tromey <tom@tromey.com>
380 * configure: Rebuild.
382 2018-10-04 Tom Tromey <tom@tromey.com>
384 * server.c (handle_status): Rename inner "thread".
385 (process_serial_event): Declare "res" in 'm' case.
386 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
387 (iterate_over_lwps): Rename inner "thread".
388 (linux_qxfer_libraries_svr4): Rename inner "len".
389 * gdbthread.h (find_thread_in_random): Rename inner "thread".
391 2018-10-01 Gary Benson <gbenson@redhat.com>
393 * gdb_proc_service.h: Moved common code to
394 common/gdb_proc_service.h.
396 2018-10-01 Gary Benson <gbenson@redhat.com>
398 * gdb_proc_service.h: Synchronize comments and whitespace with
399 GDB's version of this file.
401 2018-09-25 Tom Tromey <tom@tromey.com>
403 * configure: Rebuild.
404 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
406 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
408 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
409 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
410 ($(IPA_LIB)): Sort IPA_OBJS.
412 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
414 * Makefile.in: Remove references to $(ADD_DEPS).
416 2018-09-16 Tom Tromey <tom@tromey.com>
418 * remote-utils.c (remote_open): Use GNU style for metasyntactic
420 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
423 2018-09-05 Tom Tromey <tom@tromey.com>
425 * configure: Rebuild.
427 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
430 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
432 2018-08-27 Tom Tromey <tom@tromey.com>
435 * configure: Rebuild.
437 2018-08-27 Tom Tromey <tom@tromey.com>
439 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
440 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
441 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
442 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
443 (s390x_emit_stack_adjust): Add casts to unsigned char.
445 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
449 * server.h (struct client_state) <disable_randomization>:
452 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
454 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
456 (mips_supply_ptrace_register): Likewise.
458 2018-07-22 Tom Tromey <tom@tromey.com>
460 * configure: Rebuild.
462 2018-07-22 Tom Tromey <tom@tromey.com>
464 * win32-low.c (win32_create_inferior): Remove unused variables.
465 * gdbreplay.c (remote_open): Remove unused variable.
466 * remote-utils.c (remote_prepare): Remove unused variable.
467 * x86-tdesc.h (X86_TDESC_H): Define.
468 (amd64_expedite_regs): Define conditionally.
469 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
470 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
471 * remote-utils.c (readchar): Remove unused variable.
473 2018-07-13 Pedro Alves <palves@redhat.com>
475 * linux-low.c (linux_kill): Change parameter to process_info
476 pointer instead of pid. Adjust.
477 * lynx-low.c (lynx_kill): Likewise.
478 * nto-low.c (nto_kill): Likewise.
479 * spu-low.c (spu_kill): Likewise.
480 * win32-low.c (win32_kill): Likewise.
481 * server.c (handle_v_kill, kill_inferior_callback)
482 (detach_or_kill_for_exit): Adjust.
483 * target.c (kill_inferior): Change parameter to process_info
484 pointer instead of pid. Adjust.
485 * target.h (struct target_ops) <kill>: Change parameter to
486 process_info pointer instead of pid. Adjust all implementations
488 (kill_inferior): Likewise.
490 2018-07-13 Pedro Alves <palves@redhat.com>
492 * linux-low.c (linux_detach, linux_join): Change parameter to
493 process_info pointer instead of pid. Adjust.
494 * lynx-low.c (lynx_detach, lynx_join): Likewise.
495 * nto-low.c (nto_detach): Likewise.
496 * spu-low.c (spu_detach, spu_join): Likewise.
497 * win32-low.c (win32_detach, win32_join): Likewise.
498 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
499 * target.h (struct target_ops) <detach, join>: Change parameter to
500 process_info pointer instead of pid. Adjust all implementations
502 (detach_inferior, join_inferior): Rename 'pid' parameter to
505 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
506 Jan Kratochvil <jan.kratochvil@redhat.com>
507 Paul Fertser <fercerpav@gmail.com>
508 Tsutomu Seki <sekiriki@gmail.com>
510 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
511 (OBS): Add 'common/netstuff.o'.
512 (GDBREPLAY_OBS): Likewise.
513 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
514 (remote_open): Implement support for IPv6
516 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
518 (handle_accept_event): Accept connections from IPv6 sources.
519 (remote_prepare): Handle IPv6-style hostnames; implement
520 support for IPv6 connections.
521 (remote_open): Implement support for printing connections from
524 2018-07-11 Pedro Alves <palves@redhat.com>
527 * mem-break.c (any_persistent_commands): Add process_info
528 parameter and use it instead of relying on the current process.
529 Change return type to bool.
530 * mem-break.h (any_persistent_commands): Add process_info
531 parameter and change return type to bool.
532 * server.c (handle_detach): Remove require_running_or_return call.
533 Look up the process_info for the process we're about to detach.
534 If not found, return back error to GDB. Adjust
535 any_persistent_commands call to pass down a process pointer.
537 2018-07-11 Pedro Alves <palves@redhat.com>
539 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
540 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
541 instead of collect_register_by_name.
542 * regcache.c (regcache_raw_get_unsigned_by_name): New.
543 * regcache.h (regcache_raw_get_unsigned_by_name): New.
545 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
546 Pedro Alves <palves@redhat.com>
548 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
550 2018-07-03 Tom Tromey <tom@tromey.com>
552 * linux-low.c: Update.
553 * lynx-low.c: Update.
554 * mem-break.c: Update.
556 * remote-utils.c: Update.
560 * win32-low.c: Update.
562 2018-07-03 Tom Tromey <tom@tromey.com>
566 2018-07-03 Tom Tromey <tom@tromey.com>
568 * linux-low.c: Update.
570 2018-07-03 Tom Tromey <tom@tromey.com>
574 2018-07-03 Tom Tromey <tom@tromey.com>
576 * linux-low.c: Update.
577 * linux-mips-low.c: Update.
578 * lynx-low.c: Update.
580 * remote-utils.c: Update.
584 * thread-db.c: Update.
586 2018-07-03 Tom Tromey <tom@tromey.com>
588 * linux-low.c: Update.
589 * linux-mips-low.c: Update.
590 * lynx-low.c: Update.
591 * mem-break.c: Update.
593 * remote-utils.c: Update.
597 * tracepoint.c: Update.
599 2018-07-03 Tom Tromey <tom@tromey.com>
601 * linux-low.c: Update.
602 * linux-ppc-low.c: Update.
603 * linux-x86-low.c: Update.
604 * proc-service.c: Update.
607 * thread-db.c: Update.
608 * win32-low.c: Update.
610 2018-07-03 Tom Tromey <tom@tromey.com>
612 * linux-low.c: Update.
613 * lynx-low.c: Update.
615 * remote-utils.c: Update.
617 * thread-db.c: Update.
618 * win32-low.c: Update.
620 2018-06-29 Joel Brobecker <brobecker@adacore.com>
622 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
623 parameter in call to 'amd64_create_target_description'.
625 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
627 * x86-tdesc.h: Remove executable permission flag.
629 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
631 * configure.ac: Remove AC_PREREQ, add missing quoting.
632 * configure: Re-generate.
633 * config.in: Re-generate.
634 * aclocal.m4: Re-generate.
636 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
638 * tracepoint.h (current_traceframe): Remove declaration.
640 2018-06-18 Alan Hayward <alan.hayward@arm.com>
642 * linux-aarch64-low.c (is_sve_tdesc): New function.
643 (aarch64_sve_regs_copy_to_regcache): Likewise.
644 (aarch64_sve_regs_copy_from_regcache): Likewise.
645 (aarch64_regs_info): Add SVE checks.
646 (initialize_low_arch): Initialize SVE.
648 2018-06-18 Alan Hayward <alan.hayward@arm.com>
650 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
652 2018-06-11 Alan Hayward <alan.hayward@arm.com>
654 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
655 (initialize_low_tracepoint): Likewise
656 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
657 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
659 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
661 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
663 2018-06-11 Alan Hayward <alan.hayward@arm.com>
665 * server.h (PBUFSIZ): Increase size
667 2018-06-11 Alan Hayward <alan.hayward@arm.com>
669 * regcache.c (regcache::raw_compare): New function.
670 * regcache.h (regcache::raw_compare): New declaration.
672 2018-06-11 Alan Hayward <alan.hayward@arm.com>
674 * regcache.c (new_register_cache): Use new.
675 (free_register_cache): Use delete.
676 (register_data): Use const.
677 (supply_register): Move body inside regcache.
678 (regcache::raw_supply): New override function.
679 (collect_register): Move body inside regcache.
680 (regcache::raw_collect): New override function.
681 (regcache::get_register_status): New override function.
682 * regcache.h (struct regcache): Inherit from reg_buffer_common.
684 2018-06-09 Tom Tromey <tom@tromey.com>
686 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
688 (event_queue): Use std::queue.
689 (gdb_event_xfree): Remove.
690 (initialize_event_loop, process_event, wait_for_event): Update.
692 2018-06-08 Stan Cox <scox@redhat.com>
694 * win32-low.c (win32_create_inferior): last_ptid and last_status
695 moved to client_state.
697 2018-06-08 Pedro Alves <palves@redhat.com>
699 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
700 common/common-exceptions.o, common/common-utils.o,
701 common/errors.o, common/print-utils.o and utils.o.
702 * gdbreplay.c: Include "common-defs.h" instead of the two
703 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
704 string.h or alloca.h.
705 (perror_with_name): Delete.
706 (remote_open): Use xstrdup instead of strdup.
707 (main): Rename to ...
708 (captured_main): ... this.
711 2018-06-08 Tom Tromey <tom@tromey.com>
713 * linux-low.c (linux_low_read_btrace): Update.
715 2018-06-04 Stan Cox <scox@redhat.com>
717 * server.h (struct client_state): New.
718 * server.c (cont_thread, general_thread, multi_process)
719 (report_fork_events, report_vfork_events, report_exec_events)
720 (report_thread_events, swbreak_feature, hwbreak_feature)
721 (vCont_supported, disable_randomization, pass_signals)
722 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
723 Moved to client_state.
724 * remote-utils.c (remote_debug, noack_mode)
725 (transport_is_reliable): Moved to client_state.
726 * tracepoint.c (current_traceframe): Moved to client_state.
729 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
730 linux-low.c, remote-utils.h, target.c: Use client_state.
732 2018-05-31 Alan Hayward <alan.hayward@arm.com>
734 * configure.srv: Add new c/h file.
736 2018-05-31 Alan Hayward <alan.hayward@arm.com>
738 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
741 2018-05-25 Maciej W. Rozycki <macro@mips.com>
743 * gdb.arch/mips-fpregset-core.exp: New test.
744 * gdb.arch/mips-fpregset-core.c: New test source.
746 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
749 * hostio.c (require_int): Do not report overflow for integers
750 between 0xfffffff and 0x7fffffff.
752 2018-05-22 Maciej W. Rozycki <macro@mips.com>
754 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
755 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
756 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
758 (the_low_target): Wire them.
760 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
762 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
763 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
764 mode. Call collect_register_by_name with vscr using
765 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
766 (ppc_store_vrregset): Add and set vscr_offset variable as in
767 ppc_fill_vrregset. Call supply_register_by_name with vscr using
770 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
772 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
773 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
774 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
776 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
778 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
779 (ppc_store_vsxregset): Likewise.
780 (ppc_fill_vrregset): Likewise.
781 (ppc_store_vrregset): Likewise.
782 (ppc_fill_evrregset): Likewise.
783 (ppc_store_evrregset): Likewise.
784 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
785 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
788 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
790 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
791 wordsize of the inferior. Call ppc_linux_target_wordsize.
793 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
795 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
796 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
797 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
798 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
799 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
800 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
801 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
802 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
803 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
804 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
805 (tdesc_powerpc_e500l): Remove.
806 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
807 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
808 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
809 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
811 (ppc_arch_setup): Remove target description matching code. Fill a
812 ppc_linux_features struct and call ppc_linux_match_description
815 2018-05-22 Maciej W. Rozycki <macro@mips.com>
817 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
818 width of the requested register exceeds the width of the
820 (mips_cannot_store_register): Likewise.
822 2018-05-21 Maciej W. Rozycki <macro@mips.com>
824 * linux-mips-low.c (mips_fetch_register): New function. Update
826 (mips_store_gregset): Supply 0 rather than $restart for $zero.
827 (the_low_target): Wire `mips_fetch_register'.
829 2018-05-10 Joel Brobecker <brobecker@adacore.com>
831 * lynx-i386-low.c (LYNXOS_178): New macro.
832 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
833 the layout on LynxOS-178.
834 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
835 handle floating point registers that are not supported by
838 2018-05-10 Tom Tromey <tom@tromey.com>
840 * configure: Rebuild.
842 2018-05-10 Joel Brobecker <brobecker@adacore.com>
845 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
846 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
847 Use it to set the expedite_regs field in the given tdesc.
848 * x86-tdesc.h: New file.
849 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
850 Adjust following the addition of the new expedite_regs parameter
852 * linux-tic6x-low.c (tic6x_read_description): Likewise.
853 * linux-x86-tdesc.c: #include "x86-tdesc.h".
854 (i386_linux_read_description, amd64_linux_read_description):
855 Adjust following the addition of the new expedite_regs parameter
857 * lynx-i386-low.c: #include "x86-tdesc.h".
858 (lynx_i386_arch_setup): Adjust following the addition of the new
859 expedite_regs parameter to init_target_desc.
860 * nto-x86-low.c: #include "x86-tdesc.h".
861 (nto_x86_arch_setup): Adjust following the addition of the new
862 expedite_regs parameter to init_target_desc.
863 * win32-i386-low.c: #include "x86-tdesc.h".
864 (i386_arch_setup): Adjust following the addition of the new
865 expedite_regs parameter to init_target_desc.
867 2018-05-10 Joel Brobecker <brobecker@adacore.com>
870 * win32-low.c (win32_create_inferior): Add call to my_wait
871 setting last_status global.
873 2018-05-10 Joel Brobecker <brobecker@adacore.com>
876 * win32-low.c (create_process): Only call gdb_tilde_expand if
877 inferior_cwd is not NULL.
879 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
881 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
882 registers to the cache if their values have changed.
883 (i387_xsave_to_cache): Provide default values for x87 control
884 registers when these features are available, but disabled.
885 * regcache.c (supply_register_by_name_zeroed): New function.
886 * regcache.h (supply_register_by_name_zeroed): Declare new
889 2018-05-07 Tom Tromey <tom@tromey.com>
891 * configure: Rebuild.
893 2018-05-04 Tom Tromey <tom@tromey.com>
895 * configure: Rebuild.
897 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
898 Pedro Alves <palves@redhat.com>
900 * linux-aarch64-low.c (aarch64_stopped_data_address):
903 2018-04-27 Tom Tromey <tom@tromey.com>
905 * configure: Rebuild.
907 2018-04-23 Tom Tromey <tom@tromey.com>
909 * configure: Rebuild.
911 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
913 * Makefile.in (depcomp): Add "..".
914 (all_deps_files): New and use it.
916 2018-04-18 Alan Hayward <alan.hayward@arm.com>
918 * configure.srv (aarch64*-*-linux*): Don't include xml.
919 (i[34567]86-*-cygwin*): Likewise.
920 (i[34567]86-*-linux*): Likewise.
921 (i[34567]86-*-lynxos*): Likewise.
922 (i[34567]86-*-mingw32ce*): Likewise.
923 (i[34567]86-*-mingw*): Likewise.
924 (i[34567]86-*-nto*): Likewise.
925 (tic6x-*-uclinux): Likewise.
926 (x86_64-*-linux*): Likewise.
927 (x86_64-*-mingw*): Likewise.
928 (x86_64-*-cygwin*): Likewise.
930 2018-04-18 Alan Hayward <alan.hayward@arm.com>
932 * tdesc.c: Remove xml parameter.
934 2018-04-18 Alan Hayward <alan.hayward@arm.com>
936 * server.c (get_features_xml): Remove cast.
937 * tdesc.c (void target_desc::accept): Fill in function.
938 (tdesc_get_features_xml): Remove old xml creation.
939 (print_xml_feature::visit_pre): Add xml vistor.
940 * tdesc.h (struct target_desc): Make xmltarget mutable.
941 (tdesc_get_features_xml): Remove declaration.
943 2018-04-18 Alan Hayward <alan.hayward@arm.com>
945 * tdesc.c (tdesc_architecture_name): Add new function.
946 (tdesc_osabi_name): Likewise.
947 (tdesc_get_features_xml): Use new functions.
949 2018-04-18 Alan Hayward <alan.hayward@arm.com>
951 * tdesc.c (tdesc_create_flags): Remove.
952 (tdesc_add_flag): Likewise.
953 (tdesc_named_type): Likewise.
954 (tdesc_create_union): Likewise.
955 (tdesc_create_struct): Likewise.
956 (tdesc_create_vector): Likewise.
957 (tdesc_add_bitfield): Likewise.
958 (tdesc_add_field): Likewise.
959 (tdesc_set_struct_size): Likewise.
961 2018-04-18 Alan Hayward <alan.hayward@arm.com>
963 * tdesc.c (~target_desc): Remove implictly deleted items.
964 (init_target_desc): Iterate all features.
965 (tdesc_get_features_xml): Use vector.
966 (tdesc_create_feature): Create feature.
967 * tdesc.h (tdesc_feature) Remove
968 (target_desc): Add features.
970 2018-04-18 Alan Hayward <alan.hayward@arm.com>
972 * Makefile.in: Add common/tdesc.c
973 * tdesc.c (init_target_desc): init all reg_defs from register
975 (tdesc_create_reg): Create tdesc_reg.
976 * tdesc.h (tdesc_feature): Add register vector.
978 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
980 * tdesc.h (struct target_desc) <features>: Change type to
981 std::vector<std::string>.
982 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
984 (tdesc_get_features_xml): Likewise.
985 (tdesc_create_feature): Likewise.
987 2018-03-26 Alan Hayward <alan.hayward@arm.com>
989 * regcache.c (find_register_by_number): Return a ref.
990 (find_regno): Use references.
991 (register_size): Likewise.
992 (register_data): Likewise.
993 * tdesc.c (target_desc::~target_desc): Remove free calls.
994 (target_desc::operator==): Use std::vector compare.
995 (init_target_desc): Use reference.
996 (tdesc_create_reg): Use reg constructors.
997 * tdesc.h (struct target_desc): Replace pointer with object.
999 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1001 * regcache.c (find_register_by_number): Make static.
1002 (find_regno): Use find_register_by_number
1003 * regcache.h (struct reg): Remove declaration.
1005 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1007 * tdesc.c (target_desc::~target_desc): Move to here.
1008 (target_desc::operator==): Likewise.
1009 * tdesc.h (target_desc::~target_desc): Move from here.
1010 (target_desc::operator==): Likewise.
1012 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1014 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1016 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1018 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1020 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1021 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1022 and init_registers_s390_gs_linux64.
1024 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1026 * linux-s390-low.c (s390_fill_gs): Remove function.
1027 (s390_fill_gsbc): Remove function.
1028 (s390_regsets): Set fill functions for the guarded storage regsets
1031 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1033 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1034 the word size. Add comment.
1035 (s390_get_wordsize): New function.
1036 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1037 pswm with it. Instead, use s390_get_wordsize to determine the
1038 word size first and derive the correct tdesc from that directly.
1040 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1042 * Makefile.in: Include silent-rules.mk.
1043 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1044 (COMPILE): Add ECHO_CXX.
1045 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1046 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1047 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1048 (version-generated.c): Add ECHO_GEN.
1049 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1050 (IPAGENT_COMPILE): Add ECHO_CXX.
1051 (%-generated.c): Add ECHO_REGDAT.
1053 2018-03-14 Tom Tromey <tom@tromey.com>
1056 * ax.c (ax_printf): Special case for NULL.
1058 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1060 * linux-low.c (linux_qxfer_libraries_svr4): Use
1061 xml_escape_text_append.
1063 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1065 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1067 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1069 * server.c (handle_general_set): Remove unnecessary xstrdup.
1071 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1073 * server.c (parse_debug_format_options): Adjust to
1074 delim_string_to_char_ptr_vec changes.
1075 * thread-db.c (thread_db_load_search): Adjust to
1076 dirnames_to_char_ptr_vec changes.
1078 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1080 * target.h (target_enable_btrace, target_disable_btrace)
1081 (target_read_btrace, target_read_btrace_conf): Turn macro into
1082 inline function. Throw error if target method is not defined.
1083 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1084 check for btrace target method. Be prepared to handle exceptions
1085 from btrace target methods.
1087 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1089 * server.c (captured_main): Change order of error message printed
1090 when the current working directory cannot be found.
1092 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1094 * server.c: Include "filenames.h" and "pathstuff.h".
1095 (program_name): Delete variable.
1096 (program_path): New anonymous class.
1097 (get_exec_wrapper): Use "program_path" instead of
1099 (handle_v_run): Likewise.
1100 (captured_main): Likewise.
1101 (process_serial_event): Likewise.
1103 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1105 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1106 (OBJS): Add "pathstuff.o".
1107 * server.c (current_directory): New global variable.
1108 (captured_main): Initialize "current_directory".
1110 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1112 * tdesc.c: Use common/tdesc.h.
1113 * tdesc.h: Likewise.
1115 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1116 Simon Marchi <simon.marchi@ericsson.com>
1118 * Makefile.in: Switch order of make rules.
1120 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1122 * Makefile.in: Add common directory in build.
1123 * configure.ac: Add common reference.
1124 * configure: Regenerate.
1126 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1128 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1129 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1130 * spu-low.c (spu_target_ops): Likewise.
1131 * win32-low.c (win32_target_ops): Likewise.
1132 * server.c (supported_btrace_packets): Report packets unconditionally.
1133 * target.h (target_ops) <supports_btrace>: Remove.
1134 (target_supports_btrace): Remove.
1136 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1138 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1139 (handle_btrace_disable): Change return type to void. Use exceptions
1141 (handle_btrace_general_set): Catch exception and copy message to
1144 2018-02-08 Tom Tromey <tom@tromey.com>
1146 * linux-low.c (install_software_single_step_breakpoints): Use
1147 make_scoped_restore.
1148 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1149 (do_restore_current_thread_cleanup): Remove.
1150 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1153 2018-02-08 Tom Tromey <tom@tromey.com>
1155 * mem-break.c (set_raw_breakpoint_at): Use
1156 gdb::unique_xmalloc_ptr.
1158 2018-01-30 Pedro Alves <palves@redhat.com>
1161 * target.c (target_terminal::terminal_state): Rename to ...
1162 (target_terminal::m_terminal_state): ... this.
1164 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1166 * linux-low.c (handle_extended_wait): Surround call to
1167 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1169 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1171 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1172 linux_ptrace_attach_fail_reason_string now returning an
1174 (linux_attach): Likewise.
1175 * thread-db.c (attach_thread): Likewise.
1177 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1180 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1181 checking for fs_base/gs_base fields in struct user_regs_struct.
1182 * configure: Regenerate.
1184 2018-01-16 Yao Qi <yao.qi@linaro.org>
1187 * linux-low.c (fetch_register): Call supply_register instead of
1190 2018-01-08 Yao Qi <yao.qi@linaro.org>
1191 Simon Marchi <simon.marchi@ericsson.com>
1193 * Makefile.in (OBS): Remove selftest.o.
1194 * configure.ac: Set srv_selftest_objs if $development is true.
1195 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1196 * configure: Re-generated.
1197 * server.c (captured_main): Wrap variable selftest_filter with
1200 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1202 * server.c (parse_debug_format_options): Return std::string.
1203 (handle_monitor_command, captured_main): Adjust.
1205 2018-01-05 Pedro Alves <palves@redhat.com>
1208 * server.c (captured_main): Pass quiet=false to
1209 save_original_signals_state.
1211 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1213 * gdbreplay.c (gdbreplay_version): Update copyright year in
1215 * server.c (gdbserver_version): Likewise.
1217 2017-12-08 Tom Tromey <tom@tromey.com>
1219 * ax.c (ax_printf): Update.
1221 2017-12-07 Yao Qi <yao.qi@linaro.org>
1223 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1224 aarch64_linux_read_description.
1225 * linux-amd64-ipa.c (idx2mask): New array.
1226 (get_ipa_tdesc): Move idx2mask out.
1227 (initialize_low_tracepoint): Initialize target descriptions.
1228 * linux-i386-ipa.c (idx2mask): New array.
1229 (get_ipa_tdesc): Move idx2mask out.
1230 (initialize_low_tracepoint): Initialize target descriptions.
1232 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1234 * tdesc.c (struct tdesc_type): Change return type.
1235 (tdesc_add_flag): Change parameter type.
1236 (tdesc_add_bitfield): Likewise.
1237 (tdesc_add_field): Likewise.
1238 (tdesc_set_struct_size): Likewise.
1240 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1242 * regcache.c (registers_to_string): Remove unused variable.
1244 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1246 * inferiors.c (for_each_inferior_with_data): Remove.
1247 * inferiors.h (for_each_inferior_with_data): Remove.
1248 * server.c (handle_qxfer_threads_worker): Change parameter type.
1249 (handle_qxfer_threads_proper): Use for_each_thread.
1251 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1253 * inferiors.c (for_each_inferior): Remove.
1254 (clear_inferiors): Use for_each_thread.
1255 * inferiors.h (for_each_inferior): Remove.
1256 * linux-low.c (linux_wait_for_event_filtered): Use
1258 (linux_stabilize_threads): Likewise.
1259 * regcache.c (regcache_release): Likewise.
1260 * server.c (gdb_wants_all_threads_stopped): Likewise.
1261 (clear_pending_status_callback): Remove.
1262 (handle_status): Use for_each_thread.
1263 (captured_main): Likewise.
1264 * win32-low.c (child_init_thread_list): Likewise.
1265 (win32_clear_inferiors): Likewise.
1266 (fake_breakpoint_event): Likewise.
1268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1270 * inferiors.h (find_inferior): Remove.
1271 * inferiors.c (find_inferior): Remove.
1273 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1275 * linux-low.c (resume_status_pending_p): Update comment.
1276 (need_step_over_p): Update comment.
1278 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1280 * linux-low.c (proceed_one_lwp): Return void, change parameter
1282 (unsuspend_and_proceed_one_lwp): Likewise.
1283 (proceed_all_lwps): Use for_each_thread.
1284 (unstop_all_lwps): Likewise.
1286 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1288 * linux-low.c (linux_resume_one_thread): Return void, take
1290 (linux_resume): Use for_each_thread.
1292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1294 * linux-low.c (send_sigstop_callback): Return void, change
1295 parameter type. Rename to...
1296 (send_sigstop): ... this.
1297 (suspend_and_send_sigstop_callback): Return void, change parameter
1299 (suspend_and_send_sigstop): ... this.
1300 (stop_all_lwps): Use for_each_thread.
1302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1304 * linux-low.c (lwp_running): Return bool, remove unused
1306 (linux_stabilize_threads): Use find_thread.
1308 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1310 * linux-low.c (select_singlestep_lwp_callback): Remove.
1311 (count_events_callback): Remove.
1312 (select_event_lwp_callback): Remove.
1313 (select_event_lwp): Use find_thread/for_each_thread.
1315 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1317 * linux-low.c (not_stopped_callback): Return bool, take filter
1319 (linux_wait_for_event_filtered): Use find_thread.
1320 (linux_wait_1): Likewise.
1322 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1324 * linux-low.c (same_lwp): Remove.
1325 (find_lwp_pid): Use find_thread.
1327 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1329 * linux-low.c (delete_lwp_callback): Remove.
1330 (linux_mourn): Use for_each_thread.
1332 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1334 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1335 args parameter, don't check for pid.
1336 (linux_detach): Use for_each_thread.
1338 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1340 * linux-low.c (struct counter): Remove.
1341 (second_thread_of_pid_p): Remove.
1342 (last_thread_of_process_p): Use find_thread.
1344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1346 * inferiors.c (find_inferior_in_random): Remove.
1347 * inferiors.h (find_inferior_in_random): Remove.
1348 * linux-low.c (status_pending_p_callback): Return bool, accept
1349 parameter ptid directly.
1350 (linux_wait_for_event_filtered): Use find_thread_in_random.
1351 (linux_wait_1): Likewise.
1353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1355 * inferiors.c (find_inferior_id): Remove.
1356 (find_thread_ptid): Move implemention from find_inferior_id to
1358 * inferiors.h (find_inferior_id): Remove.
1359 * server.c (handle_status): Use find_thread_ptid.
1360 (process_serial_event): Likewise.
1361 * thread-db.c (find_one_thread): Likewise.
1362 (thread_db_thread_handle): Likewise.
1363 * win32-low.c (thread_rec): Likewise.
1364 (child_delete_thread): Likewise.
1365 (win32_thread_alive): Likewise.
1366 (get_child_debug_event): Likewise.
1368 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1370 * linux-mips-low.c (update_watch_registers_callback): Return
1371 void, remove pid_p parameter, don't check for pid.
1372 (mips_insert_point, mips_remove_point): Use for_each_thread.
1374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1376 * lynx.low (lynx_delete_thread_callback): Remove.
1377 (lynx_mourn): Use for_each_thread.
1379 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1381 * regcache.c (regcache_invalidate_one): Remove.
1382 (regcache_invalidate_pid): use for_each_thread.
1384 2017-11-26 Tom Tromey <tom@tromey.com>
1386 * linux-low.c (linux_create_inferior): Update.
1388 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1390 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1392 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1394 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1395 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1396 * linux-aarch64-tdesc-selftest.c: New file.
1397 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1399 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1401 * configure.srv: Add new file.
1402 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1403 * linux-aarch64-tdesc-selftest.c: New file.
1404 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1406 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1408 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1409 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1410 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1412 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1414 * configure.srv: Add new files.
1415 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1416 aarch64_linux_read_description.
1417 * linux-aarch64-low.c (aarch64_linux_read_description):
1418 Merge with aarch64_arch_setup.
1419 (aarch64_arch_setup): Call aarch64_linux_read_description.
1420 * linux-aarch64-tdesc.c: New file.
1421 * linux-aarch64-tdesc.h: New file.
1423 2017-11-24 Yao Qi <yao.qi@linaro.org>
1425 * configure.srv: Set $srv_regobj for tic6x-linux.
1426 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1427 (tic6x_read_description): Move some code to tic6x_arch_setup.
1428 (tic6x_tdesc_test): New function.
1429 (initialize_low_arch): Call selftests::register_test.
1431 2017-11-22 Yao Qi <yao.qi@linaro.org>
1433 * remote-utils.c (prepare_resume_reply): Use memcpy.
1435 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1437 * linux-low.c (kill_one_lwp_callback): Return void, take
1438 argument directly, don't filter on pid.
1439 (linux_kill): Use for_each_thread.
1441 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1443 * linux-low.c (need_step_over_p): Return bool, remove dummy
1445 (linux_resume, proceed_all_lwps): Use find_thread.
1447 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1449 * linux-low.c (resume_status_pending_p): Return bool, remove
1451 (linux_resume): Use find_thread.
1453 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1455 * linux-low.c (struct thread_resume_array): Remove.
1456 (linux_set_resume_request): Return void, take arguments
1458 (linux_resume): Use for_each_thread.
1460 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1462 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1463 return bool, remove data argument.
1464 (linux_stabilize_threads): Use find_thread.
1466 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1468 * linux-low.c (unsuspend_one_lwp): Remove.
1469 (unsuspend_all_lwps): Use for_each_thread, inline code from
1472 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1474 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1475 * linux-low.c (struct iterate_over_lwps_args): Remove.
1476 (iterate_over_lwps_filter): Remove.
1477 (iterate_over_lwps): Use find_thread.
1479 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1481 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1482 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1483 code from reset_lwp_ptrace_options_callback.
1485 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1487 * linux-arm-low.c (struct update_registers_data): Remove.
1488 (update_registers_callback): Return void, take arguments
1489 directly, don't check thread's pid.
1490 (arm_insert_point, arm_remove_point): Use for_each_thread.
1492 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1494 * win32-low.c (continue_one_thread): Return void, take argument
1496 (child_continue): Use for_each_thread.
1498 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1500 * win32-i386-low.c (update_debug_registers_callback): Rename
1502 (update_debug_registers): ... this, return void, remove pid_p arg.
1503 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1505 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1507 * inferiors.h (struct process_info): Add constructor, initialize
1509 <syscalls_to_catch>: Change type to std::vector<int>.
1510 * inferiors.c (add_process): Allocate process_info with new.
1511 (remove_process): Free process_info with delete.
1512 * linux-low.c (handle_extended_wait): Adjust.
1513 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1514 * server.c (handle_general_set): Adjust.
1516 2017-11-16 Pedro Alves <palves@redhat.com>
1518 * remote-utils.c (remote_close): Block SIGIO signals instead of
1519 uninstalling the SIGIO handler.
1521 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1523 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1525 2017-11-16 Yao Qi <yao.qi@linaro.org>
1527 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1528 (tic6x_store_gregset): Likewise.
1529 (tic6x_usrregs_info): Move it up.
1531 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1533 * Makefile.in: Update arch rules.
1534 * configure.srv: Explicitly mark arch/ files.
1536 2017-11-13 Andreas Schwab <schwab@suse.de>
1538 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1540 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1542 2017-11-06 Pedro Alves <palves@redhat.com>
1544 * config.in, configure: Regenerate.
1546 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1548 * target.c (struct thread_search): Remove.
1549 (thread_search_callback): Remove.
1550 (prepare_to_access_memory): Use for_each_thread instead of
1551 find_inferior. Inline code from thread_search_callback.
1553 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1555 * server.c (struct visit_actioned_threads_data): Remove.
1556 (visit_actioned_threads): Change prototype to take arguments
1558 (resume): Use find_thread instead of find_inferior.
1560 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1562 * server.c (queue_stop_reply_callback): Change prototype, return
1564 (find_status_pending_thread_callback): Remove.
1565 (handle_status): Replace find_inferior with find_thread and
1568 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1570 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1572 (aarch64_store_gregset): Likewise.
1573 (aarch64_fill_fpregset): Likewise.
1574 (aarch64_store_fpregset): Likewise.
1576 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1578 * gdbthread.h (find_thread, for_each_thread): New functions.
1579 * inferiors.c (thread_of_pid): Remove.
1580 (find_any_thread_of_pid): Use find_thread.
1581 * linux-low.c (num_lwps): Use for_each_thread.
1583 2017-10-17 Yao Qi <yao.qi@linaro.org>
1585 * Makefile.in: Remove one rule.
1586 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1588 2017-10-17 Yao Qi <yao.qi@linaro.org>
1590 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1591 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1593 2017-10-17 Yao Qi <yao.qi@linaro.org>
1595 * configure.srv: Rename arm.o with arch/arm.o.
1597 2017-10-17 Yao Qi <yao.qi@linaro.org>
1599 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1600 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1601 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1602 (arch-i386.o, arch-amd64.o): Remove rules.
1603 (arch/%.o): New rule.
1604 Update POSTCOMPILE and COMPILE.pre.
1605 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1606 * configure: Re-generated.
1607 * configure.srv: Replace arch-i386.o with arch/i386.o.
1608 Replace arch-amd64.o with arch/amd64.o.
1610 2017-10-16 Yao Qi <yao.qi@linaro.org>
1612 * configure: Regenerated.
1614 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1616 * inferiors.h: (struct inferior_list): Remove.
1617 (struct inferior_list_entry); Remove.
1618 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1619 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1620 get_first_inferior): Remove.
1621 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1622 find_inferior_id, find_inferior_in_random): Change signature.
1623 * inferiors.c (all_threads): Change type to
1624 std::list<thread_info *>.
1625 (get_thread): Remove macro.
1626 (find_inferior, find_inferior_id): Change signature, implement
1628 (find_inferior_in_random): Change signature, implement using
1629 find_thread_in_random.
1630 (for_each_inferior, for_each_inferior_with_data): Change
1631 signature, implement using for_each_thread.
1632 (add_inferior_to_list, remove_inferior): Remove.
1633 (add_thread, get_first_thread, thread_of_pid,
1634 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1635 (get_first_inferior, one_inferior_p, clear_inferior_list):
1637 (clear_inferiors, get_thread_process): Update.
1638 * gdbthread.h: Include <list>.
1639 (struct thread_info) <entry>: Remove field.
1641 (all_threads): Change type to std::list<thread_info *>.
1642 (get_first_inferior): Add doc.
1643 (find_thread, for_each_thread, find_thread_in_random): New
1645 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1646 * linux-arm-low.c (update_registers_callback): Update.
1647 * linux-low.c (second_thread_of_pid_p): Update.
1648 (kill_one_lwp_callback, linux_detach_lwp_callback,
1649 delete_lwp_callback, status_pending_p_callback, same_lwp,
1650 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1651 iterate_over_lwps, not_stopped_callback,
1652 resume_stopped_resumed_lwps, count_events_callback,
1653 select_singlestep_lwp_callback, select_event_lwp_callback,
1654 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1655 suspend_and_send_sigstop_callback, wait_for_sigstop,
1656 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1657 lwp_running, linux_set_resume_request, resume_status_pending_p,
1658 need_step_over_p, start_step_over, linux_resume_one_thread,
1659 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1660 reset_lwp_ptrace_options_callback): Update.
1661 * linux-mips-low.c (update_watch_registers_callback): Update.
1662 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1664 (free_register_cache_thread_one): Remove.
1665 (regcache_release): Update.
1666 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1667 handle_qxfer_threads_worker): Update.
1668 (handle_query): Update, use list iterator.
1669 (visit_actioned_threads, handle_pending_status,
1670 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1671 clear_pending_status_callback, set_pending_status_callback,
1672 find_status_pending_thread_callback, handle_status,
1673 process_serial_event): Update.
1674 * target.c (thread_search_callback): Update.
1675 * thread-db.c (thread_db_get_tls_address): Update.
1676 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1678 * win32-i386-low.c (update_debug_registers_callback): Update.
1679 * win32-low.c (delete_thread_info, child_delete_thread,
1680 continue_one_thread, suspend_one_thread,
1681 get_child_debug_event): Adjust.
1683 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1685 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1686 * inferiors.h: Include <list>.
1687 (struct process_info) <entry>: Remove field.
1689 (pid_of): Change macro to function.
1690 (ptid_of, lwpid_of): Remove macro.
1691 (all_processes): Change type to std::list<process_info *>.
1692 (ALL_PROCESSES): Remove macro.
1693 (for_each_process, find_process): New function.
1694 * inferiors.c (all_processes): Change type to
1695 std::list<process_info *>.
1696 (find_thread_process): Adjust.
1697 (add_process): Likewise.
1698 (remove_process): Likewise.
1699 (find_process_pid): Likewise.
1700 (get_first_process): Likewise.
1701 (started_inferior_callback): Remove.
1702 (have_started_inferiors_p): Adjust.
1703 (attached_inferior_callback): Remove.
1704 (have_attached_inferiors_p): Adjust.
1705 * linux-low.c (check_zombie_leaders): Likewise.
1706 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1707 (x86_linux_update_xmltarget): Adjust.
1708 * server.c (handle_query): Likewise.
1709 (gdb_reattached_process): Remove.
1710 (handle_status): Adjust.
1711 (kill_inferior_callback): Likewise.
1712 (detach_or_kill_inferior): Remove.
1713 (print_started_pid): Likewise.
1714 (print_attached_pid): Likewise.
1715 (detach_or_kill_for_exit): Update.
1716 (process_serial_event): Likewise.
1717 * linux-arm-low.c (arm_new_fork): Likewise.
1719 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1721 * dll.h: Include <list>.
1722 (struct dll_info): Add constructor.
1723 <entry>: Remove field.
1724 (all_dlls): Change type to std::list<dll_info>.
1725 * dll.c: Include <algorithm>.
1726 (get_dll): Remove macro.
1727 (all_dlls): Change type to std::list<dll_info *>.
1728 (free_one_dll): Remove.
1729 (match_dll): Likewise.
1730 (loaded_dll): Adjust.
1731 (unloaded_dll): Adjust to all_dlls type change, use
1732 std::find_if. Inline code from match_dll.
1733 (clear_dlls): Adjust to all_dlls type change.
1734 * server.c (emit_dll_description): Remove.
1735 (handle_qxfer_libraries): Adjust to all_dlls type change,
1736 integrate emit_dll_description's functionality.
1738 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1740 * linux-low.h (struct linux_target_ops) <delete_process>: New
1742 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1743 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1744 (struct linux_target_ops): Add delete_process callback.
1745 * linux-arm-low.c (arm_delete_process): New.
1746 (struct linux_target_ops): Add delete_process callback.
1747 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1748 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1749 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1750 * linux-mips-low.c (mips_linux_delete_process): New.
1751 (struct linux_target_ops): Add delete_process callback.
1752 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1753 * linux-s390-low.c (struct linux_target_ops): Likewise.
1754 * linux-sh-low.c (struct linux_target_ops): Likewise.
1755 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1756 * linux-tile-low.c (struct linux_target_ops): Likewise.
1757 * linux-x86-low.c (x86_linux_delete_process): New.
1758 (struct linux_target_ops): Add delete_process callback.
1759 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1761 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1763 * linux-aarch64-low.c (the_low_target): Add thread delete
1765 * linux-arm-low.c (arm_delete_thread): New function.
1766 (the_low_target): Add thread delete callback.
1767 * linux-bfin-low.c (the_low_target): Likewise.
1768 * linux-crisv32-low.c (the_low_target): Likewise.
1769 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1771 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1773 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1774 * linux-mips-low.c (mips_linux_delete_thread): New function.
1775 (the_low_target): Add thread delete callback.
1776 * linux-ppc-low.c (the_low_target): Likewise.
1777 * linux-s390-low.c (the_low_target): Likewise.
1778 * linux-sh-low.c (the_low_target): Likewise.
1779 * linux-tic6x-low.c (the_low_target): Likewise.
1780 * linux-tile-low.c (the_low_target): Likewise.
1781 * linux-x86-low.c (the_low_target): Likewise.
1782 * linux-xtensa-low.c (the_low_target): Likewise.
1784 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1786 * win32-low.c: Include "common-inferior.h".
1788 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1790 * inferiors.c (set_inferior_cwd): New function.
1791 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1792 (handle_query): Inform that QSetWorkingDir is supported.
1793 * win32-low.c (create_process): Pass the inferior's cwd to
1796 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1798 * inferiors.c (current_inferior_cwd): New global variable.
1799 (get_inferior_cwd): New function.
1800 * inferiors.h (struct process_info) <cwd>: New field.
1802 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1804 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1805 (OBS): Add gdb_tilde_expand.o.
1807 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1809 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1810 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1812 2017-09-29 Pedro Alves <palves@redhat.com>
1814 * ax.c (gdb_parse_agent_expr): Constify.
1815 * ax.h (gdb_parse_agent_expr): Constify.
1816 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1818 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1819 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1820 * remote-utils.h (read_ptid): Constify.
1821 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1822 (process_point_options, process_serial_event): Constify.
1823 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1824 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1825 (cmd_qtbuffer): Constify.
1827 2017-09-29 Pedro Alves <palves@redhat.com>
1829 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1832 2017-09-29 Pedro Alves <palves@redhat.com>
1834 * linux-low.c (handle_extended_wait): Pass parent thread instead
1835 of process to thread_db_notice_clone.
1836 * linux-low.h (thread_db_notice_clone): Replace parent process
1837 parameter with parent thread parameter.
1838 * thread-db.c (find_one_thread): Add comment.
1839 (thread_db_notice_clone): Replace parent process parameter with
1840 parent thread parameter. Temporarily switch to the parent thread.
1842 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1844 * gdbthread.h: Include "common-gdbthread.h".
1845 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1846 "if" when validating the ptid.
1847 * remote-utils.c: Include "gdbthread.h".
1848 (prepare_resume_reply): Use "switch_to_thread".
1849 * target.c (done_accessing_memory): Likewise.
1851 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1853 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1854 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1855 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1856 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1857 s390x-gs-linux64-ipa.o to ipa_obj.
1858 * linux-s390-low.c (HWCAP_S390_GS): New define.
1859 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1861 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1862 (s390_arch_setup): Check for guarded-storage support and choose
1864 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1865 init_registers_s390x_gs_linux64.
1866 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1868 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1869 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1871 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1873 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1875 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1877 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1878 (thread_db_thread_handle): Declare.
1879 * linux-low.c (linux_target_ops): Initialize thread_handle.
1880 * server.c (handle_qxfer_threads_worker): Add support for
1882 * target.h (struct target_ops): Add new function pointer,
1884 (target_thread_handle): Define.
1885 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1887 (thread_db_thread_handle): New function.
1889 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1891 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1892 * linux-low.h (thread_db_notice_clone): Declare.
1893 * thread-db.c (thread_db_notice_clone): New function.
1895 2017-09-21 Pedro Alves <palves@redhat.com>
1897 * server.c (gdb_read_memory, handle_status, process_serial_event)
1898 (handle_serial_event, handle_target_event): Adjust to
1899 set_desired_thread prototype change.
1900 * target.c (set_desired_thread): Remove 'use_general' parameter
1902 * target.h (set_desired_thread): Remove 'use_general' parameter.
1904 2017-09-20 Tom Tromey <tom@tromey.com>
1906 * target.c (target_terminal::terminal_state): Define.
1907 (target_terminal::init): Rename from target_terminal_init.
1908 (target_terminal::inferior): Rename from
1909 target_terminal_inferior.
1910 (target_terminal::ours): Rename from target_terminal_ours.
1911 (target_terminal::ours_for_output, target_terminal::info): New.
1913 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1915 * server.c (accumulate_file_name_length): Remove.
1916 (emit_dll_description): Adjust to std::string change.
1917 (handle_qxfer_libraries): Use std::string to hold document.
1919 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1921 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1922 return type of xml_escape_text.
1923 * server.c (emit_dll_description): Likewise.
1925 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1927 * server.c (captured_main): Accept argument for --selftest.
1928 Update run_tests call.
1929 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1930 when registering selftests.
1932 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1934 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1935 instead of "VEC" for "target_desc.reg_defs".
1936 (regcache_cpy): Likewise.
1937 (registers_to_string): Likewise.
1938 (registers_from_string): Likewise.
1939 (find_regno): Likewise.
1940 (supply_regblock): Likewise.
1941 (regcache_raw_read_unsigned): Likewise.
1942 * tdesc.c (init_target_desc): Likewise.
1943 (tdesc_create_reg): Likewise.
1944 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1945 (struct target_desc) <reg_defs>: Convert to "std::vector".
1946 (target_desc): Do not initialize "reg_defs".
1947 (~target_desc): Update code to use "std::vector" instead of "VEC"
1948 for "target_desc.reg_defs".
1949 (operator==): Likewise.
1951 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1953 * inferiors.h (thread_to_gdb_id): Remove.
1954 * inferiors.c (thread_to_gdb_id): Remove.
1955 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1956 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1957 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1959 * nto-low.c (nto_fetch_registers, nto_store_registers,
1960 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1962 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1964 * inferiors.h (gdb_id_to_thread_id): Remove.
1965 * inferiors.c (gdb_id_to_thread_id): Remove.
1966 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1967 removal. Move pid declaration closer to where it's used.
1969 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1971 * server.c (handle_detach): New function.
1972 (process_serial_event): Move code out, call handle_detach.
1974 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1976 * server.c (require_running): Rename to ...
1977 (require_running_or_return): ... this ...
1978 (require_running_or_break): ... and this.
1979 (handle_query, process_serial_event): Adjust.
1981 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1983 * linux-low.c (linux_set_resume_request): Remove unused
1986 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1988 * server.c (first_thread_of): Remove.
1989 (process_serial_event): Replace usage of first_thread_of with
1990 find_any_thread_of_pid.
1991 * tracepoint.c (same_process_p): Remove.
1992 (gdb_agent_about_to_close): Replace usage of same_process_p with
1993 find_any_thread_of_pid.
1994 * linux-x86-low.c (same_process_callback): Remove.
1995 (x86_arch_setup_process_callback): Replace usage of
1996 same_process_callback with find_any_thread_of_pid.
1997 * thread-db.c (any_thread_of): Remove.
1998 (switch_to_process): Replace usage of any_thread_of with
1999 find_any_thread_of_pid.
2000 * inferiors.c (thread_pid_matches_callback): Remove.
2001 (find_thread_process): Adjust to use find_any_thread_of_pid.
2003 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2005 * regcache.c (get_thread_regcache): Guard calls to "memset"
2008 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2010 * linux-low.c (handle_extended_wait): Use
2011 "allocate_target_description" instead of "XNEW".
2012 * linux-x86-low.c (initialize_low_arch): Likewise.
2014 2017-09-05 Yao Qi <yao.qi@linaro.org>
2016 * configure.srv (srv_i386_regobj): Remove.
2017 (srv_amd64_regobj): Remove.
2018 (srv_regobj): Set it to "" for x86 non-linux targets.
2019 * linux-x86-tdesc.c (i386_linux_read_description):
2020 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2021 (init_registers_i386): Remove the declaration.
2022 (tdesc_i386): Remove the declaration.
2023 (lynx_i386_arch_setup): Call i386_create_target_description.
2024 * nto-x86-low.c: Likewise.
2025 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2026 [!__x86_64__]: include arch/i386.h.
2027 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2029 2017-09-05 Yao Qi <yao.qi@linaro.org>
2031 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2032 i386/amd64-XXX-linux from it.
2034 2017-09-05 Yao Qi <yao.qi@linaro.org>
2036 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2038 (ipa_amd64_linux_regobj): Remove.
2039 (ipa_x32_linux_regobj): Remove.
2041 2017-09-05 Yao Qi <yao.qi@linaro.org>
2043 * Makefile.in (arch-amd64.o): New rule.
2044 * configure.srv: Append arch-amd64.o.
2045 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2046 (get_ipa_tdesc): Call amd64_linux_read_description.
2047 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2048 and init_registers_amd64_XXX.
2049 * linux-x86-low.c (x86_linux_read_description): Call
2050 amd64_linux_read_description.
2051 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2052 (initialize_low_arch): Don't call init_registers_x32_XXX and
2053 init_registers_amd64_XXX.
2054 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2055 and tdesc_amd64_XXX.
2056 [__x86_64__] (amd64_tdesc_test): New function.
2057 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2058 and init_registers_amd64_XXX.
2059 * linux-x86-tdesc.c: Include arch/amd64.h.
2060 (xcr0_to_tdesc_idx): New function.
2061 (i386_linux_read_description): New function.
2062 (amd64_get_ipa_tdesc_idx): New function.
2063 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2064 (amd64_get_ipa_tdesc): Declare.
2066 2017-09-05 Yao Qi <yao.qi@linaro.org>
2068 * configure.srv (srv_i386_linux_xmlfiles): Remove
2069 i386/i386-XXX-linux.xml from it.
2071 2017-09-05 Yao Qi <yao.qi@linaro.org>
2073 * configure.srv: Set srv_i386_linux_regobj empty if $development
2075 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2076 initialize_low_tdesc.
2077 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2078 with #if initialize_low_tdesc.
2079 * linux-x86-tdesc-selftest.c: New file.
2080 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2082 2017-09-05 Yao Qi <yao.qi@linaro.org>
2084 * Makefile.in (arch-i386.o): New rule.
2085 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2086 (x86_64-*-linux*): Likewise.
2087 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2088 include arch/i386.h.
2089 (i386_linux_read_description): Remove code and call
2090 i386_create_target_description.
2091 * tdesc.c (allocate_target_description): New function.
2092 * tdesc.h (set_tdesc_architecture): Remove declaration.
2093 (set_tdesc_osabi): Likewise.
2095 2017-09-05 Yao Qi <yao.qi@linaro.org>
2097 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2098 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2099 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2101 * server.c (get_features_xml): Call tdesc_get_features_xml.
2102 * tdesc.c (set_tdesc_architecture): New function.
2103 (set_tdesc_osabi): New function.
2104 (tdesc_get_features_xml): New function.
2105 (tdesc_create_feature): Add an argument.
2106 * tdesc.h (struct target_desc) <features>: New field.
2107 <arch, osabi>: New field.
2108 (~target_desc): xfree features, arch, and osabi.
2109 (target_desc::oerator==): Don't compare .xmltarget.
2110 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2111 (set_tdesc_osabi): Likewise.
2112 (tdesc_get_features_xml): Likewise.
2114 2017-09-05 Yao Qi <yao.qi@linaro.org>
2116 * linux-x86-tdesc.c: Include selftest.h.
2117 (i386_tdesc_test): New function.
2118 (initialize_low_tdesc): Call selftests::register_test.
2119 * tdesc.h: Include regdef.h.
2120 (target_desc): Override operator == and !=.
2122 2017-09-05 Yao Qi <yao.qi@linaro.org>
2124 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2125 (ipa_obj): Likewise.
2126 * linux-i386-ipa.c: Include common/x86-xstate.h
2127 (get_ipa_tdesc): Call i386_linux_read_description.
2128 (initialize_low_tracepoint): Don't call init_registers_XXX
2129 functions, call initialize_low_tdesc instead.
2130 * linux-x86-low.c (x86_linux_read_description): Call
2131 i386_linux_read_description.
2132 (initialize_low_arch): Don't call init_registers_i386_XXX
2133 functions, call initialize_low_tdesc.
2134 * linux-x86-tdesc.c: New file.
2135 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2136 (i386_get_ipa_tdesc_idx): Declare.
2137 (i386_get_ipa_tdesc): Declare.
2138 (initialize_low_tdesc): Declare.
2140 2017-09-05 Yao Qi <yao.qi@linaro.org>
2142 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2145 2017-09-05 Yao Qi <yao.qi@linaro.org>
2147 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2148 * regcache.c (get_thread_regcache): Use VEC_length.
2149 (init_register_cache): Likewise.
2150 (regcache_cpy): Likewise.
2151 (registers_to_string): Iterate reg_defs via VEC_iterate.
2152 (find_regno): Likewise.
2153 (find_register_by_number): Use VEC_index.
2154 (register_size): Call find_register_by_number.
2155 (register_data): Call find_register_by_number.
2156 (supply_regblock): Use VEC_length.
2157 (regcache_raw_read_unsigned): Likewise.
2158 * tdesc.c (init_target_desc): Iterate reg_defs via
2160 (default_description): Update initializer.
2161 (copy_target_description): Don't update field num_registers.
2162 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2163 <num_registers>: Remove.
2165 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2167 * Makefile.in (.SECONDARY): Define target.
2169 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2171 * linux-low.c (linux_wait_1): Adjust.
2172 * server.c (queue_stop_reply_callback): Adjust.
2174 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2176 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2177 QEnvironmentUnset and QEnvironmentReset packets.
2178 (handle_query): Inform remote that QEnvironmentHexEncoded,
2179 QEnvironmentUnset and QEnvironmentReset are supported.
2181 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2183 * inferiors.h (inferior_target_data): Rename to ...
2184 (thread_target_data): ... this.
2185 (inferior_regcache_data): Rename to ...
2186 (thread_regcache_data): ... this.
2187 (set_inferior_regcache_data): Rename to ...
2188 (set_thread_regcache_data): ... this.
2189 * inferiors.c (inferior_target_data): Rename to ...
2190 (thread_target_data): ... this.
2191 (inferior_regcache_data): Rename to ...
2192 (thread_regcache_data): ... this.
2193 (set_inferior_regcache_data): Rename to ...
2194 (set_thread_regcache_data): ... this.
2195 (free_one_thread): Update.
2196 * linux-low.h (get_thread_lwp): Update.
2197 * regcache.c (get_thread_regcache): Update.
2198 (regcache_invalidate_thread): Update.
2199 (free_register_cache_thread): Update.
2200 * win32-i386-low.c (update_debug_registers_callback): Update.
2201 (win32_get_current_dr): Update.
2202 * win32-low.c (thread_rec): Update.
2203 (delete_thread_info): Update.
2204 (continue_one_thread): Update.
2205 (suspend_one_thread): Update.
2207 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2209 * inferiors.c (set_inferior_target_data): Remove.
2210 * inferiors.h (set_inferior_target_data): Remove.
2212 2017-08-18 Yao Qi <yao.qi@linaro.org>
2214 * Makefile.in (OBS): Add selftest.o.
2215 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2216 * configure, config.in: Re-generated.
2217 * server.c: Include common/sefltest.h.
2218 (captured_main): Handle option --selftest.
2220 2017-08-09 Yao Qi <yao.qi@linaro.org>
2222 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2223 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2224 i386-avx-mpx.o and i386-mmx.o.
2225 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2226 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2227 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2228 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2229 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2230 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2231 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2232 i386/amd64-avx-mpx.xml.
2234 2017-08-09 Yao Qi <yao.qi@linaro.org>
2236 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2237 and x32-avx-avx512.o.
2238 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2239 i386/x32-avx-avx512.xml.
2241 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2243 * tracepoint.h (enum class fast_tpoint_collect_result): New
2245 (fast_tracepoint_collecting): Change return type to
2246 fast_tpoint_collect_result.
2247 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2248 * linux-low.h: Include tracepoint.h.
2249 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2250 fast_tpoint_collect_result.
2251 * linux-low.c (handle_tracepoints): Adjust.
2252 (linux_fast_tracepoint_collecting): Change return type to
2253 fast_tpoint_collect_result.
2254 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2255 linux_wait_1, stuck_in_jump_pad_callback,
2256 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2257 proceed_one_lwp): Adjust to type change.
2259 2017-07-10 Yao Qi <yao.qi@linaro.org>
2261 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2263 2017-06-29 Yao Qi <yao.qi@linaro.org>
2265 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2267 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2269 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2271 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2273 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2275 * linux-low.c (linux_create_inferior): Adjust code to access the
2276 environment information via 'gdb_environ' class.
2277 * lynx-low.c (lynx_create_inferior): Likewise.
2278 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2279 (get_environ): Return a pointer to 'our_environ'.
2280 (captured_main): Initialize 'our_environ'.
2281 * server.h (get_environ): Adjust prototype.
2282 * spu-low.c (spu_create_inferior): Adjust code to access the
2283 environment information via 'gdb_environ' class.
2285 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2287 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2288 usage of "register" keyword.
2290 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2292 * configure: Re-generate.
2294 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2296 * configure: Re-generate.
2298 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2300 * Makefile.in (COMPILE.pre): Add "-x c++".
2302 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2304 * fork-child.c: Conditionally include <signal.h>.
2306 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2308 * server.c (handle_general_set): Handle new packet
2309 "QStartupWithShell".
2310 (handle_query): Add "QStartupWithShell" to the list of supported
2312 (gdbserver_usage): Add help text explaining the
2313 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2315 (captured_main): Recognize and act upon the presence of the new
2318 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2319 Pedro Alves <palves@redhat.com>
2321 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2322 * configure: Regenerate.
2323 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2325 (i[34567]86-*-lynxos*): Likewise.
2326 (spu*-*-*): Likewise.
2327 * fork-child.c: New file.
2328 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2330 (linux_ptrace_fun): New function.
2331 (linux_create_inferior): Adjust function prototype to reflect
2332 change on "target.h". Adjust function code to use
2334 (linux_request_interrupt): Delete "signal_pid".
2335 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2336 (lynx_ptrace_fun): New function.
2337 (lynx_create_inferior): Adjust function prototype to reflect
2338 change on "target.h". Adjust function code to use
2340 * nto-low.c (nto_create_inferior): Adjust function prototype and
2341 code to reflect change on "target.h". Update comments.
2342 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2343 "common-terminal.h" and "environ.h".
2344 (terminal_fd): Moved to fork-child.c.
2345 (old_foreground_pgrp): Likewise.
2346 (restore_old_foreground_pgrp): Likewise.
2347 (last_status): Make it global.
2348 (last_ptid): Likewise.
2349 (our_environ): New variable.
2350 (startup_with_shell): Likewise.
2351 (program_name): Likewise.
2352 (program_argv): Rename to...
2353 (program_args): ...this.
2354 (wrapper_argv): New variable.
2355 (start_inferior): Delete function.
2356 (get_exec_wrapper): New function.
2357 (get_exec_file): Likewise.
2358 (get_environ): Likewise.
2359 (prefork_hook): Likewise.
2360 (post_fork_inferior): Likewise.
2361 (postfork_hook): Likewise.
2362 (postfork_child_hook): Likewise.
2363 (handle_v_run): Update code to deal with arguments coming from the
2364 remote host. Update calls from "start_inferior" to
2366 (captured_main): Likewise. Initialize environment variable. Call
2368 * server.h (post_fork_inferior): New prototype.
2369 (get_environ): Likewise.
2370 (last_status): Declare.
2371 (last_ptid): Likewise.
2372 (signal_pid): Likewise.
2373 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2374 (spu_ptrace_fun): New function.
2375 (spu_create_inferior): Adjust function prototype to reflect change
2376 on "target.h". Adjust function code to use "fork_inferior".
2377 * target.c (target_terminal_init): New function.
2378 (target_terminal_inferior): Likewise.
2379 (target_terminal_ours): Likewise.
2380 * target.h: Include <vector>.
2381 (struct target_ops) <create_inferior>: Update prototype.
2382 (create_inferior): Update macro.
2383 * utils.c (gdb_flush_out_err): New function.
2384 * win32-low.c (win32_create_inferior): Adjust function prototype
2385 and code to reflect change on "target.h".
2387 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2389 * inferiors.c (switch_to_thread): New function.
2391 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2393 * Makefile.in (SFILE): Add "common/job-control.c".
2394 (OBS): Add "job-control.o".
2396 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2398 * Makefile: Remove "@host_makefile_frag@".
2400 2017-05-05 Pedro Alves <palves@redhat.com>
2402 * configure: Regenerate.
2404 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2406 * configure: Regenerate.
2408 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2410 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2411 software_single_step change of return type to
2412 std::vector<CORE_ADDR>.
2413 * linux-low.c (install_software_single_step_breakpoints):
2415 * linux-low.h (install_software_single_step_breakpoints):
2418 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2420 * remote-utils.c: Include "gdb_termios.h" instead of
2422 * terminal.h: Delete file.
2424 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2426 * server.c: Include <vector>.
2427 <program_argv, wrapper_argv>: Convert to std::vector.
2428 (start_inferior): Rewrite function to use C++.
2429 (handle_v_run): Likewise. Update code that calculates the argv
2430 based on the vRun packet; use C++.
2431 (captured_main): Likewise.
2433 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2435 * server.c (handle_v_cont): Initialize thread_resume::thread
2438 2017-04-05 Pedro Alves <palves@redhat.com>
2440 * configure: Regenerate.
2442 2017-04-05 Pedro Alves <palves@redhat.com>
2444 * gdbreplay.c (sync_error): Constify.
2445 * linux-x86-low.c (push_opcode): Constify.
2447 2017-04-05 Pedro Alves <palves@redhat.com>
2449 * win32-low.c (get_child_debug_event)
2450 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2451 Report TARGET_WAITKIND_SPURIOUS instead.
2453 2017-04-05 Pedro Alves <palves@redhat.com>
2455 * remote-utils.c (remote_prepare, remote_open): Constify.
2456 * remote-utils.h (remote_prepare, remote_open): Constify.
2457 * server.c (captured_main): Constify 'port' handling.
2459 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2461 * Makefile.in (clean): Clear .deps.
2463 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2465 * .gitignore: Remove generated files, replace with wildcard.
2466 * (clean): Replace removal of generated files with wildcard.
2467 (version.c): Replace with...
2468 (version-generated.c): ...this.
2469 (xml-builtin.c): Replace with...
2470 (xml-builtin-generated.c): ...this.
2471 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2472 (%.c: *regformats*): Replace with...
2473 (%-generated.c: *regformats*): ...this.
2475 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2477 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2478 (xtensa_fill_gregset): Call collect_register_by_name for
2480 (xtensa_store_gregset): Call supply_register_by_name for
2483 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2485 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2486 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2487 (xtensa_store_gregset): Call supply_register for all registers in
2488 a0_regnum..a0_regnum + C0_NREGS range.
2490 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2492 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2493 (ax-ipa.o: ax.c): Remove.
2494 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2495 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2496 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2497 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2498 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2500 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2502 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2503 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2504 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2505 (errors-ipa.o: ../common/errors.c): Remove.
2506 (format-ipa.o: ../common/format.c): Remove.
2507 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2509 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2511 * Makefile.in (%-ipa.o: %.c): New rule.
2512 (tracepoint-ipa.o: tracepoint.c): Remove.
2513 (utils-ipa.o: utils.c): Remove.
2514 (remote-utils-ipa.o: remote-utils.c): Remove.
2515 (regcache-ipa.o: regcache.c): Remove.
2516 (i386-linux-ipa.o: i386-linux.c): Remove.
2517 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2518 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2519 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2520 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2521 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2522 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2523 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2524 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2525 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2526 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2527 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2528 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2529 (aarch64-ipa.o: aarch64.c): Remove.
2530 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2531 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2532 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2533 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2534 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2535 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2536 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2537 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2538 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2539 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2540 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2541 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2542 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2543 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2544 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2545 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2546 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2547 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2548 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2549 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2550 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2551 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2552 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2553 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2554 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2555 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2556 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2557 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2558 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2559 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2560 (tdesc-ipa.o: tdesc.c): Remove.
2561 (x32-linux-ipa.o: x32-linux.c): Remove.
2562 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2563 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2565 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2567 * Makefile.in (%.o: ../arch/%.c): New rule.
2568 (arm.o: ../arch/arm.c): Remove.
2569 (arm-linux.o: ../arch/arm-linux.c): Remove.
2570 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2571 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2573 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2575 * Makefile.in (%.o: ../nat/%.c): New rule.
2576 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2577 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2578 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2579 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2580 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2581 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2582 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2583 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2584 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2585 (linux-personality.o: ../nat/linux-personality.c): Remove.
2586 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2587 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2588 (x86-linux.o: ../nat/x86-linux.c): Remove.
2589 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2590 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2592 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2594 * Makefile.in (%.o: ../common/%.c): New rule.
2595 (signals.o: ../common/signals.c): Remove.
2596 (print-utils.o: ../common/print-utils.c): Remove.
2597 (rsp-low.o: ../common/rsp-low.c): Remove.
2598 (common-utils.o: ../common/common-utils.c): Remove.
2599 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2600 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2601 (vec.o: ../common/vec.c): Remove.
2602 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2603 (xml-utils.o: ../common/xml-utils.c): Remove.
2604 (ptid.o: ../common/ptid.c): Remove.
2605 (buffer.o: ../common/buffer.c): Remove.
2606 (format.o: ../common/format.c): Remove.
2607 (filestuff.o: ../common/filestuff.c): Remove.
2608 (agent.o: ../common/agent.c): Remove.
2609 (errors.o: ../common/errors.c): Remove.
2610 (environ.o: ../common/environ.c): Remove.
2611 (common-debug.o: ../common/common-debug.c): Remove.
2612 (cleanups.o: ../common/cleanups.c): Remove.
2613 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2614 (fileio.o: ../common/fileio.c): Remove.
2615 (common-regcache.o: ../common/common-regcache.c): Remove.
2616 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2617 (new-op.o: ../common/new-op.c): Remove.
2618 (btrace-common.o: ../common/btrace-common.c): Remove.
2620 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2622 * Makefile.in (%.o: ../target/%.c): New rule.
2623 (waitstatus.o: ../target/waitstatus.c): Remove.
2625 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2628 (%.c: ../regformats/%.dat,
2629 (%.c: ../regformats/arm/%.dat,
2630 (%.c: ../regformats/i386/%.dat,
2631 (%.c: ../regformats/rs6000/%.dat): New rules.
2632 (aarch64.c): Remove.
2633 (reg-arm.c): Remove.
2634 (arm-with-iwmmxt.c): Remove.
2635 (arm-with-vfpv2.c): Remove.
2636 (arm-with-vfpv3.c): Remove.
2637 (arm-with-neon.c): Remove.
2638 (reg-bfin.c): Remove.
2639 (reg-cris.c): Remove.
2640 (reg-crisv32.c): Remove.
2642 (i386-linux.c): Remove.
2643 (i386-avx.c): Remove.
2644 (i386-avx-linux.c): Remove.
2645 (i386-avx-avx512.c): Remove.
2646 (i386-avx-avx512-linux.c): Remove.
2647 (i386-mpx.c): Remove.
2648 (i386-mpx-linux.c): Remove.
2649 (i386-avx-mpx-avx512-pku.c): Remove.
2650 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2651 (i386-avx-mpx.c): Remove.
2652 (i386-avx-mpx-linux.c): Remove.
2653 (i386-mmx.c): Remove.
2654 (i386-mmx-linux.c): Remove.
2655 (reg-ia64.c): Remove.
2656 (reg-m32r.c): Remove.
2657 (reg-m68k.c): Remove.
2659 (mips-linux.c): Remove.
2660 (mips-dsp-linux.c): Remove.
2661 (mips64-linux.c): Remove.
2662 (mips64-dsp-linux.c): Remove.
2663 (nios2-linux.c): Remove.
2664 (powerpc-32.c): Remove.
2665 (powerpc-32l.c): Remove.
2666 (powerpc-altivec32l.c): Remove.
2667 (powerpc-cell32l.c): Remove.
2668 (powerpc-vsx32l.c): Remove.
2669 (powerpc-isa205-32l.c): Remove.
2670 (powerpc-isa205-altivec32l.c): Remove.
2671 (powerpc-isa205-vsx32l.c): Remove.
2672 (powerpc-e500l.c): Remove.
2673 (powerpc-64l.c): Remove.
2674 (powerpc-altivec64l.c): Remove.
2675 (powerpc-cell64l.c): Remove.
2676 (powerpc-vsx64l.c): Remove.
2677 (powerpc-isa205-64l.c): Remove.
2678 (powerpc-isa205-altivec64l.c): Remove.
2679 (powerpc-isa205-vsx64l.c): Remove.
2680 (s390-linux32.c): Remove.
2681 (s390-linux32v1.c): Remove.
2682 (s390-linux32v2.c): Remove.
2683 (s390-linux64.c): Remove.
2684 (s390-linux64v1.c): Remove.
2685 (s390-linux64v2.c): Remove.
2686 (s390-te-linux64.c): Remove.
2687 (s390-vx-linux64.c): Remove.
2688 (s390-tevx-linux64.c): Remove.
2689 (s390x-linux64.c): Remove.
2690 (s390x-linux64v1.c): Remove.
2691 (s390x-linux64v2.c): Remove.
2692 (s390x-te-linux64.c): Remove.
2693 (s390x-vx-linux64.c): Remove.
2694 (s390x-tevx-linux64.c): Remove.
2695 (tic6x-c64xp-linux.c): Remove.
2696 (tic6x-c64x-linux.c): Remove.
2697 (tic6x-c62x-linux.c): Remove.
2699 (reg-sparc64.c): Remove.
2700 (reg-spu.c): Remove.
2702 (amd64-linux.c): Remove.
2703 (amd64-avx.c): Remove.
2704 (amd64-avx-linux.c): Remove.
2705 (amd64-avx-avx512.c): Remove.
2706 (amd64-avx-avx512-linux.c): Remove.
2707 (amd64-mpx.c): Remove.
2708 (amd64-mpx-linux.c): Remove.
2709 (amd64-avx-mpx-avx512-pku.c): Remove.
2710 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2711 (amd64-avx-mpx.c): Remove.
2712 (amd64-avx-mpx-linux.c): Remove.
2714 (x32-linux.c): Remove.
2715 (x32-avx.c): Remove.
2716 (x32-avx-linux.c): Remove.
2717 (x32-avx-avx512.c): Remove.
2718 (x32-avx-avx512-linux.c): Remove.
2719 (reg-xtensa.c): Remove.
2720 (reg-tilegx.c): Remove.
2721 (reg-tilegx32.c): Remove.
2723 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2725 * Makefile.in (SFILES): Add "common/environ.c".
2726 (OBJS): Add "common/environ.h".
2728 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2730 * configure.ac: Check if the fs_base and gs_base members of
2731 `struct user_regs_struct' exist.
2732 * config.in: Regenerated.
2733 * configure: Likewise.
2735 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2737 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2739 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2740 (get_next_pcs_syscall_next_pc): Likewise.
2742 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2744 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2745 * nto-x86-low.c: Likewise.
2747 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2749 * Makefile.in: Include disable-implicit-rules.mk.
2751 2016-11-23 Pedro Alves <palves@redhat.com>
2753 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2754 (debug_vprintf): Use std::chrono::steady_clock instead of
2755 gettimeofday. Use '.' instead of ':'.
2756 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2757 (get_timestamp): Use std::chrono::steady_clock instead of
2760 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2762 * Makefile.in: Fix whitespace formatting.
2764 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2766 * Makefile.in (SFILES, OBS): Flatten list and order
2769 2016-11-23 Pedro Alves <palves@redhat.com>
2771 * event-loop.c (handle_file_event): Use warning.
2772 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2773 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2776 2016-11-23 Pedro Alves <palves@redhat.com>
2778 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2780 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2781 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2782 debug_printf and debug_flush for debug output.
2783 * server.c (handle_general_set): Likewise.
2784 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2787 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2789 * Makefile.in (.c.o): Replace rule with ...
2790 (%.o: %.c): ... this one.
2792 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2794 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2795 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2797 * configure.ac: Remove checks for the make program.
2798 * configure: Re-generate.
2800 2016-10-28 Pedro Alves <palves@redhat.com>
2802 * Makefile.in (CXX_DIALECT): Get from configure.
2803 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2804 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2805 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2806 * config.in: Regenerate.
2807 * configure: Regenerate.
2809 2016-10-27 Yao Qi <yao.qi@linaro.org>
2811 * linux-low.c (linux_supports_range_stepping): Return true if
2812 can_software_single_step return true.
2814 2016-10-27 Yao Qi <yao.qi@linaro.org>
2816 * inferiors.c (find_inferior_in_random): New function.
2817 * inferiors.h (find_inferior_in_random): Declare.
2818 * linux-low.c (linux_wait_for_event_filtered): Call
2819 find_inferior_in_random instead of find_inferior.
2821 2016-10-27 Yao Qi <yao.qi@linaro.org>
2823 * linux-low.c (linux_wait_1): If single-step breakpoints are
2824 inserted, remove them.
2826 2016-10-26 Pedro Alves <palves@redhat.com>
2828 * linux-low.c (handle_extended_wait): Link parent/child fork
2830 (linux_wait_1): Unlink them.
2831 (linux_set_resume_request): Ignore resume requests for
2832 already-resumed and unhandled fork child threads.
2833 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2834 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2836 (handle_v_requests) <vCont>: Don't call require_running.
2837 * server.h (in_queued_stop_replies): New declaration.
2839 2016-10-24 Yao Qi <yao.qi@linaro.org>
2842 * linux-aarch64-low.c (append_insns): Cast the return value to
2845 2016-10-10 Yao Qi <yao.qi@linaro.org>
2847 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2849 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2851 * target.c (target_supports_multi_process): New function, moved
2853 * target.h (target_supports_multi_process): ... here. Remove
2856 2016-10-05 Tom Tromey <tom@tromey.com>
2859 * tracepoint.c (handle_tracepoint_bkpts): Check
2860 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2862 2016-10-05 Yao Qi <yao.qi@linaro.org>
2864 * configure.srv: Update the path of arm-*.xml files.
2866 2016-10-05 Terry Guo <terry.guo@arm.com>
2867 Yao Qi <yao.qi@linaro.org>
2869 * Makefile.in: Adjust the path of rules.
2870 * configure.srv: Update the path of xml files.
2871 * regformats/arm-with-iwmmxt.dat: Regenerated.
2872 * regformats/arm-with-neon.dat: Likewise.
2873 * regformats/arm-with-vfpv2.dat: Likewise.
2874 * regformats/arm-with-vfpv3.dat Likewise.
2876 2016-09-30 Yao Qi <yao.qi@linaro.org>
2879 * target.c (target_stop_and_wait): Don't call
2880 target_continue_no_signal, use resume_stop instead.
2882 2016-09-26 Yao Qi <yao.qi@linaro.org>
2884 * linux-low.c (linux_wait_1): Call debug_exit.
2886 2016-09-23 Pedro Alves <palves@redhat.com>
2888 * Makefile.in (SFILES): Add common/new-op.c.
2889 (OBS): Add common/new-op.o.
2890 (new-op.o): New rule.
2892 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2894 * .gitinore: Ignore more files.
2896 2016-09-21 Yao Qi <yao.qi@linaro.org>
2898 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2901 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2903 * server.c (start_inferior): Call target_mourn_inferior instead of
2904 mourn_inferior; pass ptid_t argument to it.
2906 (handle_target_event): Likewise.
2907 * target.c (target_mourn_inferior): New function.
2908 * target.h (mourn_inferior): Delete macro.
2910 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2912 * linux-low.c (lwp_is_stepping): New function.
2914 2016-09-06 Carl Love <cel@us.ibm.com>
2916 * server.c (start_inferior): Fixed comment, requested comment change
2917 didn't get updated correctly. Removed reference to ptrace () call as
2918 it is only true on Linux systems.
2920 2016-09-06 Carl Love <cel@us.ibm.com>
2922 * server.c (start_inferior): Do not call
2923 function target_post_create_inferior () if the
2924 inferior process has already exited.
2926 2016-09-05 Pedro Alves <palves@redhat.com>
2928 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2929 (COMPILE.pre, CC_LD): Use CXX directly.
2930 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2931 * acinclude.m4: Don't include build-with-cxx.m4.
2932 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2933 * configure: Regenerate.
2935 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2938 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2939 call writing data to own_buf.
2941 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2943 * target.c (mywait): Call target_wait instead of
2945 (target_wait): New function.
2947 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2949 * server.c (start_inferior): New variable 'ptid'. Replace calls
2950 to the_target->resume by target_continue{,_no_signal}, depending
2952 * target.c (target_stop_and_wait): Call target_continue_no_signal
2953 instead of the_target->resume.
2954 (target_continue): New function.
2956 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2958 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2960 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2963 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2965 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2966 * linux-arm-low.c (ps_get_thread_area): Likewise.
2967 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2968 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2969 * linux-mips-low.c (ps_get_thread_area): Likewise.
2970 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2971 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2972 * linux-x86-low.c (ps_get_thread_area): Likewise.
2973 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2975 2016-08-19 Pedro Alves <palves@redhat.com>
2977 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2979 2016-08-19 Pedro Alves <palves@redhat.com>
2981 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2982 comment. Use memcpy instead of casting through unsigned long.
2984 2016-08-19 Pedro Alves <palves@redhat.com>
2986 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2987 allocating around 0x80000000.
2989 2016-08-19 Pedro Alves <palves@redhat.com>
2992 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2993 (x32-avx512-linux-ipa.o): New rules.
2994 * configure.ac (x86_64-*-linux*): New x32 check.
2995 * configure.srv (ipa_x32_linux_regobj): New.
2996 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2997 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2999 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3001 * configure: Regenerate.
3003 2016-08-09 Pedro Alves <palves@redhat.com>
3006 * Makefile.in (OBS): Add signals-state-save-restore.o.
3007 (signals-state-save-restore.o): New rule.
3008 * config.in: Regenerate.
3009 * configure: Regenerate.
3010 * linux-low.c: Include "signals-state-save-restore.h".
3011 (linux_create_inferior): Call
3012 restore_original_signals_state.
3013 * server.c: Include "dispositions-save-restore.h".
3014 (captured_main): Call save_original_signals_state.
3016 2016-08-05 Pedro Alves <palves@redhat.com>
3018 * configure: Regenerate.
3020 2016-08-04 Yao Qi <yao.qi@linaro.org>
3022 * linux-low.c (regsets_fetch_inferior_registers): Check
3023 errno is ESRCH or not.
3025 2016-08-02 Yao Qi <yao.qi@linaro.org>
3027 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3028 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3029 (thread_db_load_search): Update.
3030 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3031 td_ta_set_event and td_ta_event_getmsg.
3033 2016-07-26 Pedro Alves <palves@redhat.com>
3036 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3037 of unsigned long for 64-bit registers and use uint32_t instead of
3038 unsigned int for 32-bit registers.
3040 2016-07-26 Pedro Alves <palves@redhat.com>
3042 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3045 2016-07-21 Tom Tromey <tom@tromey.com>
3047 * configure: Rebuild.
3049 2016-07-21 Yao Qi <yao.qi@linaro.org>
3051 * mem-break.c (find_gdb_breakpoint): Cast bp to
3052 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3054 2016-07-21 Yao Qi <yao.qi@linaro.org>
3056 * server.c (handle_v_requests): Support s and S actions
3057 if target_supports_software_single_step return true.
3059 2016-07-21 Yao Qi <yao.qi@linaro.org>
3061 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3062 is resume_step, call maybe_hw_step.
3063 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3065 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3067 (proceed_one_lwp): If resume request is resume_step, install
3068 reinsert breakpoints and call maybe_hw_step.
3070 2016-07-21 Yao Qi <yao.qi@linaro.org>
3072 * linux-low.c (proceed_one_lwp): Declare.
3073 (linux_resume_one_thread): Remove local variable 'step'.
3074 Lift code enqueue signal. Call proceed_one_lwp instead of
3075 linux_resume_one_lwp.
3077 2016-07-21 Yao Qi <yao.qi@linaro.org>
3079 * linux-low.c (linux_resume_one_thread): Call
3080 enqueue_pending_signal.
3082 2016-07-21 Yao Qi <yao.qi@linaro.org>
3084 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3085 * inferiors.c (do_restore_current_thread_cleanup): New function.
3086 (make_cleanup_restore_current_thread): Likewise.
3087 * linux-low.c (install_software_single_step_breakpoints): Call
3088 make_cleanup_restore_current_thread. Switch current_thread to
3091 2016-07-21 Yao Qi <yao.qi@linaro.org>
3093 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3094 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3095 (clone_one_breakpoint): Likewise.
3096 (delete_reinsert_breakpoints): Change parameter to thread.
3098 (has_reinsert_breakpoints): Likewise.
3099 (uninsert_reinsert_breakpoints): Likewise.
3100 (reinsert_reinsert_breakpoints): Likewise.
3101 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3102 (delete_reinsert_breakpoints): Likewise.
3103 (reinsert_reinsert_breakpoints): Likewise.
3104 (uninsert_reinsert_breakpoints): Likewise.
3105 (has_reinsert_breakpoints): Likewise.
3107 2016-07-21 Yao Qi <yao.qi@linaro.org>
3109 * inferiors.c (get_thread_process): Make parameter const.
3110 * inferiors.h (get_thread_process): Update declaration.
3111 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3112 Add new parameters child_thread and parent_thread. Callers
3114 * mem-break.h (clone_all_breakpoints): Update declaration.
3116 2016-07-21 Yao Qi <yao.qi@linaro.org>
3118 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3119 <command_list, handler>: Remove.
3120 (struct gdb_breakpoint): New.
3121 (struct other_breakpoint): New.
3122 (struct reinsert_breakpoint): New.
3123 (is_gdb_breakpoint): New function.
3124 (any_persistent_commands): Update command_list if
3125 is_gdb_breakpoint returns true.
3126 (set_breakpoint): Create breakpoints according to their types.
3127 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3128 (set_gdb_breakpoint_1): Likewise.
3129 (set_gdb_breakpoint): Likewise.
3130 (clear_breakpoint_conditions): Change parameter type to
3131 'struct gdb_breakpoint *'.
3132 (clear_breakpoint_commands): Likewise.
3133 (clear_breakpoint_conditions_and_commands): Likewise.
3134 (add_condition_to_breakpoint): Likewise.
3135 (add_breakpoint_condition): Likewise.
3136 (add_commands_to_breakpoint): Likewise.
3137 (check_breakpoints): Check other_breakpoint.
3138 (clone_one_breakpoint): Clone breakpopint according to its type.
3139 * mem-break.h (struct gdb_breakpoint): Declare.
3140 (set_gdb_breakpoint): Update declaration.
3141 (clear_breakpoint_conditions_and_commands): Likewise.
3142 (add_breakpoint_condition): Likewise.
3143 (add_breakpoint_commands): Likewise.
3144 * server.c (process_point_options): Change parameter type to
3145 'struct gdb_breakpoint *'.
3147 2016-07-21 Yao Qi <yao.qi@linaro.org>
3149 * mem-break.c (set_breakpoint_at): Rename it to ...
3150 (set_breakpoint_type_at): ... it.
3151 (set_breakpoint_at): Call set_breakpoint_type_at.
3152 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3153 * mem-break.h (set_breakpoint_at): Update comments.
3155 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3157 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3159 (nios2_store_gregset): Likewise.
3161 2016-07-01 Pedro Alves <palves@redhat.com>
3162 Antoine Tremblay <antoine.tremblay@ericsson.com>
3164 * linux-low.c: Change interface to take the target lwp_info
3165 pointer directly and return void. Handle detaching from a zombie
3167 (linux_detach_lwp_callback): New function.
3168 (linux_detach): Detach from the leader thread after detaching from
3171 2016-06-28 Yao Qi <yao.qi@linaro.org>
3173 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3174 for variable new_offset.
3175 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3176 (aarch64_ftrace_insn_reloc_cb): Likewise.
3177 (aarch64_ftrace_insn_reloc_tb): Likewise.
3178 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3179 PRIx64 instead of PRIx32.
3181 2016-06-28 Yao Qi <yao.qi@linaro.org>
3183 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3184 (the_low_target): Install arm_get_syscall_trapinfo.
3186 2016-06-28 Yao Qi <yao.qi@linaro.org>
3188 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3190 (the_low_target): Install aarch64_get_syscall_trapinfo.
3192 2016-06-28 Yao Qi <yao.qi@linaro.org>
3194 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3196 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3197 Remove parameter sysno.
3198 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3201 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3203 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3204 (s390_emit_ne_goto): Likewise.
3205 (s390_emit_lt_goto): Likewise.
3206 (s390_emit_le_goto): Likewise.
3207 (s390_emit_gt_goto): Likewise.
3208 (s390_emit_ge_goto): Likewise.
3209 (s390x_emit_eq_goto): Likewise.
3210 (s390x_emit_ne_goto): Likewise.
3211 (s390x_emit_lt_goto): Likewise.
3212 (s390x_emit_le_goto): Likewise.
3213 (s390x_emit_gt_goto): Likewise.
3214 (s390x_emit_ge_goto): Likewise.
3215 (s390_emit_ops_impl): Mark variable static.
3216 (s390x_emit_ops): Likewise.
3218 2016-06-17 Yao Qi <yao.qi@linaro.org>
3220 * linux-low.c (handle_extended_wait): Call
3221 uninsert_reinsert_breakpoints for the parent process. Remove
3222 reinsert breakpoints from the child process. Reinsert them to
3223 the parent process when vfork is done.
3224 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3225 (reinsert_reinsert_breakpoints): New function.
3226 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3227 (reinsert_reinsert_breakpoints): Declare.
3229 2016-06-17 Yao Qi <yao.qi@linaro.org>
3231 * linux-low.c (handle_extended_wait): If the parent is doing
3232 step-over, remove the reinsert breakpoints from the forked child.
3234 2016-06-17 Yao Qi <yao.qi@linaro.org>
3236 * linux-low.c (unsuspend_all_lwps): Declare.
3237 (linux_low_filter_event): If thread exited, call finish_step_over.
3238 If step-over is finished, unsuspend other threads.
3240 2016-06-17 Yao Qi <yao.qi@linaro.org>
3242 * linux-low.c (linux_resume_one_lwp_throw): Assert
3243 has_reinsert_breakpoints returns false.
3244 * mem-break.c (delete_disabled_breakpoints): Assert
3245 bp type isn't reinsert_breakpoint.
3247 2016-06-17 Yao Qi <yao.qi@linaro.org>
3249 * linux-low.c (maybe_hw_step): New function.
3250 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3251 (finish_step_over): Switch current_thread to lwp temporarily,
3252 and assert has_reinsert_breakpoints returns true.
3253 (proceed_one_lwp): Call maybe_hw_step.
3254 * mem-break.c (has_reinsert_breakpoints): New function.
3255 * mem-break.h (has_reinsert_breakpoints): Declare.
3257 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3259 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3261 2016-05-17 Yao Qi <yao.qi@linaro.org>
3263 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3264 instead of find_inferior.
3266 2016-05-05 Yao Qi <yao.qi@linaro.org>
3268 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3269 Initialize res to zero.
3271 2016-05-05 Yao Qi <yao.qi@linaro.org>
3273 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3276 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3278 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3279 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3280 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3282 2016-04-28 Par Olsson <par.olsson@windriver.com>
3283 Simon Marchi <simon.marchi@ericsson.com>
3285 * tracepoint.c (write_inferior_int8): New function.
3286 (cmd_qtenable_disable): Write enable flag using
3287 write_inferior_int8.
3289 2016-04-25 Yao Qi <yao.qi@linaro.org>
3291 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3292 (need_step_over_p): Return zero if the LWP has pending signals
3293 can be delivered on software single step target.
3295 2016-04-25 Yao Qi <yao.qi@linaro.org>
3297 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3298 return instead of error.
3300 2016-04-22 Yao Qi <yao.qi@linaro.org>
3302 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3305 2016-04-22 Yao Qi <yao.qi@linaro.org>
3307 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3308 signal when stepping over breakpoint with software single
3311 2016-04-21 Pedro Alves <palves@redhat.com>
3313 * linux-s390-low.c (s390_collect_ptrace_register)
3314 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3316 (s390_check_regset): Use void * instead of gdb_byte *.
3318 2016-04-20 Pedro Alves <palves@redhat.com>
3320 * configure: Renegerate.
3322 2016-04-20 Yao Qi <yao.qi@linaro.org>
3324 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3325 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3327 (arm_store_gregset): Likewise.
3329 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3331 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3332 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3333 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3334 (amd64-avx-mpx-linux.c): New rules.
3335 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3336 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3337 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3338 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3339 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3340 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3341 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3342 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3343 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3344 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3345 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3346 * linux-x86-low.c (x86_linux_read_description): Add case for
3347 X86_XSTATE_AVX_MPX_MASK.
3348 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3349 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3350 init_registers_i386_avx_mpx_linux.
3351 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3352 (initialize_low_tracepoint): Call
3353 init_registers_i386_avx_mpx_linux.
3354 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3355 (initialize_low_tracepoint): Call
3356 init_registers_amd64_avx_mpx_linux.
3357 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3358 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3359 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3362 2016-04-18 Pedro Alves <palves@redhat.com>
3364 * configure: Regenerate.
3366 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3368 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3369 (aarch64_emit_sub): Likewise.
3371 2016-04-12 Pedro Alves <palves@redhat.com>
3373 * utils.c (prepare_to_throw_exception): Delete.
3375 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3377 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3379 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3381 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3383 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3385 * linux-aarch64-ipa.c: Add <elf.h> include.
3386 * linux-ppc-ipa.c: Add <elf.h> include.
3387 * linux-s390-ipa.c: Add <elf.h> include.
3389 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3391 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3392 (get_raw_reg_ptr): Likewise.
3393 (get_trace_state_variable_value_ptr): Likewise.
3394 (set_trace_state_variable_value_ptr): Likewise.
3395 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3398 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3399 Marcin Kościelnicki <koriakin@0x04.net>
3402 * linux-ppc-low.c (emit_insns): New function.
3403 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3404 (ppc_emit_prologue): New function.
3405 (ppc_emit_epilogue): New function.
3406 (ppc_emit_add): New function.
3407 (ppc_emit_sub): New function.
3408 (ppc_emit_mul): New function.
3409 (ppc_emit_lsh): New function.
3410 (ppc_emit_rsh_signed): New function.
3411 (ppc_emit_rsh_unsigned): New function.
3412 (ppc_emit_ext): New function.
3413 (ppc_emit_zero_ext): New function.
3414 (ppc_emit_log_not): New function.
3415 (ppc_emit_bit_and): New function.
3416 (ppc_emit_bit_or): New function.
3417 (ppc_emit_bit_xor): New function.
3418 (ppc_emit_bit_not): New function.
3419 (ppc_emit_equal): New function.
3420 (ppc_emit_less_signed): New function.
3421 (ppc_emit_less_unsigned): New function.
3422 (ppc_emit_ref): New function.
3423 (ppc_emit_const): New function.
3424 (ppc_emit_reg): New function.
3425 (ppc_emit_pop): New function.
3426 (ppc_emit_stack_flush): New function.
3427 (ppc_emit_swap): New function.
3428 (ppc_emit_stack_adjust): New function.
3429 (ppc_emit_call): New function.
3430 (ppc_emit_int_call_1): New function.
3431 (ppc_emit_void_call_2): New function.
3432 (ppc_emit_if_goto): New function.
3433 (ppc_emit_goto): New function.
3434 (ppc_emit_eq_goto): New function.
3435 (ppc_emit_ne_goto): New function.
3436 (ppc_emit_lt_goto): New function.
3437 (ppc_emit_le_goto): New function.
3438 (ppc_emit_gt_goto): New function.
3439 (ppc_emit_ge_goto): New function.
3440 (ppc_write_goto_address): New function.
3441 (ppc_emit_ops_impl): New static variable.
3442 (ppc64v1_emit_prologue): New function.
3443 (ppc64v2_emit_prologue): New function.
3444 (ppc64_emit_epilogue): New function.
3445 (ppc64_emit_add): New function.
3446 (ppc64_emit_sub): New function.
3447 (ppc64_emit_mul): New function.
3448 (ppc64_emit_lsh): New function.
3449 (ppc64_emit_rsh_signed): New function.
3450 (ppc64_emit_rsh_unsigned): New function.
3451 (ppc64_emit_ext): New function.
3452 (ppc64_emit_zero_ext): New function.
3453 (ppc64_emit_log_not): New function.
3454 (ppc64_emit_bit_and): New function.
3455 (ppc64_emit_bit_or): New function.
3456 (ppc64_emit_bit_xor): New function.
3457 (ppc64_emit_bit_not): New function.
3458 (ppc64_emit_equal): New function.
3459 (ppc64_emit_less_signed): New function.
3460 (ppc64_emit_less_unsigned): New function.
3461 (ppc64_emit_ref): New function.
3462 (ppc64_emit_const): New function.
3463 (ppc64v1_emit_reg): New function.
3464 (ppc64v2_emit_reg): New function.
3465 (ppc64_emit_pop): New function.
3466 (ppc64_emit_stack_flush): New function.
3467 (ppc64_emit_swap): New function.
3468 (ppc64v1_emit_call): New function.
3469 (ppc64v2_emit_call): New function.
3470 (ppc64v1_emit_int_call_1): New function.
3471 (ppc64v2_emit_int_call_1): New function.
3472 (ppc64v1_emit_void_call_2): New function.
3473 (ppc64v2_emit_void_call_2): New function.
3474 (ppc64_emit_if_goto): New function.
3475 (ppc64_emit_eq_goto): New function.
3476 (ppc64_emit_ne_goto): New function.
3477 (ppc64_emit_lt_goto): New function.
3478 (ppc64_emit_le_goto): New function.
3479 (ppc64_emit_gt_goto): New function.
3480 (ppc64_emit_ge_goto): New function.
3481 (ppc64v1_emit_ops_impl): New static variable.
3482 (ppc64v2_emit_ops_impl): New static variable.
3483 (ppc_emit_ops): New function.
3484 (linux_low_target): Wire in ppc_emit_ops.
3486 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3487 Marcin Kościelnicki <koriakin@0x04.net>
3490 * Makefile.in: Add powerpc-*-ipa.o
3491 * configure.srv: Add ipa_obj for powerpc*-linux.
3492 * linux-ppc-ipa.c: New file.
3493 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3495 (PPC_FIELD): New macro.
3496 (PPC_SEXT): New macro.
3497 (PPC_OP6): New macro.
3498 (PPC_BO): New macro.
3499 (PPC_LI): New macro.
3500 (PPC_BD): New macro.
3501 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3502 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3503 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3504 (ppc_get_thread_area): New function.
3505 (is_elfv2_inferior): New function.
3506 (gen_ds_form): New function.
3507 (GEN_STD): New macro.
3508 (GEN_STDU): New macro.
3509 (GEN_LD): New macro.
3510 (GEN_LDU): New macro.
3511 (gen_d_form): New function.
3512 (GEN_ADDI): New macro.
3513 (GEN_ADDIS): New macro.
3514 (GEN_LI): New macro.
3515 (GEN_LIS): New macro.
3516 (GEN_ORI): New macro.
3517 (GEN_ORIS): New macro.
3518 (GEN_LWZ): New macro.
3519 (GEN_STW): New macro.
3520 (GEN_STWU): New macro.
3521 (gen_xfx_form): New function.
3522 (GEN_MFSPR): New macro.
3523 (GEN_MTSPR): New macro.
3524 (GEN_MFCR): New macro.
3525 (GEN_MTCR): New macro.
3526 (GEN_SYNC): New macro.
3527 (GEN_LWSYNC): New macro.
3528 (gen_x_form): New function.
3529 (GEN_OR): New macro.
3530 (GEN_MR): New macro.
3531 (GEN_LWARX): New macro.
3532 (GEN_STWCX): New macro.
3533 (GEN_CMPW): New macro.
3534 (gen_md_form): New function.
3535 (GEN_RLDICL): New macro.
3536 (GEN_RLDICR): New macro.
3537 (gen_i_form): New function.
3539 (GEN_BL): New macro.
3540 (gen_b_form): New function.
3541 (GEN_BNE): New macro.
3542 (GEN_LOAD): New macro.
3543 (GEN_STORE): New macro.
3544 (gen_limm): New function.
3545 (gen_atomic_xchg): New function.
3546 (gen_call): New function.
3547 (ppc_relocate_instruction): New function.
3548 (ppc_install_fast_tracepoint_jump_pad): New function.
3549 (ppc_get_min_fast_tracepoint_insn_len): New function.
3550 (ppc_get_ipa_tdesc_idx): New function.
3551 (the_low_target): Wire in the new functions.
3552 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3554 * linux-ppc-tdesc.h: New file.
3556 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3558 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3559 (alloc_jump_pad_buffer): New function.
3560 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3561 (alloc_jump_pad_buffer): New function.
3562 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3563 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3564 (alloc_jump_pad_buffer): New function.
3565 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3566 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3567 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3568 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3570 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3572 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3573 * linux-amd64-ipa.c: Likewise.
3574 * linux-i386-ipa.c: Likewise.
3575 * linux-s390-ipa.c: Likewise.
3576 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3577 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3578 set_trace_state_variable_value_ptr.
3579 (struct ipa_sym_addresses): Likewise.
3580 (symbol_list): Likewise.
3581 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3582 accessing gdb_collect directly.
3583 (gdb_collect_ptr_type): New typedef.
3584 (get_raw_reg_ptr_type): New typedef.
3585 (get_trace_state_variable_value_ptr_type): New typedef.
3586 (set_trace_state_variable_value_ptr_type): New typedef.
3587 (gdb_collect_ptr): New global.
3588 (get_raw_reg_ptr): New global.
3589 (get_trace_state_variable_value_ptr): New global.
3590 (set_trace_state_variable_value_ptr): New global.
3591 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3592 accessing get_raw_reg directly.
3593 (get_get_tsv_func_addr): Likewise for
3594 get_trace_state_variable_value_ptr.
3595 (get_set_tsv_func_addr): Likewise for
3596 set_trace_state_variable_value_ptr.
3597 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3599 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3601 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3603 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3605 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3607 (relocate_instruction): Remove own_buf.
3608 * server.c (own_buf): Make global.
3609 (handle_v_requests): Make global.
3610 * server.h (own_buf): New declaration.
3611 (handle_v_requests): New prototype.
3613 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3616 * linux-s390-low.c (add_insns): New function.
3617 (s390_emit_prologue): New function.
3618 (s390_emit_epilogue): New function.
3619 (s390_emit_add): New function.
3620 (s390_emit_sub): New function.
3621 (s390_emit_mul): New function.
3622 (s390_emit_lsh): New function.
3623 (s390_emit_rsh_signed): New function.
3624 (s390_emit_rsh_unsigned): New function.
3625 (s390_emit_ext): New function.
3626 (s390_emit_log_not): New function.
3627 (s390_emit_bit_and): New function.
3628 (s390_emit_bit_or): New function.
3629 (s390_emit_bit_xor): New function.
3630 (s390_emit_bit_not): New function.
3631 (s390_emit_equal): New function.
3632 (s390_emit_less_signed): New function.
3633 (s390_emit_less_unsigned): New function.
3634 (s390_emit_ref): New function.
3635 (s390_emit_if_goto): New function.
3636 (s390_emit_goto): New function.
3637 (s390_write_goto_address): New function.
3638 (s390_emit_litpool): New function.
3639 (s390_emit_const): New function.
3640 (s390_emit_call): New function.
3641 (s390_emit_reg): New function.
3642 (s390_emit_pop): New function.
3643 (s390_emit_stack_flush): New function.
3644 (s390_emit_zero_ext): New function.
3645 (s390_emit_swap): New function.
3646 (s390_emit_stack_adjust): New function.
3647 (s390_emit_set_r2): New function.
3648 (s390_emit_int_call_1): New function.
3649 (s390_emit_void_call_2): New function.
3650 (s390_emit_eq_goto): New function.
3651 (s390_emit_ne_goto): New function.
3652 (s390_emit_lt_goto): New function.
3653 (s390_emit_le_goto): New function.
3654 (s390_emit_gt_goto): New function.
3655 (s390_emit_ge_goto): New function.
3656 (s390x_emit_prologue): New function.
3657 (s390x_emit_epilogue): New function.
3658 (s390x_emit_add): New function.
3659 (s390x_emit_sub): New function.
3660 (s390x_emit_mul): New function.
3661 (s390x_emit_lsh): New function.
3662 (s390x_emit_rsh_signed): New function.
3663 (s390x_emit_rsh_unsigned): New function.
3664 (s390x_emit_ext): New function.
3665 (s390x_emit_log_not): New function.
3666 (s390x_emit_bit_and): New function.
3667 (s390x_emit_bit_or): New function.
3668 (s390x_emit_bit_xor): New function.
3669 (s390x_emit_bit_not): New function.
3670 (s390x_emit_equal): New function.
3671 (s390x_emit_less_signed): New function.
3672 (s390x_emit_less_unsigned): New function.
3673 (s390x_emit_ref): New function.
3674 (s390x_emit_if_goto): New function.
3675 (s390x_emit_const): New function.
3676 (s390x_emit_call): New function.
3677 (s390x_emit_reg): New function.
3678 (s390x_emit_pop): New function.
3679 (s390x_emit_stack_flush): New function.
3680 (s390x_emit_zero_ext): New function.
3681 (s390x_emit_swap): New function.
3682 (s390x_emit_stack_adjust): New function.
3683 (s390x_emit_int_call_1): New function.
3684 (s390x_emit_void_call_2): New function.
3685 (s390x_emit_eq_goto): New function.
3686 (s390x_emit_ne_goto): New function.
3687 (s390x_emit_lt_goto): New function.
3688 (s390x_emit_le_goto): New function.
3689 (s390x_emit_gt_goto): New function.
3690 (s390x_emit_ge_goto): New function.
3691 (s390_emit_ops): New function.
3692 (struct linux_target_ops): Fill in emit_ops hook.
3694 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3697 * Makefile.in: Add s390 IPA files.
3698 * configure.srv: Build IPA for s390.
3699 * linux-s390-ipa.c: New file.
3700 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3701 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3702 (tdesc_s390_linux32): Likewise.
3703 (init_registers_s390_linux32v1): Likewise.
3704 (tdesc_s390_linux32v1): Likewise.
3705 (init_registers_s390_linux32v2): Likewise.
3706 (tdesc_s390_linux32v2): Likewise.
3707 (init_registers_s390_linux64): Likewise.
3708 (tdesc_s390_linux64): Likewise.
3709 (init_registers_s390_linux64v1): Likewise.
3710 (tdesc_s390_linux64v1): Likewise.
3711 (init_registers_s390_linux64v2): Likewise.
3712 (tdesc_s390_linux64v2): Likewise.
3713 (init_registers_s390_te_linux64): Likewise.
3714 (tdesc_s390_te_linux64): Likewise.
3715 (init_registers_s390_vx_linux64): Likewise.
3716 (tdesc_s390_vx_linux64): Likewise.
3717 (init_registers_s390_tevx_linux64): Likewise.
3718 (tdesc_s390_tevx_linux64): Likewise.
3719 (init_registers_s390x_linux64): Likewise.
3720 (tdesc_s390x_linux64): Likewise.
3721 (init_registers_s390x_linux64v1): Likewise.
3722 (tdesc_s390x_linux64v1): Likewise.
3723 (init_registers_s390x_linux64v2): Likewise.
3724 (tdesc_s390x_linux64v2): Likewise.
3725 (init_registers_s390x_te_linux64): Likewise.
3726 (tdesc_s390x_te_linux64): Likewise.
3727 (init_registers_s390x_vx_linux64): Likewise.
3728 (tdesc_s390x_vx_linux64): Likewise.
3729 (init_registers_s390x_tevx_linux64): Likewise.
3730 (tdesc_s390x_tevx_linux64): Likewise.
3731 (have_hwcap_s390_vx): New static variable.
3732 (s390_arch_setup): Fill have_hwcap_s390_vx.
3733 (s390_get_thread_area): New function.
3734 (s390_ft_entry_gpr_esa): New const.
3735 (s390_ft_entry_gpr_zarch): New const.
3736 (s390_ft_entry_misc): New const.
3737 (s390_ft_entry_fr): New const.
3738 (s390_ft_entry_vr): New const.
3739 (s390_ft_main_31): New const.
3740 (s390_ft_main_64): New const.
3741 (s390_ft_exit_fr): New const.
3742 (s390_ft_exit_vr): New const.
3743 (s390_ft_exit_misc): New const.
3744 (s390_ft_exit_gpr_esa): New const.
3745 (s390_ft_exit_gpr_zarch): New const.
3746 (append_insns): New function.
3747 (s390_relocate_instruction): New function.
3748 (s390_install_fast_tracepoint_jump_pad): New function.
3749 (s390_get_min_fast_tracepoint_insn_len): New function.
3750 (s390_get_ipa_tdesc_idx): New function.
3751 (struct linux_target_ops): Wire in the above functions.
3752 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3753 * linux-s390-tdesc.h: New file.
3755 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3757 * linux-s390-low.c (s390_supports_tracepoints): New function.
3758 (struct linux_target_ops): Fill supports_tracepoints hook.
3760 2016-03-18 Yao Qi <yao.qi@linaro.org>
3762 * linux-low.c (lwp_signal_can_be_delivered): New function.
3763 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3765 2016-03-18 Yao Qi <yao.qi@linaro.org>
3767 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3768 0 if signal is enqueued. Remove 'signal' from one debugging
3769 message. Move one debugging message to some lines below.
3770 Remove code setting 'signal' to 0.
3772 2016-03-18 Yao Qi <yao.qi@linaro.org>
3774 * linux-low.c (linux_low_filter_event): Remove redundant
3775 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3777 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3779 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3780 (struct linux_target_ops): Wire in the above.
3782 2016-03-03 Yao Qi <yao.qi@linaro.org>
3784 * linux-low.c: Update comments to start_step_over.
3786 2016-03-03 Yao Qi <yao.qi@linaro.org>
3789 * linux-low.c (handle_extended_wait): Set child suspended
3790 if event_lwp->bp_reinsert isn't zero.
3792 2016-03-02 Yao Qi <yao.qi@linaro.org>
3794 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3795 enqueue_pending_signal.
3797 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3799 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3802 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3804 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3805 (s390_regmap_3264) [!__s390x__]: New global.
3806 (s390_collect_ptrace_register): Skip map entries containing -1.
3807 (s390_supply_ptrace_register): Ditto.
3808 (s390_fill_gprs_high): New function.
3809 (s390_store_gprs_high): New function.
3810 (s390_regsets): Add NT_S390_HIGH_GPRS.
3811 (s390_get_hwcap): Enable on 31-bit.
3812 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3813 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3814 Detect NT_S390_HIGH_GPRS.
3815 (s390_usrregs_info_3264): Enable on 31-bit.
3816 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3817 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3819 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3822 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3823 * configure.srv: Ditto.
3824 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3825 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3826 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3827 (init_registers_amd64_linux): Remove prototype.
3828 (tdesc_amd64_linux): Remove declaration.
3829 (get_ipa_tdesc): New function.
3830 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3831 initialize remaining tdescs.
3832 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3833 (init_registers_i386_linux): Remove prototype.
3834 (tdesc_i386_linux): Remove declaration.
3835 (get_ipa_tdesc): New function.
3836 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3837 initialize remaining tdescs.
3838 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3839 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3840 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3841 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3842 (x86_get_ipa_tdesc_idx): New function.
3843 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3844 * linux-x86-tdesc.h: New file.
3845 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3846 (target_get_ipa_tdesc_idx): New macro.
3847 * tracepoint.c (ipa_tdesc_idx): New macro.
3848 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3849 (symbol_list): Add ipa_tdesc_idx.
3850 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3851 (ipa_tdesc): Remove.
3852 (ipa_tdesc_idx): New variable.
3853 (get_context_regcache): Use get_ipa_tdesc.
3854 (gdb_collect): Ditto.
3856 * tracepoint.h (get_ipa_tdesc): New prototype.
3857 (ipa_tdesc): Remove.
3859 2016-02-24 Pedro Alves <palves@redhat.com>
3861 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3862 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3863 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3864 Factor out common code between the USE_SIGTRAP_SIGINFO and
3865 !USE_SIGTRAP_SIGINFO blocks.
3866 (linux_low_filter_event): Call save_stop_reason instead of
3867 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3869 (linux_wait_1): Update comments.
3871 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3873 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3874 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3875 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3876 ppc_insert_point, ppc_remove_point.
3878 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3880 * linux-s390-low.c (s390_supports_z_point_type): New function.
3881 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3883 2016-02-16 Yao Qi <yao.qi@linaro.org>
3885 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3886 PC. Get pc from regcache_read_pc.
3888 2016-02-12 Yao Qi <yao.qi@linaro.org>
3890 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3891 or linux_get_pc_32bit.
3892 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3894 2016-02-12 Yao Qi <yao.qi@linaro.org>
3896 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3897 arm_linux_get_next_pcs_fixup.
3899 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3901 * tracepoint.c (x_tracepoint_action_download): Change
3902 write_inferior_data_ptr to write_inferior_data_pointer.
3903 (cmd_qtstart): Likewise.
3904 (write_inferior_data_ptr): Remove.
3905 (download_agent_expr): Change write_inferior_data_ptr to
3906 write_inferior_data_pointer.
3907 (download_tracepoint_1): Likewise.
3908 (download_tracepoint): Likewise.
3909 (download_trace_state_variables): Likewise.
3911 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3912 Marcin Kościelnicki <koriakin@0x04.net>
3914 * tracepoint.c (struct tracepoint_action_ops): Remove.
3915 (struct tracepoint_action): Remove ops.
3916 (m_tracepoint_action_download, r_tracepoint_action_download)
3917 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3918 size and offset accordingly.
3919 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3920 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3921 (tracepoint_action_send, tracepoint_action_download): New functions.
3922 Helpers for trace action handlers.
3923 (add_tracepoint_action): Remove setup actions ops.
3924 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3926 2016-02-10 Yao Qi <yao.qi@linaro.org>
3928 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3930 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3932 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3934 * configure: Regenerate.
3936 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3938 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3939 void * to gdb_byte *.
3940 * linux-low.c (siginfo_fixup): Likewise.
3941 (linux_xfer_siginfo): Likewise.
3942 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3944 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3946 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3948 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3950 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3952 * linux-x86-low.c [__x86_64__]: Include
3953 "nat/amd64-linux-siginfo.h".
3954 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3955 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3956 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3957 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3958 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3959 (cpt_si_fd, si_timerid, si_overrun): Move from
3960 nat/amd64-linux-siginfo.c.
3961 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3963 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3965 * server.c (skip_to_semicolon): Remove.
3966 (process_point_options): Use strchrnul instead of
3969 2016-01-26 Yao Qi <yao.qi@linaro.org>
3971 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3972 * linux-low.c (install_software_single_step_breakpoints): Don't
3973 call regcache_read_pc.
3974 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3977 2016-01-26 Yao Qi <yao.qi@linaro.org>
3979 * linux-low.c (install_software_single_step_breakpoints): Call
3980 regcache_read_pc instead of get_pc.
3982 2016-01-26 Yao Qi <yao.qi@linaro.org>
3984 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3985 (unblock_async_io): Rename to ...
3986 (block_unblock_async_io): ... it. New function.
3987 (enable_async_io): Don't install SIGIO handler. Unblock it
3989 (disable_async_io): Don't ignore SIGIO. Block it instead.
3990 (initialize_async_io): Install SIGIO handler. Don't call
3993 2016-01-26 Yao Qi <yao.qi@linaro.org>
3995 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3996 first character is '\003', call *the_target->request_interrupt.
3998 2016-01-25 Yao Qi <yao.qi@linaro.org>
4000 * remote-utils.c (new_thread_notify): Remove.
4001 (dead_thread_notify): Likewise.
4002 * remote-utils.h (new_thread_notify): Remove declaration.
4003 (dead_thread_notify): Likewise.
4005 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4007 * gdb.trace/pending.exp: Fix expected message on continue.
4009 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4011 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4012 it works properly on big-endian machines where sizeof (CORE_ADDR)
4015 2016-01-21 Pedro Alves <palves@redhat.com>
4017 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4018 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4019 * configure: Regenerate.
4021 2016-01-21 Yao Qi <yao.qi@linaro.org>
4023 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4024 is_thumb and set it according to CPSR saved on the stack.
4025 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4026 arm_sigreturn_next_pc.
4028 2016-01-18 Yao Qi <yao.qi@linaro.org>
4030 * linux-low.c (linux_set_pc_64bit): New function.
4031 (linux_get_pc_64bit): New function.
4032 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4034 * linux-sparc-low.c (debug_threads): Remove declaration.
4035 (sparc_get_pc): Remove.
4036 (the_low_target): Use linux_get_pc_64bit instead of
4038 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4039 (the_low_target): Use linux_get_pc_64bit and
4042 2016-01-18 Yao Qi <yao.qi@linaro.org>
4044 * linux-arm-low.c (debug_threads): Remove declaration.
4045 (arm_get_pc, arm_set_pc): Remove.
4046 (the_low_target): Use linux_get_pc_32bit and
4048 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4049 (the_low_target): Use linux_get_pc_32bit and
4051 * linux-cris-low.c (debug_threads): Remove declaration.
4052 (cris_get_pc, cris_set_pc,): Remove.
4053 (the_low_target): Use linux_get_pc_32bit and
4055 * linux-crisv32-low.c (debug_threads): Remove declaration.
4056 (cris_get_pc, cris_set_pc): Remove.
4057 (the_low_target): Use linux_get_pc_32bit and
4059 * linux-low.c: Include inttypes.h.
4060 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4061 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4062 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4063 (the_low_target): Use linux_get_pc_32bit and
4065 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4066 (the_low_target): Use linux_get_pc_32bit and
4068 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4069 (the_low_target): Use linux_get_pc_32bit and
4071 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4072 (the_low_target): Use linux_get_pc_32bit and
4074 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4075 (the_low_target): Use linux_get_pc_32bit and
4078 2016-01-18 Gary Benson <gbenson@redhat.com>
4080 * configure.ac (AC_FUNC_FORK): New check.
4081 * config.in: Regenerate.
4082 * configure: Likewise.
4084 2016-01-14 Yao Qi <yao.qi@linaro.org>
4086 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4087 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4088 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4089 arm_get_next_pcs_ctor.
4091 2016-01-12 Josh Stone <jistone@redhat.com>
4092 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4094 * inferiors.h: Include "gdb_vecs.h".
4095 (struct process_info): Add syscalls_to_catch.
4096 * inferiors.c (remove_process): Free syscalls_to_catch.
4097 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4098 syscall_return stops.
4099 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4100 * server.c (handle_general_set): Handle QCatchSyscalls.
4101 (handle_query): Report support for QCatchSyscalls.
4102 * target.h (struct target_ops): Add supports_catch_syscall.
4103 (target_supports_catch_syscall): New macro.
4104 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4105 (struct lwp_info): Add syscall_state.
4106 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4107 Maintain syscall_state and syscalls_to_catch across exec.
4108 (get_syscall_trapinfo): New function, proxy to the_low_target.
4109 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4110 (linux_low_filter_event): Toggle syscall_state entry/return for
4111 syscall traps, and set it ignored for all others.
4112 (gdb_catching_syscalls_p): New function.
4113 (gdb_catch_this_syscall_p): New function.
4114 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4115 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4116 (linux_supports_catch_syscall): New function.
4117 (linux_target_ops): Install it.
4118 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4119 (the_low_target): Install it.
4121 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4123 * acinclude.m4: Include new ../warning.m4 file.
4124 * configure: Regenerated.
4125 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4127 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4129 * ax.c (is_goto_target): Mark static.
4130 * linux-low.c (register_addr): Likewise.
4131 (linux_fetch_registers, linux_store_registers): Likewise.
4132 * mem-break.c (any_persistent_commands): Fix old prototype.
4133 (add_commands_to_breakpoint): Mark static.
4134 * regcache.c (find_register_by_name): Delete unused func.
4135 * remote-utils.c (hex_or_minus_one): Mark static.
4136 * server.c (monitor_show_help): Mark static.
4137 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4138 handle_v_requests): Likewise.
4140 2016-01-12 Pedro Alves <palves@redhat.com>
4142 Remove use of the registered trademark symbol throughout.
4144 2016-01-08 Yao Qi <yao.qi@linaro.org>
4146 * remote-utils.c (getpkt): If c is '\003', call target hook
4149 2016-01-06 Yao Qi <yao.qi@linaro.org>
4151 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4152 linux-aarch32-low.c.
4153 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4154 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4155 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4156 (thumb2_breakpoint): Declare.
4157 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4158 linux-aarch32-low.h.
4159 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4160 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4161 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4163 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4165 * gdbreplay.c (gdbreplay_version): Change copyright year in
4167 * server.c (gdbserver_version): Likewise.
4169 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4171 * server.c (crc32_table): Delete.
4172 (crc32): Use libiberty's xcrc32 function.
4174 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4176 * lynx-low.c (lynx_delete_thread_callback): New function.
4177 (lynx_mourn): Properly delete our process and all of its
4178 threads. Remove call to clear_inferiors.
4180 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4182 * target.c (thread_search_callback): Add check that
4183 the thread_stopped target callback is not NULL before
4186 2015-12-21 Yao Qi <yao.qi@linaro.org>
4188 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4191 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4193 * server.c (handle_query): Call target_supports_software_single_step.
4195 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4197 * linux-low.c (single_step): New function.
4198 (linux_resume_one_lwp_throw): Call single_step.
4199 (start_step_over): Likewise.
4201 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4203 * Makefile.in (SFILES): Append arch/arm-linux.c,
4204 arch/arm-get-next-pcs.c.
4205 (arm-linux.o): New rule.
4206 (arm-get-next-pcs.o): New rule.
4207 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4209 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4210 to linux-aarch32-low.c.
4211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4212 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4213 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4214 (thumb2_breakpoint_len): Likewise.
4215 (arm_is_thumb_mode): Make non-static.
4216 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4217 from linux-aarch32-low.c.
4218 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4219 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4220 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4221 (thumb2_breakpoint_len): Likewise.
4222 (arm_is_thumb_mode): New declaration.
4223 * linux-arm-low.c: Include arch/arm-linux.h
4224 aarch/arm-get-next-pcs.h, sys/syscall.h.
4225 (get_next_pcs_ops): New struct.
4226 (get_next_pcs_addr_bits_remove): New function.
4227 (get_next_pcs_is_thumb): New function.
4228 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4229 (arm_sigreturn_next_pc): Likewise.
4230 (get_next_pcs_syscall_next_pc): Likewise.
4231 (arm_gdbserver_get_next_pcs): Likewise.
4232 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4234 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4235 * server.h: Include gdb_vecs.h.
4237 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4239 * Makefile.in (SFILES): Append common/common-regcache.c.
4240 (OBS): Append common-regcache.o.
4241 (common-regcache.o): New rule.
4242 * regcache.c (init_register_cache): Initialize cache to
4244 (regcache_raw_read_unsigned): New function.
4245 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4246 register_status enum.
4248 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4250 * linux-aarch64-low.c (the_low_targets): Rename
4251 breakpoint_reinsert_addr to get_next_pcs.
4252 * linux-arm-low.c (the_low_targets): Likewise.
4253 * linux-bfin-low.c (the_low_targets): Likewise.
4254 * linux-cris-low.c (the_low_targets): Likewise.
4255 * linux-crisv32-low.c (the_low_targets): Likewise.
4256 * linux-low.c (can_software_single_step): Likewise.
4257 (install_software_single_step_breakpoints): New function.
4258 (start_step_over): Use install_software_single_step_breakpoints.
4259 * linux-low.h: New CORE_ADDR vector.
4260 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4262 * linux-mips-low.c (the_low_targets): Likewise.
4263 * linux-nios2-low.c (the_low_targets): Likewise.
4264 * linux-sparc-low.c (the_low_targets): Likewise.
4266 2015-12-17 Pedro Alves <palves@redhat.com>
4268 * linux-low.c (linux_kill_one_lwp): Remove references to
4270 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4272 (linux_init_signals): Delete.
4273 (initialize_low): Adjust.
4274 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4276 2015-12-16 Pedro Alves <palves@redhat.com>
4278 * configure.ac (compiler warning flags): When testing a
4279 -Wno-foo option, check whether -Wfoo works instead.
4280 * configure: Regenerate.
4282 2015-12-11 Don Breazeal <donb@codesourcery.com>
4284 * server.c (process_serial_event): Don't exit from gdbserver
4285 in remote mode if there are still active inferiors.
4287 2015-12-11 Yao Qi <yao.qi@linaro.org>
4289 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4290 arm_breakpoint_at if the process is 32-bit.
4292 2015-12-11 Yao Qi <yao.qi@linaro.org>
4294 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4297 2015-12-07 Yao Qi <yao.qi@linaro.org>
4299 * configure.srv: Append arm.o to srv_tgtobj for
4300 aarch64*-*-linux* target.
4301 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4302 from linux-arm-low.c.
4303 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4304 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4305 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4306 (thumb2_breakpoint_len): Likewise.
4307 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4308 (arm_breakpoint_kinds): Likewise.
4309 (arm_breakpoint_kind_from_pc): Likewise.
4310 (arm_sw_breakpoint_from_kind): Likewise.
4311 (arm_breakpoint_kind_from_current_state): Likewise.
4312 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4313 (arm_sw_breakpoint_from_kind): Declare.
4314 (arm_breakpoint_kind_from_current_state): Declare.
4315 (arm_breakpoint_at): Declare.
4316 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4317 arm_sw_breakpoint_from_kind if process is 32-bit.
4318 (aarch64_breakpoint_kind_from_pc): New function.
4319 (aarch64_breakpoint_kind_from_current_state): New function.
4320 (the_low_target): Initialize fields breakpoint_kind_from_pc
4321 and breakpoint_kind_from_current_state.
4322 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4323 linux-aarch32-low.c.
4324 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4325 (arm_breakpoint, arm_breakpoint_len): Likewise.
4326 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4327 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4328 (arm_is_thumb_mode): Likewise.
4329 (arm_breakpoint_at): Likewise.
4330 (arm_breakpoint_kind_from_pc): Likewise.
4331 (arm_sw_breakpoint_from_kind): Likewise.
4332 (arm_breakpoint_kind_from_current_state): Likewise.
4335 2015-08-04 Yao Qi <yao.qi@linaro.org>
4337 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4338 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4339 * server.c (extended_protocol): Remove "static".
4340 * server.h (extended_protocol): Declare it.
4342 2015-12-04 Josh Stone <jistone@redhat.com>
4344 * target.h (struct target_ops) <arch_setup>: Rename to ...
4345 (struct target_ops) <post_create_inferior>: ... this.
4346 (target_arch_setup): Rename to ...
4347 (target_post_create_inferior): ... this, calling post_create_inferior.
4348 * server.c (start_inferior): Update target_arch_setup calls to
4349 target_post_create_inferior.
4350 * linux-low.c (linux_low_ptrace_options): Forward declare.
4351 (linux_arch_setup): Update its comment for general use.
4352 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4353 (struct linux_target_ops): Use linux_post_create_inferior.
4354 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4355 to post_create_inferior.
4356 * nto-low.c (struct nto_target_ops): Likewise.
4357 * spu-low.c (struct spu_target_ops): Likewise.
4358 * win32-low.c (struct win32_target_ops): Likewise.
4360 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4362 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4364 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4366 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4367 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4368 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4369 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4370 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4371 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4372 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4373 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4374 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4375 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4376 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4377 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4379 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4381 * linux-low.c (linux_look_up_symbols): Don't call
4382 linux_supports_traceclone.
4383 * linux-low.h (thread_db_init): Remove use_events argument.
4384 * thread-db.c (thread_db_use_event): Remove global variable.
4385 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4386 (struct thread_db) <td_create_bp>: Remove field.
4387 (thread_db_create_event): Remove function.
4388 (thread_db_enable_reporting): Likewise.
4389 (find_one_thread): Don't check for thread_db_use_events.
4390 (attach_thread): Likewise.
4391 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4392 (try_thread_db_load_1): Don't check for thread_db_use_events.
4393 (thread_db_init): Remove use_events argument and thread events
4395 (remove_thread_event_breakpoints): Remove function.
4396 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4398 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4400 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4402 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4403 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4404 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4405 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4406 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4408 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4410 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4411 * linux-low.c (can_hardware_single_step): Use
4412 supports_hardware_single_step.
4413 (can_software_single_step): New function.
4414 (start_step_over): Call can_software_single_step.
4415 (linux_supports_hardware_single_step): New function.
4416 (struct target_ops) <supports_software_single_step>: Initialize.
4417 * linux-low.h (struct linux_target_ops)
4418 <supports_hardware_single_step>: Initialize.
4419 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4420 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4421 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4422 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4423 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4424 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4425 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4426 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4427 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4428 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4430 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4431 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4433 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4435 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4437 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4438 * target.h (struct target_ops): <supports_software_single_step>:
4440 (target_supports_software_single_step): New macro.
4442 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4444 * linux-low.c (linux_wait_1): Fix pc advance condition.
4445 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4446 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4448 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4450 * linux-arm-low.c (arm_is_thumb_mode): New function.
4451 (arm_breakpoint_at): Use arm_is_thumb_mode.
4452 (arm_breakpoint_kind_from_current_state): New function.
4453 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4455 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4456 (linux_breakpoint_kind_from_current_state): New function.
4457 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4458 * linux-low.h (struct linux_target_ops)
4459 <breakpoint_kind_from_current_state>: New field.
4460 * target.h (struct target_ops): Likewise.
4461 (target_breakpoint_kind_from_current_state): New macro.
4463 2015-11-30 Pedro Alves <palves@redhat.com>
4465 * linux-low.c (linux_resume): Wake up the event loop before
4468 2015-11-30 Pedro Alves <palves@redhat.com>
4470 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4472 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4474 * target.c (struct thread_search): New structure.
4475 (thread_search_callback): New function.
4476 (prev_general_thread): New global.
4477 (prepare_to_access_memory, done_accessing_memory): New functions.
4478 * target.h (prepare_to_access_memory, done_accessing_memory):
4479 Replace macros with function declarations.
4481 2015-11-30 Pedro Alves <palves@redhat.com>
4484 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4485 report TARGET_WAITKIND_NO_RESUMED.
4486 * remote-utils.c (prepare_resume_reply): Handle
4487 TARGET_WAITKIND_NO_RESUMED.
4488 * server.c (report_no_resumed): New global.
4489 (handle_query) <qSupported>: Handle "no-resumed+". Report
4490 "no-resumed+" support.
4491 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4492 return error if the client doesn't support no-resumed events.
4493 (push_stop_notification): New function.
4494 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4495 events if the client supports them.
4497 2015-11-30 Pedro Alves <palves@redhat.com>
4499 * linux-low.c (thread_still_has_status_pending_p): Don't check
4501 (lwp_resumed): New function.
4502 (status_pending_p_callback): Return early if the LWP is not
4503 supposed to be resumed.
4505 2015-11-30 Pedro Alves <palves@redhat.com>
4507 * linux-low.c (handle_extended_wait): Assert that the LWP's
4508 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4509 thread create events, leave the new child's status pending.
4510 (linux_low_filter_event): If GDB wants to hear about thread exit
4511 events, leave the LWP marked dead and don't delete it.
4512 (linux_wait_for_event_filtered): Don't check for thread exit.
4513 (filter_exit_event): New function.
4514 (linux_wait_1): Use it, when returning an exit event.
4515 (linux_resume_one_lwp_throw): Assert that the LWP's
4516 waitstatus is TARGET_WAITKIND_IGNORE.
4517 * remote-utils.c (prepare_resume_reply): Handle
4518 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4519 * server.c (report_thread_events): New global.
4520 (handle_general_set): Handle QThreadEvents.
4521 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4522 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4523 TARGET_WAITKIND_THREAD_EXITED.
4524 * server.h (report_thread_events): Declare.
4526 2015-11-30 Pedro Alves <palves@redhat.com>
4528 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4529 the thread's last_resume_kind was resume_stop.
4531 2015-11-30 Pedro Alves <palves@redhat.com>
4533 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4536 2015-11-30 Pedro Alves <palves@redhat.com>
4538 * server.c (handle_v_requests): Handle vCtrlC.
4540 2015-11-30 Pedro Alves <palves@redhat.com>
4542 * gdbthread.h (find_any_thread_of_pid): Declare.
4543 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4545 * server.c (handle_query): If current_thread is NULL, look for
4546 another thread of the selected process.
4548 2015-11-26 Daniel Colascione <dancol@dancol.org>
4549 Simon Marchi <simon.marchi@ericsson.com>
4551 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4552 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4554 * target.h (struct target_ops) <thread_name>: New field.
4555 (target_thread_name): New macro.
4557 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4559 * regcache.h (regcache_invalidate_pid): Add declaration.
4560 * regcache.c (regcache_invalidate_pid): New function, extracted
4561 from regcache_invalidate.
4562 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4563 Add trivial documentation comment.
4564 * lynx-low.c: Use regcache_invalidate_pid instead of
4565 regcache_invalidate.
4567 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4569 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4570 and Elf64_auxv_t if the target is Android.
4572 2015-11-22 Doug Evans <xdje42@gmail.com>
4574 * target.h: #include <sys/types.h>.
4576 2015-11-19 Pedro Alves <palves@redhat.com>
4578 * linux-low.c (linux_process_qsupported): Change prototype.
4580 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4582 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4583 and adjust to loop over all features.
4584 * server.c (handle_query) <qSupported>: Adjust to call
4585 target_process_qsupported once, passing it a vector of unprocessed
4587 * target.h (struct target_ops) <process_qsupported>: Change
4589 (target_process_qsupported): Adjust.
4591 2015-11-19 Pedro Alves <palves@redhat.com>
4593 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4595 * configure: Regenerate.
4597 2015-11-19 Pedro Alves <palves@redhat.com>
4599 * configure: Regenerate.
4601 2015-11-19 Yao Qi <yao.qi@linaro.org>
4603 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4606 2015-11-19 Yao Qi <yao.qi@linaro.org>
4608 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4609 (struct aarch64_operand): Move enum out.
4611 2015-11-19 Yao Qi <yao.qi@linaro.org>
4613 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4614 struct user_fpsimd_state *.
4615 (aarch64_store_fpregset): Likewise.
4617 2015-11-19 Yao Qi <yao.qi@linaro.org>
4619 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4620 struct user_pt_regs *.
4621 (aarch64_store_gregset): Likewise.
4623 2015-11-18 Pedro Alves <palves@redhat.com>
4625 * Makefile.in (all_object_files): Add $IPA_OBJS.
4627 2015-11-17 Pedro Alves <palves@redhat.com>
4629 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4630 GDB_SIGNAL_0 and gdb_signal_to_string.
4632 2015-11-17 Pedro Alves <palves@redhat.com>
4634 * win32-low.c (handle_output_debug_string): Remove parameter.
4635 (win32_kill): Remove our_status local and adjust call to
4636 handle_output_debug_string.
4637 (get_child_debug_event): Adjust call to
4638 handle_output_debug_string.
4640 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4642 * linux-mips-low.c (mips_fill_gregset): Add cast.
4643 (mips_store_gregset): Likewise.
4644 (mips_fill_fpregset): Likewise.
4645 (mips_store_fpregset): Likewise.
4647 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4649 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4652 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4654 * linux-mips-low.c (mips_linux_new_thread): Change type of
4655 watch_type to enum target_hw_bp_type.
4657 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4659 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4660 Change return type to arm_hwbp_type.
4662 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4664 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4665 (arm_store_gregset): Likewise.
4666 * linux-arm-low.c (arm_get_hwcap): Likewise.
4667 (arm_read_description): Likewise.
4669 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4671 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4673 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4675 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4676 (ppc_fill_vsxregset): Likewise.
4677 (ppc_store_vsxregset): Likewise.
4678 (ppc_fill_vrregset): Likewise.
4679 (ppc_store_vrregset): Likewise.
4680 (ppc_fill_evrregset): Likewise.
4681 (ppc_store_evrregset): Likewise.
4683 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4685 * linux-ppc-low.c (ppc_usrregs_info): Remove
4686 forward-declaration.
4687 (ppc_arch_setup): Move lower in file.
4689 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4691 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4692 (ps_pdwrite): Likewise.
4694 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4696 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4697 to after assert checks.
4699 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4701 * proc-service.c (ps_pdread): Add/adjust casts.
4702 (ps_pdwrite): Add/adjust casts.
4704 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4706 * server.c (handle_search_memory_1): Cast return value of
4709 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4711 * server.c (write_qxfer_response): Change type of data to
4714 2015-10-29 Pedro Alves <palves@redhat.com>
4716 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4718 2015-10-29 Pedro Alves <palves@redhat.com>
4720 * tracepoint.c (clear_installed_tracepoints): Add casts.
4722 2015-10-29 Pedro Alves <palves@redhat.com>
4724 * server.c (handle_v_cont, process_serial_event): Add enum
4725 gdb_signal casts to signal parsing code.
4727 2015-10-29 Pedro Alves <palves@redhat.com>
4729 * linux-low.h (NULL_REGSET): Define.
4730 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4731 * linux-arm-low.c (arm_regsets): Likewise.
4732 * linux-crisv32-low.c (cris_regsets): Likewise.
4733 * linux-m68k-low.c (m68k_regsets): Likewise.
4734 * linux-mips-low.c (mips_regsets): Likewise.
4735 * linux-nios2-low.c (nios2_regsets): Likewise.
4736 * linux-ppc-low.c (ppc_regsets): Likewise.
4737 * linux-s390-low.c (s390_regsets): Likewise.
4738 * linux-sh-low.c (sh_regsets): Likewise.
4739 * linux-sparc-low.c (sparc_regsets): Likewise.
4740 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4741 * linux-tile-low.c (tile_regsets): Likewise.
4742 * linux-x86-low.c (x86_regsets): Likewise.
4743 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4745 2015-10-29 Pedro Alves <palves@redhat.com>
4747 * linux-low.h (NULL_REGSET): Define.
4748 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4749 * linux-arm-low.c (arm_regsets): Likewise.
4750 * linux-crisv32-low.c (cris_regsets): Likewise.
4751 * linux-m68k-low.c (m68k_regsets): Likewise.
4752 * linux-mips-low.c (mips_regsets): Likewise.
4753 * linux-nios2-low.c (nios2_regsets): Likewise.
4754 * linux-ppc-low.c (ppc_regsets): Likewise.
4755 * linux-s390-low.c (s390_regsets): Likewise.
4756 * linux-sh-low.c (sh_regsets): Likewise.
4757 * linux-sparc-low.c (sparc_regsets): Likewise.
4758 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4759 * linux-tile-low.c (tile_regsets): Likewise.
4760 * linux-x86-low.c (x86_regsets): Likewise.
4761 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4763 2015-10-26 Doug Evans <dje@google.com>
4765 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4767 2015-10-26 Doug Evans <dje@google.com>
4769 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4771 2015-10-26 Doug Evans <dje@google.com>
4773 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4775 (attach_thread, find_new_threads_callback): Ditto.
4777 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4779 * mem-break.h (set_breakpoint_data): Remove.
4781 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4783 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4784 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4785 (initialize_low): Remove set_breakpoint_data call.
4786 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4787 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4788 (initialize_low): Remove set_breakpoint_data call.
4789 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4790 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4791 (initialize_low): Remove set_breakpoint_data call.
4793 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4795 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4796 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4797 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4798 * target.h (target_breakpoint_kind_from_pc): New macro.
4800 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4802 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4803 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4804 the default breakpoint kind.
4806 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4808 * linux-arm-low.c (arm_supports_z_point_type): Add software
4811 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4813 * linux-arm-low.c: Refactor breakpoint definitions.
4814 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4815 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4817 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4819 * Makefile.in: Add arm.c/o.
4820 * configure.srv: Likewise.
4821 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4822 (arm_breakpoint_kind_from_pc): New function.
4823 (arm_sw_breakpoint_from_kind): Return proper kind.
4824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4826 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4828 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4830 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4831 (struct raw_breakpoint) <size>: Remove.
4832 (struct raw_breakpoint) <kind>: Add.
4833 (bp_size): New function.
4834 (bp_opcode): Likewise.
4835 (find_raw_breakpoint_at): Adjust for kind.
4836 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4837 (remove_memory_breakpoint): Adjust for kind call bp_size.
4838 (set_raw_breakpoint_at): Adjust for kind.
4839 (set_breakpoint): Likewise.
4840 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4841 (delete_raw_breakpoint): Adjust for kind.
4842 (delete_breakpoint): Likewise.
4843 (find_gdb_breakpoint): Likewise.
4844 (set_gdb_breakpoint_1): Likewise.
4845 (set_gdb_breakpoint): Likewise.
4846 (delete_gdb_breakpoint_1): Likewise.
4847 (delete_gdb_breakpoint): Likewise.
4848 (uninsert_raw_breakpoint): Likewise.
4849 (reinsert_raw_breakpoint): Likewise.
4850 (set_breakpoint_data): Remove.
4851 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4852 (check_mem_read): Adjust for kind call bp_size.
4853 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4854 (clone_one_breakpoint): Adjust for kind.
4855 * mem-break.h (set_gdb_breakpoint): Likewise.
4856 (delete_gdb_breakpoint): Likewise.
4857 * server.c (process_serial_event): Likewise.
4859 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4861 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4862 (struct linux_target_ops) <breakpoint>: Remove.
4863 (struct linux_target_ops) <breakpoint_len>: Remove.
4864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4865 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4866 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4867 (arm_sw_breakpoint_from_kind): New function.
4868 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4869 (struct linux_target_ops) <breakpoint>: Remove.
4870 (struct linux_target_ops) <breakpoint_len>: Remove.
4871 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4872 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4873 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4874 (struct linux_target_ops) <breakpoint>: Remove.
4875 (struct linux_target_ops) <breakpoint_len>: Remove.
4876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4877 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4878 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4879 (struct linux_target_ops) <breakpoint>: Remove.
4880 (struct linux_target_ops) <breakpoint_len>: Remove.
4881 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4882 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4883 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4884 and sw_breakpoint_from_kind to increment the pc.
4885 (linux_breakpoint_kind_from_pc): New function.
4886 (linux_sw_breakpoint_from_kind): New function.
4887 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4888 (initialize_low): Call breakpoint_kind_from_pc and
4889 sw_breakpoint_from_kind to replace breakpoint_data/len.
4890 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4893 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4894 (struct linux_target_ops) <breakpoint>: Remove.
4895 (struct linux_target_ops) <breakpoint_len>: Remove.
4896 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4897 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4898 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4899 (struct linux_target_ops) <breakpoint>: Remove.
4900 (struct linux_target_ops) <breakpoint_len>: Remove.
4901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4903 * linux-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4919 (struct linux_target_ops) <breakpoint>: Remove.
4920 (struct linux_target_ops) <breakpoint_len>: Remove.
4921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4923 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4924 (struct linux_target_ops) <breakpoint>: Remove.
4925 (struct linux_target_ops) <breakpoint_len>: Remove.
4926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4928 * linux-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4939 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4940 (struct linux_target_ops) <breakpoint>: Remove.
4941 (struct linux_target_ops) <breakpoint_len>: Remove.
4942 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4943 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4944 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4945 (struct linux_target_ops) <breakpoint>: Remove.
4946 (struct linux_target_ops) <breakpoint_len>: Remove.
4947 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4948 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4950 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4952 * linux-cris-low.c (cris_get_pc): Remove void arg.
4954 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4956 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4959 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4961 * inferiors.c (thread_pid_matches_callback): New function.
4962 (find_thread_process): New function.
4963 (remove_thread): Reset current_thread.
4964 (remove_process): Assert threads have been removed first.
4966 2015-10-15 Yao Qi <yao.qi@linaro.org>
4968 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4970 (aarch64_remove_point): Likewise.
4971 * regcache.c (regcache_register_size): New function.
4973 2015-10-12 Yao Qi <yao.qi@linaro.org>
4975 * linux-aarch64-low.c: Update all callers as emit_load_store
4976 is renamed to aarch64_emit_load_store.
4978 2015-10-12 Yao Qi <yao.qi@linaro.org>
4980 * linux-aarch64-low.c: Update all callers of function renaming
4981 from emit_insn to aarch64_emit_insn.
4983 2015-10-12 Yao Qi <yao.qi@linaro.org>
4985 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4986 arch/aarch64-insn.h.
4987 (struct aarch64_memory_operand): Likewise.
4989 (emit_insn): Move to arch/aarch64-insn.c.
4990 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4991 (emit_load_store): Move to arch/aarch64-insn.c.
4992 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4993 (can_encode_int32): Remove.
4995 2015-10-12 Yao Qi <yao.qi@linaro.org>
4997 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4998 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4999 (aarch64_relocate_instruction): Likewise.
5000 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5001 (struct aarch64_insn_visitor): Likewise.
5003 2015-10-12 Yao Qi <yao.qi@linaro.org>
5005 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5006 (struct aarch64_insn_visitor): New.
5007 (struct aarch64_insn_relocation_data): New.
5008 (aarch64_ftrace_insn_reloc_b): New function.
5009 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5010 (aarch64_ftrace_insn_reloc_cb): Likewise.
5011 (aarch64_ftrace_insn_reloc_tb): Likewise.
5012 (aarch64_ftrace_insn_reloc_adr): Likewise.
5013 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5014 (aarch64_ftrace_insn_reloc_others): Likewise.
5016 (aarch64_relocate_instruction): Use visitor.
5018 2015-10-12 Yao Qi <yao.qi@linaro.org>
5020 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5021 int. Add argument buf.
5022 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5023 aarch64_relocate_instruction.
5025 2015-10-12 Yao Qi <yao.qi@linaro.org>
5027 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5028 argument insn. Remove local variable insn. Don't call
5030 (aarch64_install_fast_tracepoint_jump_pad): Call
5033 2015-09-30 Yao Qi <yao.qi@linaro.org>
5035 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5036 (emit_load_store_pair): Likewise.
5038 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5040 * dll.c (match_dll): Add cast(s).
5041 (unloaded_dll): Likewise.
5042 * linux-low.c (second_thread_of_pid_p): Likewise.
5043 (delete_lwp_callback): Likewise.
5044 (count_events_callback): Likewise.
5045 (select_event_lwp_callback): Likewise.
5046 (linux_set_resume_request): Likewise.
5047 * server.c (accumulate_file_name_length): Likewise.
5048 (emit_dll_description): Likewise.
5049 (handle_qxfer_threads_worker): Likewise.
5050 (visit_actioned_threads): Likewise.
5051 * thread-db.c (any_thread_of): Likewise.
5052 * tracepoint.c (same_process_p): Likewise.
5053 (match_blocktype): Likewise.
5054 (build_traceframe_info_xml): Likewise.
5056 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5058 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5060 (gdb_unparse_agent_expr): Likewise.
5061 * hostio.c (require_data): Likewise.
5062 (handle_pread): Likewise.
5063 * linux-low.c (disable_regset): Likewise.
5064 (fetch_register): Likewise.
5065 (store_register): Likewise.
5066 (get_dynamic): Likewise.
5067 (linux_qxfer_libraries_svr4): Likewise.
5068 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5069 (set_fast_tracepoint_jump): Likewise.
5070 (uninsert_fast_tracepoint_jumps_at): Likewise.
5071 (reinsert_fast_tracepoint_jumps_at): Likewise.
5072 (validate_inserted_breakpoint): Likewise.
5073 (clone_agent_expr): Likewise.
5074 * regcache.c (init_register_cache): Likewise.
5075 * remote-utils.c (putpkt_binary_1): Likewise.
5076 (decode_M_packet): Likewise.
5077 (decode_X_packet): Likewise.
5078 (look_up_one_symbol): Likewise.
5079 (relocate_instruction): Likewise.
5080 (monitor_output): Likewise.
5081 * server.c (handle_search_memory): Likewise.
5082 (handle_qxfer_exec_file): Likewise.
5083 (handle_qxfer_libraries): Likewise.
5084 (handle_qxfer): Likewise.
5085 (handle_query): Likewise.
5086 (handle_v_cont): Likewise.
5087 (handle_v_run): Likewise.
5088 (captured_main): Likewise.
5089 * target.c (write_inferior_memory): Likewise.
5090 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5091 * tracepoint.c (init_trace_buffer): Likewise.
5092 (add_tracepoint_action): Likewise.
5093 (add_traceframe): Likewise.
5094 (add_traceframe_block): Likewise.
5095 (cmd_qtdpsrc): Likewise.
5096 (cmd_qtdv): Likewise.
5097 (cmd_qtstatus): Likewise.
5098 (response_source): Likewise.
5099 (response_tsv): Likewise.
5100 (cmd_qtnotes): Likewise.
5101 (gdb_collect): Likewise.
5102 (initialize_tracepoint): Likewise.
5104 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5106 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5107 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5108 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5110 (enum aarch64_condition_codes): New enum.
5111 (w0): New static global.
5114 (struct aarch64_memory_operand) <type>: New
5115 MEMORY_OPERAND_POSTINDEX type.
5116 (postindex_memory_operand): New helper function.
5117 (emit_ret): New function.
5118 (emit_load_store_pair): New function, factored out of emit_stp
5119 with support for MEMORY_OPERAND_POSTINDEX.
5120 (emit_stp): Rewrite using emit_load_store_pair.
5121 (emit_ldp): New function.
5122 (emit_load_store): Likewise.
5123 (emit_ldr): Mention post-index instruction in comment.
5124 (emit_ldrh): New function.
5125 (emit_ldrb): New function.
5126 (emit_ldrsw): Mention post-index instruction in comment.
5127 (emit_str): Likewise.
5128 (emit_subs): New function.
5129 (emit_cmp): Likewise.
5130 (emit_and): Likewise.
5131 (emit_orr): Likewise.
5132 (emit_orn): Likewise.
5133 (emit_eor): Likewise.
5134 (emit_mvn): Likewise.
5135 (emit_lslv): Likewise.
5136 (emit_lsrv): Likewise.
5137 (emit_asrv): Likewise.
5138 (emit_mul): Likewise.
5139 (emit_sbfm): Likewise.
5140 (emit_sbfx): Likewise.
5141 (emit_ubfm): Likewise.
5142 (emit_ubfx): Likewise.
5143 (emit_csinc): Likewise.
5144 (emit_cset): Likewise.
5145 (emit_nop): Likewise.
5146 (emit_ops_insns): New helper function.
5147 (emit_pop): Likewise.
5148 (emit_push): Likewise.
5149 (aarch64_emit_prologue): New function.
5150 (aarch64_emit_epilogue): Likewise.
5151 (aarch64_emit_add): Likewise.
5152 (aarch64_emit_sub): Likewise.
5153 (aarch64_emit_mul): Likewise.
5154 (aarch64_emit_lsh): Likewise.
5155 (aarch64_emit_rsh_signed): Likewise.
5156 (aarch64_emit_rsh_unsigned): Likewise.
5157 (aarch64_emit_ext): Likewise.
5158 (aarch64_emit_log_not): Likewise.
5159 (aarch64_emit_bit_and): Likewise.
5160 (aarch64_emit_bit_or): Likewise.
5161 (aarch64_emit_bit_xor): Likewise.
5162 (aarch64_emit_bit_not): Likewise.
5163 (aarch64_emit_equal): Likewise.
5164 (aarch64_emit_less_signed): Likewise.
5165 (aarch64_emit_less_unsigned): Likewise.
5166 (aarch64_emit_ref): Likewise.
5167 (aarch64_emit_if_goto): Likewise.
5168 (aarch64_emit_goto): Likewise.
5169 (aarch64_write_goto_address): Likewise.
5170 (aarch64_emit_const): Likewise.
5171 (aarch64_emit_call): Likewise.
5172 (aarch64_emit_reg): Likewise.
5173 (aarch64_emit_pop): Likewise.
5174 (aarch64_emit_stack_flush): Likewise.
5175 (aarch64_emit_zero_ext): Likewise.
5176 (aarch64_emit_swap): Likewise.
5177 (aarch64_emit_stack_adjust): Likewise.
5178 (aarch64_emit_int_call_1): Likewise.
5179 (aarch64_emit_void_call_2): Likewise.
5180 (aarch64_emit_eq_goto): Likewise.
5181 (aarch64_emit_ne_goto): Likewise.
5182 (aarch64_emit_lt_goto): Likewise.
5183 (aarch64_emit_le_goto): Likewise.
5184 (aarch64_emit_gt_goto): Likewise.
5185 (aarch64_emit_ge_got): Likewise.
5186 (aarch64_emit_ops_impl): New static global variable.
5187 (aarch64_emit_ops): New target function, return
5188 &aarch64_emit_ops_impl.
5189 (struct linux_target_ops): Install it.
5191 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5193 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5194 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5196 * linux-aarch64-ipa.c: New file.
5197 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5199 (aarch64_get_thread_area): New target method.
5200 (extract_signed_bitfield): New helper function.
5201 (aarch64_decode_ldr_literal): New function.
5202 (enum aarch64_opcodes): New enum.
5203 (struct aarch64_register): New struct.
5204 (struct aarch64_operand): New struct.
5205 (x0): New static global.
5214 (aarch64_register): New helper function.
5215 (register_operand): Likewise.
5216 (immediate_operand): Likewise.
5217 (struct aarch64_memory_operand): New struct.
5218 (offset_memory_operand): New helper function.
5219 (preindex_memory_operand): Likewise.
5220 (enum aarch64_system_control_registers): New enum.
5221 (ENCODE): New macro.
5222 (emit_insn): New helper function.
5223 (emit_b): New function.
5224 (emit_bcond): Likewise.
5225 (emit_cb): Likewise.
5226 (emit_tb): Likewise.
5227 (emit_blr): Likewise.
5228 (emit_stp): Likewise.
5229 (emit_ldp_q_offset): Likewise.
5230 (emit_stp_q_offset): Likewise.
5231 (emit_load_store): Likewise.
5232 (emit_ldr): Likewise.
5233 (emit_ldrsw): Likewise.
5234 (emit_str): Likewise.
5235 (emit_ldaxr): Likewise.
5236 (emit_stxr): Likewise.
5237 (emit_stlr): Likewise.
5238 (emit_data_processing_reg): Likewise.
5239 (emit_data_processing): Likewise.
5240 (emit_add): Likewise.
5241 (emit_sub): Likewise.
5242 (emit_mov): Likewise.
5243 (emit_movk): Likewise.
5244 (emit_mov_addr): Likewise.
5245 (emit_mrs): Likewise.
5246 (emit_msr): Likewise.
5247 (emit_sevl): Likewise.
5248 (emit_wfe): Likewise.
5249 (append_insns): Likewise.
5250 (can_encode_int32_in): New helper function.
5251 (aarch64_relocate_instruction): New function.
5252 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5253 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5254 (struct linux_target_ops): Install aarch64_get_thread_area,
5255 aarch64_install_fast_tracepoint_jump_pad and
5256 aarch64_get_min_fast_tracepoint_insn_len.
5258 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5260 * Makefile.in (aarch64-insn.o): New rule.
5261 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5263 2015-09-21 Yao Qi <yao.qi@linaro.org>
5265 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5267 2015-09-21 Yao Qi <yao.qi@linaro.org>
5269 * tracepoint.c (max_jump_pad_size): Remove.
5271 2015-09-18 Yao Qi <yao.qi@linaro.org>
5273 * linux-aarch64-low.c: Don't include sys/uio.h.
5274 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5276 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5278 * tracepoint.c (eval_result_type): Change prototype.
5279 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5281 2015-09-15 Pedro Alves <palves@redhat.com>
5283 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5284 Check whether to report exec events instead of checking whether
5285 multiprocess is enabled.
5287 2015-09-15 Pedro Alves <palves@redhat.com>
5290 * remote-utils.c (prepare_resume_reply): Merge
5291 TARGET_WAITKIND_VFORK_DONE switch case with the
5292 TARGET_WAITKIND_FORKED case.
5294 2015-09-15 Yao Qi <yao.qi@linaro.org>
5296 * server.c (handle_query): Check string comparison using
5297 "else if" instead of "if".
5299 2015-09-15 Yao Qi <yao.qi@linaro.org>
5301 * server.c (vCont_supported): New global variable.
5302 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5303 matches. Append ";vContSupported+" to own_buf.
5304 (handle_v_requests): Append ";s;S" to own_buf if target supports
5305 hardware single step or vCont_supported is false.
5306 (capture_main): Set vCont_supported to zero.
5308 2015-09-15 Yao Qi <yao.qi@linaro.org>
5310 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5312 (linux_supports_hardware_single_step): ... New function.
5313 (linux_target_ops): Update.
5314 * lynx-low.c (lynx_target_ops): Set field
5315 supports_hardware_single_step to target_can_do_hardware_single_step.
5316 * nto-low.c (nto_target_ops): Likewise.
5317 * spu-low.c (spu_target_ops): Likewise.
5318 * win32-low.c (win32_target_ops): Likewise.
5319 * target.c (target_can_do_hardware_single_step): New function.
5320 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5321 Remove. <supports_hardware_single_step>: New field.
5322 (target_supports_conditional_breakpoints): Remove.
5323 (target_supports_hardware_single_step): New macro.
5324 (target_can_do_hardware_single_step): Declare.
5325 * server.c (handle_query): Use target_supports_hardware_single_step
5326 instead of target_supports_conditional_breakpoints.
5328 2015-09-15 Yao Qi <yao.qi@linaro.org>
5330 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5332 (struct linux_target_ops the_low_target): Install
5333 aarch64_linux_siginfo_fixup.
5335 2015-09-11 Don Breazeal <donb@codesourcery.com>
5336 Luis Machado <lgustavo@codesourcery.com>
5338 * linux-low.c (linux_mourn): Static declaration.
5339 (linux_arch_setup): Move in front of
5340 handle_extended_wait.
5341 (linux_arch_setup_thread): New function.
5342 (handle_extended_wait): Handle exec events. Call
5343 linux_arch_setup_thread. Make event_lwp argument a
5344 pointer-to-a-pointer.
5345 (check_zombie_leaders): Do not check stopped threads.
5346 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5347 (linux_low_filter_event): Add lwp and thread for exec'ing
5348 non-leader thread if leader thread has been deleted.
5349 Refactor code into linux_arch_setup_thread and call it.
5350 Pass child lwp pointer by reference to handle_extended_wait.
5351 (linux_wait_for_event_filtered): Update comment.
5352 (linux_wait_1): Prevent clobbering exec event status.
5353 (linux_supports_exec_events): New function.
5354 (linux_target_ops) <supports_exec_events>: Initialize new member.
5355 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5357 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5358 * server.c (report_exec_events): New global variable.
5359 (handle_query): Handle qSupported query for exec-events feature.
5360 (captured_main): Initialize report_exec_events.
5361 * server.h (report_exec_events): Declare new global variable.
5362 * target.h (struct target_ops) <supports_exec_events>: New
5364 (target_supports_exec_events): New macro.
5365 * win32-low.c (win32_target_ops) <supports_exec_events>:
5366 Initialize new member.
5368 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5370 * linux-low.c (linux_low_enable_btrace): Remove.
5371 (linux_target_ops): Replace linux_low_enable_btrace with
5372 linux_enable_btrace.
5374 2015-09-03 Yao Qi <yao.qi@linaro.org>
5376 * linux-aarch64-low.c (aarch64_insert_point): Call
5377 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5380 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5382 * linux-low.c (check_stopped_by_breakpoint): Use
5383 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5385 2015-08-27 Pedro Alves <palves@redhat.com>
5387 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5389 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5391 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5392 the XNEW-family equivalent.
5393 (compile_bytecodes): Likewise.
5394 * dll.c (loaded_dll): Likewise.
5395 * event-loop.c (append_callback_event): Likewise.
5396 (create_file_handler): Likewise.
5397 (create_file_event): Likewise.
5398 * hostio.c (handle_open): Likewise.
5399 * inferiors.c (add_thread): Likewise.
5400 (add_process): Likewise.
5401 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5402 * linux-arm-low.c (arm_new_process): Likewise.
5403 (arm_new_thread): Likewise.
5404 * linux-low.c (add_to_pid_list): Likewise.
5405 (linux_add_process): Likewise.
5406 (handle_extended_wait): Likewise.
5407 (add_lwp): Likewise.
5408 (enqueue_one_deferred_signal): Likewise.
5409 (enqueue_pending_signal): Likewise.
5410 (linux_resume_one_lwp_throw): Likewise.
5411 (linux_resume_one_thread): Likewise.
5412 (linux_read_memory): Likewise.
5413 (linux_write_memory): Likewise.
5414 * linux-mips-low.c (mips_linux_new_process): Likewise.
5415 (mips_linux_new_thread): Likewise.
5416 (mips_add_watchpoint): Likewise.
5417 * linux-x86-low.c (initialize_low_arch): Likewise.
5418 * lynx-low.c (lynx_add_process): Likewise.
5419 * mem-break.c (set_raw_breakpoint_at): Likewise.
5420 (set_breakpoint): Likewise.
5421 (add_condition_to_breakpoint): Likewise.
5422 (add_commands_to_breakpoint): Likewise.
5423 (clone_agent_expr): Likewise.
5424 (clone_one_breakpoint): Likewise.
5425 * regcache.c (new_register_cache): Likewise.
5426 * remote-utils.c (look_up_one_symbol): Likewise.
5427 * server.c (queue_stop_reply): Likewise.
5428 (start_inferior): Likewise.
5429 (queue_stop_reply_callback): Likewise.
5430 (handle_target_event): Likewise.
5431 * spu-low.c (fetch_ppc_memory): Likewise.
5432 (store_ppc_memory): Likewise.
5433 * target.c (set_target_ops): Likewise.
5434 * thread-db.c (thread_db_load_search): Likewise.
5435 (try_thread_db_load_1): Likewise.
5436 * tracepoint.c (add_tracepoint): Likewise.
5437 (add_tracepoint_action): Likewise.
5438 (create_trace_state_variable): Likewise.
5439 (cmd_qtdpsrc): Likewise.
5440 (cmd_qtro): Likewise.
5441 (add_while_stepping_state): Likewise.
5442 * win32-low.c (child_add_thread): Likewise.
5443 (get_image_name): Likewise.
5445 2015-08-25 Yao Qi <yao.qi@linaro.org>
5447 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5449 2015-08-25 Yao Qi <yao.qi@linaro.org>
5451 * Makefile.in (aarch64-linux.o): New rule.
5452 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5454 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5455 (aarch64_init_debug_reg_state): Make it extern.
5456 (aarch64_linux_prepare_to_resume): Remove.
5458 2015-08-25 Yao Qi <yao.qi@linaro.org>
5460 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5461 lwp_arch_private_info and ptid_of_lwp.
5463 2015-08-25 Yao Qi <yao.qi@linaro.org>
5465 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5466 Find proc_info by find_process_pid. All callers updated.
5468 2015-08-25 Yao Qi <yao.qi@linaro.org>
5470 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5472 (debug_reg_change_callback): Remove.
5473 (aarch64_notify_debug_reg_change): Remove.
5475 2015-08-25 Yao Qi <yao.qi@linaro.org>
5477 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5478 Call current_lwp_ptid.
5480 2015-08-25 Yao Qi <yao.qi@linaro.org>
5482 * linux-aarch64-low.c (debug_reg_change_callback): Use
5485 2015-08-25 Yao Qi <yao.qi@linaro.org>
5487 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5489 2015-08-25 Yao Qi <yao.qi@linaro.org>
5491 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5493 2015-08-25 Yao Qi <yao.qi@linaro.org>
5495 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5498 2015-08-25 Yao Qi <yao.qi@linaro.org>
5500 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5502 (debug_reg_change_callback): Remove argument entry and add argument
5503 lwp. Remove local variable thread. Don't print thread id in the
5504 debugging output. Don't check whether pid of thread equals to pid.
5505 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5506 iterate_over_lwps instead find_inferior.
5508 2015-08-24 Pedro Alves <palves@redhat.com>
5510 * inferiors.c (get_first_process): New function.
5511 * inferiors.h (get_first_process): New declaration.
5512 * remote-utils.c (read_ptid): Default to the first process in the
5513 list, instead of to the current thread's process.
5515 2015-08-24 Pedro Alves <palves@redhat.com>
5517 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5518 * event-loop.c: Likewise.
5519 * remote-utils.c: Likewise.
5520 * tracepoint.c: Likewise.
5522 2015-08-24 Pedro Alves <palves@redhat.com>
5524 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5527 2015-08-21 Pedro Alves <palves@redhat.com>
5529 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5530 instead of literal 1.
5532 2015-08-21 Pedro Alves <palves@redhat.com>
5534 * tdesc.c (default_description): Explicitly zero-initialize.
5536 2015-08-21 Pedro Alves <palves@redhat.com>
5539 * inferiors.c (remove_thread): Discard any pending stop reply for
5541 * server.c (remove_all_on_match_pid): Rename to ...
5542 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5544 (discard_queued_stop_replies): Change parameter to a ptid. Now
5546 (handle_v_kill, kill_inferior_callback, captured_main)
5547 (process_serial_event): Adjust.
5548 * server.h (discard_queued_stop_replies): Declare.
5550 2015-08-21 Pedro Alves <palves@redhat.com>
5552 * linux-low.c (wait_for_sigstop): Always switch to no thread
5553 selected if the previously current thread dies.
5554 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5555 process instead of the current thread's.
5556 * remote-utils.c (input_interrupt): Don't check if there's no
5558 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5559 current thread to the general thread fails, error out.
5560 (handle_qxfer_auxv, handle_qxfer_libraries)
5561 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5562 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5563 (handle_query): Check if there's a thread selected instead of
5564 checking whether there's any thread in the thread list.
5565 (handle_qxfer_threads, handle_qxfer_btrace)
5566 (handle_qxfer_btrace_conf): Don't error out early if there's no
5567 thread in the thread list.
5568 (handle_v_cont, myresume): Don't set the current thread to the
5570 (process_serial_event) <Hg handling>: Also set thread_id if the
5571 previous general thread is still alive.
5572 (process_serial_event) <g/G handling>: If setting the current
5573 thread to the general thread fails, error out.
5574 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5575 thread's lwp instead of the current thread's.
5576 * target.c (set_desired_thread): If the desired thread was not
5577 found, leave the current thread pointing to NULL. Return an int
5578 (boolean) indicating success.
5579 * target.h (set_desired_thread): Change return type to int.
5581 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5583 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5584 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5586 (ps_get_thread_area): New function.
5588 2015-08-19 Gary Benson <gbenson@redhat.com>
5590 * hostio.c (handle_pread): Do not attempt to read more data
5591 than hostio_reply_with_data can fit in a packet.
5593 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5595 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5597 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5599 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5601 2015-08-06 Pedro Alves <palves@redhat.com>
5603 * tracepoint.c (expr_eval_result): Now an int.
5605 2015-08-06 Pedro Alves <palves@redhat.com>
5607 * gdbthread.h (struct regcache): Forward declare.
5608 (struct thread_info) <regcache_data>: Now a struct regcache
5610 * inferiors.c (inferior_regcache_data)
5611 (set_inferior_regcache_data): Now work with struct regcache
5613 * inferiors.h (struct regcache): Forward declare.
5614 (inferior_regcache_data, set_inferior_regcache_data): Now work
5615 with struct regcache pointers.
5616 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5617 (free_register_cache_thread): Remove struct regcache pointer
5620 2015-08-06 Pedro Alves <palves@redhat.com>
5622 * server.c (captured_main): On error, print the exception message
5623 to stderr, and if run_once is set, throw a quit.
5625 2015-08-06 Pedro Alves <palves@redhat.com>
5627 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5630 2015-08-06 Pedro Alves <palves@redhat.com>
5632 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5633 reading beyond the passed in buffer length.
5635 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5637 * tracepoint.c (symbol_list) <required>: Remove.
5639 2015-08-06 Pedro Alves <palves@redhat.com>
5641 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5642 count if stopping and suspending threads.
5643 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5644 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5645 (linux_detach): Complete an ongoing step-over.
5646 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5648 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5649 (linux_wait_1): If passing a signal to the inferior after
5650 finishing a step-over, unsuspend and re-resume all lwps. If we
5651 see a single-step event but the thread should be continuing, don't
5652 pass the trap to gdb.
5653 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5654 internal_error instead of gdb_assert.
5655 (enqueue_pending_signal): New function.
5656 (check_ptrace_stopped_lwp_gone): Add debug output.
5657 (start_step_over): Use internal_error instead of gdb_assert.
5658 (complete_ongoing_step_over): New function.
5659 (linux_resume_one_thread): Don't resume a suspended thread.
5660 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5663 2015-08-06 Pedro Alves <palves@redhat.com>
5665 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5666 (linux_thread_alive): Use lwp_is_marked_dead.
5667 (extended_event_reported): Delete.
5668 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5669 instead of extended_event_reported.
5670 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5672 (lwp_is_marked_dead): New function.
5673 (lwp_running): Use lwp_is_marked_dead.
5674 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5677 2015-08-06 Pedro Alves <palves@redhat.com>
5679 * linux-low.c (linux_wait_1): Move fork event output out of the
5680 !report_to_gdb check. Pass event_child->waitstatus to
5681 target_waitstatus_to_string instead of ourstatus.
5683 2015-08-04 Yao Qi <yao.qi@linaro.org>
5685 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5686 if current_thread is 32 bit.
5688 2015-08-04 Yao Qi <yao.qi@linaro.org>
5690 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5691 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5692 * server.c (extended_protocol): Remove "static".
5693 * server.h (extended_protocol): Declare it.
5695 2015-08-04 Yao Qi <yao.qi@linaro.org>
5697 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5698 both aarch64 and aarch32.
5699 (aarch64_set_pc): Likewise.
5701 2015-08-04 Yao Qi <yao.qi@linaro.org>
5703 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5704 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5705 arm-with-neon.xml to srv_xmlfiles.
5706 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5707 (is_64bit_tdesc): New function.
5708 (aarch64_linux_read_description): New function.
5709 (aarch64_arch_setup): Call aarch64_linux_read_description.
5710 (regs_info): Rename to regs_info_aarch64.
5711 (aarch64_regs_info): Return right regs_info.
5712 (initialize_low_arch): Call initialize_low_arch_aarch32.
5714 2015-08-04 Yao Qi <yao.qi@linaro.org>
5716 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5717 * linux-aarch32-low.c: New file.
5718 * linux-aarch32-low.h: New file.
5719 * linux-arm-low.c (arm_fill_gregset): Move it to
5720 linux-aarch32-low.c.
5721 (arm_store_gregset): Likewise.
5722 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5723 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5724 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5725 (regs_info): Rename to regs_info_arm.
5726 (arm_regs_info): Return regs_info_aarch32 if
5727 have_ptrace_getregset is 1 and target description is
5728 arm_with_neon or arm_with_vfpv3.
5729 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5730 Call initialize_low_arch_aarch32 instead.
5732 2015-08-04 Yao Qi <yao.qi@linaro.org>
5734 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5735 * linux-low.c: ... here.
5736 * linux-low.h (have_ptrace_getregset): Declare it.
5738 2015-08-04 Pedro Alves <palves@redhat.com>
5740 * thread-db.c (struct thread_db): Use new typedefs.
5741 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5743 (disable_thread_event_reporting): Cast result of dlsym to
5744 destination function pointer type.
5745 (thread_db_mourn): Use td_ta_delete_ftype.
5747 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5749 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5751 (CDX_BREAKPOINT): Define for R2.
5752 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5753 (the_low_target): Add comments.
5755 2015-07-30 Yao Qi <yao.qi@linaro.org>
5757 * linux-arm-low.c (arm_hwcap): Remove it.
5758 (arm_read_description): New local variable arm_hwcap. Don't
5759 set arm_hwcap to zero.
5761 2015-07-30 Yao Qi <yao.qi@linaro.org>
5763 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5764 Use regcache->tdesc instead.
5765 (arm_store_wmmxregset): Likewise.
5766 (arm_fill_vfpregset): Likewise.
5767 (arm_store_vfpregset): Likewise.
5769 2015-07-30 Yao Qi <yao.qi@linaro.org>
5771 * linux-arm-low.c: Include arch/arm.h.
5772 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5773 (arm_store_gregset): Likewise.
5775 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5777 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5778 ptrace's 4th parameter.
5780 2015-07-27 Yao Qi <yao.qi@linaro.org>
5782 * configure.srv (case aarch64*-*-linux*): Don't set
5785 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5787 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5789 * linux-arm-low.c: Likewise.
5790 * linux-cris-low.c: Likewise.
5791 * linux-crisv32-low.c: Likewise.
5792 * linux-low.c: Likewise.
5793 * linux-m68k-low.c: Likewise.
5794 * linux-mips-low.c: Likewise.
5795 * linux-nios2-low.c: Likewise.
5796 * linux-s390-low.c: Likewise.
5797 * linux-sparc-low.c: Likewise.
5798 * linux-tic6x-low.c: Likewise.
5799 * linux-tile-low.c: Likewise.
5800 * linux-x86-low.c: Likewise.
5802 2015-07-24 Pedro Alves <palves@redhat.com>
5804 * config.in: Regenerate.
5805 * configure: Regenerate.
5807 2015-07-24 Pedro Alves <palves@redhat.com>
5809 * acinclude.m4: Include ../ptrace.m4.
5810 * configure.ac: Call GDB_AC_PTRACE.
5811 * config.in, configure: Regenerate.
5813 2015-07-24 Yao Qi <yao.qi@linaro.org>
5815 * linux-low.c (linux_create_inferior): Remove setting to
5816 proc->priv->new_inferior.
5817 (linux_attach): Likewise.
5818 (linux_low_filter_event): Likewise.
5819 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5821 2015-07-24 Yao Qi <yao.qi@linaro.org>
5823 * linux-low.c (linux_arch_setup): New function.
5824 (linux_low_filter_event): If proc->tdesc is NULL and
5825 proc->attached is true, call the_low_target.arch_setup.
5826 Otherwise, keep status pending, and return.
5827 (linux_resume_one_lwp_throw): Don't call get_pc if
5828 thread->while_stepping isn't NULL. Don't call
5829 get_thread_regcache if proc->tdesc is NULL.
5830 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5831 (linux_target_ops): Install arch_setup.
5832 * server.c (start_inferior): Call the_target->arch_setup.
5833 * target.h (struct target_ops) <arch_setup>: New field.
5834 (target_arch_setup): New marco.
5835 * lynx-low.c (lynx_target_ops): Update.
5836 * nto-low.c (nto_target_ops): Update.
5837 * spu-low.c (spu_target_ops): Update.
5838 * win32-low.c (win32_target_ops): Update.
5840 2015-07-24 Yao Qi <yao.qi@linaro.org>
5842 * linux-low.c (linux_add_process): Don't set
5843 proc->priv->new_inferior.
5844 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5845 (linux_attach): Likewise.
5847 2015-07-24 Yao Qi <yao.qi@linaro.org>
5849 * server.c (start_inferior): Code refactor.
5851 2015-07-24 Yao Qi <yao.qi@linaro.org>
5853 * server.c (process_serial_event): Set general_thread.
5855 2015-07-21 Yao Qi <yao.qi@linaro.org>
5857 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5858 aarch64_linux_get_debug_reg_capacity.
5860 2015-07-17 Yao Qi <yao.qi@linaro.org>
5862 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5863 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5864 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5865 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5866 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5867 (AARCH64_HWP_ALIGNMENT): Likewise.
5868 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5869 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5870 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5871 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5872 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5873 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5874 (struct aarch64_debug_reg_state): Likewise.
5875 (struct arch_lwp_info): Likewise.
5876 (aarch64_align_watchpoint): Likewise.
5877 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5878 (aarch64_watchpoint_length): Likewise.
5879 (aarch64_point_encode_ctrl_reg): Likewise
5880 (aarch64_point_is_aligned): Likewise.
5881 (aarch64_align_watchpoint): Likewise.
5882 (aarch64_linux_set_debug_regs):
5883 (aarch64_dr_state_insert_one_point): Likewise.
5884 (aarch64_dr_state_remove_one_point): Likewise.
5885 (aarch64_handle_breakpoint): Likewise.
5886 (aarch64_handle_aligned_watchpoint): Likewise.
5887 (aarch64_handle_unaligned_watchpoint): Likewise.
5888 (aarch64_handle_watchpoint): Likewise.
5890 2015-07-17 Yao Qi <yao.qi@linaro.org>
5892 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5893 and don't aarch64_get_debug_reg_state. All callers update.
5894 (aarch64_handle_aligned_watchpoint): Likewise.
5895 (aarch64_handle_unaligned_watchpoint): Likewise.
5896 (aarch64_handle_watchpoint): Likewise.
5897 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5898 (aarch64_remove_point): Likewise.
5900 2015-07-17 Yao Qi <yao.qi@linaro.org>
5902 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5904 (aarch64_handle_unaligned_watchpoint): Likewise.
5906 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5908 Revert the previous 3 commits:
5909 Move gdb_regex* to common/
5910 Move linux_find_memory_regions_full & co.
5911 gdbserver build-id attribute generator
5913 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5914 Jan Kratochvil <jan.kratochvil@redhat.com>
5916 gdbserver build-id attribute generator.
5917 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5918 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5919 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5921 (get_dynamic): Use find_pdhr to traverse program headers.
5922 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5923 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5924 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5925 (get_hex_build_id): New.
5926 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5927 to reply XML document.
5929 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5930 Jan Kratochvil <jan.kratochvil@redhat.com>
5932 * target.c: Include target/target-utils.h and fcntl.h.
5933 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5934 (target_fileio_read_stralloc): New functions.
5936 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5938 * Makefile.in (OBS): Add gdb_regex.o.
5940 * config.in: Rebuilt.
5941 * configure: Rebuilt.
5943 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5944 Jan Kratochvil <jan.kratochvil@redhat.com>
5946 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5947 * Makefile.in (OBS): Add target-utils.o.
5948 (linux-maps.o, target-utils.o): New.
5949 * configure.srv (srv_linux_obj): Add linux-maps.o.
5951 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5953 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5955 (the_low_target): Install it.
5957 2015-07-14 Pedro Alves <palves@redhat.com>
5959 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5960 Instead, ignore ECHILD, and throw an error for other errnos.
5962 2015-07-10 Pedro Alves <palves@redhat.com>
5964 * event-loop.c (struct callback_event) <data>: Change type to
5965 gdb_client_data instance instead of gdb_client_data pointer.
5966 (append_callback_event): Adjust.
5968 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5970 * linux-aarch64-low.c: Add comments for each linux_target_ops
5971 method. Remove comments already covered in target_ops and
5972 linux_target_ops definitions.
5973 (the_low_target): Add comments for each unimplemented method.
5975 2015-07-09 Yao Qi <yao.qi@linaro.org>
5977 * linux-aarch64-low.c (aarch64_regmap): Remove.
5978 (aarch64_usrregs_info): Remove.
5979 (regs_info): Set field usrregs to NULL.
5981 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5983 * linux-low.c: Include "rsp-low.h"
5984 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5985 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5986 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5987 (handle_btrace_enable_pt): New.
5988 (handle_btrace_general_set): Support "pt".
5989 (handle_btrace_conf_general_set): Support "pt:size".
5991 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5993 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5996 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5998 * linux-aarch64-low.c: Remove comment about endianness.
5999 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6000 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6003 2015-06-24 Gary Benson <gbenson@redhat.com>
6005 * linux-i386-ipa.c (stdint.h): Do not include.
6006 * lynx-i386-low.c (stdint.h): Likewise.
6007 * lynx-ppc-low.c (stdint.h): Likewise.
6008 * mem-break.c (stdint.h): Likewise.
6009 * thread-db.c (stdint.h): Likewise.
6010 * tracepoint.c (stdint.h): Likewise.
6011 * win32-low.c (stdint.h): Likewise.
6013 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6015 * server.c (write_qxfer_response): Update call to
6016 remote_escape_output.
6018 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6019 Jan Kratochvil <jan.kratochvil@redhat.com>
6021 Merge multiple hex conversions.
6022 * gdbreplay.c (tohex): Rename to 'fromhex'.
6023 (logchar): Use fromhex.
6025 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6027 * server.c (handle_qxfer_libraries): Set `version' attribute for
6030 2015-06-10 Gary Benson <gbenson@redhat.com>
6032 * target.h (struct target_ops) <multifs_open>: New field.
6033 <multifs_unlink>: Likewise.
6034 <multifs_readlink>: Likewise.
6035 * linux-low.c (nat/linux-namespaces.h): New include.
6036 (linux_target_ops): Initialize the_target->multifs_open,
6037 the_target->multifs_unlink and the_target->multifs_readlink.
6038 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6039 * hostio.c (hostio_fs_pid): New static variable.
6040 (hostio_handle_new_gdb_connection): New function.
6041 (handle_setfs): Likewise.
6042 (handle_open): Use the_target->multifs_open as appropriate.
6043 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6044 (handle_readlink): Use the_target->multifs_readlink as
6046 (handle_vFile): Handle vFile:setfs packets.
6047 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6048 after target_handle_new_gdb_connection.
6050 2015-06-10 Gary Benson <gbenson@redhat.com>
6052 * configure.ac (AC_CHECK_FUNCS): Add setns.
6053 * config.in: Regenerate.
6054 * configure: Likewise.
6055 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6056 (linux-namespaces.o): New rule.
6057 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6059 2015-06-09 Gary Benson <gbenson@redhat.com>
6061 * hostio.c (handle_open): Process mode argument with
6062 fileio_to_host_mode.
6064 2015-06-01 Yao Qi <yao.qi@linaro.org>
6066 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6067 * linux-x86-low.c: Likewise.
6069 2015-05-28 Don Breazeal <donb@codesourcery.com>
6071 * linux-low.c (handle_extended_wait): Initialize
6072 thread_info.last_resume_kind for new fork children.
6074 2015-05-15 Pedro Alves <palves@redhat.com>
6076 * target.h (target_handle_new_gdb_connection): Rewrite using if
6077 wrapped in do/while.
6079 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6081 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6082 * configure, config.in: Regenerate.
6083 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6086 2015-05-12 Don Breazeal <donb@codesourcery.com>
6088 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6089 PTRACE_EVENT_VFORK_DONE.
6090 (linux_low_ptrace_options, extended_event_reported): Add vfork
6092 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6093 and "vforkdone" for RSP 'T' Stop Reply Packet.
6094 * server.h (report_vfork_events): Declare
6097 2015-05-12 Don Breazeal <donb@codesourcery.com>
6099 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6100 (the_low_target) <new_fork>: Initialize new member.
6101 * linux-arm-low.c (arm_new_fork): New function.
6102 (the_low_target) <new_fork>: Initialize new member.
6103 * linux-low.c (handle_extended_wait): Call new target function
6105 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6106 * linux-mips-low.c (mips_add_watchpoint): New function
6107 extracted from mips_insert_point.
6108 (the_low_target) <new_fork>: Initialize new member.
6109 (mips_linux_new_fork): New function.
6110 (mips_insert_point): Call mips_add_watchpoint.
6111 * linux-x86-low.c (x86_linux_new_fork): New function.
6112 (the_low_target) <new_fork>: Initialize new member.
6114 2015-05-12 Don Breazeal <donb@codesourcery.com>
6116 * linux-low.c (handle_extended_wait): Implement return value,
6117 rename argument 'event_child' to 'event_lwp', handle
6118 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6119 (linux_low_ptrace_options): New function.
6120 (linux_low_filter_event): Call linux_low_ptrace_options,
6121 use different argument fo linux_enable_event_reporting,
6122 use return value from handle_extended_wait.
6123 (extended_event_reported): New function.
6124 (linux_wait_1): Call extended_event_reported and set
6125 status to report fork events.
6126 (linux_write_memory): Add pid to debug message.
6127 (reset_lwp_ptrace_options_callback): New function.
6128 (linux_handle_new_gdb_connection): New function.
6129 (linux_target_ops): Initialize new structure member.
6130 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6131 * lynx-low.c: Initialize new structure member.
6132 * remote-utils.c (prepare_resume_reply): Implement stop reason
6133 "fork" for "T" stop message.
6134 * server.c (handle_query): Call handle_new_gdb_connection.
6135 * server.h (report_fork_events): Declare global flag.
6136 * target.h (struct target_ops) <handle_new_gdb_connection>:
6138 (target_handle_new_gdb_connection): New macro.
6139 * win32-low.c: Initialize new structure member.
6141 2015-05-12 Don Breazeal <donb@codesourcery.com>
6143 * mem-break.c (APPEND_TO_LIST): Define macro.
6144 (clone_agent_expr): New function.
6145 (clone_one_breakpoint): New function.
6146 (clone_all_breakpoints): New function.
6147 * mem-break.h: Declare new functions.
6149 2015-05-12 Don Breazeal <donb@codesourcery.com>
6151 * linux-low.c (linux_supports_fork_events): New function.
6152 (linux_supports_vfork_events): New function.
6153 (linux_target_ops): Initialize new structure members.
6154 (initialize_low): Call linux_check_ptrace_features.
6155 * lynx-low.c (lynx_target_ops): Initialize new structure
6157 * server.c (report_fork_events, report_vfork_events):
6159 (handle_query): Add new features to qSupported packet and
6161 (captured_main): Initialize new global variables.
6162 * target.h (struct target_ops) <supports_fork_events>:
6164 <supports_vfork_events>: New member.
6165 (target_supports_fork_events): New macro.
6166 (target_supports_vfork_events): New macro.
6167 * win32-low.c (win32_target_ops): Initialize new structure
6170 2015-05-12 Gary Benson <gbenson@redhat.com>
6172 * server.c (handle_qxfer_exec_file): Use current process
6175 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6177 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6178 Remove HAVE_PTRACE_GETREGS conditionals.
6179 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6180 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6182 2015-05-08 Yao Qi <yao.qi@linaro.org>
6184 * linux-low.c (linux_supports_conditional_breakpoints): New
6186 (linux_target_ops): Install new target method.
6187 * lynx-low.c (lynx_target_ops): Install NULL hook for
6188 supports_conditional_breakpoints.
6189 * nto-low.c (nto_target_ops): Likewise.
6190 * spu-low.c (spu_target_ops): Likewise.
6191 * win32-low.c (win32_target_ops): Likewise.
6192 * server.c (handle_query): Check
6193 target_supports_conditional_breakpoints.
6194 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6196 (target_supports_conditional_breakpoints): New macro.
6198 2015-05-06 Pedro Alves <palves@redhat.com>
6201 * server.c (start_inferior): If the process exits, mourn it.
6203 2015-04-21 Gary Benson <gbenson@redhat.com>
6205 * hostio.c (fileio_open_flags_to_host): Factored out to
6206 fileio_to_host_openflags in common/fileio.c. Single use
6209 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6211 * linux-xtensa-low.c (xtensa_fill_gregset)
6212 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6215 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6217 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6218 (regs_info): Replace usrregs pointer with NULL.
6220 2015-04-17 Gary Benson <gbenson@redhat.com>
6222 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6223 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6224 * server.c (handle_qxfer_exec_file): New function.
6225 (qxfer_packets): Add exec-file entry.
6226 (handle_query): Report qXfer:exec-file:read as supported packet.
6228 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6230 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6232 2015-04-09 Gary Benson <gbenson@redhat.com>
6234 * hostio-errno.c (errno_to_fileio_error): Remove function.
6235 Update caller to use remote_fileio_to_fio_error.
6237 2015-04-09 Yao Qi <yao.qi@linaro.org>
6239 * linux-low.c (linux_insert_point): Call
6240 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6241 (linux_remove_point): Call remove_memory_breakpoint if type is
6243 * linux-x86-low.c (x86_insert_point): Don't call
6244 insert_memory_breakpoint.
6245 (x86_remove_point): Don't call remove_memory_breakpoint.
6247 2015-04-01 Pedro Alves <palves@redhat.com>
6248 Cleber Rosa <crosa@redhat.com>
6250 * server.c (gdbserver_usage): Reorganize and extend the usage
6253 2015-03-24 Pedro Alves <palves@redhat.com>
6255 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6256 output. Also dump TRAP_TRACE.
6257 (linux_low_filter_event): In debug output, distinguish a
6258 resume_stop SIGSTOP from a delayed SIGSTOP.
6260 2015-03-24 Gary Benson <gbenson@redhat.com>
6262 * linux-x86-low.c (x86_linux_new_thread): Moved to
6264 (x86_linux_prepare_to_resume): Likewise.
6266 2015-03-24 Gary Benson <gbenson@redhat.com>
6268 * Makefile.in (x86-linux-dregs.o): New rule.
6269 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6270 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6271 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6272 (x86_linux_dr_get): Likewise.
6273 (x86_linux_dr_set): Likewise.
6274 (update_debug_registers_callback): Likewise.
6275 (x86_linux_dr_set_addr): Likewise.
6276 (x86_linux_dr_get_addr): Likewise.
6277 (x86_linux_dr_set_control): Likewise.
6278 (x86_linux_dr_get_control): Likewise.
6279 (x86_linux_dr_get_status): Likewise.
6280 (x86_linux_update_debug_registers): Likewise.
6282 2015-03-24 Gary Benson <gbenson@redhat.com>
6284 * linux-x86-low.c (x86_linux_update_debug_registers):
6285 New function, factored out from...
6286 (x86_linux_prepare_to_resume): ...this.
6288 2015-03-24 Gary Benson <gbenson@redhat.com>
6290 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6291 (x86_linux_dr_set): Likewise.
6292 (update_debug_registers_callback): Likewise.
6293 (x86_linux_dr_set_addr): Likewise.
6294 (x86_linux_dr_get_addr): Likewise.
6295 (x86_linux_dr_set_control): Likewise.
6296 (x86_linux_dr_get_control): Likewise.
6297 (x86_linux_dr_get_status): Likewise.
6298 (x86_linux_prepare_to_resume): Likewise.
6300 2015-03-24 Gary Benson <gbenson@redhat.com>
6302 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6303 Use perror_with_name. Pass string through gettext.
6304 (x86_linux_dr_set): Likewise.
6306 2015-03-24 Gary Benson <gbenson@redhat.com>
6308 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6309 (x86_linux_dr_set_addr): ...this.
6310 (x86_dr_low_get_addr): Rename to...
6311 (x86_linux_dr_get_addr): ...this.
6312 (x86_dr_low_set_control): Rename to...
6313 (x86_linux_dr_set_control): ...this.
6314 (x86_dr_low_get_control): Rename to...
6315 (x86_linux_dr_get_control): ...this.
6316 (x86_dr_low_get_status): Rename to...
6317 (x86_linux_dr_get_status): ...this.
6318 (x86_dr_low): Update with new function names.
6320 2015-03-24 Gary Benson <gbenson@redhat.com>
6322 * Makefile.in (x86-linux.o): New rule.
6323 * configure.srv: Add x86-linux.o to relevant targets.
6324 * linux-low.c (lwp_set_arch_private_info): New function.
6325 (lwp_arch_private_info): Likewise.
6326 * linux-x86-low.c: Include nat/x86-linux.h.
6327 (arch_lwp_info): Removed structure.
6328 (update_debug_registers_callback):
6329 Use lwp_set_debug_registers_changed.
6330 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6331 and lwp_set_debug_registers_changed.
6332 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6334 2015-03-24 Gary Benson <gbenson@redhat.com>
6336 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6337 * linux-arm-low.c (arm_new_thread): Likewise.
6338 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6339 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6340 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6341 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6343 2015-03-24 Gary Benson <gbenson@redhat.com>
6345 * linux-low.c (ptid_of_lwp): New function.
6346 (lwp_is_stopped): Likewise.
6347 (lwp_stop_reason): Likewise.
6348 * linux-x86-low.c (update_debug_registers_callback):
6350 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6353 2015-03-24 Gary Benson <gbenson@redhat.com>
6355 * linux-low.h (linux_stop_lwp): Remove declaration.
6357 2015-03-24 Gary Benson <gbenson@redhat.com>
6359 * linux-low.h: Include nat/linux-nat.h.
6360 * linux-low.c (iterate_over_lwps_args): New structure.
6361 (iterate_over_lwps_filter): New function.
6362 (iterate_over_lwps): Likewise.
6363 * linux-x86-low.c (update_debug_registers_callback):
6364 Update signature to what iterate_over_lwps expects.
6365 Remove PID check that iterate_over_lwps now performs.
6366 (x86_dr_low_set_addr): Use iterate_over_lwps.
6367 (x86_dr_low_set_control): Likewise.
6369 2015-03-24 Gary Benson <gbenson@redhat.com>
6371 * linux-x86-low.c (x86_debug_reg_state): New function.
6372 (x86_linux_prepare_to_resume): Use the above.
6374 2015-03-24 Gary Benson <gbenson@redhat.com>
6376 * linux-low.c (current_lwp_ptid): New function.
6377 * linux-x86-low.c: Include nat/linux-nat.h.
6378 (x86_dr_low_get_addr): Use current_lwp_ptid.
6379 (x86_dr_low_get_control): Likewise.
6380 (x86_dr_low_get_status): Likewise.
6382 2015-03-20 Pedro Alves <palves@redhat.com>
6384 * tracepoint.c (cmd_qtstatus): Make "str" const.
6386 2015-03-20 Pedro Alves <palves@redhat.com>
6388 * server.c (handle_general_set): Make "req_str" const.
6390 2015-03-19 Pedro Alves <palves@redhat.com>
6392 * linux-low.c (linux_resume_one_lwp): Rename to ...
6393 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6394 instead call perror_with_name.
6395 (check_ptrace_stopped_lwp_gone): New function.
6396 (linux_resume_one_lwp): Reimplement as wrapper around
6397 linux_resume_one_lwp_throw that swallows errors if the LWP is
6400 2015-03-19 Pedro Alves <palves@redhat.com>
6402 * linux-low.c (count_events_callback, select_event_lwp_callback):
6403 No longer check whether the thread has resume_stop as last resume
6406 2015-03-19 Pedro Alves <palves@redhat.com>
6408 * linux-low.c (count_events_callback, select_event_lwp_callback):
6409 Use the lwp's status_pending_p field, not the thread's.
6411 2015-03-19 Pedro Alves <palves@redhat.com>
6413 * linux-low.c (select_event_lwp_callback): Update comments to
6414 no longer mention SIGTRAP.
6416 2015-03-18 Gary Benson <gbenson@redhat.com>
6418 * server.c (handle_query): Do not report vFile:fstat as supported.
6420 2015-03-11 Gary Benson <gbenson@redhat.com>
6422 * hostio.c (sys/types.h): New include.
6423 (sys/stat.h): Likewise.
6424 (common-remote-fileio.h): Likewise.
6425 (handle_fstat): New function.
6426 (handle_vFile): Handle vFile:fstat packets.
6428 2015-03-11 Gary Benson <gbenson@redhat.com>
6430 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6431 struct stat.st_blocks and struct stat.st_blksize.
6432 * configure: Regenerate.
6433 * config.in: Likewise.
6434 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6435 (OBS): Add common-remote-fileio.o.
6436 (common-remote-fileio.o): New rule.
6438 2015-03-09 Pedro Alves <palves@redhat.com>
6440 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6441 'struct sockaddr' pointer in 'accept' call.
6443 2015-03-09 Pedro Alves <palves@redhat.com>
6446 2015-03-07 Pedro Alves <palves@redhat.com>
6447 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6448 or <winsock2.h> here. Instead include "gdb_socket.h".
6449 (remote_open): Use union gdb_sockaddr_u.
6450 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6451 or <winsock2.h> here. Instead include "gdb_socket.h".
6452 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6453 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6455 (init_named_socket, gdb_agent_helper_thread): Use union
6458 2015-03-07 Pedro Alves <palves@redhat.com>
6460 * configure.ac (build_warnings): Move
6461 -Wdeclaration-after-statement to the C-specific set.
6462 * configure: Regenerate.
6464 2015-03-07 Pedro Alves <palves@redhat.com>
6466 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6467 or <winsock2.h> here. Instead include "gdb_socket.h".
6468 (remote_open): Use union gdb_sockaddr_u.
6469 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6470 or <winsock2.h> here. Instead include "gdb_socket.h".
6471 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6472 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6474 (init_named_socket, gdb_agent_helper_thread): Use union
6477 2015-03-07 Pedro Alves <palves@redhat.com>
6479 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6482 2015-03-06 Yao Qi <yao.qi@linaro.org>
6484 * linux-aarch64-low.c (aarch64_insert_point): Use
6485 show_debug_regs as a boolean.
6486 (aarch64_remove_point): Likewise.
6488 2015-03-05 Pedro Alves <palves@redhat.com>
6490 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6491 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6492 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6493 * nto-low.c (nto_target_ops): Likewise.
6494 * spu-low.c (spu_target_ops): Likewise.
6495 * win32-low.c (win32_target_ops): Likewise.
6497 2015-03-04 Pedro Alves <palves@redhat.com>
6499 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6500 Decide whether a breakpoint triggered based on the SIGTRAP's
6502 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6503 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6504 (linux_low_filter_event): Check for breakpoints before checking
6506 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6508 (linux_stopped_by_sw_breakpoint)
6509 (linux_supports_stopped_by_sw_breakpoint)
6510 (linux_stopped_by_hw_breakpoint)
6511 (linux_supports_stopped_by_hw_breakpoint): New functions.
6512 (linux_target_ops): Install new target methods.
6514 2015-03-04 Pedro Alves <palves@redhat.com>
6516 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6517 * server.c (swbreak_feature, hwbreak_feature): New globals.
6518 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6519 (captured_main): Clear swbreak_feature and hwbreak_feature.
6520 * server.h (swbreak_feature, hwbreak_feature): Declare.
6521 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6522 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6523 supports_stopped_by_hw_breakpoint>: New fields.
6524 (target_supports_stopped_by_sw_breakpoint)
6525 (target_stopped_by_sw_breakpoint)
6526 (target_supports_stopped_by_hw_breakpoint)
6527 (target_stopped_by_hw_breakpoint): Declare.
6529 2015-03-04 Pedro Alves <palves@redhat.com>
6531 enum lwp_stop_reason -> enum target_stop_reason
6532 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6533 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6534 (linux_wait_1, stuck_in_jump_pad_callback)
6535 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6536 (linux_stopped_by_watchpoint):
6537 * linux-low.h (enum lwp_stop_reason): Delete.
6538 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6539 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6541 2015-03-04 Yao Qi <yao.qi@linaro.org>
6543 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6545 2015-03-03 Gary Benson <gbenson@redhat.com>
6547 * hostio.c (handle_vFile): Fix prefix lengths.
6549 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6551 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6554 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6556 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6557 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6558 (clean): Add "rm -f" for above C files.
6559 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6560 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6561 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6562 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6563 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6564 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6565 (init_registers_s390x_vx_linux64)
6566 (init_registers_s390x_tevx_linux64)
6567 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6568 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6570 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6571 (s390_store_vxrs_high): New functions.
6572 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6574 (s390_arch_setup): Add logic for selecting one of the new target
6575 descriptions. Activate the new vector regsets if applicable.
6576 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6577 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6578 and init_registers_s390x_tevx_linux64.
6580 2015-03-01 Pedro Alves <palves@redhat.com>
6582 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6585 2015-02-27 Pedro Alves <palves@redhat.com>
6587 * linux-x86-low.c (u_debugreg_offset): New function.
6588 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6590 2015-02-27 Pedro Alves <palves@redhat.com>
6592 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6593 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6594 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6595 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6596 (ps_lsetfpregs, ps_getpid)
6597 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6598 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6599 (ps_lsetxregs, ps_plog): Declare.
6601 2015-02-27 Pedro Alves <palves@redhat.com>
6603 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6604 IP_AGENT_EXPORT_FUNC.
6605 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6606 IP_AGENT_EXPORT_FUNC.
6607 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6608 (IP_AGENT_EXPORT): Delete.
6609 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6610 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6611 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6612 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6613 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6614 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6615 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6616 (traceframe_read_count, traceframe_write_count)
6617 (traceframes_created, trace_state_variables, get_raw_reg)
6618 (get_trace_state_variable_value, set_trace_state_variable_value)
6619 (ust_loaded, helper_thread_id, cmd_buf): Use
6620 IPA_SYM_EXPORTED_NAME.
6621 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6622 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6623 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6624 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6625 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6626 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6627 EXTERN_C_PUSH/EXTERN_C_POP.
6628 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6629 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6630 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6631 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6632 (traceframe_write_count, traceframe_read_count)
6633 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6634 (about_to_request_buffer_space, get_trace_state_variable_value)
6635 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6636 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6637 EXTERN_C_PUSH/EXTERN_C_POP.
6638 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6639 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6640 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6641 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6642 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6643 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6644 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6645 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6647 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6648 (IP_AGENT_EXPORT_VAR_DECL): Define.
6650 (gdb_agent_get_raw_reg): Declare.
6652 2015-02-27 Tom Tromey <tromey@redhat.com>
6653 Pedro Alves <palves@redhat.com>
6655 Rename symbols whose names are reserved C++ keywords throughout.
6657 2015-02-27 Pedro Alves <palves@redhat.com>
6659 * Makefile.in (COMPILER): New, get it from autoconf.
6660 (CXX): Get from autoconf instead.
6661 (COMPILE.pre): Use COMPILER.
6662 (CC-LD): Rename to ...
6663 (CC_LD): ... this. Use COMPILER.
6664 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6665 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6666 * acinclude.m4: Include build-with-cxx.m4.
6667 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6668 Disable -Werror by default if building in C++ mode.
6669 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6670 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6671 the C++ compiler. Save/restore CXXFLAGS too.
6672 * configure: Regenerate.
6674 2015-02-27 Pedro Alves <palves@redhat.com>
6676 * acinclude.m4: Include libiberty.m4.
6677 * configure.ac: Call libiberty_INIT.
6678 * config.in, configure: Regenerate.
6680 2015-02-26 Pedro Alves <palves@redhat.com>
6682 * linux-low.c (linux_wait_1): When incrementing the PC past a
6683 program breakpoint always use the_low_target.breakpoint_len as
6684 increment, rather than the maximum between that and
6685 the_low_target.decr_pc_after_break.
6687 2015-02-23 Pedro Alves <palves@redhat.com>
6689 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6690 thread was doing a step-over; always adjust the PC if
6691 we stepped over a permanent breakpoint.
6692 (linux_wait_1): If we stepped over breakpoint that was on top of a
6693 permanent breakpoint, manually advance the PC past it.
6695 2015-02-23 Pedro Alves <palves@redhat.com>
6697 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6699 (x86_fill_gregset, x86_store_gregset): Use it when handling
6702 2015-02-20 Pedro Alves <palves@redhat.com>
6704 * thread-db.c: Include "nat/linux-procfs.h".
6705 (thread_db_init): Skip listing new threads if the kernel supports
6706 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6708 2015-02-20 Pedro Alves <palves@redhat.com>
6710 * linux-low.c (status_pending_p_callback): Use ptid_match.
6712 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6714 PR breakpoints/16812
6715 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6716 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6717 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6719 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6721 PR breakpoints/15956
6722 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6724 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6726 * linux-low.c (linux_low_btrace_conf): Print size.
6727 * server.c (handle_btrace_conf_general_set): New.
6728 (hanle_general_set): Call handle_btrace_conf_general_set.
6729 (handle_query): Report Qbtrace-conf:bts:size as supported.
6731 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6733 * linux-low.c (linux_low_enable_btrace): Update parameters.
6734 (linux_low_btrace_conf): New.
6735 (linux_target_ops)<to_btrace_conf>: Initialize.
6736 * server.c (current_btrace_conf): New.
6737 (handle_btrace_enable): Rename to ...
6738 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6739 to target_enable_btrace. Update comment. Update users.
6740 (handle_qxfer_btrace_conf): New.
6741 (qxfer_packets): Add btrace-conf entry.
6742 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6743 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6744 (target_ops)<read_btrace_conf>: New.
6745 (target_enable_btrace): Update parameters.
6746 (target_read_btrace_conf): New.
6748 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6750 * server.c (handle_btrace_general_set): Remove call to
6751 target_supports_btrace.
6752 (supported_btrace_packets): New.
6753 (handle_query): Call supported_btrace_packets.
6754 * target.h: include btrace-common.h.
6755 (btrace_target_info): Removed.
6756 (supports_btrace, target_supports_btrace): Update parameters.
6758 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6760 * Makefile.in (SFILES): Add common/btrace-common.c.
6761 (OBS): Add common/btrace-common.o.
6762 (btrace-common.o): Add build rules.
6763 * linux-low: Include btrace-common.h.
6764 (linux_low_read_btrace): Use struct btrace_data. Call
6765 btrace_data_init and btrace_data_fini.
6767 2015-02-06 Pedro Alves <palves@redhat.com>
6769 * thread-db.c (find_new_threads_callback): Add debug output.
6771 2015-02-04 Pedro Alves <palves@redhat.com>
6773 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6774 (resume_stopped_resumed_lwps): New function.
6775 (linux_wait_for_event_filtered): Use it.
6777 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6779 * Makefile.in (SFILES): Add linux-personality.c.
6780 (linux-personality.o): New rule.
6781 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6782 list of objects to be built.
6783 * linux-low.c: Include nat/linux-personality.h.
6784 (linux_create_inferior): Remove code to disable address space
6785 randomization (moved to ../nat/linux-personality.c). Create
6786 cleanup to disable address space randomization.
6788 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6790 * Makefile.in (posix-strerror.o): New rule.
6791 (mingw-strerror.o): Likewise.
6792 * configure: Regenerated.
6793 * configure.ac: Source file ../common/common.host. Initialize new
6794 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6796 2015-01-14 Yao Qi <yao@codesourcery.com>
6798 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6799 (ppc-linux.o): New rule.
6800 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6801 * configure.ac: AC_CHECK_FUNCS(getauxval).
6802 * config.in: Re-generated.
6803 * configure: Re-generated.
6804 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6805 ppc64_64bit_inferior_p
6807 2015-01-14 Yao Qi <yao@codesourcery.com>
6809 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6810 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6811 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6812 (PT_ORIG_R3, PT_TRAP): Likewise.
6813 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6814 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6815 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6817 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6819 * i387-fp.c (i387_cache_to_xsave): In look over
6820 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6821 zmmh_low_space field by use of zmmh_high_space.
6823 2015-01-09 Pedro Alves <palves@redhat.com>
6825 * linux-low.c (step_over_bkpt): Move higher up in the file.
6826 (handle_extended_wait): Don't store the stop_pc here.
6827 (get_stop_pc): Adjust comments and rename to ...
6828 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6829 stopped for a software breakpoint or hardware breakpoint.
6830 (thread_still_has_status_pending_p): New function.
6831 (status_pending_p_callback): Use
6832 thread_still_has_status_pending_p. If the event is no longer
6833 interesting, resume the LWP.
6834 (handle_tracepoints): Add assert.
6835 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6836 (wstatus_maybe_breakpoint): New function.
6837 (cancel_breakpoint): Delete function.
6838 (check_stopped_by_watchpoint): New function, factored out from
6839 linux_low_filter_event.
6840 (lp_status_maybe_breakpoint): Delete function.
6841 (linux_low_filter_event): Remove filter_ptid argument.
6842 Leave thread group exits pending here. Store the LWP's stop PC.
6843 Always leave events pending.
6844 (linux_wait_for_event_filtered): Pull all events out of the
6845 kernel, and leave them all pending.
6846 (count_events_callback, select_event_lwp_callback): Consider all
6848 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6849 (select_event_lwp): Only give preference to the stepping LWP in
6850 all-stop mode. Adjust comments.
6851 (ignore_event): New function.
6852 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6853 references to cancel_breakpoints. Adjust to renames. Also give
6854 equal priority to all LWPs that have had events in non-stop mode.
6855 If reporting a software breakpoint event, unadjust the LWP's PC.
6856 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6857 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6859 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6860 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6861 (linux_stopped_by_watchpoint): Adjust.
6862 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6863 * linux-low.h (enum lwp_stop_reason): New.
6864 (struct lwp_info) <stop_pc>: Adjust comment.
6865 <stopped_by_watchpoint>: Delete field.
6866 <stop_reason>: New field.
6867 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6868 * mem-break.c (software_breakpoint_inserted_here)
6869 (hardware_breakpoint_inserted_here): New function.
6870 * mem-break.h (software_breakpoint_inserted_here)
6871 (hardware_breakpoint_inserted_here): Declare.
6872 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6873 (cancel_breakpoints): Delete.
6874 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6875 (upload_fast_traceframes): Remove references to
6878 2015-01-09 Pedro Alves <palves@redhat.com>
6880 * thread-db.c (find_new_threads_callback): Ignore thread if the
6881 kernel thread ID is -1.
6883 2015-01-09 Pedro Alves <palves@redhat.com>
6885 * linux-low.c (linux_attach_fail_reason_string): Move to
6886 nat/linux-ptrace.c, and rename.
6887 (linux_attach_lwp): Update comment.
6888 (attach_proc_task_lwp_callback): New function.
6889 (linux_attach): Adjust to rename and use
6890 linux_proc_attach_tgid_threads.
6891 (linux_attach_fail_reason_string): Delete declaration.
6893 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6895 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6896 * server.c (gdbserver_version): Likewise.
6898 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6900 * remote-utils.c: Include ctype.h.
6901 (input_interrupt): Explicitly handle the case when the char
6902 received is the NUL byte. Improve the printing of non-ASCII
6905 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6907 * linux-low.c (linux_low_filter_event): Update call to
6908 linux_enable_event_reporting following the addition of
6909 a new parameter to that function.
6911 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6914 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6915 (AARCH64_FPCR_REGNO): Likewise.
6916 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6917 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6918 (aarch64_store_fpregset): Likewise.
6920 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6922 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6923 Remove FIXME comment about assumption about N.
6925 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6927 * configure.ac: If large-file support is disabled in GDBserver,
6928 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6929 * configure: Regenerate.
6931 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6933 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6934 warning upon ENODATA from ptrace.
6935 * linux-s390-low.c (s390_store_tdb): New.
6936 (s390_regsets): Add regset for NT_S390_TDB.
6938 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6940 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6941 without a fill_function.
6942 * linux-s390-low.c (s390_fill_last_break): Remove.
6943 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6944 (s390_arch_setup): Use regset's size instead of fill_function for
6947 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6949 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6950 the regset's store function when ptrace returned an error.
6951 * regcache.c (get_thread_regcache): Invalidate register cache
6952 before fetching inferior's registers.
6954 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6956 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6957 while-loop as for-loop.
6958 (regsets_store_inferior_registers): Likewise.
6960 2014-11-28 Yao Qi <yao@codesourcery.com>
6962 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6963 * config.in, configure: Re-generate.
6964 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6967 2014-11-21 Yao Qi <yao@codesourcery.com>
6969 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6970 (AC_CHECK_HEADERS): Remove malloc.h.
6971 * configure: Re-generated.
6972 * config.in: Re-generated.
6973 * server.h: Don't include alloca.h and malloc.h.
6974 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6975 Don't include malloc.h.
6977 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6979 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6980 corresponding ERRNO check in same block.
6982 2014-11-12 Pedro Alves <palves@redhat.com>
6984 * server.c (cont_thread): Update comment.
6985 (start_inferior, attach_inferior): No longer clear cont_thread.
6986 (handle_v_cont): No longer set cont_thread.
6987 (captured_main): Clear cont_thread each time a GDB connects.
6989 2014-11-12 Pedro Alves <palves@redhat.com>
6991 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6992 thread, and don't resume all threads if the Hc thread has exited.
6994 2014-11-12 Pedro Alves <palves@redhat.com>
6996 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6997 the process group instead of to a specific LWP.
6999 2014-10-15 Pedro Alves <palves@redhat.com>
7002 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7004 (arm_set_thread_context): Delete.
7005 (the_low_target): Adjust.
7006 * win32-i386-low.c (debug_registers_changed)
7007 (debug_registers_used): Delete.
7008 (update_debug_registers_callback): New function.
7009 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7010 needing to update their debug registers.
7011 (win32_get_current_dr): New function.
7012 (x86_dr_low_get_addr, x86_dr_low_get_control)
7013 (x86_dr_low_get_status): Fetch the debug register from the thread
7015 (i386_initial_stuff): Adjust.
7016 (i386_get_thread_context): Remove current_event parameter. Don't
7017 clear debug_registers_changed nor copy DR values to
7019 (i386_set_thread_context): Delete.
7020 (i386_prepare_to_resume): New function.
7021 (i386_thread_added): Mark the thread as needing to update irs
7023 (the_low_target): Remove i386_set_thread_context and install
7024 i386_prepare_to_resume.
7025 * win32-low.c (win32_get_thread_context): Adjust.
7026 (win32_set_thread_context): Use SetThreadContext
7028 (win32_prepare_to_resume): New function.
7029 (win32_require_context): New function, factored out from ...
7030 (thread_rec): ... this.
7031 (continue_one_thread): Call win32_prepare_to_resume on each thread
7032 we're about to continue.
7033 (win32_resume): Call win32_prepare_to_resume on the event thread.
7034 * win32-low.h (struct win32_thread_info)
7035 <debug_registers_changed>: New field.
7036 (struct win32_target_ops): Change prototype of set_thread_context,
7037 delete set_thread_context and add prepare_to_resume.
7038 (win32_require_context): New declaration.
7040 2014-10-08 Gary Benson <gbenson@redhat.com>
7042 * server.h: Do not include common-exceptions.h.
7044 2014-10-08 Gary Benson <gbenson@redhat.com>
7046 * server.h: Do not include cleanups.h.
7048 2014-09-30 James Hogan <james.hogan@imgtec.com>
7050 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7053 2014-09-23 Yao Qi <yao@codesourcery.com>
7055 * linux-low.c (lp_status_maybe_breakpoint): New function.
7056 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7057 (count_events_callback): Likewise.
7058 (select_event_lwp_callback): Likewise.
7059 (cancel_breakpoints_callback): Likewise.
7061 2014-09-19 Don Breazeal <donb@codesourcery.com>
7063 * linux-low.c (handle_extended_wait): Call
7064 linux_ptrace_get_extended_event.
7065 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7066 linux_is_extended_waitstatus.
7068 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7070 * Makefile.in (CPPFLAGS): Define.
7071 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7072 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7074 2014-09-16 Gary Benson <gbenson@redhat.com>
7076 * inferiors.h (current_inferior): Renamed as...
7077 (current_thread): New variable. All uses updated.
7078 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7079 (maybe_move_out_of_jump_pad): Likewise.
7080 (cancel_breakpoint): Likewise.
7081 (linux_low_filter_event): Likewise.
7082 (wait_for_sigstop): Likewise.
7083 (linux_resume_one_lwp): Likewise.
7084 (need_step_over_p): Likewise.
7085 (start_step_over): Likewise.
7086 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7087 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7088 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7089 and save_inferior as saved_thread.
7090 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7092 (regcache_invalidate_thread): Likewise.
7093 * remote-utils.c (prepare_resume_reply): Likewise.
7094 * thread-db.c (thread_db_get_tls_address): Likewise.
7095 (disable_thread_event_reporting): Likewise.
7096 (remove_thread_event_breakpoints): Likewise.
7097 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7099 * target.h (set_desired_inferior): Renamed as...
7100 (set_desired_thread): New declaration. All uses updated.
7101 * server.c (myresume): Updated comment to reference thread instead
7103 (handle_serial_event): Likewise.
7104 (handle_target_event): Likewise.
7106 2014-09-12 Tom Tromey <tromey@redhat.com>
7107 Gary Benson <gbenson@redhat.com>
7109 * regcache.h: Include common-regcache.h.
7110 (regcache_read_pc): Don't declare.
7111 * regcache.c (get_thread_regcache_for_ptid): New function.
7113 2014-09-11 Tom Tromey <tromey@redhat.com>
7114 Gary Benson <gbenson@redhat.com>
7116 * symbol.c: New file.
7117 * Makefile.in (SFILES): Add symbol.c.
7118 (OBS): Add symbol.o.
7120 2014-09-11 Gary Benson <gbenson@redhat.com>
7122 * target.c (target_stop_ptid, target_continue_ptid): New
7125 2014-09-11 Tom Tromey <tromey@redhat.com>
7126 Gary Benson <gbenson@redhat.com>
7128 * target.h: Include target/target.h.
7129 * target.c (target_read_memory, target_read_uint32)
7130 (target_write_memory): New functions.
7132 2014-09-11 Gary Benson <gbenson@redhat.com>
7134 * server.h (debug_hw_points): Don't declare.
7135 * server.c (debug_hw_points): Don't define. Replace all uses
7136 with show_debug_regs.
7137 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7138 all uses with show_debug_regs.
7140 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7142 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7143 endianness into account.
7144 (ppc_supply_ptrace_register): Likewise.
7146 2014-09-03 James Hogan <james.hogan@imgtec.com>
7148 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7149 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7151 2014-09-03 Gary Benson <gbenson@redhat.com>
7153 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7154 ALL_DEBUG_ADDRESS_REGISTERS.
7156 2014-09-02 Gary Benson <gbenson@redhat.com>
7158 * i386-low.h: Renamed as...
7159 * x86-low.h: New file. All type, function and variable name
7160 prefixes changed from "i386_" to "x86_". All references updated.
7161 * i386-low.c: Renamed as...
7162 * x86-low.c: New file. All type, function and variable name
7163 prefixes changed from "i386_" to "x86_". All references updated.
7165 2014-09-02 Gary Benson <gbenson@redhat.com>
7167 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7168 (x86_linux_new_thread): Likewise.
7170 2014-08-29 Gary Benson <gbenson@redhat.com>
7172 * server.h (setjmp.h): Do not include.
7173 (toplevel): Do not declare.
7174 (common-exceptions.h): Include.
7175 (cleanups.h): Likewise.
7176 * server.c (toplevel): Do not define.
7177 (exit_code): New static global.
7178 (detach_or_kill_for_exit_cleanup): New function.
7179 (main): New function. Original main renamed to...
7180 (captured_main): New function.
7181 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7183 2014-08-29 Gary Benson <gbenson@redhat.com>
7185 * Makefile.in (SFILES): Add common/common-exceptions.c.
7186 (OBS): Add common-exceptions.o.
7187 (common-exceptions.o): New rule.
7188 * utils.c (prepare_to_throw_exception): New function.
7190 2014-08-29 Gary Benson <gbenson@redhat.com>
7192 * config.in: Regenerate.
7193 * configure: Likewise.
7195 2014-08-29 Gary Benson <gbenson@redhat.com>
7197 * Makefile.in (SFILES): Add common/cleanups.c.
7199 (cleanups.o): New rule.
7201 2014-08-29 Gary Benson <gbenson@redhat.com>
7203 * utils.c (internal_vwarning): New function.
7205 2014-08-28 Gary Benson <gbenson@redhat.com>
7207 * utils.h (fatal): Remove declaration.
7208 * utils.c (fatal): Remove function.
7210 2014-08-28 Gary Benson <gbenson@redhat.com>
7212 * tracepoint.c (gdb_agent_init): Replace fatal with
7214 (initialize_tracepoint): Likewise.
7216 2014-08-28 Gary Benson <gbenson@redhat.com>
7218 * remote-utils.c (remote_prepare): Replace fatal with error.
7220 2014-08-28 Gary Benson <gbenson@redhat.com>
7222 * linux-low.c (linux_async): Replace fatal with warning.
7224 (linux_start_non_stop): Return -1 if linux_async failed.
7226 2014-08-28 Gary Benson <gbenson@redhat.com>
7228 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7230 (i386_dr_low_get_addr): Remove vague comment.
7231 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7234 2014-08-28 Gary Benson <gbenson@redhat.com>
7236 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7237 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7239 (linux_resume_one_lwp): Likewise.
7240 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7242 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7243 with internal_error.
7244 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7245 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7246 (find_register_by_name): Replace fatal with internal_error.
7247 (find_regno): Likewise.
7248 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7249 * thread-db.c (thread_db_create_event): Likewise.
7250 (thread_db_load_search): Likewise.
7251 (try_thread_db_load_1): Likewise.
7252 * tracepoint.c (get_jump_space_head): Replace fatal with
7254 (claim_trampoline_space): Likewise.
7255 (have_fast_tracepoint_trampoline_buffer): Likewise.
7256 (cmd_qtstart): Likewise.
7257 (stop_tracing): Likewise.
7258 (fast_tracepoint_collecting): Likewise.
7259 (target_malloc): Likewise.
7260 (download_tracepoint): Likewise.
7261 (download_trace_state_variables): Replace check with gdb_assert.
7262 (upload_fast_traceframes): Replace fatal with internal_error.
7264 2014-08-19 Tom Tromey <tromey@redhat.com>
7265 Gary Benson <gbenson@redhat.com>
7267 * Makefile.in (SFILES): Add common/common-debug.c.
7268 (OBS): Add common-debug.o.
7269 (common-debug.o): New rule.
7270 * debug.h (debug_printf): Don't declare.
7271 * debug.c (debug_printf): Renamed and rewritten as...
7272 (debug_vprintf): New function.
7274 2014-08-19 Gary Benson <gbenson@redhat.com>
7276 * utils.h: Do not include print-utils.h.
7278 2014-08-19 Tom Tromey <tromey@redhat.com>
7279 Gary Benson <gbenson@redhat.com>
7281 * server.h: Add static assertion.
7282 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7284 2014-08-19 Tom Tromey <tromey@redhat.com>
7285 Gary Benson <gbenson@redhat.com>
7287 * Makefile.in (SFILES): Add common/errors.c.
7288 (OBS): Add errors.o.
7289 (IPA_OBS): Add errors-ipa.o.
7290 (errors.o): New rule.
7291 (errors-ipa.o): Likewise.
7292 * utils.h (perror_with_name, error, warning): Don't declare.
7293 * utils.c (warning): Renamed and rewritten as...
7294 (vwarning): New function.
7295 (error): Renamed and rewritten as...
7296 (verror): New function.
7297 (internal_error): Renamed and rewritten as...
7298 (internal_verror): New function.
7300 2014-08-07 Gary Benson <gbenson@redhat.com>
7302 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7303 * configure: Regenerate.
7304 * config.in: Likewise.
7305 * server.h: Do not include errno.h.
7306 * event-loop.c: Likewise.
7307 * hostio-errno.c: Likewise.
7308 * linux-low.c: Likewise.
7309 * remote-utils.c: Likewise.
7310 * spu-low.c: Likewise.
7311 * utils.c: Likewise.
7312 * gdbreplay.c: Unconditionally include errno.h.
7314 2014-08-07 Gary Benson <gbenson@redhat.com>
7316 * server.h: Do not include string.h.
7317 * event-loop.c: Likewise.
7318 * linux-low.c: Likewise.
7319 * regcache.c: Likewise.
7320 * remote-utils.c: Likewise.
7321 * spu-low.c: Likewise.
7322 * utils.c: Likewise.
7324 2014-08-07 Gary Benson <gbenson@redhat.com>
7326 * server.h: Do not include gdb_assert.h.
7328 2014-08-07 Gary Benson <gbenson@redhat.com>
7330 * server.h: Do not include common-utils.h.
7332 2014-08-07 Gary Benson <gbenson@redhat.com>
7334 * server.h: Do not include ptid.h.
7335 * notif.h: Likewise.
7337 2014-08-07 Gary Benson <gbenson@redhat.com>
7339 * server.h: Do not include gdb_locale.h.
7341 2014-08-07 Gary Benson <gbenson@redhat.com>
7343 * server.h: Do not include gdb/signals.h.
7344 * win32-low.c: Likewise.
7346 2014-08-07 Gary Benson <gbenson@redhat.com>
7348 * server.h: Do not include pathmax.h.
7350 2014-08-07 Gary Benson <gbenson@redhat.com>
7352 * server.h: Do not include libiberty.h.
7353 * linux-bfin-low.c: Likewise.
7355 2014-08-07 Gary Benson <gbenson@redhat.com>
7357 * server.h: Do not include ansidecl.h.
7359 2014-08-07 Gary Benson <gbenson@redhat.com>
7361 * linux-x86-low.c: Do not include stddef.h.
7362 * lynx-ppc-low.c: Likewise.
7363 * tracepoint.c: Likewise.
7365 2014-08-07 Gary Benson <gbenson@redhat.com>
7367 * server.h: Do not include stdarg.h.
7368 * nto-low.c: Likewise.
7370 2014-08-07 Gary Benson <gbenson@redhat.com>
7372 * server.h: Do not include stdlib.h.
7373 * inferiors.c: Likewise.
7374 * linux-low.c: Likewise.
7375 * regcache.c: Likewise.
7376 * spu-low.c: Likewise.
7377 * tracepoint.c: Likewise.
7378 * utils.c: Likewise.
7380 2014-08-07 Gary Benson <gbenson@redhat.com>
7382 * server.h: Do not include stdio.h.
7383 * linux-low.c: Likewise.
7384 * remote-utils.c: Likewise.
7385 * spu-low.c: Likewise.
7386 * utils.c: Likewise.
7387 * wincecompat.c: Likewise.
7389 2014-08-06 Gary Benson <gbenson@redhat.com>
7391 * regcache.c (init_register_cache): Move conditionals inside if.
7393 2014-08-06 Gary Benson <gbenson@redhat.com>
7395 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7397 2014-07-31 Gary Benson <gbenson@redhat.com>
7399 * ax.h: Do not include server.h.
7400 * gdbthread.h: Likewise.
7401 * lynx-low.h: Likewise.
7402 * notif.h: Likewise.
7404 2014-07-30 Gary Benson <gbenson@redhat.com>
7406 * server.h: Include common-defs.h.
7407 Do not include config.h or build-gnulib-gdbserver/config.h.
7409 2014-07-30 Gary Benson <gbenson@redhat.com>
7411 * hostio-errno.c: Move server.h to top of includes list.
7412 * inferiors.c: Likewise.
7413 * linux-x86-low.c: Likewise.
7414 * notif.c: Include server.h.
7416 2014-07-24 Tom Tromey <tromey@redhat.com>
7417 Gary Benson <gbenson@redhat.com>
7419 * server.h (CORE_ADDR): Now unsigned.
7421 2014-07-16 Pedro Alves <palves@redhat.com>
7423 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7425 2014-07-15 Pedro Alves <palves@redhat.com>
7427 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7430 2014-07-11 Pedro Alves <palves@redhat.com>
7432 * linux-low.c (kill_wait_lwp): New function, based on
7433 kill_one_lwp_callback, but use my_waitpid directly.
7434 (kill_one_lwp_callback, linux_kill): Use it.
7436 2014-06-23 Pedro Alves <palves@redhat.com>
7438 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7439 before setting DR0..DR3.
7441 2014-06-20 Gary Benson <gbenson@redhat.com>
7443 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7444 * configure: Regenerated.
7445 * config.in: Likewise.
7447 2014-06-20 Gary Benson <gbenson@redhat.com>
7449 * Makefile.in (SFILES): Update locations for files moved
7451 (object file files): Reordered.
7453 2014-06-20 Gary Benson <gbenson@redhat.com>
7455 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7456 (i386_dr_low_set_addr): Likewise.
7457 (i386_dr_low_get_addr): Likewise.
7458 (i386_dr_low_can_set_control): Likewise.
7459 (i386_dr_low_set_control): Likewise.
7460 (i386_dr_low_get_control): Likewise.
7461 (i386_dr_low_get_status): Likewise.
7462 (i386_get_debug_register_length): Likewise.
7463 * linux-x86-low.c (i386_dr_low_set_addr):
7464 Changed signature. Made static.
7465 (i386_dr_low_get_addr): Likewise.
7466 (i386_dr_low_set_control): Likewise.
7467 (i386_dr_low_get_control): Likewise.
7468 (i386_dr_low_get_status): Likewise.
7469 (i386_dr_low): New global variable.
7470 * win32-i386-low.c (i386_dr_low_set_addr):
7471 Changed signature. Made static.
7472 (i386_dr_low_get_addr): Likewise.
7473 (i386_dr_low_set_control): Likewise.
7474 (i386_dr_low_get_control): Likewise.
7475 (i386_dr_low_get_status): Likewise.
7476 (i386_dr_low): New global variable.
7478 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7480 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7481 * Makefile.in (AR, AR_FLAGS): Define.
7482 * configure: Regenerate.
7484 2014-06-19 Gary Benson <gbenson@redhat.com>
7486 * Makefile.in (i386-dregs.o): New rule.
7487 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7488 * i386-low.c (target.h): Remove include.
7489 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7490 (DR_CONTROL_SHIFT): Likewise.
7491 (DR_CONTROL_SIZE): Likewise.
7492 (DR_RW_EXECUTE): Likewise.
7493 (DR_RW_WRITE): Likewise.
7494 (DR_RW_READ): Likewise.
7495 (DR_RW_IORW): Likewise.
7496 (DR_LEN_1): Likewise.
7497 (DR_LEN_2): Likewise.
7498 (DR_LEN_4): Likewise.
7499 (DR_LEN_8): Likewise.
7500 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7501 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7502 (DR_ENABLE_SIZE): Likewise.
7503 (DR_LOCAL_SLOWDOWN): Likewise.
7504 (DR_GLOBAL_SLOWDOWN): Likewise.
7505 (DR_CONTROL_RESERVED): Likewise.
7506 (I386_DR_CONTROL_MASK): Likewise.
7507 (I386_DR_VACANT): Likewise.
7508 (I386_DR_LOCAL_ENABLE): Likewise.
7509 (I386_DR_GLOBAL_ENABLE): Likewise.
7510 (I386_DR_DISABLE): Likewise.
7511 (I386_DR_SET_RW_LEN): Likewise.
7512 (I386_DR_GET_RW_LEN): Likewise.
7513 (I386_DR_WATCH_HIT): Likewise.
7514 (i386_wp_op_t): Likewise.
7515 (i386_show_dr): Likewise.
7516 (i386_length_and_rw_bits): Likewise.
7517 (i386_insert_aligned_watchpoint): Likewise.
7518 (i386_remove_aligned_watchpoint): Likewise.
7519 (i386_handle_nonaligned_watchpoint): Likewise.
7520 i386_update_inferior_debug_regs(): Likewise.
7521 (i386_dr_insert_watchpoint): Likewise.
7522 (i386_dr_remove_watchpoint): Likewise.
7523 (i386_dr_region_ok_for_watchpoint): Likewise.
7524 (i386_dr_stopped_data_address): Likewise.
7525 (i386_dr_stopped_by_watchpoint): Likewise.
7527 2014-06-19 Gary Benson <gbenson@redhat.com>
7529 * i386-low.c (i386_dr_show): Renamed to
7530 i386_show_dr and made static. All uses updated.
7531 (i386_dr_length_and_rw_bits): Renamed to
7532 i386_length_and_rw_bits and made static.
7534 (i386_dr_insert_aligned_watchpoint): Renamed to
7535 i386_insert_aligned_watchpoint and made static.
7537 (i386_dr_remove_aligned_watchpoint): Renamed to
7538 i386_remove_aligned_watchpoint and made static.
7540 (i386_dr_update_inferior_debug_regs): Renamed to
7541 i386_update_inferior_debug_regs and made static.
7544 2014-06-18 Gary Benson <gbenson@redhat.com>
7546 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7547 (i386_dr_low_can_set_control): Likewise.
7548 (i386_get_debug_register_length): Likewise.
7549 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7550 (i386_dr_low_can_set_control): Likewise.
7551 (i386_get_debug_register_length): Likewise.
7553 2014-06-17 Gary Benson <gbenson@redhat.com>
7555 * i386-low.h (i386-dregs.h): New include.
7556 (DR_FIRSTADDR): Now in i386-dregs.h.
7557 (DR_LASTADDR): Likewise.
7558 (DR_NADDR): Likewise.
7559 (DR_STATUS): Likewise.
7560 (DR_CONTROL): Likewise.
7561 (i386_debug_reg_state): Likewise.
7562 (i386_dr_insert_watchpoint): Likewise.
7563 (i386_dr_remove_watchpoint): Likewise.
7564 (i386_dr_region_ok_for_watchpoint): Likewise.
7565 (i386_dr_stopped_data_address): Likewise.
7566 (i386_dr_stopped_by_watchpoint): Likewise.
7567 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7569 2014-06-18 Gary Benson <gbenson@redhat.com>
7571 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7572 i386_dr_insert_watchpoint.
7573 (i386_low_remove_watchpoint): Renamed to
7574 i386_dr_remove_watchpoint.
7575 (i386_low_region_ok_for_watchpoint): Renamed to
7576 i386_dr_region_ok_for_watchpoint.
7577 (i386_low_stopped_data_address): Renamed to
7578 i386_dr_stopped_data_address.
7579 (i386_low_stopped_by_watchpoint): Renamed to
7580 i386_dr_stopped_by_watchpoint.
7581 * i386-low.c (i386_show_dr): Renamed to
7582 i386_dr_show and made nonstatic. All uses updated.
7583 (i386_length_and_rw_bits): Renamed to
7584 i386_dr_length_and_rw_bits and made nonstatic.
7586 (i386_insert_aligned_watchpoint): Renamed to
7587 i386_dr_insert_aligned_watchpoint and made nonstatic.
7589 (i386_remove_aligned_watchpoint): Renamed to
7590 i386_dr_remove_aligned_watchpoint and made nonstatic.
7592 (i386_update_inferior_debug_regs): Renamed to
7593 i386_dr_update_inferior_debug_regs and made nonstatic.
7595 (i386_low_insert_watchpoint): Renamed to
7596 i386_dr_insert_watchpoint. All uses updated.
7597 (i386_low_remove_watchpoint): Renamed to
7598 i386_dr_remove_watchpoint. All uses updated.
7599 (i386_low_region_ok_for_watchpoint): Renamed to
7600 i386_dr_region_ok_for_watchpoint. All uses updated.
7601 (i386_low_stopped_data_address): Renamed to
7602 i386_dr_stopped_data_address. All uses updated.
7603 (i386_low_stopped_by_watchpoint): Renamed to
7604 i386_dr_stopped_by_watchpoint. All uses updated.
7606 2014-06-18 Gary Benson <gbenson@redhat.com>
7608 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7609 (i386_dr_low_can_set_control): Likewise.
7610 (i386_insert_aligned_watchpoint): New check.
7612 2014-06-18 Gary Benson <gbenson@redhat.com>
7614 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7617 2014-06-18 Gary Benson <gbenson@redhat.com>
7619 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7620 instead of fatal and error.
7621 (i386_handle_nonaligned_watchpoint): Likewise.
7623 2014-06-18 Gary Benson <gbenson@redhat.com>
7625 * i386-low.c (i386_get_debug_register_length): New macro.
7626 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7627 (i386_show_dr): Use debug_printf instead of fprintf. Use
7628 phex to format values.
7630 2014-06-18 Gary Benson <gbenson@redhat.com>
7632 * i386-low.h: Comment changes.
7633 * i386-low.c: Likewise.
7635 2014-06-18 Gary Benson <gbenson@redhat.com>
7637 * i386-low.c: Whitespace changes.
7639 2014-06-12 Tom Tromey <tromey@redhat.com>
7641 * utils.c (freeargv): Remove.
7643 2014-06-12 Tom Tromey <tromey@redhat.com>
7645 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7646 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7647 (parse_debug_format_options): Likewise.
7648 (gdbserver_usage): Likewise.
7649 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7650 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7651 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7653 ($(LIBGNU)): Depend on libiberty.
7654 (all-lib): Recurse into all subdirs.
7655 (install-only): Invoke "install" target in subdirs.
7656 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7658 * configure: Rebuild.
7659 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7660 for vasprintf, vsnprintf, or gettimeofday.
7661 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7664 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7666 * development.sh: Delete.
7667 * Makefile.in (config.status): Adjust dependency on development.sh.
7668 * configure.ac: Adjust development.sh source call.
7669 * configure: Regenerate.
7671 2014-06-02 Pedro Alves <palves@redhat.com>
7673 * ax.c (gdb_free_agent_expr): New function.
7674 * ax.h (gdb_free_agent_expr): New declaration.
7675 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7677 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7679 (clear_breakpoint_conditions_and_commands): New function.
7680 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7681 (clear_breakpoint_conditions_and_commands): New declaration.
7683 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7685 * linux-aarch64-low.c (asm/ptrace.h): Include.
7687 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7689 Fix TLS access for -static -pthread.
7690 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7691 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7692 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7694 2014-05-20 Pedro Alves <palves@redhat.com>
7696 * linux-aarch64-low.c (aarch64_insert_point)
7697 (aarch64_remove_point): No longer check whether the type is
7698 supported here. Adjust to new interface.
7699 (the_low_target): Install aarch64_supports_z_point_type as
7700 supports_z_point_type method.
7701 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7702 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7703 instead of a Z packet char. Adjust.
7704 (arm_supports_z_point_type): New function.
7705 (arm_insert_point, arm_remove_point): Adjust to new interface.
7706 (the_low_target): Install arm_supports_z_point_type.
7707 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7708 (cris_insert_point, cris_remove_point): Adjust to new interface.
7709 Don't check whether the type is supported here.
7710 (the_low_target): Install cris_supports_z_point_type.
7711 * linux-low.c (linux_supports_z_point_type): New function.
7712 (linux_insert_point, linux_remove_point): Adjust to new interface.
7713 * linux-low.h (struct linux_target_ops) <insert_point,
7714 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7715 raw_breakpoint pointer parameter.
7716 <supports_z_point_type>: New method.
7717 * linux-mips-low.c (mips_supports_z_point_type): New function.
7718 (mips_insert_point, mips_remove_point): Adjust to new interface.
7719 Use mips_supports_z_point_type.
7720 (the_low_target): Install mips_supports_z_point_type.
7721 * linux-ppc-low.c (the_low_target): Install NULL as
7722 supports_z_point_type method.
7723 * linux-s390-low.c (the_low_target): Install NULL as
7724 supports_z_point_type method.
7725 * linux-sparc-low.c (the_low_target): Install NULL as
7726 supports_z_point_type method.
7727 * linux-x86-low.c (x86_supports_z_point_type): New function.
7728 (x86_insert_point): Adjust to new insert_point interface. Use
7729 insert_memory_breakpoint. Adjust to new
7730 i386_low_insert_watchpoint interface.
7731 (x86_remove_point): Adjust to remove_point interface. Use
7732 remove_memory_breakpoint. Adjust to new
7733 i386_low_remove_watchpoint interface.
7734 (the_low_target): Install x86_supports_z_point_type.
7735 * lynx-low.c (lynx_target_ops): Install NULL as
7736 supports_z_point_type callback.
7737 * nto-low.c (nto_supports_z_point_type): New.
7738 (nto_insert_point, nto_remove_point): Adjust to new interface.
7739 (nto_target_ops): Install nto_supports_z_point_type.
7740 * mem-break.c: Adjust intro comment.
7741 (struct raw_breakpoint) <raw_type, size>: New fields.
7742 <inserted>: Update comment.
7743 <shlib_disabled>: Delete field.
7744 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7745 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7746 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7747 (raw_bkpt_type_to_target_hw_bp_type): New function.
7748 (find_enabled_raw_code_breakpoint_at): New function.
7749 (find_raw_breakpoint_at): New type and size parameters. Use them.
7750 (insert_memory_breakpoint): New function, based off
7751 set_raw_breakpoint_at.
7752 (remove_memory_breakpoint): New function.
7753 (set_raw_breakpoint_at): Reimplement.
7754 (set_breakpoint): New, based on set_breakpoint_at.
7755 (set_breakpoint_at): Reimplement.
7756 (delete_raw_breakpoint): Go through the_target->remove_point
7757 instead of assuming memory breakpoints.
7758 (find_gdb_breakpoint_at): Delete.
7759 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7760 (find_gdb_breakpoint): New function.
7761 (set_gdb_breakpoint_at): Delete.
7762 (z_type_supported): New function.
7763 (set_gdb_breakpoint_1): New function, loosely based off
7764 set_gdb_breakpoint_at.
7765 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7766 (delete_gdb_breakpoint_at): Delete.
7767 (delete_gdb_breakpoint_1): New function, loosely based off
7768 delete_gdb_breakpoint_at.
7769 (delete_gdb_breakpoint): New function.
7770 (clear_gdb_breakpoint_conditions): Rename to ...
7771 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7773 (add_condition_to_breakpoint): Make static.
7774 (add_breakpoint_condition): Take a struct breakpoint pointer
7775 instead of an address. Adjust.
7776 (gdb_condition_true_at_breakpoint): Rename to ...
7777 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7779 (gdb_condition_true_at_breakpoint): Reimplement.
7780 (add_breakpoint_commands): Take a struct breakpoint pointer
7781 instead of an address. Adjust.
7782 (gdb_no_commands_at_breakpoint): Rename to ...
7783 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7784 parameter. Return true if no breakpoint was found. Change debug
7786 (gdb_no_commands_at_breakpoint): Reimplement.
7787 (run_breakpoint_commands): Rename to ...
7788 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7789 and change return type to boolean.
7790 (run_breakpoint_commands): New function.
7791 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7792 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7793 breakpoint. Go through the_target->remove_point instead of
7794 assuming memory breakpoint.
7795 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7796 software and hardware breakpoints.
7797 (reinsert_raw_breakpoint): Go through the_target->insert_point
7798 instead of assuming memory breakpoint.
7799 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7800 software and hardware breakpoints.
7801 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7802 Check both software and hardware breakpoints.
7803 (validate_inserted_breakpoint): Assert the breakpoint is a
7804 software breakpoint. Set the inserted flag to -1 instead of
7805 setting shlib_disabled.
7806 (delete_disabled_breakpoints): Adjust.
7807 (validate_breakpoints): Only validate software breakpoints.
7808 Adjust to inserted flag change.
7809 (check_mem_read, check_mem_write): Skip breakpoint types other
7810 than software breakpoints. Adjust to inserted flag change.
7811 * mem-break.h (enum raw_bkpt_type): New enum.
7812 (raw_breakpoint, struct process_info): Forward declare.
7813 (Z_packet_to_target_hw_bp_type): Delete declaration.
7814 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7815 (set_gdb_breakpoint, delete_gdb_breakpoint)
7816 (clear_breakpoint_conditions): New declarations.
7817 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7818 (breakpoint_inserted_here): Update comment.
7819 (add_breakpoint_condition, add_breakpoint_commands): Replace
7820 address parameter with a breakpoint pointer parameter.
7821 (gdb_breakpoint_here): Update comment.
7822 (delete_gdb_breakpoint_at): Delete.
7823 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7824 * server.c (process_point_options): Take a struct breakpoint
7825 pointer instead of an address. Adjust.
7826 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7827 delete_gdb_breakpoint.
7828 * spu-low.c (spu_target_ops): Install NULL as
7829 supports_z_point_type method.
7830 * target.h: Include mem-break.h.
7831 (struct target_ops) <prepare_to_access_memory>: Update comment.
7832 <supports_z_point_type>: New field.
7833 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7834 instead of a char. Also take a raw breakpoint pointer.
7835 * win32-arm-low.c (the_low_target): Install NULL as
7836 supports_z_point_type.
7837 * win32-i386-low.c (i386_supports_z_point_type): New function.
7838 (i386_insert_point, i386_remove_point): Adjust to new interface.
7839 (the_low_target): Install i386_supports_z_point_type.
7840 * win32-low.c (win32_supports_z_point_type): New function.
7841 (win32_insert_point, win32_remove_point): Adjust to new interface.
7842 (win32_target_ops): Install win32_supports_z_point_type.
7843 * win32-low.h (struct win32_target_ops):
7844 <supports_z_point_type>: New method.
7845 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7846 instead of a char. Also take a raw breakpoint pointer.
7848 2014-05-20 Pedro Alves <palves@redhat.com>
7850 * mem-break.h: Include break-common.h.
7851 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7852 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7853 (Z_packet_to_target_hw_bp_type): New declaration.
7854 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7855 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7856 (Z_PACKET_ACCESS_WP): Delete macros.
7857 (Z_packet_to_hw_type): Delete function.
7858 * i386-low.h: Don't include break-common.h here.
7859 (Z_packet_to_hw_type): Delete declaration.
7860 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7861 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7862 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7863 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7864 * linux-aarch64-low.c: Don't include break-common.h here.
7865 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7866 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7867 (Z_packet_to_target_hw_bp_type): Delete function.
7868 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7870 (mips_insert_point, mips_remove_point): Use
7871 Z_packet_to_target_hw_bp_type.
7873 2014-05-20 Pedro Alves <palves@redhat.com>
7875 * linux-aarch64-low.c: Include break-common.h.
7876 (enum target_point_type): Delete.
7877 (Z_packet_to_point_type): Rename to ...
7878 (Z_packet_to_target_hw_bp_type): ... this, and return a
7879 target_hw_bp_type instead.
7880 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7881 instead of an enum target_point_type.
7882 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7884 (aarch64_dr_state_insert_one_point)
7885 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7886 (aarch64_handle_aligned_watchpoint)
7887 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7888 Take an enum target_hw_bp_type instead of an enum
7890 (aarch64_supports_z_point_type): New function.
7891 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7892 use Z_packet_to_target_hw_bp_type.
7894 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7896 * configure.ac: Only use -Werror by default when DEVELOPMENT
7898 * configure: Regenerate.
7900 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7902 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7903 * linux-x86-low.c (X86_64_USER_REGS): New.
7904 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7906 2014-04-28 Yao Qi <yao@codesourcery.com>
7908 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7911 2014-04-25 Pedro Alves <palves@redhat.com>
7914 * linux-low.c (linux_attach_fail_reason_string): New function.
7915 (linux_attach_lwp): Delete.
7916 (linux_attach_lwp_1): Rename to ...
7917 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7918 argument. Remove "initial" parameter. Return int instead of
7919 void. Don't error or warn here.
7920 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7921 failure to attach to the tgid. Call warning when failing to
7923 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7924 argument. Remove "initial" parameter. Return int instead of
7925 void. Don't error or warn here.
7926 (linux_attach_fail_reason_string): New declaration.
7927 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7928 interface change. Use linux_attach_fail_reason_string.
7930 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7931 Walfred Tedeschi <walfred.tedeschi@intel.com>
7933 * Makefile.in: Added rules to handle new files
7934 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7935 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7936 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7937 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7938 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7939 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7941 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7942 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7943 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7944 i386/x32-avx512.xml.
7945 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7946 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7947 i386/x32-avx512-linux.xml.
7948 * i387-fp.c (num_avx512_k_registers): New constant for number
7950 (num_avx512_zmmh_low_registers): New constant for number of
7951 lower ZMM registers (0-15).
7952 (num_avx512_zmmh_high_registers): New constant for number of
7953 higher ZMM registers (16-31).
7954 (num_avx512_ymmh_registers): New contant for number of higher
7955 YMM registers (ymm16-31 added by avx521 on x86_64).
7956 (num_avx512_xmm_registers): New constant for number of higher
7957 XMM registers (xmm16-31 added by AVX512 on x86_64).
7958 (struct i387_xsave): Add space for AVX512 registers.
7959 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7960 Add code to handle AVX512 registers.
7961 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7962 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7963 prototypei from generated file.
7964 (tdesc_amd64_avx512_linux): Likewise.
7965 (init_registers_x32_avx512_linux): Likewise.
7966 (tdesc_x32_avx512_linux): Likewise.
7967 (init_registers_i386_avx512_linux): Likewise.
7968 (tdesc_i386_avx512_linux): Likewise.
7969 (x86_64_regmap): Add AVX512 registers.
7970 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7972 (initialize_low_arch): Add code to initialize AVX512 registers.
7974 2014-04-23 Pedro Alves <palves@redhat.com>
7976 * mem-break.c (find_gdb_breakpoint_at): Make static.
7977 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7979 2014-04-23 Pedro Alves <palves@redhat.com>
7981 * i386-low.c: Don't include break-common.h here.
7982 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7983 prototype to take target_hw_bp_type as argument instead of a Z
7985 * i386-low.h: Include break-common.h here.
7986 (Z_packet_to_hw_type): Declare.
7987 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7989 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7990 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7991 (x86_remove_point): Convert the packet number to a
7992 target_hw_bp_type before calling i386_low_remove_watchpoint.
7993 * win32-i386-low.c (i386_insert_point): Convert the packet number
7994 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7995 (i386_remove_point): Convert the packet number to a
7996 target_hw_bp_type before calling i386_low_remove_watchpoint.
7998 2014-04-23 Pedro Alves <palves@redhat.com>
8000 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8002 2014-04-10 Pedro Alves <palves@redhat.com>
8004 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8005 Check if the condition or command is NULL before checking if the
8006 breakpoint is known. On success, return true.
8007 * mem-break.h (add_breakpoint_condition): Document return.
8008 (add_breakpoint_commands): Add describing comment.
8009 * server.c (skip_to_semicolon): New function.
8010 (process_point_options): Use it.
8012 2014-04-09 Pedro Alves <palves@redhat.com>
8014 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8017 2014-02-27 Pedro Alves <palves@redhat.com>
8020 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8022 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8024 (last_thread_of_process_p): Take a PID argument instead of a
8026 (linux_wait_for_lwp): Delete.
8027 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8029 (linux_low_filter_event): New function, party factored out from
8030 linux_wait_for_event.
8031 (linux_wait_for_event): Rename to ...
8032 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8033 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8034 sigsuspend. Check for zombie leaders.
8035 (linux_wait_for_event): Reimplement as wrapper around
8036 linux_wait_for_event_filtered.
8037 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8038 a normal or signal exit is seen, it's the whole process exiting.
8039 (wait_for_sigstop): No longer a for_each_inferior callback.
8040 Rewrite on top of linux_wait_for_event_filtered.
8041 (stop_all_lwps): Call wait_for_sigstop directly.
8042 * server.c (resume, handle_target_event): Handle
8043 TARGET_WAITKIND_NO_RESUMED.
8045 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8047 * win32-low.c (psapi_get_dll_name,
8048 * win32_CreateToolhelp32Snapshot): Delete.
8049 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8050 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8052 (handle_load_dll): Add function description.
8053 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8055 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8057 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8059 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8060 base address when calling win32_add_one_solib.
8061 (handle_load_dll): Delete local variable load_addr.
8062 Remove 0x1000 offset applied to DLL base address when calling
8063 win32_add_one_solib.
8064 (handle_unload_dll): Add comment.
8066 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8068 * win32-low.c (win32_add_all_dlls): Renames
8069 win32_ensure_ntdll_loaded. Rewrite function documentation.
8070 Adjust implementation to always load all DLLs.
8071 Add 0x1000 offset to DLL base address when calling
8072 win32_add_one_solib.
8073 (child_initialization_done): New static global.
8074 (do_initial_child_stuff): Set child_initialization_done to
8075 zero during child initialization, and 1 after. Replace call
8076 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8078 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8079 (handle_unload_dll): Add function documentation.
8080 (get_child_debug_event): Ignore load and unload DLL events
8081 during child initialization.
8083 2014-02-20 Doug Evans <dje@google.com>
8085 Remove global all_lwps.
8086 * inferiors.h (ptid_of): Move here from linux-low.h.
8087 (pid_of, lwpid_of): Ditto.
8088 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8089 parameter is a struct thread_info * now.
8090 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8091 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8092 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8094 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8095 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8096 * linux-arm-low.c (update_registers_callback): Update, "entry"
8097 parameter is a struct thread_info * now.
8098 Fetch lwpid from current_inferior directly.
8099 (arm_insert_point): Pass &all_threads to find_inferior instead of
8101 (arm_remove_point): Ditto.
8102 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8103 (arm_prepare_to_resume): Fetch pid from thread.
8104 (arm_read_description): Fetch lwpid from current_inferior directly.
8105 * linux-low.c (all_lwps): Delete.
8106 (delete_lwp): Delete call to remove_inferior.
8107 (handle_extended_wait): Fetch lwpid from thread.
8108 (add_lwp): Don't set lwp->entry.id. Remove call to
8109 add_inferior_to_list.
8110 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8111 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8112 (kill_one_lwp_callback): Ditto.
8113 (linux_kill): Don't dereference NULL pointer.
8114 Fetch ptid,lwpid from thread.
8115 (get_detach_signal): Fetch ptid from thread.
8116 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8117 Simplify call to regcache_invalidate_thread.
8118 (delete_lwp_callback): Update, "entry" parameter is a
8119 struct thread_info * now. Fetch pid from thread.
8120 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8121 (status_pending_p_callback): Update, "entry" parameter is a
8122 struct thread_info * now. Fetch ptid from thread.
8123 (find_lwp_pid): Update, "entry" parameter is a
8124 struct thread_info * now.
8125 (linux_wait_for_lwp): Fetch pid from thread.
8126 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8127 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8128 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8129 (dequeue_one_deferred_signal): Ditto.
8130 (cancel_breakpoint): Fetch ptid from current_inferior.
8131 (linux_wait_for_event): Pass &all_threads to find_inferior,
8132 not &all_lwps. Fetch ptid, lwpid from thread.
8133 (count_events_callback): Update, "entry" parameter is a
8134 struct thread_info * now.
8135 (select_singlestep_lwp_callback): Ditto.
8136 (select_event_lwp_callback): Ditto.
8137 (cancel_breakpoints_callback): Ditto.
8138 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8140 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8141 (unsuspend_one_lwp): Update, "entry" parameter is a
8142 struct thread_info * now.
8143 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8145 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8146 Fetch lwpid from thread, not lwp.
8147 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8148 Pass &all_threads to find_inferior, not &all_lwps.
8149 (send_sigstop): Fetch lwpid from thread, not lwp.
8150 (send_sigstop_callback): Update, "entry" parameter is a
8151 struct thread_info * now.
8152 (suspend_and_send_sigstop_callback): Ditto.
8153 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8154 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8155 struct thread_info * now.
8156 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8158 (lwp_running): Update, "entry" parameter is a
8159 struct thread_info * now.
8160 (stop_all_lwps): Fetch ptid from thread.
8161 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8162 (linux_resume_one_lwp): Fetch lwpid from thread.
8163 (linux_set_resume_request): Update, "entry" parameter is a
8164 struct thread_info * now. Fetch pid, lwpid from thread.
8165 (resume_status_pending_p): Update, "entry" parameter is a
8166 struct thread_info * now.
8167 (need_step_over_p): Ditto. Fetch lwpid from thread.
8168 (start_step_over): Fetch lwpid from thread.
8169 (linux_resume_one_thread): Update, "entry" parameter is a
8170 struct thread_info * now. Fetch lwpid from thread.
8171 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8172 (proceed_one_lwp): Update, "entry" parameter is a
8173 struct thread_info * now. Fetch lwpid from thread.
8174 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8175 struct thread_info * now.
8176 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8177 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8178 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8180 (regsets_store_inferior_registers): Ditto.
8181 (fetch_register, store_register): Ditto.
8182 (linux_read_memory, linux_write_memory): Ditto.
8183 (linux_request_interrupt): Ditto.
8184 (linux_read_auxv): Ditto.
8185 (linux_xfer_siginfo): Ditto.
8186 (linux_qxfer_spu): Ditto.
8187 (linux_qxfer_libraries_svr4): Ditto.
8188 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8189 moved to inferiors.h.
8191 (get_thread_lwp): Update.
8192 (struct lwp_info): Delete member "entry". Simplify comment for
8195 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8196 current_inferior directly.
8197 (update_watch_registers_callback): Update, "entry" parameter is a
8198 struct thread_info * now. Fetch pid from thread.
8199 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8200 (mips_insert_point): Fetch lwpid from current_inferior.
8201 Pass &all_threads to find_inferior, not &all_lwps.
8202 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8203 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8205 (mips_stopped_data_address): Ditto.
8206 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8208 * linux-tile-low.c (tile_arch_setup): Ditto.
8209 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8210 (update_debug_registers_callback): Update, "entry" parameter is a
8211 struct thread_info * now. Fetch pid from thread.
8212 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8213 Pass &all_threads to find_inferior, not &all_lwps.
8214 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8215 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8216 Pass &all_threads to find_inferior, not &all_lwps.
8217 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8218 (i386_dr_low_get_status): Ditto.
8219 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8220 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8221 (x86_linux_read_description): Ditto.
8222 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8224 2014-02-20 Doug Evans <dje@google.com>
8226 * inferiors.c (get_first_inferior): Fix buglet.
8228 2014-02-19 Doug Evans <dje@google.com>
8230 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8231 * inferiors.c (add_thread): Change result type to struct thread_info *.
8232 All callers updated.
8233 (add_lwp): Call add_thread here instead of in callers.
8234 All callers updated.
8235 * linux-low.h (get_lwp_thread): Rewrite.
8236 (struct lwp_info): New member "thread".
8238 2014-02-19 Doug Evans <dje@google.com>
8240 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8241 All callers updated.
8243 2014-02-19 Doug Evans <dje@google.com>
8245 * inferiors.c (add_thread): Fix whitespace.
8247 2014-02-19 Doug Evans <dje@google.com>
8249 * dll.c (clear_dlls): Replace accessing list implemention details
8251 * gdbthread.h (get_first_thread): Declare.
8252 * inferiors.c (for_each_inferior_with_data): New function.
8253 (get_first_thread): New function.
8254 (find_thread_ptid): Simplify.
8255 (get_first_inferior): New function.
8256 (clear_list): Delete.
8257 (one_inferior_p): New function.
8258 (clear_inferior_list): New function.
8259 (clear_inferiors): Update.
8260 * inferiors.h (for_each_inferior_with_data): Declare.
8261 (clear_inferior_list): Declare.
8262 (one_inferior_p): Declare.
8263 (get_first_inferior): Declare.
8264 * linux-low.c (linux_wait_for_event): Replace accessing list
8265 implemention details with API function.
8266 * server.c (target_running): Ditto.
8267 (accumulate_file_name_length): New function.
8268 (emit_dll_description): New function.
8269 (handle_qxfer_libraries): Replace accessing list implemention
8270 details with API function.
8271 (handle_qxfer_threads_worker): New function.
8272 (handle_qxfer_threads_proper): Replace accessing list implemention
8273 details with API function.
8274 (handle_query): Ditto.
8275 (visit_actioned_threads_callback_ftype): New typedef.
8276 (visit_actioned_threads_data): New struct.
8277 (visit_actioned_threads): Rewrite to be find_inferior callback.
8278 (resume): Call find_inferior.
8279 (handle_status): Replace accessing list implemention
8280 details with API function.
8281 (process_serial_event): Replace accessing list implemention details
8283 * target.c (set_desired_inferior): Replace accessing list implemention
8284 details with API function.
8285 * tracepoint.c (same_process_p): New function.
8286 (gdb_agent_about_to_close): Replace accessing list implemention
8287 details with API function.
8288 * win32-low.c (child_delete_thread): Replace accessing list
8289 implemention details with API function.
8290 (match_dll_by_basename): New function.
8291 (dll_is_loaded_by_basename): New function.
8292 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8293 details call to dll_is_loaded_by_basename.
8295 2014-02-19 Doug Evans <dje@google.com>
8297 * dll.h (struct dll_info): Add comment.
8298 * gdbthread.h (struct thread_info): Add comment.
8299 (current_ptid): Simplify.
8300 * inferiors.c (add_process): Update.
8301 (remove_process): Update.
8302 * inferiors.h (struct process_info): Rename member "head" to "entry".
8303 * linux-low.c (delete_lwp): Update.
8305 (last_thread_of_process_p): Update.
8306 (kill_one_lwp_callback, linux_kill): Update.
8307 (status_pending_p_callback): Update.
8308 (wait_for_sigstop): Update. Simplify read of ptid.
8309 (start_step_over): Update.
8310 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8311 (get_lwp_thread): Update.
8312 (struct lwp_info): Rename member "head" to "entry".
8313 * regcache.h (inferior_list_entry): Delete.
8314 * server.c (kill_inferior_callback): Update.
8315 (detach_or_kill_inferior_callback): Update.
8316 (print_started_pid): Update.
8317 (print_attached_pid): Update.
8318 (process_serial_event): Simplify read of ptid.
8319 * thread-db.c (thread_db_create_event): Update.
8320 (thread_db_get_tls_address): Update.
8321 * win32-low.c (current_inferior_ptid): Simplify.
8323 2014-02-19 Tom Tromey <tromey@redhat.com>
8325 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8327 (target_supports_btrace): Update.
8329 2014-02-14 Yao Qi <yao@codesourcery.com>
8331 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8332 (rsp-low-ipa.o): New target.
8334 2014-02-12 Tom Tromey <tromey@redhat.com>
8336 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8337 convert_ascii_to_int.
8338 * regcache.c (registers_to_string): Likewise.
8339 * remote-utils.c (decode_M_packet): Likewise.
8340 * server.c (process_serial_event): Likewise.
8342 2014-02-12 Tom Tromey <tromey@redhat.com>
8344 * server.c (handle_query, handle_v_run): Use hex2bin, not
8346 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8348 2014-02-12 Tom Tromey <tromey@redhat.com>
8350 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8351 convert_int_to_ascii.
8352 * regcache.c (registers_to_string, collect_register_as_string):
8354 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8356 * server.c (process_serial_event): Likewise.
8357 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8358 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8360 2014-02-12 Tom Tromey <tromey@redhat.com>
8362 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8363 bin2hex, not hexify.
8364 * tracepoint.c (cmd_qtstatus): Likewise.
8366 2014-02-12 Tom Tromey <tromey@redhat.com>
8368 * remote-utils.c (monitor_output): Pass explicit length to
8371 2014-02-12 Tom Tromey <tromey@redhat.com>
8373 * tracepoint.c: Include rsp-low.h.
8374 * server.c: Include rsp-low.h.
8375 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8376 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8378 * remote-utils.c: Include rsp-low.h.
8379 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8380 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8381 (convert_int_to_ascii, convert_ascii_to_int): Move to
8383 * regcache.c: Include rsp-low.h.
8384 * ax.c: Include rsp-low.h.
8385 * Makefile.in (SFILES): Add common/rsp-low.c.
8386 (OBS): Add rsp-low.o.
8387 (rsp-low.o): New target.
8389 2014-02-12 Tom Tromey <tromey@redhat.com>
8391 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8392 Include print-utils.h.
8393 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8394 (plongest, thirty_two, phex_nz): Remove.
8395 * Makefile.in (SFILES): Add common/print-utils.c.
8396 (OBS): Add print-utils.o.
8397 (print-utils-ipa.o): New target.
8398 (print-utils.o): New target.
8399 (IPA_OBJS): Add print-utils-ipa.o.
8401 2014-02-06 Tom Tromey <tromey@redhat.com>
8403 * Makefile.in (SFILES): Fix indentation.
8405 2014-02-05 Doug Evans <dje@google.com>
8407 * linux-low.c (linux_wait_for_event): Improve comment.
8408 (linux_wait_1): Keep current_inferior in sync with event_child.
8410 2014-01-22 Doug Evans <dje@google.com>
8412 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8414 2014-01-22 Doug Evans <dje@google.com>
8416 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8417 * configure: Regenerate.
8418 * config.in: Regenerate.
8419 * Makefile.in (SFILES): Add debug.c.
8421 * debug.c: New file.
8422 * debug.h: New file.
8423 * linux-aarch64-low.c (*): Update all debugging printfs to use
8424 debug_printf instead of fprintf.
8425 * linux-arm-low.c (*): Ditto.
8426 * linux-cris-low.c (*): Ditto.
8427 * linux-crisv32-low.c (*): Ditto.
8428 * linux-m32r-low.c (*): Ditto.
8429 * linux-sparc-low.c (*): Ditto.
8430 * linux-x86.c (*): Ditto.
8431 * linux-low.c (*): Ditto.
8432 (linux_wait_1): Add calls to debug_enter, debug_exit.
8433 (linux_wait): Remove redundant debugging printf.
8434 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8435 (linux_resume, unstop_all_lwps): Ditto.
8436 * mem-break.c (*): Update all debugging printfs to use
8437 debug_printf instead of fprintf.
8438 * remote-utils.c (*): Ditto.
8439 * thread-db.c (*): Ditto.
8440 * server.c #include <ctype.h>, "gdb_vecs.h".
8441 (debug_threads): Moved to debug.c.
8442 (*): Update all debugging printfs to use debug_printf instead of
8444 (start_inferior): Replace call to fflush with call to debug_flush.
8445 (monitor_show_help): Mention set debug-format.
8446 (parse_debug_format_options): New function.
8447 (handle_monitor_command): Handle "monitor set debug-format".
8448 (gdbserver_usage): Mention --debug-format.
8449 (main): Parse --debug-format.
8450 * server.h (debug_threads): Declaration moved to debug.h.
8452 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8453 trace_debug_1 that uses debug_printf.
8454 (tracepoint_look_up_symbols): Update all debugging printfs to use
8455 debug_printf instead of fprintf.
8457 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8459 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8462 2014-01-17 Pedro Alves <palves@redhat.com>
8465 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8466 defined after including gdb_proc_service.h.
8468 2014-01-16 Doug Evans <dje@google.com>
8470 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8471 (match_dll): Use it.
8473 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8475 * target.h (target_ops) <read_btrace>: Change parameters and
8476 return type to allow error reporting.
8477 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8478 trace reading errors on.
8479 * linux-low.c (linux_low_read_btrace): Pass trace reading
8481 (linux_low_disable_btrace): New.
8483 2014-01-15 Doug Evans <dje@google.com>
8485 * inferiors.c (thread_id_to_gdb_id): Delete.
8486 * inferiors.h (thread_id_to_gdb_id): Delete.
8488 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8490 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8491 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8494 2014-01-08 Pedro Alves <palves@redhat.com>
8496 * server.c (handle_status): Don't discard previous queued stop
8497 replies or thread's pending status here.
8498 (main) <disconnection>: Do it here instead.
8500 2014-01-08 Pedro Alves <palves@redhat.com>
8502 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8503 * server.c (visit_actioned_threads, handle_pending_status): New
8505 (handle_v_cont): Factor out parts to ...
8506 (resume): ... this new function. If in all-stop, and a thread
8507 being resumed has a pending status, report it without actually
8509 (myresume): Adjust to use the new 'resume' function.
8510 (clear_pending_status_callback, set_pending_status_callback)
8511 (find_status_pending_thread_callback): New functions.
8512 (handle_status): Handle the case of multiple threads having
8513 interesting statuses to report. Report threads' real last signal
8514 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8515 with an interesting thread to report the status for, instead of
8516 always reporting the status of the first thread.
8518 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8520 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8521 * gdbreplay.c (gdbreplay_version): Likewise.
8523 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8525 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8526 iov.iov_len with the real length in use.
8528 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8530 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8531 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8532 for all targets that use win32-low.c.
8533 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8534 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8536 2013-12-13 Pedro Alves <palves@redhat.com>
8538 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8539 if equal to TARGET_WAITKIND_LOADED.
8540 * win32-low.c (cached_status): New static global.
8541 (win32_wait): Add declaration.
8542 (do_initial_child_stuff): Flush all initial pending debug events
8543 up to the initial breakpoint.
8544 (win32_wait): If CACHED_STATUS was set, return that instead
8545 of doing a real wait. Remove the code resuming the execution
8546 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8547 during the initial phase. Also remove the code changing
8548 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8549 TARGET_WAITKIND_STOPPED.
8551 2013-12-11 Yao Qi <yao@codesourcery.com>
8553 * notif.c (handle_notif_ack): Return 0 if no notification
8556 2013-11-20 Doug Evans <dje@google.com>
8558 * linux-low.c (linux_set_resume_request): Fix comment.
8560 2013-11-20 Doug Evans <dje@google.com>
8562 * linux-low.c (resume_status_pending_p): Tweak comment.
8564 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8566 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8567 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8568 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8569 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8570 (srv_amd64_regobj): Add amd64-mpx.o.
8571 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8572 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8573 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8574 * i387-fp.c (num_pl_bnd_register) Added constant.
8575 (num_pl_bnd_cfg_registers) Added constant.
8576 (struct i387_xsave) Added reserved area and MPX fields.
8577 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8578 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8580 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8581 (init_registers_amd64_mpx_linux): Declare new function.
8582 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8583 (x86_64_regmap): Add MPX registers.
8584 (x86_linux_read_description): Add MPX case.
8585 (initialize_low_arch): Initialize MPX targets.
8587 2013-11-18 Tom Tromey <tromey@redhat.com>
8589 * configure: Rebuild.
8590 * configure.ac: Don't check for stdlib.h.
8591 * gdbreplay.c: Unconditionally include stdlib.h.
8593 2013-11-18 Tom Tromey <tromey@redhat.com>
8595 * config.in: Rebuild.
8596 * configure: Rebuild.
8597 * configure.ac: Don't use AC_HEADER_DIRENT.
8599 2013-11-18 Tom Tromey <tromey@redhat.com>
8601 * server.h: Don't check HAVE_STRING_H.
8602 * gdbreplay.c: Don't check HAVE_STRING_H.
8603 * configure: Rebuild.
8605 2013-11-18 Tom Tromey <tromey@redhat.com>
8607 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8610 2013-11-08 Tom Tromey <tromey@redhat.com>
8612 * configure, config.in: Rebuild.
8613 * configure.ac: Remove unused configury.
8615 2013-11-08 Tom Tromey <tromey@redhat.com>
8617 * acinclude.m4: Include common.m4, codeset.m4.
8618 * configure, config.in: Rebuild.
8619 * configure.ac: Use GDB_AC_COMMON.
8621 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8623 * linux-s390-low.c (HWCAP_S390_TE): New define.
8624 (s390_arch_setup): Consider the TE field in the HWCAP for
8625 determining 'have_regset_tdb'.
8627 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8630 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8633 2013-10-02 Pedro Alves <palves@redhat.com>
8635 * server.c (process_serial_event): Don't output "GDBserver
8636 exiting" if GDB is connected through stdio.
8637 * target.c (mywait): Likewise, be silent if GDB is connected
8640 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8642 * lynx-low.c (lynx_add_threads_after_attach): New function.
8643 (lynx_attach): Remove call to add_thread. Add call to
8644 lynx_add_threads_after_attach instead.
8646 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8648 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8649 * config.in, configure: Regenerated.
8651 2013-09-18 Yao Qi <yao@codesourcery.com>
8654 * server.c (start_inferior): Clear 'resume_info'.
8656 2013-09-16 Jiong Wang <jiwang@tilera.com>
8658 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8661 2013-09-16 Jiong Wang <jiwang@tilera.com>
8663 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8664 linux-tile-low.o to srv_tgtobj.
8666 2013-09-16 Will Newton <will.newton@linaro.org>
8668 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8671 2013-09-06 Pedro Alves <palves@redhat.com>
8673 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8674 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8675 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8676 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8677 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8678 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8680 2013-09-06 Pedro Alves <palves@redhat.com>
8682 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8683 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8685 2013-09-06 Pedro Alves <palves@redhat.com>
8687 * linux-amd64-ipa.c: Include tracepoint.h.
8688 * linux-i386-ipa.c: Include tracepoint.h.
8690 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8692 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8693 (ps_get_thread_area): New function.
8695 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8697 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8698 (initialize_low_arch): Call init_registers_crisv32 rather than
8699 init_register_crisv32.
8701 2013-09-05 Pedro Alves <palves@redhat.com>
8703 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8705 * hostio.h: ... this new file.
8706 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8707 win32-low.c: Include hostio.h.
8709 2013-09-05 Pedro Alves <palves@redhat.com>
8711 * server.h (gdb_client_data, handler_func, callback_handler_func)
8712 (delete_file_handler, add_file_handler, append_callback_event)
8713 (delete_callback_event, start_event_loop, initialize_event_loop):
8714 Move to event-loop.h and include it.
8715 * event-loop.h: New file.
8717 2013-09-05 Pedro Alves <palves@redhat.com>
8719 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8720 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8721 (loaded_dll, unloaded_dll): Move to ...
8722 * dll.h: ... this new file.
8723 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8725 2013-09-05 Pedro Alves <palves@redhat.com>
8727 * server.h (current_process, get_thread_process, all_processes)
8728 (add_inferior_to_list, for_each_inferior, current_inferior)
8729 (remove_inferior, add_process, remove_process, find_process_pid)
8730 (have_started_inferiors_p, have_attached_inferiors_p)
8731 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8732 (clear_inferiors, find_inferior, find_inferior_id)
8733 (inferior_target_data, set_inferior_target_data)
8734 (inferior_regcache_data, set_inferior_regcache_data): Move to
8735 inferiors.h, and include it.
8736 * inferiors.h: New file.
8738 2013-09-05 Pedro Alves <palves@redhat.com>
8740 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8744 2013-09-05 Pedro Alves <palves@redhat.com>
8746 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8748 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8749 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8750 (handle_tracepoint_general_set, handle_tracepoint_query)
8751 (tracepoint_finished_step, tracepoint_was_hit)
8752 (release_while_stepping_state_list, current_traceframe)
8753 (in_readonly_region, traceframe_read_mem)
8754 (fetch_traceframe_registers, traceframe_read_sdata)
8755 (traceframe_read_info, struct fast_tpoint_collect_status)
8756 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8757 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8758 (supply_fast_tracepoint_registers)
8759 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8760 (ipa_tdesc, claim_trampoline_space)
8761 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8762 (agent_mem_read, agent_get_trace_state_variable_value)
8763 (agent_set_trace_state_variable_value, agent_tsv_read)
8764 (agent_mem_read_string, get_raw_reg_func_addr)
8765 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8766 * tracepoint.h: ... this new file.
8768 2013-09-05 Pedro Alves <palves@redhat.com>
8770 * server.h (perror_with_name, error, fatal, warning, paddress)
8771 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8773 * utils.h: New file.
8775 2013-09-05 Pedro Alves <palves@redhat.com>
8777 * server.h (remote_debug, noack_mode, transport_is_reliable)
8778 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8779 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8780 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8781 (write_enn, initialize_async_io, enable_async_io)
8782 (disable_async_io, check_remote_input_interrupt_request)
8783 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8784 (dead_thread_notify, prepare_resume_reply)
8785 (decode_address_to_semicolon, decode_address, decode_m_packet)
8786 (decode_M_packet, decode_X_packet, decode_xfer_write)
8787 (decode_search_memory_packet, unhexify, hexify)
8788 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8789 (look_up_one_symbol, relocate_instruction)
8790 (monitor_output): Move to remote-utils.h, and include it.
8791 * remote-utils.h: New file.
8793 2013-09-05 Pedro Alves <palves@redhat.com>
8795 * server.h (_): Delete.
8797 2013-09-02 Pedro Alves <palves@redhat.com>
8799 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8800 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8802 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8804 2013-09-02 Pierre Muller <muller@sourceware.org>
8806 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8807 or WriteProcessMemory complete successfully and handle
8808 ERROR_PARTIAL_COPY error.
8810 2013-09-02 Pedro Alves <palves@redhat.com>
8812 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8813 error instead of EIO.
8815 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8818 * linux-low.c: Include filestuff.h.
8819 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8820 * lynx-low.c: Include filestuff.h.
8821 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8822 * server.c: Include filestuff.h.
8823 (main): Call notice_open_fds.
8824 * spu-low.c: Include filestuff.h.
8825 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8827 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8829 * Makefile.in: Explain why ../target and ../nat are not
8830 listed as include file search paths.
8831 (linux-waitpid.o): New object file rule.
8832 * configure.srv (srv_native_linux_obj): New variable.
8833 Replace all occurrences of linux native object files with
8834 $srv_native_linux_obj.
8835 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8836 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8837 (linux_enable_event_reporting): Remove declaration.
8838 (my_waitpid): Moved to common/linux-waitpid.c.
8839 (linux_wait_for_event): Pass ptid when calling
8840 linux_enable_event_reporting.
8841 (linux_supports_tracefork_flag): Remove.
8842 (linux_enable_event_reporting): Likewise.
8843 (linux_tracefork_grandchild): Remove.
8844 (STACK_SIZE): Moved to common/linux-ptrace.c.
8845 (linux_tracefork_child): Remove.
8846 (linux_test_for_tracefork): Remove.
8847 (linux_look_up_symbols): Call linux_supports_traceclone.
8848 (initialize_low): Remove call to linux_test_for_tracefork.
8849 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8850 common/linux-ptrace.h.
8851 (PTRACE_TYPE_ARG4): Likewise.
8852 Include linux-ptrace.h.
8854 2013-08-21 Pedro Alves <palves@redhat.com>
8856 * config.in: Renegerate.
8858 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8860 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8861 (SFILES): Remove $(srcdir)/common/target-common.c and
8862 add $(srcdir)/target/waitstatus.c.
8863 (OBS): Remove target-common.o and add waitstatus.o.
8864 (server_h): Remove $(srcdir)/../common/target-common.h and
8865 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8866 and $(srcdir)/../target/waitstatus.h.
8867 (target-common.o): Remove.
8868 (waitstatus.o): New target object file.
8869 * target.h: Do not include target-common.h and
8870 include target/resume.h, target/wait.h and
8871 target/waitstatus.h.
8873 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8875 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8876 to PTRACE_TYPE_ARG3.
8877 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8878 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8880 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8881 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8883 2013-07-27 Jie Zhang <jie@codesourcery.com>
8884 Daniel Jacobowitz <dan@codesourcery.com>
8885 Yao Qi <yao@codesourcery.com>
8887 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8888 (mips-linux-watch.o): New rule.
8889 (mips_linux_watch_h): New variable.
8890 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8892 * linux-mips-low.c: Include mips-linux-watch.h.
8893 (struct arch_process_info, struct arch_lwp_info): New.
8894 (update_watch_registers_callback): New function.
8895 (mips_linux_new_process, mips_linux_new_thread) New functions.
8896 (mips_linux_prepare_to_resume, mips_insert_point): New
8898 (mips_remove_point, mips_stopped_by_watchpoint): New
8900 (rsp_bp_type_to_target_hw_bp_type): New function.
8901 (mips_stopped_data_address): New function.
8902 (the_low_target): Add watchpoint support functions.
8904 2013-07-27 Yao Qi <yao@codesourcery.com>
8906 * i386-low.c: Include break-common.h.
8907 (enum target_hw_bp_type): Remove.
8909 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8911 * Makefile.in (SFILES): /common/target-common.c.
8912 (OBS): Add target-common.o.
8913 (server_h): Add $(srcdir)/../common/target-common.h.
8914 (target-common.o): New target.
8915 * server.c (queue_stop_reply_callback): Free
8916 status string after use.
8917 * target.c (target_waitstatus_to_string): Remove.
8918 * target.h: Include target-common.h.
8919 (resume_kind): Likewise.
8920 (target_waitkind): Likewise.
8921 (target_waitstatus): Likewise.
8922 (TARGET_WNOHANG): Likewise.
8924 2013-07-04 Yao Qi <yao@codesourcery.com>
8926 * Makefile.in (host_alias): Use @host_noncanonical@.
8927 (target_alias): Use @target_noncanonical@.
8928 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8929 ACX_NONCANONICAL_HOST.
8930 * configure: Regenerated.
8933 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8935 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8936 * configure: Rebuild.
8937 * Makefile.in (version_host, version_target): Get from configure.
8938 (version.c): Use $(version_host) and $(version_target).
8940 2013-07-03 Pedro Alves <palves@redhat.com>
8942 * Makefile.in (config.status): Depend on development.sh.
8943 * acinclude.m4: Include libmcheck.m4.
8944 * configure: Regenerate.
8946 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8948 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8949 attribute inside the parentheses.
8950 (winapi_DebugSetProcessKillOnExit): Ditto.
8951 (winapi_DebugBreakProcess): Ditto.
8952 (winapi_GenerateConsoleCtrlEvent): Ditto.
8954 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8956 * notif.h (notif_event): Add a dummy member to avoid compiler
8959 2013-07-01 Pedro Alves <palves@redhat.com>
8961 * hostio.c (HOSTIO_PATH_MAX): Define.
8962 (require_filename, handle_open, handle_unlink, handle_readlink):
8965 2013-07-01 Pedro Alves <palves@redhat.com>
8967 * server.h: Include "pathmax.h".
8968 * linux-low.c: Don't include sys/param.h.
8969 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8971 * win32-low.c: Don't include sys/param.h.
8972 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8974 2013-07-01 Pedro Alves <palves@redhat.com>
8976 * event-loop.c: Don't check HAVE_UNISTD_H before including
8978 * gdbreplay.c: Likewise.
8979 * remote-utils.c: Likewise.
8980 * server.c: Likewise.
8981 * configure.ac: Don't check for unistd.h.
8982 * configure: Regenerate.
8984 2013-06-28 Tom Tromey <tromey@redhat.com>
8986 * Makefile.in (version.c): Use version.in, not
8989 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8991 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8992 * configure: Rebuild.
8993 * Makefile.in (version_host, version_target): Get from configure.
8994 (version.c): Use $(version_host) and $(version_target).
8996 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8998 Fix trace-status to output user name without trailing colon.
8999 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9001 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9003 Fix trace-status to output proper start-time and stop-time.
9004 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9005 output start time and stop time in hex as gdb expects.
9007 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9009 * tracepoint.c (build_traceframe_info_xml): Output trace state
9010 variables present in the trace buffer.
9012 2013-06-24 Tom Tromey <tromey@redhat.com>
9014 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9016 (version.o): Remove.
9017 * gdbreplay.c: Include version.h.
9018 (version, host_name): Don't declare.
9019 * server.h: Include version.h.
9020 (version, host_name): Don't declare.
9022 2013-06-12 Pedro Alves <palves@redhat.com>
9024 * linux-x86-low.c (linux_is_elf64): Delete global.
9025 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9026 with local linux_pid_exe_is_elf_64_file use.
9028 2013-06-11 Pedro Alves <palves@redhat.com>
9030 * linux-low.c (regset_disabled, disable_regset): New functions.
9031 (regsets_fetch_inferior_registers)
9032 (regsets_store_inferior_registers): Use them.
9033 (initialize_regsets_info); Don't allocate the disabled_regsets
9035 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9038 2013-06-11 Pedro Alves <palves@redhat.com>
9040 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9043 2013-06-11 Pedro Alves <palves@redhat.com>
9045 * linux-x86-low.c (initialize_low_arch): Call
9046 init_registers_x32_avx_linux.
9048 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9050 Fix compatibility with Android Bionic.
9051 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9054 2013-06-07 Pedro Alves <palves@redhat.com>
9057 * Makefile.in (OBS): Add tdesc.o.
9058 (IPA_OBJS): Add tdesc-ipa.o.
9059 (tdesc-ipa.o): New rule.
9060 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9062 * linux-low.c (new_inferior): Delete.
9063 (disabled_regsets, num_regsets): Delete.
9064 (linux_add_process): Adjust to set the new per-process
9066 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9067 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9068 was a stop. When calling arch_setup, switch the current inferior
9069 to the thread that got an event.
9070 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9071 (regsets_fetch_inferior_registers)
9072 (regsets_store_inferior_registers): New regsets_info parameter.
9074 (linux_register_in_regsets): New regs_info parameter. Adjust to
9076 (register_addr, fetch_register, store_register): New usrregs_info
9077 parameter. Adjust to use it.
9078 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9079 parameter regs_info. Adjust to use it.
9080 (linux_fetch_registers): Get the current inferior's regs_info, and
9082 (linux_store_registers): Ditto.
9083 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9084 (initialize_low): Don't initialize the target_regsets here. Call
9085 initialize_low_arch.
9086 * linux-low.h (target_regsets): Delete declaration.
9087 (struct regsets_info): New.
9088 (struct usrregs_info): New.
9089 (struct regs_info): New.
9090 (struct process_info_private) <new_inferior>: New field.
9091 (struct linux_target_ops): Delete the num_regs, regmap, and
9092 regset_bitmap fields. New field regs_info.
9093 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9094 * i387-fp.c (num_xmm_registers): Delete.
9095 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9096 calls to new interface.
9097 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9098 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9099 Infer the number of xmm registers from the regcache's target
9101 * i387-fp.h (num_xmm_registers): Delete.
9102 * inferiors.c (add_thread): Don't install the thread's regcache
9104 * proc-service.c (gregset_info): Fetch the current inferior's
9105 regs_info. Adjust to use it.
9106 * regcache.c: Include tdesc.h.
9107 (register_bytes, reg_defs, num_registers)
9108 (gdbserver_expedite_regs): Delete.
9109 (get_thread_regcache): If the thread doesn't have a regcache yet,
9110 create one, instead of aborting gdbserver.
9111 (regcache_invalidate_one): Rename to ...
9112 (regcache_invalidate_thread): ... this.
9113 (regcache_invalidate_one): New.
9114 (regcache_invalidate): Only invalidate registers of the current
9116 (init_register_cache): Add target_desc parameter, and use it.
9117 (new_register_cache): Ditto. Assert the target description has a
9118 non zero registers_size.
9119 (regcache_cpy): Add assertions. Adjust.
9120 (realloc_register_cache, set_register_cache): Delete.
9121 (registers_to_string, registers_from_string): Adjust.
9122 (find_register_by_name, find_regno, find_register_by_number)
9123 (register_cache_size): Add target_desc parameter, and use it.
9124 (free_register_cache_thread, free_register_cache_thread_one)
9125 (regcache_release, register_cache_size): New.
9126 (register_size): Add target_desc parameter, and use it.
9127 (register_data, supply_register, supply_register_zeroed)
9128 (supply_regblock, supply_register_by_name, collect_register)
9129 (collect_register_as_string, collect_register_by_name): Adjust.
9130 * regcache.h (struct target_desc): Forward declare.
9131 (struct regcache) <tdesc>: New field.
9132 (init_register_cache, new_register_cache): Add target_desc
9134 (regcache_invalidate_thread): Declare.
9135 (regcache_invalidate_one): Delete declaration.
9136 (regcache_release): Declare.
9137 (find_register_by_number, register_cache_size, register_size)
9138 (find_regno): Add target_desc parameter.
9139 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9141 * remote-utils.c: Include tdesc.h.
9142 (outreg, prepare_resume_reply): Adjust.
9143 * server.c: Include tdesc.h.
9144 (gdbserver_xmltarget): Delete declaration.
9145 (get_features_xml, process_serial_event): Adjust.
9146 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9148 (struct process_info) <tdesc>: New field.
9149 (ipa_tdesc): Declare.
9150 * tdesc.c: New file.
9151 * tdesc.h: New file.
9152 * tracepoint.c: Include tdesc.h.
9153 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9154 (get_context_regcache): Adjust to pass ipa_tdesc down.
9155 (do_action_at_tracepoint): Adjust to get the register cache size
9156 from the context regcache's description.
9157 (traceframe_walk_blocks): Adjust to get the register cache size
9158 from the current trace frame's description.
9159 (traceframe_get_pc): Adjust to get current trace frame's
9160 description and pass it down.
9161 (gdb_collect): Adjust to get the register cache size from the
9163 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9164 (gdbserver_xmltarget): Delete.
9165 (initialize_low_tracepoint): Set the ipa's target description.
9166 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9167 (initialize_low_tracepoint): Set the ipa's target description.
9168 * linux-x86-low.c: Include tdesc.h.
9169 [__x86_64__] (is_64bit_tdesc): New.
9170 (ps_get_thread_area, x86_get_thread_area): Use it.
9171 (i386_cannot_store_register): Rename to ...
9172 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9173 (i386_cannot_fetch_register): Rename to ...
9174 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9175 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9177 (target_regsets): Rename to ...
9178 (x86_regsets): ... this.
9179 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9181 (x86_siginfo_fixup): Use is_64bit_tdesc.
9182 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9183 (tdesc_x32_avx_linux, tdesc_x32_linux)
9184 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9186 (x86_linux_update_xmltarget): Delete.
9187 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9188 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9189 (AMD64_LINUX_USER64_CS): New.
9190 (x86_linux_read_description): New, based on
9191 x86_linux_update_xmltarget.
9192 (same_process_callback): New.
9193 (x86_arch_setup_process_callback): New.
9194 (x86_linux_update_xmltarget): New.
9195 (x86_regsets_info): New.
9196 (amd64_linux_regs_info): New.
9197 (i386_linux_usrregs_info): New.
9198 (i386_linux_regs_info): New.
9199 (x86_linux_regs_info): New.
9200 (x86_arch_setup): Reimplement.
9201 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9202 (x86_emit_ops): Ditto.
9203 (the_low_target): Adjust. Install x86_linux_regs_info,
9204 x86_cannot_fetch_register, and x86_cannot_store_register.
9205 (initialize_low_arch): New.
9206 * linux-ia64-low.c (tdesc_ia64): Declare.
9207 (ia64_fetch_register): Adjust.
9208 (ia64_usrregs_info, regs_info): New globals.
9209 (ia64_regs_info): New function.
9210 (the_low_target): Adjust.
9211 (initialize_low_arch): New function.
9212 * linux-sparc-low.c (tdesc_sparc64): Declare.
9213 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9215 (sparc_arch_setup): New function.
9216 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9217 (the_low_target): Adjust.
9218 (initialize_low_arch): New function.
9219 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9220 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9221 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9222 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9223 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9224 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9225 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9226 (tdesc_powerpc_isa205_vsx64l): Declare.
9227 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9228 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9229 (ppc_set_pc, ppc_get_hwcap): Adjust.
9230 (ppc_usrregs_info): Forward declare.
9231 (!__powerpc64__) ppc_regmap_adjusted: New global.
9232 (ppc_arch_setup): Adjust to the current process'es target
9234 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9235 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9236 (ppc_store_evrregset): Adjust.
9237 (target_regsets): Rename to ...
9238 (ppc_regsets): ... this, and make static.
9239 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9240 (ppc_regs_info): New function.
9241 (the_low_target): Adjust.
9242 (initialize_low_arch): New function.
9243 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9244 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9245 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9246 (tdesc_s390x_linux64v2): Declare.
9247 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9248 (s390_fill_gregset, s390_store_last_break): Adjust.
9249 (target_regsets): Rename to ...
9250 (s390_regsets): ... this, and make static.
9251 (s390_get_pc, s390_set_pc): Adjust.
9252 (s390_get_hwcap): New target_desc parameter, and use it.
9253 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9254 (s390_arch_setup): Adjust to set the current process'es target
9255 description. Don't adjust the regmap.
9256 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9257 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9258 (regs_info_3264): New globals.
9259 (s390_regs_info): New function.
9260 (the_low_target): Adjust.
9261 (initialize_low_arch): New function.
9262 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9263 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9264 [__mips64] (init_registers_mips_linux)
9265 (init_registers_mips_dsp_linux): Delete defines.
9266 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9267 (have_dsp): New global.
9268 (mips_read_description): New, based on mips_arch_setup.
9269 (mips_arch_setup): Reimplement.
9270 (get_usrregs_info): New function.
9271 (mips_cannot_fetch_register, mips_cannot_store_register)
9272 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9273 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9274 (target_regsets): Rename to ...
9275 (mips_regsets): ... this, and make static.
9276 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9277 (dsp_regs_info, regs_info): New globals.
9278 (mips_regs_info): New function.
9279 (the_low_target): Adjust.
9280 (initialize_low_arch): New function.
9281 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9282 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9284 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9285 (arm_read_description): New, with bits factored from
9287 (arm_arch_setup): Reimplement.
9288 (target_regsets): Rename to ...
9289 (arm_regsets): ... this, and make static.
9290 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9291 (arm_regs_info): New function.
9292 (the_low_target): Adjust.
9293 (initialize_low_arch): New function.
9294 * linux-m68k-low.c (tdesc_m68k): Declare.
9295 (target_regsets): Rename to ...
9296 (m68k_regsets): ... this, and make static.
9297 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9298 (m68k_regs_info): New function.
9299 (m68k_arch_setup): New function.
9300 (the_low_target): Adjust.
9301 (initialize_low_arch): New function.
9302 * linux-sh-low.c (tdesc_sharch): Declare.
9303 (target_regsets): Rename to ...
9304 (sh_regsets): ... this, and make static.
9305 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9306 (sh_regs_info, sh_arch_setup): New functions.
9307 (the_low_target): Adjust.
9308 (initialize_low_arch): New function.
9309 * linux-bfin-low.c (tdesc_bfin): Declare.
9310 (bfin_arch_setup): New function.
9311 (bfin_usrregs_info, regs_info): New globals.
9312 (bfin_regs_info): New function.
9313 (the_low_target): Adjust.
9314 (initialize_low_arch): New function.
9315 * linux-cris-low.c (tdesc_cris): Declare.
9316 (cris_arch_setup): New function.
9317 (cris_usrregs_info, regs_info): New globals.
9318 (cris_regs_info): New function.
9319 (the_low_target): Adjust.
9320 (initialize_low_arch): New function.
9321 * linux-cris-low.c (tdesc_crisv32): Declare.
9322 (cris_arch_setup): New function.
9323 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9324 (cris_regs_info): New function.
9325 (the_low_target): Adjust.
9326 (initialize_low_arch): New function.
9327 * linux-m32r-low.c (tdesc_m32r): Declare.
9328 (m32r_arch_setup): New function.
9329 (m32r_usrregs_info, regs_info): New globals.
9330 (m32r_regs_info): Adjust.
9331 (initialize_low_arch): New function.
9332 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9333 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9334 (tic6x_usrregs_info): Forward declare.
9335 (tic6x_read_description): New function, based on ...
9336 (tic6x_arch_setup): ... this. Reimplement.
9337 (target_regsets): Rename to ...
9338 (tic6x_regsets): ... this, and make static.
9339 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9340 (tic6x_regs_info): New function.
9341 (the_low_target): Adjust.
9342 (initialize_low_arch): New function.
9343 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9344 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9345 (target_regsets): Rename to ...
9346 (xtensa_regsets): ... this, and make static.
9347 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9349 (xtensa_arch_setup, xtensa_regs_info): New functions.
9350 (the_low_target): Adjust.
9351 (initialize_low_arch): New function.
9352 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9353 (nios2_arch_setup): Set the current process'es tdesc.
9354 (target_regsets): Rename to ...
9355 (nios2_regsets): ... this.
9356 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9357 (nios2_regs_info): New function.
9358 (the_low_target): Adjust.
9359 (initialize_low_arch): New function.
9360 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9361 (aarch64_arch_setup): Set the current process'es tdesc.
9362 (target_regsets): Rename to ...
9363 (aarch64_regsets): ... this.
9364 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9365 (aarch64_regs_info): New function.
9366 (the_low_target): Adjust.
9367 (initialize_low_arch): New function.
9368 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9370 (target_regsets): Rename to ...
9371 (tile_regsets): ... this.
9372 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9373 (tile_regs_info): New function.
9374 (tile_arch_setup): Set the current process'es tdesc.
9375 (the_low_target): Adjust.
9376 (initialize_low_arch): New function.
9377 * spu-low.c (tdesc_spu): Declare.
9378 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9379 * win32-arm-low.c (tdesc_arm): Declare.
9380 (arm_arch_setup): New function.
9381 (the_low_target): Install arm_arch_setup instead of
9383 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9384 (init_windows_x86): Rename to ...
9385 (i386_arch_setup): ... this. Set `win32_tdesc'.
9386 (the_low_target): Adjust.
9387 * win32-low.c (win32_tdesc): New global.
9388 (child_add_thread): Don't create the thread cache here.
9389 (do_initial_child_stuff): Set the new process'es tdesc.
9390 * win32-low.h (struct target_desc): Forward declare.
9391 (win32_tdesc): Declare.
9392 * lynx-i386-low.c (tdesc_i386): Declare global.
9393 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9394 * lynx-low.c (lynx_tdesc): New global.
9395 (lynx_add_process): Set the new process'es tdesc.
9396 * lynx-low.h (struct target_desc): Forward declare.
9397 (lynx_tdesc): Declare global.
9398 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9399 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9400 * nto-low.c (nto_tdesc): New global.
9401 (do_attach): Set the new process'es tdesc.
9402 * nto-low.h (struct target_desc): Forward declare.
9403 (nto_tdesc): Declare.
9404 * nto-x86-low.c (tdesc_i386): Declare.
9405 (nto_x86_arch_setup): Set `nto_tdesc'.
9407 2013-06-04 Gary Benson <gbenson@redhat.com>
9409 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9410 to qSupported response when appropriate.
9411 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9412 with nonzero-length annex.
9413 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9414 arguments supplied in annex.
9416 2013-05-31 Doug Evans <dje@google.com>
9419 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9420 64 bits in 64-cross-32 environment.
9422 2013-05-28 Pedro Alves <palves@redhat.com>
9424 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9425 (aarch64-without-fpu.c): Delete rule.
9426 * configure.srv (aarch64*-*-linux*): Remove references to
9427 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9428 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9431 2013-05-24 Pedro Alves <palves@redhat.com>
9433 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9434 instead of strchr/decode_address. Error if the range isn't split
9435 with a ','. Don't assume there's be a ':' in the action.
9437 2013-05-23 Yao Qi <yao@codesourcery.com>
9438 Pedro Alves <palves@redhat.com>
9440 * linux-low.c (lwp_in_step_range): New function.
9441 (linux_wait_1): If the thread was range stepping and stopped
9442 outside the stepping range, report the stop to GDB. Otherwise,
9443 continue stepping. Add range stepping debug output.
9444 (linux_set_resume_request): Copy the step range from the resume
9446 (linux_supports_range_stepping): New.
9447 (linux_target_ops) <supports_range_stepping>: Set to
9448 linux_supports_range_stepping.
9449 * linux-low.h (struct linux_target_ops)
9450 <supports_range_stepping>: New field.
9451 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9452 * linux-x86-low.c (x86_supports_range_stepping): New.
9453 (the_low_target) <supports_range_stepping>: Set to
9454 x86_supports_range_stepping.
9455 * server.c (handle_v_cont): Handle 'r' action.
9456 (handle_v_requests): Append ";r" if the target supports range
9458 * target.h (struct thread_resume) <step_range_start,
9459 step_range_end>: New fields.
9460 (struct target_ops) <supports_range_stepping>:
9462 (target_supports_range_stepping): New macro.
9464 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9466 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9467 confusion in comment.
9469 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9471 * lynx-low.c (struct process_info_private): New type.
9472 (lynx_add_process): New function.
9473 (lynx_create_inferior, lynx_attach): Replace calls to
9474 add_process by calls to lynx_add_process.
9475 (lynx_resume): If PTID is null, then try using
9476 current_process()->private->last_wait_event_ptid.
9478 (lynx_clear_inferiors): Delete. The contents of that function
9479 has been inlined in lynx_mourn;
9480 (lynx_wait_1): Save the ptid in the process's private data.
9481 (lynx_mourn): Free the process' private data. Replace call
9482 to lynx_clear_inferiors by call to clear_inferiors.
9484 2013-05-17 Yao Qi <yao@codesourcery.com>
9486 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9489 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9491 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9492 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9493 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9494 PT_TEXT_END_ADDR guards. Update comments.
9495 (linux_target_op) <read_offsets>: Conditionally define to
9496 linux_read_offsets if the target is UCLIBC and if it defines
9497 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9499 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9500 Andrew Jenner <andrew@codesourcery.com>
9502 * Makefile.in (SFILES): Add linux-nios2-low.c.
9503 (clean): Add action to delete nios2-linux.c.
9504 (nios2-linux.c): New rule.
9505 * configure.srv: Add nios2*-*-linux*.
9506 * linux-nios2-low.c: New.
9508 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9510 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9512 2013-04-25 Hui Zhu <hui@codesourcery.com>
9515 * ax.c (ax_printf): Add fflush.
9517 2013-04-22 Tom Tromey <tromey@redhat.com>
9519 * Makefile.in (SFILES): Add filestuff.c.
9520 (OBS): Add filestuff.o.
9521 (filestuff.o): New target.
9522 * config.in, configure: Rebuild.
9523 * configure.ac: Check for fdwalk, pipe2.
9525 2013-04-17 Pedro Alves <palves@redhat.com>
9527 * configure.ac (USE_THREAD_DB): Delete variable.
9528 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9529 Don't AC_SUBST USE_THREAD_DB.
9530 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9531 * config.in, configure: Regenerate.
9533 2013-04-16 Pedro Alves <palves@redhat.com>
9535 * linux-low.h (struct lwp_info) <thread_known>: Move under
9536 the USE_THREAD_DB #ifdef.
9538 2013-04-16 Pedro Alves <palves@redhat.com>
9540 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9541 (linux-low.o): Delete rule.
9542 * linux-low.h: Always include "gdb_thread_db.h" instead of
9543 conditionally including thread_db.h.
9544 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9547 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9549 * Makefile.in (install-only): Fix make install regression.
9551 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9553 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9554 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9556 * gdbserver.1: Remove.
9558 2013-03-22 Pedro Alves <palves@redhat.com>
9560 * linux-low.c (handle_extended_wait): Don't call
9561 linux_enable_event_reporting.
9563 2013-03-15 Tony Theodore <tonyt@logyst.com>
9566 * Makefile.in (SHELL): Use @SHELL@.
9568 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9570 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9573 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9575 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9576 Remove extraneous NULL element.
9578 2013-03-13 Yao Qi <yao@codesourcery.com>
9580 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9581 'V' block in trace frame.
9583 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9585 * target.h (struct target_ops): Add btrace ops.
9586 (target_supports_btrace): New macro.
9587 (target_enable_btrace): New macro.
9588 (target_disable_btrace): New macro.
9589 (target_read_btrace): New macro.
9590 * gdbthread.h (struct thread_info): Add btrace field.
9591 * server.c: Include btrace-common.h.
9592 (handle_btrace_general_set): New function.
9593 (handle_btrace_enable): New function.
9594 (handle_btrace_disable): New function.
9595 (handle_general_set): Call handle_btrace_general_set.
9596 (handle_qxfer_btrace): New function.
9597 (struct qxfer qxfer_packets[]): Add btrace entry.
9598 * inferiors.c (remove_thread): Disable btrace.
9599 * linux-low: Include linux-btrace.h.
9600 (linux_low_enable_btrace): New function.
9601 (linux_low_read_btrace): New function.
9602 (linux_target_ops): Add btrace ops.
9603 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9604 Add srv_linux_btrace=yes.
9605 (x86_64-*-linux*): Add linux-btrace.o.
9606 Add srv_linux_btrace=yes.
9607 * configure.ac: Define HAVE_LINUX_BTRACE.
9608 * config.in: Regenerated.
9609 * configure: Regenerated.
9611 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9613 * server.c (handle_qxfer): Preserve error message if -3 is
9615 (qxfer): Document the -3 return value.
9617 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9619 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9620 (linux_btrace_h): New variable.
9621 (linux-btrace.o): New rule.
9623 2013-03-08 Stan Shebs <stan@codesourcery.com>
9624 Hafiz Abid Qadeer <abidh@codesourcery.com>
9626 * tracepoint.c (trace_buffer_size): New global.
9627 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9628 (init_trace_buffer): Change to one-argument function. Allocate
9629 trace buffer memory.
9630 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9631 handle QTBuffer:size packet.
9632 (cmd_bigqtbuffer_size): New function.
9633 (initialize_tracepoint): Call init_trace_buffer with
9634 DEFAULT_TRACE_BUFFER_SIZE.
9635 * server.c (handle_query): Add QTBuffer:size in the
9638 2013-03-07 Yao Qi <yao@codesourcery.com>
9640 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9641 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9643 (cmd_qtsp): Adjust condition. Do post increment.
9644 Set cur_action and cur_step_action back to 0.
9646 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9649 * linux-low.c (linux_write_memory): Return early success if LEN is
9652 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9654 * configure.srv: Add x86_64-*-cygwin* as target.
9656 2013-02-28 Tom Tromey <tromey@redhat.com>
9658 * configure.ac: Invoke AC_SYS_LARGEFILE.
9659 * configure, config.in: Rebuild.
9661 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9663 * win32-low.c: Throughout, fix format strings and casts of
9664 printf-like functions to avoid type related warnings on all
9666 (get_child_debug_event): Print dwDebugEventCode as hex since
9667 that's how it's usually documented.
9669 2013-02-28 Yao Qi <yao@codesourcery.com>
9671 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9674 2013-02-27 Jiong Wang <jiwang@tilera.com>
9676 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9677 (reg-tilegx32.c): New rule.
9678 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9679 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9680 different register info initializer according to elf class.
9681 (init_registers_tilgx32): New function. The tilegx32 register info
9683 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9684 (tile_store_gregset): Likewise.
9686 2013-02-27 Yao Qi <yao@codesourcery.com>
9688 * server.c (process_point_options): Print debug message when
9689 debug_threads is true.
9691 2013-02-26 Yao Qi <yao@codesourcery.com>
9693 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9695 2013-02-19 Pedro Alves <palves@redhat.com>
9696 Kai Tietz <ktietz@redhat.com>
9700 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9701 instead of strtoul to extract address from packet.
9702 (process_serial_event) <'z'>: Likewise.
9704 2013-02-18 Yao Qi <yao@codesourcery.com>
9706 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9708 2013-02-14 Pedro Alves <palves@redhat.com>
9712 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9713 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9715 2013-02-14 Pedro Alves <palves@redhat.com>
9717 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9719 2013-02-14 Pedro Alves <palves@redhat.com>
9721 * tracepoint.c (save_string): Delete.
9722 (add_tracepoint_action): Use savestring instead of save_string.
9724 2013-02-12 Pedro Alves <palves@redhat.com>
9726 * linux-xtensa-low.c: Ditto.
9727 * xtensa-xtregs.c: Ditto.
9729 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9731 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9734 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9736 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9737 aarch64_num_wp_regs and aarch64_num_bp_regs to
9738 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9740 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9742 * linux-aarch64-low.c (ps_get_thread_area): Replace
9743 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9745 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9746 Marcus Shawcroft <marcus.shawcroft@arm.com>
9747 Nigel Stephens <nigel.stephens@arm.com>
9748 Yufeng Zhang <yufeng.zhang@arm.com>
9750 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9751 (aarch64.c, aarch64-without-fpu.c): New targets.
9752 * configure.srv (aarch64*-*-linux*): New.
9753 * linux-aarch64-low.c: New file.
9755 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9757 * linux-low.c (handle_extended_wait, linux_create_inferior)
9758 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9759 (dequeue_one_deferred_signal, linux_resume_one_thread)
9760 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9761 (linux_tracefork_grandchild, linux_test_for_tracefork)
9762 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9763 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9764 where the argument is 0.
9766 2013-01-25 Yao Qi <yao@codesourcery.com>
9768 * event-loop.c: Include "queue.h".
9769 (gdb_event_p): New typedef.
9770 (struct gdb_event) <next_event>: Remove.
9771 (event_queue): Change to QUEUE(gdb_event_p).
9772 (async_queue_event): Remove.
9773 (gdb_event_xfree): New.
9774 (initialize_event_loop): New.
9775 (process_event): Use API from QUEUE.
9776 (wait_for_event): Likewise.
9777 * server.c (main): Call initialize_event_loop.
9778 * server.h (initialize_event_loop): Declare.
9780 2013-01-18 Yao Qi <yao@codesourcery.com>
9782 * ax.h (struct eval_agent_expr_context): New.
9783 (gdb_eval_agent_expr): Update declaration.
9784 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9785 TFRAME. Add new argument CTX.
9786 * server.h (struct eval_agent_expr_context): Declare.
9787 (agent_mem_read, agent_tsv_read): Update declaration.
9788 (agent_mem_read_string): Likewise.
9789 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9790 (add_traceframe_block): Add new argument TPOINT.
9791 Increase TPOINT->traceframe_usage.
9792 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9793 eval_tracepoint_agent_expr.
9794 (condition_true_at_tracepoint): Likewise.
9795 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9796 (agent_mem_read_string, agent_tsv_read): Likewise.
9798 2013-01-16 Yao Qi <yao@codesourcery.com>
9800 * linux-low.c (linux_resume_one_lwp): Don't check
9801 'lwp->bp_reinsert != 0'.
9803 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9804 Pedro Alves <palves@redhat.com>
9806 * lynx-low.c (ptrace_request_to_str): Define a temporary
9807 macro and use it to simplify this function's implementation.
9809 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9811 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9814 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9816 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9818 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9820 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9822 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9824 * lynx-low.c (lynx_resume): Use the resume_info parameter
9825 to determine the ptid for the lynx_ptrace call, unless
9826 it is equal to minus_one_ptid, in which case we use the
9827 ptid of the current_inferior.
9828 (lynx_wait_1): After having received a thread create/exit
9829 event, resume the inferior's execution using the signaling
9830 thread's ptid, rather than the old ptid.
9832 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9834 * lynx-low.c (lynx_resume): Delete variable ret.
9836 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9838 * gdbreplay.c (gdbreplay_version): Update copyright year.
9839 * server.c (gdbserver_version): Likewise.
9841 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9843 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9846 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9848 * lynx-low.c (ptrace_request_to_str): Add handling for
9851 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9853 * lynx-low.c (lynx_attach): Delete variable new_process.
9855 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9857 * lynx-low.c (lynx_create_inferior): Delete variable
9860 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9862 * lynx-low.c (ptrace_request_to_str): Do not handle
9863 PTRACE_GETTHREADLIST if this macro does not exist.
9865 2012-12-15 Yao Qi <yao@codesourcery.com>
9867 * Makefile.in (OBS): Add notif.o.
9868 * notif.c, notif.h: New.
9869 * server.c: Include "notif.h".
9870 (struct vstop_notif) <next>: Remove.
9872 (queue_stop_reply): Update.
9873 (push_event, send_next_stop_reply): Remove.
9874 (discard_queued_stop_replies): Update.
9875 (notif_stop): New variable.
9876 (handle_v_stopped): Remove.
9877 (handle_v_requests): Don't call handle_v_stopped. Call
9878 handle_ack_notif instead.
9879 (queue_stop_reply_callback): Call notif_event_enque instead
9880 of queue_stop_reply.
9881 (handle_status): Don't call send_next_stop_reply, call
9882 notif_write_event instead.
9883 (kill_inferior_callback): Likewise.
9884 (detach_or_kill_inferior_callback): Likewise.
9885 (main): Call initialize_notif.
9886 (process_serial_event): Call QUEUE_is_empty.
9887 (handle_target_event): Call notif_push instead of push event.
9888 * server.h (push_event): Remove declaration.
9890 2012-12-10 Tom Tromey <tromey@redhat.com>
9892 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9893 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9896 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9897 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9898 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9899 (amd64-linux-ipa.o, ax.o): Rewrite.
9900 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9901 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9902 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9903 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9904 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9905 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9906 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9907 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9908 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9909 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9910 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9911 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9912 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9913 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9914 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9915 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9916 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9917 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9918 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9919 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9920 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9921 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9922 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9923 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9924 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9925 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9926 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9927 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9928 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9929 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9930 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9931 (reg-tilegx.o): Remove.
9932 (all_object_files): New macro.
9933 Include .deps files.
9934 * aclocal.m4, configure: Rebuild.
9935 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9936 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9937 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9939 2012-12-05 Tom Tromey <tromey@redhat.com>
9942 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9944 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9946 * configure.ac: Check for linux/perf_event.h.
9947 * config.in: Regenerated.
9948 * configure: Regenerated.
9950 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9952 * hostio.c (handle_readlink): Decrease buffer size
9953 parameter passed to readlink by one byte.
9955 2012-11-26 Yao Qi <yao@codesourcery.com>
9957 * configure.ac (build_warnings): Append '-Wempty-body'.
9958 * configure: Regenerated.
9959 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9962 2012-11-15 Pierre Muller <muller@sourceware.org>
9964 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9965 * config.in: Regenerate.
9966 * configure: Regenerate.
9967 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9968 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9969 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9970 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9972 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9973 instead of <sys/wait.h> header.
9974 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9976 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9978 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9979 (various make rules): Remove -DGDBSERVER
9981 2012-11-09 Yao Qi <yao@codesourcery.com>
9983 * spu-low.c (current_ptid): Move it to ..
9984 * gdbthread.h: ... here. New.
9985 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9986 * server.c (myresume, process_serial_event): Likewise.
9987 * thread-db.c (thread_db_find_new_threads): Likewise.
9988 * tracepoint.c (run_inferior_command): Likewise.
9990 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9992 * server.c (handle_search_memory_1): Include access length in
9995 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9997 * linux-crisv32-low.c: Fix compile errors.
9999 2012-09-04 Yao Qi <yao@codesourcery.com>
10001 * tracepoint.c (cmd_qtsv): Adjust debug message.
10002 Don't check CUR_TPOINT.
10004 2012-08-28 Yao Qi <yao@codesourcery.com>
10006 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10007 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10008 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10009 Remove declarations of xmalloc, xreallloc, xstrdup and
10011 * Makefile.in (libiberty_h): New.
10012 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10013 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10015 2012-08-23 Yao Qi <yao@codesourcery.com>
10017 * server.h: Remove declaration of 'xsnprintf'.
10019 2012-08-22 Keith Seitz <keiths@redhat.com>
10021 * server.h: Include build-gnulib-gbserver/config.h.
10022 * gdbreplay.c: Likewise.
10024 2012-08-08 Doug Evans <dje@google.com>
10026 * Makefile.in (SFILES): Add gdb_vecs.c.
10027 (OBS): Add gdb_vecs.o.
10028 (gdb_vecs_h, host_defs_h): New variables.
10029 (thread-db.o): Add $(gdb_vecs_h) dependency.
10030 (gdb_vecs.o): New rule.
10031 * thread-db.c: #include "gdb_vecs.h".
10032 (thread_db_load_search): Use a vector to iterate over path elements.
10033 Handle text appearing after "$pdir".
10035 * configure.ac: Add check for strstr.
10036 * config.in: Regenerate.
10037 * configure: Regenerate.
10039 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10041 * hostio.c (handle_pread): If pread fails, fall back to attempting
10043 (handle_pwrite): Likewise for pwrite.
10045 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10047 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10048 between unsupported TYPE and unimplementable ADDR/LEN combination.
10049 (arm_insert_point): Act on new return value.
10051 2012-07-31 Pedro Alves <palves@redhat.com>
10053 * server.c (process_point_options): Only skip tokens if we find
10054 one that is unrecognized. Don't treat 'X' specially while
10055 skipping unrecognized tokens.
10057 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10059 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10060 to 4-byte-align HW breakpoint addresses for Thumb.
10062 2012-07-27 Yao Qi <yao@codesourcery.com>
10066 * server.h: Declare gdb_agent_about_to_close.
10067 * target.c (kill_inferior): Include "agent.h".
10068 New. Send command 'kill'.
10069 * target.h (kill_inferior): Removed macro.
10070 * tracepoint.c (gdb_agent_about_to_close): New.
10071 (gdb_agent_helper_thread): Handle command 'close'.
10072 Wait endlessly until the inferior stops.
10073 Install gdb_agent_remove_socket to atexit hook.
10074 (agent_socket_name): New static variable.
10075 (gdb_agent_socket_init): Replace local variable 'name' with
10076 'agent_socket_name'.
10077 (gdb_agent_remove_socket): New.
10079 2012-07-27 Yao Qi <yao@codesourcery.com>
10081 * server.c (process_point_options): Stop at 'X' when parsing.
10083 2012-07-19 Michael Eager <eager@eagercon.com>
10085 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10087 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10088 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10089 hardware breakpoint.
10091 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10093 * gdbserver/linux-low.c (initialize_low): Call
10094 linux_ptrace_init_warnings.
10096 2012-07-02 Doug Evans <dje@google.com>
10098 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10101 2012-07-02 Stan Shebs <stan@codesourcery.com>
10103 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10104 (ax.o): Add it to build rule.
10106 (OBS): Add format.o.
10107 (IPA_OBS): Add format.o.
10108 * server.c (handle_query): Claim support for breakpoint commands.
10109 (process_point_options): Add command case.
10110 (process_serial_event): Leave running if there are printfs in
10112 * mem-break.h (any_persistent_commands): Declare.
10113 (add_breakpoint_commands): Declare.
10114 (gdb_no_commands_at_breakpoint): Declare.
10115 (run_breakpoint_commands): Declare.
10116 * mem-break.c (struct point_command_list): New struct.
10117 (struct breakpoint): New field command_list.
10118 (any_persistent_commands): New function.
10119 (add_commands_to_breakpoint): New function.
10120 (add_breakpoint_commands): New function.
10121 (gdb_no_commands_at_breakpoint): New function.
10122 (run_breakpoint_commands): New function.
10123 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10125 * ax.c: Include format.h.
10126 (ax_printf): New function.
10127 (gdb_eval_agent_expr): Add printf opcode.
10129 2012-06-13 Yao Qi <yao@codesourcery.com>
10131 * server.c (start_inferior): Remove duplicated writes to fields
10132 'last_resume_kind' and 'last_status' of 'current_inferior'.
10134 2012-06-12 Yao Qi <yao@codesourcery.com>
10135 Pedro Alves <palves@redhat.com>
10137 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10139 * server.c (handle_v_cont): Extend comment.
10141 2012-06-11 Yao Qi <yao@codesourcery.com>
10143 * linux-low.c (linux_attach): Add 'static'.
10145 2012-06-06 Yao Qi <yao@codesourcery.com>
10147 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10149 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10151 Fix gcc -flto compilation warning.
10152 * server.c (main): Make variable multi_mode and attach volatile.
10154 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10156 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10157 if the platform doesn't know about it.
10159 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10161 * Makefile.in (SFILES): Add linux-tile-low.c.
10162 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10163 * configure.srv: Handle tilegx-*-linux*.
10164 * linux-tile-low.c: New file.
10166 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10168 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10170 2012-05-24 Pedro Alves <palves@redhat.com>
10174 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10176 2012-05-24 Pedro Alves <palves@redhat.com>
10180 Replace target_signal with gdb_signal throughout.
10182 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10184 * linux-low.c (linux_store_registers): Avoid the copying sequence
10185 when no data has been retrieved by ptrace.
10187 2012-05-22 Will Deacon <will.deacon@arm.com>
10189 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10190 Include asm/ptrace.h.
10191 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10194 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10196 * linux-low.c (linux_store_registers): Don't re-retrieve data
10197 with ptrace that has already been obtained from /proc. Always
10198 copy any data retrieved with ptrace to the buffer supplied.
10200 2012-05-11 Yao Qi <yao@codesourcery.com>
10201 Pedro Alves <palves@redhat.com>
10203 * linux-low.c (enum stopping_threads_kind): New.
10204 (stopping_threads): Change type to `enum stopping_threads_kind'.
10205 (handle_extended_wait): If stopping and suspending threads, leave
10206 the new_lwp suspended too.
10207 (linux_wait_for_event): Adjust.
10208 (stop_all_lwps): Set `stopping_threads' to
10209 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10210 whether we're suspending threads or just stopping them. Assert no
10213 2012-04-29 Yao Qi <yao@codesourcery.com>
10215 * server.h: Move some code to ...
10216 * gdbthread.h: ... here. New.
10217 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10218 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10219 (nto-low.o, win32-low.o): Likewise.
10220 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10221 * regcache.c, remote-utils.c, server.c: Likewise.
10222 * target.c, tracepoint.c, win32-low.c: Likewise.
10224 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10226 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10227 (PTRACE_ARG4_TYPE): Likewise.
10228 (PTRACE_XFER_TYPE): Likewise.
10229 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10230 ptrace to PTRACE_ARG3_TYPE.
10231 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10232 (PTRACE_ARG4_TYPE): Likewise.
10233 (PTRACE_XFER_TYPE): Likewise.
10234 (linux_detach_one_lwp): Cast fourth argument of
10235 ptrace to long then PTRACE_ARG4_TYPE.
10236 (regsets_fetch_inferior_registers): Cast third argument of
10237 ptrace to long then PTRACE_ARG3_TYPE.
10238 (regsets_store_inferior_registers): Likewise.
10240 2012-04-20 Pedro Alves <palves@redhat.com>
10242 * configure: Regenerate.
10244 2012-04-19 Pedro Alves <palves@redhat.com>
10246 * Makefile.in (GNULIB_BUILDDIR): New.
10247 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10248 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10249 (all, install-only, uninstall, clean-info, all-lib, clean): No
10250 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10251 (maintainer-clean realclean distclean): Use subdir_do.
10253 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10254 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10255 * acinclude.m4: Include acx_configure_dir.m4.
10256 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10257 calls. Call AC_PROG_RANLIB. Configure gnulib using
10260 (GNULIB_STDINT_H): Adjust.
10261 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10262 * gdbreplay.c: Include build-gnulib/config.h.
10263 * server.h: Likewise.
10264 * aclocal.m4: Regenerate.
10265 * config.in: Regenerate.
10266 * configure: Regenerate.
10268 2012-04-19 Pedro Alves <palves@redhat.com>
10270 * Makefile.in (LIBGNU, INCGNU): Adjust.
10271 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10272 (all, install-only, uninstall, clean-info, all-lib, clean)
10273 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10274 * configure.ac: Adjust AC_OUTPUT output.
10275 * aclocal.m4: Regenerate.
10276 * configure: Regenerate.
10278 2012-04-19 Pedro Alves <palves@redhat.com>
10280 * Makefile.in (generated_files): New.
10281 (server_h): Remove the explicit dependency on config.h, and depend
10282 on $generated_files.
10284 2012-04-19 Pedro Alves <palves@redhat.com>
10286 * Makefile.in (INCGNU): Add -Ignulib.
10288 2012-04-19 Pedro Alves <palves@redhat.com>
10290 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10291 (INCGNU): ... this, and spell out -I here.
10292 (GNULIB_LIB): Rename to ...
10293 (LIBGNU): ... this.
10294 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10296 2012-04-19 Pedro Alves <palves@redhat.com>
10298 * config.in: Regenerate.
10300 2012-04-19 Pedro Alves <palves@redhat.com>
10302 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10303 * server.h (memmem): Remove declaration.
10304 * config.in: Regenerate.
10305 * configure: Regenerate.
10307 2012-04-19 Yao Qi <yao@codesourcery.com>
10309 * Makefile.in (SFILES): Add common/vec.c.
10313 2012-04-19 Yao Qi <yao@codesourcery.com>
10315 * remote-utils.c (prepare_resume_reply): Replace with macro
10316 target_core_of_thread.
10317 * server.c (handle_qxfer_threads_proper): Likewise.
10318 * target.h (traget_core_of_thread): New macro.
10320 2012-04-18 Pedro Alves <palves@redhat.com>
10322 * aclocal.m4: Regenerate.
10323 * configure: Regenerate.
10325 2012-04-16 Yao Qi <yao@codesourcery.com>
10327 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10328 duplicated on address.
10330 2012-04-16 Yao Qi <yao@codesourcery.com>
10332 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10333 (struct tracepoint_action_ops) <send>: New field.
10334 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10335 (agent_expr_send, x_tracepoint_action_send): New.
10336 (l_tracepoint_action_send): New.
10337 (cmd_qtdp): Download and install tracepoint
10338 according to `use_agent'.
10339 (run_inferior_command): Add one more parameter `len'.
10341 (tracepoint_send_agent): New.
10342 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10344 2012-04-16 Yao Qi <yao@codesourcery.com>
10346 * tracepoint.c (download_tracepoints): Moved to ...
10347 (cmd_qtstart): ... here.
10349 2012-04-14 Yao Qi <yao@codesourcery.com>
10351 * tracepoint.c: Include inttypes.h.
10352 (struct collect_memory_action): Use sized types.
10353 (struct tracepoint): Likewise.
10354 (cmd_qtdp, stop_tracing): Update print specifiers.
10355 (cmd_qtp, response_tracepoint): Likewise.
10356 (collect_data_at_tracepoint): Likewise.
10357 (collect_data_at_step): Likewise.
10359 2012-04-14 Yao Qi <yao@codesourcery.com>
10361 Import gnulib module inttypes.
10362 * aclocal.m4, config.in, configure: Regenerated.
10364 2012-04-14 Yao Qi <yao@codesourcery.com>
10366 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10367 Makefile and config.status at last.
10369 2012-04-13 Yao Qi <yao@codesourcery.com>
10371 * tracepoint.c: Include stdint.h unconditionally.
10373 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10375 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10376 on BFD_HAVE_SYS_PROCFS_TYPE.
10377 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10378 * configure: Regenerate.
10379 * config.in: Likewise.
10381 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10383 * Makefile.in (clean): Also remove x32.c x32-linux.c
10384 x32-avx.c x32-avx-linux.c.
10385 (x32.o): New target.
10387 (x32-linux.o): Likewise.
10388 (x32-linux.c): Likewise.
10389 (x32-avx.o): Likewise.
10390 (x32-avx.c): Likewise.
10391 (x32-avx-linux.o): Likewise.
10392 (x32-avx-linux.c): Likewise.
10394 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10395 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10396 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10397 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10398 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10399 i386/x32-avx-linux.xml.
10401 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10402 (init_registers_x32_avx_linux): Likwise.
10403 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10404 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10406 2012-04-13 Pedro Alves <palves@redhat.com>
10408 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10409 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10410 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10411 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10414 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10416 * linux-x86-low.c (compat_x32_clock_t): New.
10417 (compat_x32_siginfo_t): Likewise.
10418 (compat_x32_siginfo_from_siginfo): Likewise.
10419 (siginfo_from_compat_x32_siginfo): Likewise.
10420 (linux_is_elf64): Likewise.
10421 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10422 and siginfo_from_compat_x32_siginfo for x32.
10423 (x86_arch_setup): Set linux_is_elf64.
10425 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10428 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10430 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10431 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10432 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10433 compatible with process.
10435 2012-04-12 Yao Qi <yao@codesourcery.com>
10437 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10438 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10439 (install-only, install-info, clean): Handle sub dir gnulib.
10440 (all-lib, am--refresh): New targets.
10441 (memmem.o): Remove target.
10442 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10443 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10444 (AC_REPLACE_FUNCS): Remove memmem.
10445 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10446 (AC_OUTPUT): Generate Makefile in gnulib/.
10447 * aclocal.m4, config.in, configure: Regenerated.
10449 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10451 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10453 2012-04-05 Pedro Alves <palves@redhat.com>
10455 -Werror=strict-aliasing
10457 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10460 2012-04-04 Pedro Alves <palves@redhat.com>
10462 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10463 (sparc_store_gregset_from_stack, sparc_store_gregset)
10464 (sparc_breakpoint_at): Fix formatting.
10466 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10468 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10470 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10471 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10472 * config.in: Regenerate.
10473 * configure: Likewise.
10475 2012-03-29 Pedro Alves <palves@redhat.com>
10477 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10478 Correct ptrace arguments.
10480 2012-03-28 Pedro Alves <palves@redhat.com>
10482 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10483 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10484 (IA64_FR1_REGNUM): New defines.
10485 (ia64_fetch_register): New.
10486 (the_low_target): Install it.
10487 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10489 * linux-low.c (linux_fetch_registers): Try the
10490 the_low_target.fetch_register hook first.
10492 * linux-arm-low.c (the_low_target): Adjust.
10493 * linux-bfin-low.c (the_low_target): Adjust.
10494 * linux-cris-low.c (the_low_target): Adjust.
10495 * linux-crisv32-low.c (the_low_target): Adjust.
10496 * linux-m32r-low.c (the_low_target): Adjust.
10497 * linux-m68k-low.c (the_low_target): Adjust.
10498 * linux-mips-low.c (the_low_target): Adjust.
10499 * linux-ppc-low.c (the_low_target): Adjust.
10500 * linux-s390-low.c (the_low_target): Adjust.
10501 * linux-sh-low.c (the_low_target): Adjust.
10502 * linux-sparc-low.c (the_low_target): Adjust.
10503 * linux-tic6x-low.c (the_low_target): Adjust.
10504 * linux-x86-low.c (the_low_target): Adjust.
10505 * linux-xtensa-low.c (the_low_target): Adjust.
10507 2012-03-26 Pedro Alves <palves@redhat.com>
10509 * server.c (handle_qxfer_libraries): Don't bail early if
10510 the_target->qxfer_libraries_svr4 is not NULL.
10512 2012-03-26 Pedro Alves <palves@redhat.com>
10514 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10516 2012-03-23 Pedro Alves <palves@redhat.com>
10518 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10519 "library-list-svr4" element's start tag when the the DSO list is
10522 2012-03-23 Pedro Alves <palves@redhat.com>
10524 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10525 a variable whose type size is the same as the inferior's pointer
10528 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10530 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10532 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10533 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10534 * linux-low.h: Include <signal.h>.
10535 (struct siginfo): Remove forward declaration.
10536 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10539 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10541 * .gitignore: Ignore more files.
10543 2012-03-19 Pedro Alves <palves@redhat.com>
10544 Jan Kratochvil <jan.kratochvil@redhat.com>
10546 * server.c (cont_thread, general_thread): Add describing comments.
10547 (start_inferior): Clear `cont_thread'.
10548 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10551 2012-03-15 Yao Qi <yao@codesourcery.com>
10553 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10555 (cmd_qtdp): ... here.
10557 2012-03-15 Yao Qi <yao@codesourcery.com>
10559 * tracepoint.c (struct tracepoint_action_ops): New.
10560 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10561 (m_tracepoint_action_download): New.
10562 (r_tracepoint_action_download): New.
10563 (x_tracepoint_action_download): New.
10564 (l_tracepoint_action_download): New.
10565 (add_tracepoint_action): Install `action->ops' according type.
10566 (download_tracepoint_1): Move code `download' function pointer
10567 of various tracepoint_action_ops.
10569 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10571 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10572 linux_ptrace_attach_warnings.
10574 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10576 * Makefile.in (linux-ptrace.o): New.
10577 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10578 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10579 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10580 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10581 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10583 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10585 2012-03-08 Yao Qi <yao@codesourcery.com>
10586 Pedro Alves <palves@redhat.com>
10588 Fix PR server/13392.
10589 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10590 offset of JMP insn.
10591 * tracepoint.c (remove_tracepoint): New.
10592 (cmd_qtdp): Call remove_tracepoint when failed to install.
10594 2012-03-07 Pedro Alves <palves@redhat.com>
10596 * linux-low.c (get_detach_signal): New.
10597 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10598 Pass on pending signals to PTRACE_DETACH. Check the result of the
10600 * server.c (program_signals, program_signals_p): New.
10601 (handle_general_set): Handle QProgramSignals.
10602 * server.h (program_signals, program_signals_p): Declare.
10604 2012-03-05 Pedro Alves <palves@redhat.com>
10605 Jan Kratochvil <jan.kratochvil@redhat.com>
10607 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10610 2012-03-03 Yao Qi <yao@codesourcery.com>
10612 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10613 agent_look_up_symbols.
10615 2012-03-03 Yao Qi <yao@codesourcery.com>
10617 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10618 (linux-x86-low.o): Likewise.
10619 * server.h: Remove in_process_agent_loaded.
10620 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10624 2012-03-03 Yao Qi <yao@codesourcery.com>
10626 * tracepoint.c (gdb_agent_capability): New global.
10627 (in_process_agent_loaded_ust): Renamed to
10628 `in_process_agent_supports_ust'.
10630 (in_process_agent_supports_ust): Call agent_capability_check.
10631 (clear_installed_tracepoints): Assert that agent supports
10634 2012-03-03 Yao Qi <yao@codesourcery.com>
10636 * linux-low.c (linux_supports_agent): New.
10637 (linux_target_ops): Initialize field `supports_agent' with
10638 linux_supports_agent.
10639 * target.h (struct target_ops) <supports_agent>: New.
10640 (target_supports_agent): New macro.
10641 * server.c (handle_general_set): Handle packet 'QAgent'.
10642 (handle_query): Send `QAgent+'.
10643 * Makefile.in (server.o): Depends on agent.h.
10645 2012-03-03 Yao Qi <yao@codesourcery.com>
10647 * Makefile.in (OBS): Add agent.o.
10648 Add new rule for agent.o.
10649 Track dependence of tracepoint.c on agent.h.
10650 * tracepoint.c (run_inferior_command_1):
10651 (run_inferior_command): Call agent_run_command.
10652 (gdb_ust_connect_sync_socket): Deleted. Move it to
10654 (resume_thread, stop_thread): Likewise.
10655 (gdb_ust_socket_init): Renamed to ...
10656 (gdb_agent_socket_init): ... New.
10657 (gdb_ust_thread): Renamed to ...
10658 (gdb_agent_helper_thread): ... New.
10659 (gdb_ust_init): Move some code to ...
10660 (gdb_agent_init): ... here. New.
10661 [HAVE_UST]: Call gdb_ust_init.
10662 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10663 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10664 * config.in, configure: Regenerated.
10666 2012-03-02 Pedro Alves <palves@redhat.com>
10668 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10669 * linux-low.c (struct simple_pid_list): New.
10670 (stopped_pids): New a struct simple_pid_list pointer.
10671 (add_to_pid_list, pull_pid_from_list): New.
10672 (handle_extended_wait): Don't assume the first signal new children
10673 report is SIGSTOP. Adjust call to pull_pid_from_list.
10674 (linux_wait_for_lwp): Adjust.
10676 2012-03-02 Yao Qi <yao@codesourcery.com>
10678 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10681 2012-03-02 Yao Qi <yao@codesourcery.com>
10683 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10684 `stop_pc' and `tpoint'. Update caller.
10686 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10688 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10689 * linux-low.c (use_linux_regsets): New macro.
10690 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10691 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10692 (linux_register_in_regsets): New function.
10693 (usr_fetch_inferior_registers): Skip registers covered by
10695 (usr_store_inferior_registers): Likewise.
10696 (usr_fetch_inferior_registers): New macro.
10697 (usr_store_inferior_registers): Likewise.
10698 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10699 (linux_store_registers): Likewise.
10700 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10702 (init_registers_mips64_dsp_linux): Likewise.
10703 (init_registers_mips_linux): New macro.
10704 (init_registers_mips_dsp_linux): Likewise.
10705 (mips_dsp_num_regs): Likewise.
10706 (DSP_BASE, DSP_CONTROL): New fallback macros.
10707 (mips_base_regs): New macro.
10708 (mips_regmap): Use it. Fix the size.
10709 (mips_dsp_regmap): New variable.
10710 (mips_dsp_regset_bitmap): Likewise.
10711 (mips_arch_setup): New function.
10712 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10714 (mips_cannot_store_register): Likewise.
10715 (the_low_target): Update .arch_setup, .num_regs and .regmap
10716 initializers. Add .regset_bitmap initializer.
10717 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10719 * linux-bfin-low.c (the_low_target): Likewise.
10720 * linux-cris-low.c (the_low_target): Likewise.
10721 * linux-crisv32-low.c (the_low_target): Likewise.
10722 * linux-ia64-low.c (the_low_target): Likewise.
10723 * linux-m32r-low.c (the_low_target): Likewise.
10724 * linux-m68k-low.c (the_low_target): Likewise.
10725 * linux-ppc-low.c (the_low_target): Likewise.
10726 * linux-s390-low.c (the_low_target): Likewise.
10727 * linux-sh-low.c (the_low_target): Likewise.
10728 * linux-sparc-low.c (the_low_target): Likewise.
10729 * linux-tic6x-low.c (the_low_target): Likewise.
10730 * linux-x86-low.c (the_low_target): Likewise.
10731 * linux-xtensa-low.c (the_low_target): Likewise.
10732 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10733 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10734 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10736 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10737 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10739 2012-02-29 Yao Qi <yao@codesourcery.com>
10740 Pedro Alves <palves@redhat.com>
10742 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10743 `step_over_finished' is true.
10745 2012-02-27 Pedro Alves <palves@redhat.com>
10747 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10748 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10750 2012-02-27 Pedro Alves <palves@redhat.com>
10753 * linux-low.c (pid_is_stopped): New.
10754 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10756 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10758 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10761 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10763 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10765 2012-02-24 Luis Machado <lgustavo@codesourcery>
10767 * server.c (handle_query): Advertise support for target-side
10768 breakpoint condition evaluation.
10769 (process_point_options): New function.
10770 (process_serial_event): When inserting a breakpoint, check for
10771 a target-side condition that should be evaluated.
10773 * mem-break.c: Include regcache.h and ax.h.
10774 (point_cond_list_t): New data structure.
10775 (breakpoint) <cond_list>: New field.
10776 (find_gdb_breakpoint_at): Make non-static.
10777 (delete_gdb_breakpoint_at): Clear any target-side
10779 (clear_gdb_breakpoint_conditions): New function.
10780 (add_condition_to_breakpoint): Likewise.
10781 (add_breakpoint_condition): Likewise.
10782 (gdb_condition_true_at_breakpoint): Likewise.
10783 (gdb_breakpoint_here): Return result directly instead
10784 of going through a local variable.
10786 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10787 (clear_gdb_breakpoint_conditions): Likewise.
10788 (add_breakpoint_condition): Likewise.
10789 (gdb_condition_true_at_breakpoint): Likewise.
10791 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10792 (need_step_over_p): Take target-side breakpoint condition into
10795 2012-02-24 Luis Machado <lgustavo@codesourcery>
10797 * server.h: Include tracepoint.h.
10798 (agent_mem_read, agent_get_trace_state_variable_value,
10799 agent_set_trace_state_variable_value,
10800 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10801 get_set_tsv_func_addr): New prototypes.
10803 * ax.h: New include file.
10804 * ax.c: New source file.
10806 * tracepoint.c: Include ax.h.
10807 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10808 agent_expr, eval_result_type): Move to ax.h.
10809 (parse_agent_expr): Rename to ...
10810 (gdb_parse_agent_expr): ... this, make it non-static and move
10812 (unparse_agent_expr) Rename to ...
10813 (gdb_unparse_agent_expr): ... this, make it non-static and move
10815 (eval_agent_expr): Rename to ...
10816 (eval_tracepoint_agent_expr): ... this.
10817 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10818 forward declarations.
10819 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10820 (agent_get_trace_state_variable_value): New function.
10821 (agent_set_trace_state_variable_value): New function.
10822 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10823 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10824 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10825 (condition_true_at_tracepoint): Likewise.
10826 (parse_agent_expr): Rename to ...
10827 (gdb_parse_agent_expr): ... this and move to ax.c.
10828 (unparse_agent_expr): Rename to ...
10829 (gdb_unparse_agent_expr): ... this and move to ax.c.
10830 (gdb_agent_op_name): Move to ax.c.
10831 (eval_agent_expr): Rename to ...
10832 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10834 (eval_tracepoint_agent_expr): New function.
10835 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10837 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10839 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10840 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10841 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10842 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10843 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10844 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10845 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10846 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10847 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10848 (compile_bytecodes): Remove forward declaration.
10849 (is_goto_target): Move to ax.c.
10850 (compile_bytecodes): Move to ax.c and call
10851 agent_get_trace_state_variable_value (...) and
10852 agent_set_trace_state_variable_value (...).
10854 * Makefile.in: Update ax.c and IPA dependencies.
10856 2012-02-24 Pedro Alves <palves@redhat.com>
10858 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10859 (cmd_bigqtbuffer_circular): ... this. Only handle
10860 'QTBuffer:circular:'.
10861 (handle_tracepoint_general_set): Adjust.
10863 2012-02-16 Yao Qi <yao@codesourcery.com>
10865 * inferiors.c: Move code to ...
10866 * dll.c: .... here. New.
10867 * server.h: Declare clear_dlls.
10868 * Makefile.in (SFILES): Add dll.c.
10872 2012-02-11 Yao Qi <yao@codesourcery.com>
10874 * server.c: (handle_monitor_command): Add a new parameter
10876 (handle_query): Update caller.
10878 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10880 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10881 * configure, config.in: Regenerate.
10882 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10885 2012-02-02 Pedro Alves <palves@redhat.com>
10887 Try SIGKILL first, then PTRACE_KILL.
10888 * linux-low.c (linux_kill_one_lwp): New.
10889 (linux_kill_one_lwp): Rename to ...
10890 (kill_one_lwp_callback): ... this. Use the new
10891 linux_kill_one_lwp.
10893 2012-02-02 Pedro Alves <palves@redhat.com>
10895 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10898 2012-01-27 Pedro Alves <palves@redhat.com>
10900 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10901 (elf_64_file_p): Make static.
10902 (linux_pid_exe_is_elf_64_file): New.
10903 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10904 Delete declarations.
10905 (linux_pid_exe_is_elf_64_file): Declare.
10906 * linux-x86-low.c (x86_arch_setup): Use
10907 linux_pid_exe_is_elf_64_file.
10909 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10911 * linux-low.c (linux_wait_for_event_1): Rename to ...
10912 (linux_wait_for_event): ... here and merge it with former
10913 linux_wait_for_event - new variable wait_ptid, use it.
10914 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10916 2012-01-23 Pedro Alves <palves@redhat.com>
10918 * server.c (main): Avoid yet another case of infinite loop while
10919 detaching/killing after a longjmp.
10921 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10924 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10926 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10928 * hostio.c (handle_readlink): New function.
10929 (handle_vFile): Call it to handle "vFile:readlink" packets.
10931 2012-01-20 Pedro Alves <palves@redhat.com>
10932 Ulrich Weigand <ulrich.weigand@linaro.org>
10934 * server.c (handle_v_requests): Only support vAttach and vRun to
10935 start multiple processes when in extended protocol mode.
10937 2012-01-17 Pedro Alves <palves@redhat.com>
10939 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10940 memalign plus mprotect to allocate the scratch buffer.
10942 2012-01-13 Pedro Alves <palves@redhat.com>
10944 * server.c (attach_inferior): Clear `cont_thread'.
10946 2012-01-13 Pedro Alves <palves@redhat.com>
10948 * server.c (main): Avoid infinite loop while detaching/killing
10951 2012-01-09 Doug Evans <dje@google.com>
10953 * server.c (start_inferior): Set last_ptid in --wrapper case.
10955 2012-01-06 Yao Qi <yao@codesourcery.com>
10957 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10959 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10961 2012-01-04 Yao Qi <yao@codesourcery.com>
10963 * tracepoint.c (cmd_qtdp): Print debug message
10964 for static tracepoint.
10966 2012-01-04 Yao Qi <yao@codesourcery.com>
10968 * tracepoint.c (trace_vdebug): Differentiate debug message
10969 between gdbserver and IPA.
10971 2012-01-03 Yao Qi <yao@codesourcery.com>
10973 * tracepoint.c (tracepoint_was_hit): Don't collect for
10976 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10978 * terminal.h: Reformat copyright header.
10980 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10982 * server.c (gdbserver_version): Update copyright year.
10983 * gdbreplay.c (gdbreplay_version): Likewise.
10985 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10987 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10990 2011-12-18 Hui Zhu <teawater@gmail.com>
10991 * linux-low.c (linux_create_inferior): Save return value to ret.
10993 2011-12-18 Hui Zhu <teawater@gmail.com>
10995 * linux-low.c (linux_create_inferior): Save return value to ret.
10997 2011-12-16 Doug Evans <dje@google.com>
10999 * linux-low.c (linux_create_inferior): If stdio connection,
11000 redirect stdin from /dev/null, stdout to stderr.
11001 * remote-utils.c (remote_is_stdio): New static global.
11002 (remote_connection_is_stdio): New function.
11003 (remote_prepare): Handle stdio connection.
11004 (remote_open): Ditto.
11005 (remote_close): Don't close stdin for stdio connections.
11006 (read_prim,write_prim): New functions. Replace all calls to
11007 read/write to these.
11008 * server.c (main): Watch for "-" argument. Move call to
11009 remote_prepare before start_inferior.
11010 * server.h (STDIO_CONNECTION_NAME): New macro.
11011 (remote_connection_is_stdio): Declare.
11013 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11014 in debugging output.
11016 2011-12-15 Yao Qi <yao@codesourcery.com>
11018 * tracepoint.c: Include sys/syscall.h.
11019 (gdb_ust_thread): Remove preprocessor conditional.
11021 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11023 * linux-low.c (linux_detach_one_lwp): Call
11024 the_low_target.prepare_to_resume before detaching.
11026 2011-12-14 Yao Qi <yao@codesourcery.com>
11028 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11031 2011-12-14 Yao Qi <yao@codesourcery.com>
11033 * i386-low.c (i386_low_stopped_data_address): Initialize local
11034 variable `control'.
11036 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11040 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11041 DR_CONTROL unless necessary. Extend comments.
11042 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11043 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11045 2011-12-13 Yao Qi <yao@codesourcery.com>
11047 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11049 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11051 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11053 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11054 Print new debug message for such case.
11056 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11058 Fix overlapping memcpy.
11059 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11060 the read_inferior_memory transfer.
11061 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11062 write_inferior_memory transfer.
11063 (set_fast_tracepoint_jump): New variable buf. Use it for the
11064 read_inferior_memory and write_inferior_memory transfers.
11065 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11066 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11067 Use it for the write_inferior_memory transfer.
11068 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11071 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11073 * linux-low.c (fetch_register, store_register): Make code
11074 consistent, fix formatting.
11076 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11078 * linux-low.c (usr_store_inferior_registers): Factor out code
11079 to handle individual registers into...
11080 (store_register): ... this new function.
11082 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11084 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11085 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11086 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11087 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11088 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11089 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11090 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11091 (srv_xmlfiles): Add new XML files.
11093 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11095 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11096 (init_registers_s390_linux32v1): Add prototype.
11097 (init_registers_s390_linux32v2): Likewise.
11098 (init_registers_s390_linux64v1): Likewise.
11099 (init_registers_s390_linux64v2): Likewise.
11100 (init_registers_s390x_linux64v1): Likewise.
11101 (init_registers_s390x_linux64v2): Likewise.
11102 (s390_num_regs): Increment to 52.
11103 (s390_regmap): Add orig_r2 register.
11104 (s390_num_regs_3264): Increment to 68.
11105 (s390_regmap_3264): Add orig_r2 register.
11106 (s390_collect_ptrace_register): Handle orig_r2 register.
11107 (s390_supply_ptrace_register): Likewise.
11108 (s390_fill_last_break): New function.
11109 (s390_store_last_break): Likewise.
11110 (s390_fill_system_call): New function.
11111 (s390_store_system_call): Likewise.
11112 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11114 (s390_check_regset): New function.
11115 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11116 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11117 Update target_regsets for available register sets.
11119 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11120 Jan Kratochvil <jan.kratochvil@redhat.com>
11122 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11123 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11125 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11126 * linux-low.h (struct process_info_private): New member r_debug.
11127 * server.c (handle_qxfer_libraries): Call
11128 the_target->qxfer_libraries_svr4.
11129 (handle_qxfer_libraries_svr4): New function.
11130 (qxfer_packets): New entry "libraries-svr4".
11131 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11132 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11133 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11134 PACKET_qXfer_libraries_svr4.
11136 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11138 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11139 PSW address/mask between 8-byte and 16-byte formats.
11140 (s390_supply_ptrace_register): Likewise.
11141 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11142 basic addressing mode bit.
11144 2011-11-24 Stan Shebs <stan@codesourcery.com>
11146 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11148 2011-11-17 Stan Shebs <stan@codesourcery.com>
11150 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11151 (tracing_start_time): New global.
11152 (tracing_stop_time): New global.
11153 (tracing_user_name): New global.
11154 (tracing_notes): New global.
11155 (tracing_stop_note): New global.
11156 (cmd_qtstart): Set traceframe_usage, start_time.
11157 (stop_tracing): Set stop_time.
11158 (cmd_qtstatus): Report additional status.
11159 (cmd_qtp): New function.
11160 (handle_tracepoint_query): Call it.
11161 (cmd_qtnotes): New function.
11162 (handle_tracepoint_general_set): Call it.
11163 (get_timestamp): Rename from tsv_get_timestamp.
11165 2011-11-14 Stan Shebs <stan@codesourcery.com>
11166 Kwok Cheung Yeung <kcy@codesourcery.com>
11168 * linux-x86-low.c (small_jump_insn): New.
11169 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11170 trampoline and error message, build a trampoline and issue a small
11171 jump instruction to it.
11172 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11173 trampoline and error message.
11174 (x86_get_min_fast_tracepoint_insn_len): New.
11175 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11176 * linux-low.h (struct linux_target_ops): Add arguments to
11177 install_fast_tracepoint_jump_pad operation, add new operation.
11178 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11180 (linux_get_min_fast_tracepoint_insn_len): New function.
11181 (linux_target_op): Add new operation.
11182 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11183 (gdb_trampoline_buffer_end): Ditto.
11184 (gdb_trampoline_buffer_error): Ditto.
11185 (struct ipa_sym_addresses): Add fields for new IPA variables.
11186 (symbol_list): Add entries for new IPA variables.
11187 (struct tracepoint): Add fields to hold the address range of the
11188 trampoline used by the tracepoint.
11189 (trampoline_buffer_head): New static variable.
11190 (trampoline_buffer_tail): Ditto.
11191 (claim_trampoline_space): New function.
11192 (have_fast_tracepoint_trampoline_buffer): New function.
11193 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11195 (install_fast_tracepoint): Ditto, also add error buffer argument.
11196 (cmd_qtminftpilen): New function.
11197 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11198 (fast_tracepoint_from_trampoline_address): New function.
11199 (fast_tracepoint_collecting): Handle trampoline as part of jump
11201 (set_trampoline_buffer_space): New function.
11202 (initialize_tracepoint): Initialize new IPA variables.
11203 * target.h (struct target_ops): Add arguments to
11204 install_fast_tracepoint_jump_pad operation, add new
11205 get_min_fast_tracepoint_insn_len operation.
11206 (target_get_min_fast_tracepoint_insn_len): New.
11207 (install_fast_tracepoint_jump_pad): Add arguments.
11208 * server.h (IPA_BUFSIZ): Define.
11209 * linux-i386-ipa.c: Include extra header files.
11210 (initialize_fast_tracepoint_trampoline_buffer): New function.
11211 (initialize_low_tracepoint): Call it.
11212 * server.h (set_trampoline_buffer_space): Declare.
11213 (claim_trampoline_space): Ditto.
11214 (have_fast_tracepoint_trampoline_buffer): Ditto.
11216 2011-11-14 Yao Qi <yao@codesourcery.com>
11218 * server.c (handle_query): Handle InstallInTrace for qSupported.
11219 * tracepoint.c (add_tracepoint): Sort list.
11220 (install_tracepoint, download_tracepoint): New.
11221 (cmd_qtdp): Call them to install and download tracepoints.
11222 (sort_tracepoints): Removed.
11223 (cmd_qtstart): Update.
11225 2011-11-14 Yao Qi <yao@codesourcery.com>
11227 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11228 * mem-break.h: Declare.
11229 * tracepoint.c (cmd_qtstart): Move some code to ...
11230 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11232 (download_tracepoints): Move some code to ...
11233 (download_tracepoint_1): ... here. New.
11235 2011-11-08 Yao Qi <yao@codesourcery.com>
11237 * remote-utils.c (relocate_instruction): A comment fix.
11239 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11241 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11242 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11243 dr_status_mirror and dr_control_mirror from debug_reg_state.
11244 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11245 (i386_initial_stuff): Remove use of deleted globals.
11246 (i386_get_thread_context, i386_set_thread_context,
11247 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11248 from debug_reg_state.
11250 2011-11-05 Yao Qi <yao@codesourcery.com>
11252 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11253 address as TPOINT's.
11255 2011-11-02 Stan Shebs <stan@codesourcery.com>
11257 * tracepoint.c (agent_mem_read_string): New function.
11258 (eval_agent_expr): Call it for tracenz.
11259 * server.c (handle_query): Report support for tracenz.
11261 2011-11-02 Yao Qi <yao@codesourcery.com>
11263 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11265 2011-11-02 Yao Qi <yao@codesourcery.com>
11267 * target.h: Fix a typo in comment.
11269 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11271 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11272 clobber the breakpoints' shadows with fast tracepoint jumps.
11273 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11274 * target.c (write_inferior_memory): Also pass MYADDR down to
11277 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11279 * configure.ac: Check support for personality routine.
11280 * configure: Regenerate.
11281 * config.in: Likewise.
11282 * linux-low.c: Include <sys/personality.h>.
11283 Define ADDR_NO_RANDOMIZE if necessary.
11284 (linux_create_inferior): Disable address space randomization when
11285 forking inferior, if requested.
11286 (linux_supports_disable_randomization): New function.
11287 (linux_target_ops): Install it.
11288 * server.h (disable_randomization): Declare.
11289 * server.c (disable_randomization): New global variable.
11290 (handle_general_set): Handle QDisableRandomization.
11291 (handle_query): Likewise for qSupported.
11292 (main): Support --disable-randomization and --no-disable-randomization
11293 command line arguments.
11294 * target.h (struct target_ops): Add supports_disable_randomization.
11295 (target_supports_disable_randomization): New macro.
11297 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11299 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11301 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11302 [!PT_GETDSBT] (target_loadmap): New definition.
11303 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11304 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11305 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11306 and PT_GETDSBT to LINUX_LOADMAP.
11307 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11308 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11310 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11312 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11313 (arm_linux_hwbp_cap): New static variable.
11314 (arm_linux_get_hwbp_cap): Replace by ...
11315 (arm_linux_init_hwbp_cap): ... this new function.
11316 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11317 (arm_linux_get_hw_watchpoint_count): Likewise.
11318 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11319 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11320 (arm_prepare_to_resume): Use perror_with_name instead of error.
11322 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11324 * linux-arm-low.c: Include <signal.h>.
11325 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11326 (struct arm_linux_hwbp_cap): New data type.
11327 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11328 (struct arm_linux_hw_breakpoint): New data type.
11329 (MAX_BPTS, MAX_WPTS): Define.
11330 (struct arch_process_info, struct arch_lwp_info): New data types.
11331 (arm_linux_get_hwbp_cap): New function.
11332 (arm_linux_get_hw_breakpoint_count): Likewise.
11333 (arm_linux_get_hw_watchpoint_count): Likewise.
11334 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11335 (arm_hwbp_control_initialize): Likewise.
11336 (arm_hwbp_control_is_enabled): Likewise.
11337 (arm_hwbp_control_is_initialized): Likewise.
11338 (arm_hwbp_control_disable): Likewise.
11339 (arm_linux_hw_breakpoint_equal): Likewise.
11340 (arm_linux_hw_point_initialize): Likewise.
11341 (struct update_registers_data): New data structure.
11342 (update_registers_callback: New function.
11343 (arm_insert_point): Likewise.
11344 (arm_remove_point): Likewise.
11345 (arm_stopped_by_watchpoint): Likewise.
11346 (arm_stopped_data_address): Likewise.
11347 (arm_new_process): Likewise.
11348 (arm_new_thread): Likewise.
11349 (arm_prepare_to_resume): Likewise.
11350 (the_low_target): Register arm_insert_point, arm_remove_point,
11351 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11352 arm_new_thread, and arm_prepare_to_resume.
11354 2011-09-15 Stan Shebs <stan@codesourcery.com>
11356 * server.h (struct emit_ops): Add compare-goto fields.
11357 * tracepoint.c (gdb_agent_op_sizes): New table.
11358 (emit_eq_goto): New function.
11359 (emit_ne_goto): New function.
11360 (emit_lt_goto): New function.
11361 (emit_le_goto): New function.
11362 (emit_gt_goto): New function.
11363 (emit_ge_goto): New function.
11364 (is_goto_target): New function.
11365 (compile_bytecodes): Recognize special cases of compare-goto
11366 combinations and call specialized emitters for them.
11367 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11368 (amd64_emit_ne_goto): New function.
11369 (amd64_emit_lt_goto): New function.
11370 (amd64_emit_le_goto): New function.
11371 (amd64_emit_gt_goto): New function.
11372 (amd64_emit_ge_goto): New function.
11373 (amd64_emit_ops): Add the new functions.
11374 (i386_emit_eq_goto): New function.
11375 (i386_emit_ne_goto): New function.
11376 (i386_emit_lt_goto): New function.
11377 (i386_emit_le_goto): New function.
11378 (i386_emit_gt_goto): New function.
11379 (i386_emit_ge_goto): New function.
11380 (i386_emit_ops): Add the new functions.
11382 2011-09-08 Stan Shebs <stan@codesourcery.com>
11384 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11385 (i386_emit_epilogue): Restore %ebx.
11387 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11389 * server.c (step_thread): Remove definition.
11390 (process_serial_event): Don't handle Hs.
11391 * server.h (step_thread): Remove declaration.
11392 * target.c (set_desired_inferior): Remove use of step_thread.
11394 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11396 * linux-low.c: Include linux-procfs.h.
11397 (linux_attach_lwp_1): Update comments.
11398 (linux_attach): Scan for existing threads when attaching to a
11399 process that is the tgid.
11400 * Makefile.in: Update dependencies.
11402 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11404 * configure.srv: Add linux-procfs.o dependencies.
11406 2011-08-14 Yao Qi <yao@codesourcery.com>
11408 * target.h (struct target_ops): Fix indent.
11409 * win32-low.c (win32_target_ops): Fix comment.
11411 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11412 Yao Qi <yao@codesourcery.com>
11414 * Makefile.in (clean): Remove tic6x-*.c files.
11415 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11416 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11417 (tic6x-c64xp-linux.c): Likewise.
11418 * configure.srv: Add support for tic6x-*-uclinux.
11419 * linux-tic6x-low.c: New.
11420 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11422 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11423 Yao Qi <yao@codesourcery.com>
11425 * target.h (struct target_ops): Add read_loadmap.
11426 * linux-low.c (struct target_loadseg): New type.
11427 (struct target_loadmap): New type.
11428 (linux_read_loadmap): New function.
11429 (linux_target_ops): Add linux_read_loadmap.
11430 * server.c (handle_query): Support qXfer:fdpic:read packet.
11431 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11434 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11436 * win32-low.c: Include <stdint.h>.
11438 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11440 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11441 to the inferior here.
11442 (i386_remove_aligned_watchpoint): Ditto.
11443 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11444 fit part of the watchpoint in the debug registers.
11445 (i386_update_inferior_debug_regs): New.
11446 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11447 registers, and only update the inferior on success.
11448 (i386_low_remove_watchpoint): Ditto.
11450 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11452 * linux-low.c (compare_ints, unique, list_threads, show_process,
11453 linux_core_of_thread): Delete.
11454 (linux_target_ops): Change linux_core_of_thread to
11455 linux_common_core_of_thread.
11456 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11457 * utils.c (malloc_failure): Change type of argument.
11458 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11459 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11460 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11461 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11462 (IPA_OBJS): Add common-utils-ipa.o.
11463 (ptid_h, linux_osdata_h): New macros.
11464 (server_h): Add common/common-utils.h, common/xml-utils.h,
11465 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11467 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11468 ptid.o, buffer.o): New rules.
11469 (linux-low.o): Add common/linux-osdata.h as a dependency.
11470 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11471 * configure.ac: Add AC_HEADER_DIRENT check.
11472 * config.in: Regenerate.
11473 * configure: Regenerate.
11474 * remote-utils.c (xml_escape_text): Delete.
11475 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11476 buffer_xml_printf): Move to common/buffer.c.
11477 * server.c (main): Remove call to initialize_inferiors.
11478 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11479 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11480 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11481 internal_error, gdb_assert, gdb_assert_fail): Delete.
11482 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11483 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11485 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11486 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11487 initialize_inferiors): Delete.
11489 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11491 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11494 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11496 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11498 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11500 2011-05-26 Yao Qi <yao@codesourcery.com>
11502 * Makefile.in (thread-db.o): Track dependence to
11503 common/gdb_thread_db.h.
11504 * thread-db.c: include gdb_thread_db.h from right place.
11506 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11508 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11509 __FILE__ and __LINE__ to internal_error.
11511 2011-05-13 Doug Evans <dje@google.com>
11513 * thread-db.c (try_thread_db_load_from_sdir): New function.
11514 (try_thread_db_load_from_dir): New function.
11515 (thread_db_load_search): Handle $sdir, ignore $pdir.
11516 Remove trying of system directories if search of
11517 libthread-db-search-path fails, that is now done via $sdir.
11519 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11521 * server.c (handle_query): Add EnableDisableTracepoints to the list
11522 of supported features.
11523 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11525 (cmd_qtenable_disable): New.
11526 (cmd_qtstart): Install tracepoints even if disabled.
11527 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11528 receiving a QTEnable or QTDisable packet.
11529 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11530 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11532 (gdb_probe): Skip data collection if static tracepoint is disabled.
11534 2011-05-10 Doug Evans <dje@google.com>
11536 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11538 2011-05-04 Doug Evans <dje@google.com>
11540 * linux-low.c (linux_join): Skip process lookup.
11541 * spu-low.c (spu_join): Ditto.
11542 * server.c (join_inferiors_callback): Delete.
11543 (process_serial_event): For 'D' packet (detach) call join_inferior
11546 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11548 * README: Don't mention xscale*-*-linux*.
11549 * configure.srv (xscale*-*-linux*): Don't handle target.
11551 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11553 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11555 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11556 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11557 (i386_emit_void_call_2): Likewise.
11559 2011-04-26 Yao Qi <yao@codesourcery.com>
11561 * linux-low.c: Move common macros to linux-ptrace.h.
11562 Include linux-ptrace.h.
11563 * Makefile.in (linux_ptrace_h): New.
11564 (linux-low.o): Depends on linux-ptrace.h.
11566 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11568 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11569 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11570 (remote_prepare): New function with most of the TCP code from ...
11571 (remote_open): ... here. Detect PORT here unconditionally. Move also
11572 setting transport_is_reliable.
11573 * server.c (run_once): New variable.
11574 (gdbserver_usage): Document it.
11575 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11576 the first run if RUN_ONCE.
11577 * server.h (run_once, remote_prepare): New declarations.
11579 2011-04-19 Tom Tromey <tromey@redhat.com>
11581 * win32-low.c (handle_load_dll): Remove duplicate "the".
11583 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11585 Remove support for old Cygwin 1.5 versions.
11586 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11587 function to avoid warning.
11588 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11591 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11593 * gdbserver/server.h (Macro _): Define it if not available.
11595 2011-03-14 Michael Snyder <msnyder@vmware.com>
11597 * hostio.c (handle_close): Remove unnecessary null test.
11599 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11601 * Makefile.in (maintainer-clean realclean distclean): Remove
11602 "make ... subdir_do" command.
11604 2011-03-10 Michael Snyder <msnyder@vmware.com>
11606 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11608 * server.c (handle_v_run): Free alloced buffer on early return.
11610 2011-03-09 Yao Qi <yao@codesourcery.com>
11613 2011-03-04 Yao Qi <yao@codesourcery.com>
11615 * Makefile.in: Remove GNU make feature --directory.
11617 2011-03-05 Yao Qi <yao@codesourcery.com>
11619 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11620 (subdir_do): New make target. Copied from gdb/Makefile.
11621 (maintainer-clean, realclean, distclean, clean): Call corresponding
11622 make targets in common/Makefile.
11624 2011-02-11 Yao Qi <yao@codesourcery.com>
11626 * configure.ac: Call AC_PROG_RANLIB.
11627 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11628 * configure: Regenerate.
11630 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11632 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11634 2011-03-06 Yao Qi <yao@codesourcery.com>
11636 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11638 2011-03-05 Yao Qi <yao@codesourcery.com>
11640 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11641 (subdir_do): New make target. Copied from gdb/Makefile.
11642 (maintainer-clean, realclean, distclean, clean): Call corresponding
11643 make targets in common/Makefile.
11645 2011-03-04 Yao Qi <yao@codesourcery.com>
11647 * Makefile.in: Remove GNU make feature --directory.
11649 2011-03-04 Michael Snyder <msnyder@vmware.com>
11651 * server.c (queue_stop_reply): Call xmalloc not malloc.
11653 2011-03-02 Michael Snyder <msnyder@vmware.com>
11655 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11657 2011-02-28 Michael Snyder <msnyder@vmware.com>
11659 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11660 (cmd_qtframe): Ditto.
11661 (cmd_qtbuffer): Ditto.
11662 (cmd_bigqtbuffer): Ditto.
11664 * utils.c (decimal2str): Initialize 'width' to nine, then
11665 don't mess with it.
11667 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11669 * hostio.c (require_data): Free *data, not data.
11671 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11673 * hostio.c (require_data): Use free, not xfree.
11675 2011-02-27 Michael Snyder <msnyder@vmware.com>
11677 * server.c (handle_query): Discard unused value.
11679 * hostio.c (require_data): Free malloc memory before returning
11682 2011-02-26 Michael Snyder <msnyder@vmware.com>
11684 * linux-low.c (list_threads): Call closedir for dirent.
11686 2011-02-27 Michael Snyder <msnyder@vmware.com>
11688 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11689 a case statement falls through.
11691 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11693 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11696 2011-02-26 Michael Snyder <msnyder@vmware.com>
11698 * utils.c (decimal2str): Eliminate dead code and dead param.
11699 (pulongest): Drop dead param from call to decimal2str.
11702 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11704 Revert the following patch (not approved yet):
11705 2011-02-21 Hui Zhu <teawater@gmail.com>
11706 * tracepoint.c (tp_printf): New function.
11707 (eval_agent_expr): Handle gdb_agent_op_printf.
11709 2011-02-21 Hui Zhu <teawater@gmail.com>
11711 * tracepoint.c (tp_printf): New function.
11712 (eval_agent_expr): Handle gdb_agent_op_printf.
11714 2011-02-18 Tom Tromey <tromey@redhat.com>
11716 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11717 (tracepoint.o): Likewise.
11718 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11719 (gdb_agent_op_names): Likewise.
11721 2011-02-18 Tom Tromey <tromey@redhat.com>
11723 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11724 gdb_agent_op_rot>: New constants.
11725 (gdb_agent_op_names): Add pick and roll.
11726 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11729 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11731 * aclocal.m4: Regenerated with aclocal-1.11.1.
11733 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11735 * server.c (handle_qxfer_traceframe_info): New.
11736 (qxfer_packets): Register "traceframe-info".
11737 (handle_query): Report support for qXfer:traceframe-info:read+.
11738 * tracepoint.c (match_blocktype): New.
11739 (traceframe_find_block_type): Rename to ...
11740 (traceframe_walk_blocks): ... this. Add callback filter argument,
11742 (traceframe_find_block_type): New, reimplemented on top of
11743 traceframe_walk_blocks.
11744 (build_traceframe_info_xml): New.
11745 (traceframe_read_info): New.
11746 * server.h (traceframe_read_info): Declare.
11748 2011-02-11 Yao Qi <yao@codesourcery.com>
11750 * configure.ac: Call AC_PROG_RANLIB.
11751 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11752 * configure: Regenerate.
11754 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11756 * server.c (gdb_read_memory): Change return semantics to allow
11758 (handle_search_memory_1): Adjust.
11759 (process_serial_event) <'m' packet>: Handle partial transfers.
11760 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11762 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11764 * regcache.c (init_register_cache): Initialize
11765 regcache->register_status.
11766 (free_register_cache): Release regcache->register_status.
11767 (regcache_cpy): Copy register_status.
11768 (registers_to_string): Print 'x's for unavailable registers.
11769 (supply_register): Mark the register's status valid or
11770 unavailable, depending on whether a buffer was passed in or not.
11771 (supply_register_zeroed): New.
11772 (supply_regblock): Mark the registers' status valid or
11773 unavailable, depending on whether a buffer was passed in or not.
11774 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11775 (struct regcache): New `register_status' field.
11776 (supply_register_zeroed): Declare.
11777 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11778 supply_register_zeroed, rather than passing a NULL buffer to
11780 * tracepoint.c (fetch_traceframe_registers): Update comment.
11782 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11784 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11787 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11789 * server.h (decode_xfer_write): Change prototype.
11790 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11791 and don't extract the annex here.
11792 * server.c (decode_xfer_read): Remove `annex' parameter,
11793 and don't extract the annex here.
11794 (decode_xfer): New.
11795 (struct qxfer): New.
11796 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11797 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11798 (handle_qxfer_statictrace): New functions, abstracted out from
11799 handle_query, and made to use the struct qxfer interface.
11800 (handle_threads_qxfer_proper): Rename to ...
11801 (handle_qxfer_threads_proper): ... this.
11802 (handle_threads_qxfer): Rename to ...
11803 (handle_qxfer_threads): ... this. Adjust.
11804 (qxfer_packets): New array.
11805 (handle_qxfer): New function.
11806 (handle_query): Use handle_qxfer.
11808 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11810 * gdbreplay.c: Shorten lines of >= 80 columns.
11811 * linux-low.c: Ditto.
11812 * linux-ppc-low.c: Ditto.
11813 * linux-s390-low.c: Ditto.
11814 * linux-sparc-low.c: Ditto.
11815 * linux-x86-low.c: Ditto.
11816 * linux-xtensa-low.c: Ditto.
11817 * mem-break.c: Ditto.
11818 * nto-low.c: Ditto.
11819 * regcache.h: Ditto.
11820 * remote-utils.c: Ditto.
11823 * thread-db.c: Ditto.
11824 * tracepoint.c: Ditto.
11826 * win32-low.h: Ditto.
11828 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11830 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11833 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11835 * server.c (gdbserver_version): Update copyright year in version
11837 * gdbreplay.c (gdbreplay_version): Ditto.
11839 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11841 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11842 * linux-bfin-low.c: New file.
11843 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11844 PT_DATA_ADDR for BFIN targets.
11845 * Makefile.in (SFILES): Add linux-bfin-low.c.
11846 (clean): Remove reg-bfin.c.
11847 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11848 * README: Mention supported Blackfin targets.
11850 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11852 * .gitignore: New file.
11854 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11856 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11858 2010-10-22 Jie Zhang <jie@codesourcery.com>
11860 * Makefile.in: Add FLAGS_TO_PASS variable.
11861 (install): Remove dependency of install-only and recursively
11862 invoke make for install-only.
11864 2010-10-04 Doug Evans <dje@google.com>
11866 * Makefile.in (uninstall): Use $(DESTDIR).
11868 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11872 * linux-x86-low.c (compat_siginfo_from_siginfo)
11873 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11874 si_code is < 0. Check for si_code == SI_TIMER before checking for
11877 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11879 * lynx-i386-low.c: New file.
11880 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11882 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11884 * lynx-low.c (ptrace_request_to_str): Remove handling for
11885 request values that have been removed in LynxOS 5.x.
11887 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11889 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11892 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11894 * configure.ac: Add --enable-inprocess-agent option.
11895 * configure: Rebuilt.
11897 2010-09-06 Yao Qi <yao@codesourcery.com>
11899 * linux-low.c (linux_kill): Remove unused variable.
11900 (linux_stabilize_threads): Likewise.
11901 * server.c (start_inferior): Likewise.
11902 (queue_stop_reply_callback): Likewise.
11903 * tracepoint.c (do_action_at_tracepoint): Likewise.
11905 2010-09-06 Yao Qi <yao@codesourcery.com>
11907 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11910 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11912 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11914 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11916 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11919 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11921 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11922 gdbserver/lynx-ppc-low.c: New files.
11923 * Makefile.in (lynx_low_h): New variable.
11924 (lynx-low.o, lynx-ppc-low.o): New rules.
11925 * configure.ac: On LynxOS, link with -lnetinet.
11926 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11927 * configure: regenerate.
11929 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11931 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11932 * configure.ac: Add check for vasprintf and vsnprintf.
11933 * configure, config.in: Regenerate.
11934 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11936 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11938 * gdbreplay.c: Move include of alloca.h up, next to include of
11940 * server.h: Add include of malloc.h.
11941 * mem-break.c: Remove include of malloc.h.
11942 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11944 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11946 * Makefile.in (memmem.o): Build with -Wno-error.
11948 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11950 * utils.c (xsnprintf): Make non-static.
11951 * server.h: Add xsnprintf declaration.
11952 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11953 replace calls to snprintf by calls to xsnprintf throughout.
11955 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11957 * configure.ac: Add configure check for alloca.
11958 * configure, config.in: Regenerate.
11959 * server.h: Include alloca.h if it exists.
11960 * gdbreplay.c: Include alloca.h if it exists.
11962 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11964 * linux-low.c (__SIGRTMIN): Define if not already defined.
11965 (linux_create_inferior): Check for __ANDROID__ rather than
11967 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11968 are already deferred.
11969 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11970 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11971 stopped and already has a pending signal to report.
11972 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11973 a pending signal to report or is moving out of a jump pad.
11974 (linux_init_signals): Check for __ANDROID__ rather than
11977 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11979 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11980 debug_threads check. Avoid a linear search when not doing debug
11983 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11985 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11986 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11987 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11988 (process_event): Change local fd's type to gdb_fildes_t.
11989 (create_file_handler): Adjust prototype.
11990 (delete_file_handler): Adjust prototype.
11991 (handle_file_event): Adjust prototype. Use pfildes.
11992 (create_file_event): Adjsut prototype.
11993 * remote-utils.c (remote_desc, listen_desc): Change type to
11995 * server.h: New gdb_fildes_t typedef.
11996 [USE_WIN32API]: Include winsock2.h.
11997 (delete_file_handler, add_file_handler): Adjust prototypes.
11998 (pfildes): Declare.
11999 * utils.c (pfildes): New.
12001 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12003 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12004 * configure: Regenerate.
12006 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12008 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12009 (linux_done_accessing_memory): ... this.
12010 (linux_target_ops): Adjust.
12011 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12012 * nto-low.c (nto_target_ops): Adjust comment.
12013 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12014 * spu-low.c (spu_target_ops): Adjust comment.
12015 * target.h (target_ops): Rename unprepare_to_access_memory field
12016 to done_accessing_memory.
12017 (unprepare_to_access_memory): Rename to ...
12018 (done_accessing_memory): ... this.
12020 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12022 * linux-low.c (linux_prepare_to_access_memory): New.
12023 (linux_unprepare_to_access_memory): New.
12024 (linux_target_ops): Install them.
12025 * server.c (read_memory): Rename to ...
12026 (gdb_read_memory): ... this. Use
12027 prepare_to_access_memory/prepare_to_access_memory.
12028 (write_memory): Rename to ...
12029 (gdb_write_memory): ... this. Use
12030 prepare_to_access_memory/prepare_to_access_memory.
12031 (handle_search_memory_1): Adjust.
12032 (process_serial_event): Adjust.
12033 * target.h (struct target_ops): New fields
12034 prepare_to_access_memory and unprepare_to_access_memory.
12035 (prepare_to_access_memory, unprepare_to_access_memory): New.
12036 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12037 prepare_to_access_memory/prepare_to_access_memory.
12038 * nto-low.c (nto_target_ops): Adjust.
12039 * spu-low.c (spu_target_ops): Adjust.
12040 * win32-low.c (win32_target_ops): Adjust.
12042 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12044 * Makefile.in (WARN_CFLAGS): Get it from configure.
12045 (WERROR_CFLAGS): New.
12046 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12047 * configure.ac: Introduce --enable-werror, which adds -Werror to
12048 the compiler command line. Enabled by default. Disable with
12049 --disable-werror. Add -Wdeclaration-after-statement
12050 Wpointer-arith and -Wformat-nonliteral to warning flags.
12051 * configure: Regenerate.
12053 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12055 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12057 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12059 * gdbreplay.c (remote_error): New.
12061 (expect): Use gdbchar. Check for error reading from GDB.
12062 Clarify sync error output.
12063 (play): Check for errors writing to GDB.
12064 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12065 * remote-utils.c (getpkt): Check for errors writing to the remote
12068 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12070 * linux-low.c (linux_wait_1): Move non-debugging code out of
12071 `debug_threads' control.
12073 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12075 * linux-low.c (linux_wait_1): Don't set last_status here.
12076 * server.c (push_event, queue_stop_reply_callback): Assert we're
12077 not pushing a TARGET_WAITKIND_IGNORE event.
12078 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12079 (myresume, handle_target_event): Set the thread's last_resume_kind
12080 and last_status from the target returned status.
12082 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12086 * linux-x86-low.c (update_debug_registers_callback): New.
12087 (i386_dr_low_set_addr): Use it.
12088 (i386_dr_low_get_addr): New.
12089 (i386_dr_low_set_control): Use update_debug_registers_callback.
12090 (i386_dr_low_get_control): New.
12091 (i386_dr_low_get_status): Adjust.
12092 * linux-low.c (linux_stop_lwp): New.
12093 * linux-low.h (linux_stop_lwp): Declare.
12095 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12096 argument instead of a i386_debug_reg_state.
12097 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12098 a i386_debug_reg_state.
12099 (i386_insert_aligned_watchpoint): Adjust.
12100 (i386_remove_aligned_watchpoint): Adjust.
12101 (i386_low_stopped_data_address): Read the debug registers from the
12102 inferior instead of from the mirrors.
12103 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12104 (i386_dr_low_get_addr): Declare.
12105 (i386_dr_low_get_control): Declare.
12106 (i386_dr_low_get_status): Change prototype.
12108 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12109 (i386_dr_low_get_addr): New.
12110 (i386_dr_low_get_control): New.
12111 (i386_dr_low_get_status): Adjust prototype. Return
12113 (i386_initial_stuff): Clear dr_status_mirror and
12115 (i386_get_thread_context): Adjust.
12116 (i386_set_thread_context): Adjust.
12117 (i386_thread_added): Adjust.
12119 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12121 * linux-low.h (linux_thread_area): Delete declaration.
12123 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12125 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12126 after its termination.
12128 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12130 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12131 (gdb_wants_all_stopped): Delete.
12132 (linux_wait_1): Don't call them.
12133 * server.c (handle_v_cont): Tag all threads as want-stopped.
12134 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12135 stopped as "client-wants-stopped".
12137 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12139 * Makefile.in (signals_h): New.
12140 (server_h): Depend on it.
12141 (server.o): Don't depend on $(signals_def).
12142 (signals.o): Depend on $(signals_def).
12144 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12146 * Makefile.in (signals_def): New.
12147 (server_h): Append include/gdb/signals.h and signals_def.
12148 (server.o): Append signals_def.
12150 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12152 * server.c (handle_target_event): Use target_signal_to_host for
12153 resume_info.sig initialization.
12154 * target.h (struct thread_resume) <sig>: New comment.
12156 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12158 * server.c (handle_query): strcpy() the returned string from paddress()
12159 instead of sprintf().
12160 * utils.c (paddress): Return phex_nz().
12162 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12164 * server.c (handle_v_cont): Call mourn_inferior if process
12166 (myresume): Likewise.
12168 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12170 Static tracepoints, and integration with UST.
12172 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12173 * mem-break.c (uninsert_all_breakpoints)
12174 (reinsert_all_breakpoints): New.
12175 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12176 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12177 (gdb_agent_ust_loaded, helper_thread_id)
12178 (gdb_agent_helper_thread_id): New macros.
12179 (struct ipa_sym_addresses): Add addr_ust_loaded,
12180 addr_helper_thread_id, addr_cmd_buf.
12181 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12182 (in_process_agent_loaded_ust): New.
12183 (write_e_ust_not_loaded): New.
12184 (maybe_write_ipa_ust_not_loaded): New.
12185 (struct collect_static_trace_data_action): New.
12186 (enum tracepoint_type) <static_tracepoint>: New.
12187 (struct tracepoint) <handle>: Mention static tracepoints.
12188 (struct static_tracepoint_ctx): New.
12189 (CMD_BUF_SIZE): New.
12190 (add_tracepoint_action): Handle static tracepoint actions.
12191 (unprobe_marker_at): New.
12192 (clear_installed_tracepoints): Handle static tracepoints.
12193 (cmd_qtdp): Handle static tracepoints.
12194 (probe_marker_at): New.
12195 (cmd_qtstart): Handle static tracepoints.
12196 (response_tracepoint): Handle static tracepoints.
12197 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12198 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12199 (get_context_regcache): Handle static tracepoints.
12200 (do_action_at_tracepoint): Handle static tracepoint actions.
12201 (traceframe_find_block_type): Handle static trace data blocks.
12202 (traceframe_read_sdata): New.
12203 (download_tracepoints): Download static tracepoint actions.
12204 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12205 (GDB_PROBE_NAME): New.
12207 (GET_UST_SYM): New.
12210 (ust_marker_to_static_tracepoint): New.
12212 (collect_ust_data_at_tracepoint): New.
12213 (gdb_ust_probe): New.
12214 (UNIX_PATH_MAX, SOCK_DIR): New.
12215 (gdb_ust_connect_sync_socket): New.
12216 (resume_thread, stop_thread): New.
12217 (run_inferior_command): New.
12218 (init_named_socket): New.
12219 (gdb_ust_socket_init): New.
12220 (cstr_to_hexstr): New.
12222 (first_marker, next_marker): New.
12223 (response_ust_marker): New.
12224 (cmd_qtfstm, cmd_qtsstm): New.
12225 (unprobe_marker_at, probe_marker_at): New.
12226 (cmd_qtstmat, gdb_ust_thread): New.
12227 (gdb_ust_init): New.
12228 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12229 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12230 (ST_REGENTRY): New.
12231 (x86_64_st_collect_regmap): New.
12232 (X86_64_NUM_ST_COLLECT_GREGS): New.
12233 (AMD64_RIP_REGNUM): New.
12234 (supply_static_tracepoint_registers): New.
12235 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12236 (ST_REGENTRY): New.
12237 (i386_st_collect_regmap): New.
12238 (i386_NUM_ST_COLLECT_GREGS): New.
12239 (supply_static_tracepoint_registers): New.
12240 * server.c (handle_query): Handle qXfer:statictrace:read.
12241 <qSupported>: Report support for StaticTracepoints, and
12242 qXfer:statictrace:read features.
12243 * server.h (traceframe_read_sdata)
12244 (supply_static_tracepoint_registers): Declare.
12245 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12246 (unpack_varlen_hex): Include in IPA build.
12247 * Makefile.in (ustlibs, ustinc): New.
12248 (IPA_OBJS): Add remote-utils-ipa.o.
12249 ($(IPA_LIB)): Link -ldl and -lpthread.
12251 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12252 * config.in, configure: Regenerate.
12254 2010-06-20 Ian Lance Taylor <iant@google.com>
12255 Pedro Alves <pedro@codesourcery.com>
12257 * linux-x86-low.c (always_true): Delete.
12258 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12259 trying to fool the compiler with always_true.
12261 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12263 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12264 conditions in gdbserver.
12266 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12268 * spu-low.c (spu_read_memory): Wrap around local store limit.
12269 (spu_write_memory): Likewise.
12271 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12273 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12274 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12276 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12278 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12279 uses with LONGEST uses.
12281 2010-06-14 Stan Shebs <stan@codesourcery.com>
12282 Pedro Alves <pedro@codesourcery.com>
12286 * linux-x86-low.c: Include limits.h.
12288 (always_true): New.
12291 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12292 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12293 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12294 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12295 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12296 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12297 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12298 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12299 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12300 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12301 (amd64_emit_void_call_2): New.
12302 (amd64_emit_ops): New.
12303 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12304 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12305 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12306 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12307 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12308 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12309 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12310 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12311 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12312 (i386_emit_stack_adjust, i386_emit_int_call_1)
12313 (i386_emit_void_call_2): New.
12314 (i386_emit_ops): New.
12315 (x86_emit_ops): New.
12316 (the_low_target): Install x86_emit_ops.
12317 * server.h (struct emit_ops): New.
12318 (get_raw_reg_func_addr): Declare.
12319 (current_insn_ptr, emit_error): Declare.
12320 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12321 (set_trace_state_variable_value): New defines.
12322 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12323 addr_get_trace_state_variable_value and
12324 addr_set_trace_state_variable_value.
12325 (symbol_list): New fields for get_raw_reg,
12326 get_trace_state_variable_value and set_trace_state_variable_value.
12327 (condfn): New typedef.
12328 (struct tracepoint): New field `compiled_cond'.
12329 (do_action_at_tracepoint): Clear compiled_cond.
12330 (get_trace_state_variable_value, set_trace_state_variable_value):
12332 (condition_true_at_tracepoint): If there's a compiled condition,
12334 (current_insn_ptr, emit_error): New globals.
12335 (struct bytecode_address): New.
12336 (get_raw_reg_func_addr): New.
12337 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12338 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12339 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12340 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12341 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12342 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12343 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12344 (compile_tracepoint_condition, compile_bytecodes): New.
12345 * target.h (emit_ops): Forward declare.
12346 (struct target_ops): New field emit_ops.
12347 (target_emit_ops): New.
12348 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12349 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12350 * linux-low.c (linux_emit_ops): New.
12351 (linux_target_ops): Install it.
12352 * linux-low.h (struct linux_target_ops): New field emit_ops.
12354 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12356 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12357 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12359 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12360 Stan Shebs <stan@codesourcery.com>
12362 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12363 (all): Depend on $(extra_libraries).
12364 (install-only): Install the IPA.
12365 (IPA_OBJS, IPA_LIB): New.
12366 (clean): Remove the IPA lib.
12367 (IPAGENT_CFLAGS): New.
12368 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12369 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12370 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12371 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12372 * configure.ac: Check for atomic builtins support in the compiler.
12373 (IPA_DEPFILES, extra_libraries): Define.
12374 * configure.srv (ipa_obj): Add description.
12375 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12376 (i[34567]86-*-linux*): Set ipa_obj.
12377 (x86_64-*-linux*): Set ipa_obj.
12378 * linux-low.c (stabilizing_threads): New.
12379 (supports_fast_tracepoints): New.
12380 (linux_detach): Stabilize threads before detaching.
12381 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12382 the lwp is either not stabilizing, or is moving out of a jump pad.
12383 (linux_fast_tracepoint_collecting): New.
12384 (maybe_move_out_of_jump_pad): New.
12385 (enqueue_one_deferred_signal): New.
12386 (dequeue_one_deferred_signal): New.
12387 (linux_wait_for_event_1): If moving out of a jump pad, defer
12388 pending signals to later.
12389 (linux_stabilize_threads): New.
12390 (linux_wait_1): Check if threads need moving out of jump pads, and
12392 (stuck_in_jump_pad_callback): New.
12393 (move_out_of_jump_pad_callback): New.
12394 (lwp_running): New.
12395 (linux_resume_one_lwp): Handle moving out of jump pads.
12396 (linux_set_resume_request): Dequeue deferred signals.
12397 (need_step_over_p): Also step over fast tracepoint jumps.
12398 (start_step_over): Also uninsert fast tracepoint jumps.
12399 (finish_step_over): Also reinsert fast tracepoint jumps.
12400 (linux_install_fast_tracepoint_jump): New.
12401 (linux_target_ops): Install linux_stabilize_threads and
12402 linux_install_fast_tracepoint_jump_pad.
12403 * linux-low.h (linux_target_ops) <get_thread_area,
12404 install_fast_tracepoint_jump_pad>: New fields.
12405 (struct lwp_info) <collecting_fast_tracepoint,
12406 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12407 (linux_get_thread_area): Declare.
12408 * linux-x86-low.c (jump_insn): New.
12409 (x86_get_thread_area): New.
12410 (append_insns): New.
12411 (push_opcode): New.
12412 (amd64_install_fast_tracepoint_jump_pad): New.
12413 (i386_install_fast_tracepoint_jump_pad): New.
12414 (x86_install_fast_tracepoint_jump_pad): New.
12415 (the_low_target): Install x86_get_thread_area and
12416 x86_install_fast_tracepoint_jump_pad.
12417 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12418 (struct fast_tracepoint_jump): New.
12419 (fast_tracepoint_jump_insn): New.
12420 (fast_tracepoint_jump_shadow): New.
12421 (find_fast_tracepoint_jump_at): New.
12422 (fast_tracepoint_jump_here): New.
12423 (delete_fast_tracepoint_jump): New.
12424 (set_fast_tracepoint_jump): New.
12425 (uninsert_fast_tracepoint_jumps_at): New.
12426 (reinsert_fast_tracepoint_jumps_at): New.
12427 (set_breakpoint_at): Use write_inferior_memory.
12428 (uninsert_raw_breakpoint): Use write_inferior_memory.
12429 (check_mem_read): Mask out fast tracepoint jumps.
12430 (check_mem_write): Mask out fast tracepoint jumps.
12431 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12432 (set_fast_tracepoint_jump): Declare.
12433 (delete_fast_tracepoint_jump)
12434 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12435 (reinsert_fast_tracepoint_jumps_at): Declare.
12436 * regcache.c: Don't compile many functions when building the
12437 in-process agent library.
12438 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12439 the register buffer in the heap.
12440 (free_register_cache): If the register buffer isn't owned by the
12441 regcache, don't free it.
12442 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12443 pre-existing register caches.
12444 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12446 (convert_ascii_to_int): : Constify `from' parameter type.
12447 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12448 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12449 the needed buffer in-place.
12450 (relocate_instruction): New.
12451 * server.c (handle_query) <qSymbols>: If the target supports
12452 tracepoints, give it a chance of looking up symbols. Report
12453 support for fast tracepoints.
12454 (handle_status): Stabilize threads.
12455 (process_serial_event): Adjust.
12456 * server.h (struct fast_tracepoint_jump): Forward declare.
12457 (struct process_info) <fast_tracepoint_jumps>: New field.
12458 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12459 (decode_X_packet, decode_M_packet): Adjust.
12460 (relocate_instruction): Declare.
12461 (in_process_agent_loaded): Declare.
12462 (tracepoint_look_up_symbols): Declare.
12463 (struct fast_tpoint_collect_status): Declare.
12464 (fast_tracepoint_collecting): Declare.
12465 (force_unlock_trace_buffer): Declare.
12466 (handle_tracepoint_bkpts): Declare.
12467 (initialize_low_tracepoint)
12468 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12469 * target.h (struct target_ops) <stabilize_threads,
12470 install_fast_tracepoint_jump_pad>: New fields.
12471 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12472 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12473 [HAVE_STDINT_H]: Include stdint.h.
12474 (trace_debug_1): Rename to ...
12475 (trace_vdebug): ... this.
12476 (trace_debug): Rename to ...
12477 (trace_debug_1): ... this. Add `level' parameter.
12478 (trace_debug): New.
12479 (ATTR_USED, ATTR_NOINLINE): New.
12480 (IP_AGENT_EXPORT): New.
12481 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12482 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12483 (about_to_request_buffer_space, trace_buffer_is_full)
12484 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12485 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12486 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12487 (traceframe_write_count, traceframes_created)
12488 (trace_state_variables)
12489 New renaming defines.
12490 (struct ipa_sym_addresses): New.
12491 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12492 (symbol_list): New.
12493 (ipa_sym_addrs): New.
12494 (all_tracepoint_symbols_looked_up): New.
12495 (in_process_agent_loaded): New.
12496 (write_e_ipa_not_loaded): New.
12497 (maybe_write_ipa_not_loaded): New.
12498 (tracepoint_look_up_symbols): New.
12499 (debug_threads) [IN_PROCESS_AGENT]: New.
12500 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12501 (UNKNOWN_SIDE_EFFECTS): New.
12502 (stop_tracing): New.
12503 (flush_trace_buffer): New.
12504 (stop_tracing_bkpt): New.
12505 (flush_trace_buffer_bkpt): New.
12506 (read_inferior_integer): New.
12507 (read_inferior_uinteger): New.
12508 (read_inferior_data_pointer): New.
12509 (write_inferior_data_pointer): New.
12510 (write_inferior_integer): New.
12511 (write_inferior_uinteger): New.
12512 (struct collect_static_trace_data_action): Delete.
12513 (enum tracepoint_type): New.
12514 (struct tracepoint) <type>: New field `type'.
12515 <actions_str, step_actions, step_actions_str>: Only include in
12517 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12518 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12519 (tracepoints): Use IP_AGENT_EXPORT.
12520 (last_tracepoint): Don't include in the IPA.
12521 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12522 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12523 (alloced_trace_state_variables): New.
12524 (trace_state_variables): Use IP_AGENT_EXPORT.
12525 (traceframe_t): Delete unused variable.
12526 (circular_trace_buffer): Don't include in the IPA.
12527 (trace_buffer_start): Delete.
12528 (struct trace_buffer_control): New.
12529 (trace_buffer_free): Delete.
12530 (struct ipa_trace_buffer_control): New.
12531 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12532 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12534 (trace_buffer_ctrl): New.
12535 (TRACE_BUFFER_CTRL_CURR): New.
12536 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12537 Reimplement as macros.
12538 (trace_buffer_wrap): Delete.
12539 (traceframe_write_count, traceframe_read_count)
12540 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12541 (struct tracepoint_hit_ctx) <type>: New field.
12542 (struct fast_tracepoint_ctx): New.
12543 (memory_barrier): New.
12545 (record_tracepoint_error): Update atomically in the IPA.
12546 (clear_inferior_trace_buffer): New.
12547 (about_to_request_buffer_space): New.
12548 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12549 updating the same buffer.
12550 (add_tracepoint): Default the tracepoint's type to trap
12551 tracepoint, and orig_size to -1.
12552 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12553 internal variables.
12554 (create_trace_state_variable): New parameter `gdb'. Handle it.
12555 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12556 (cmd_qtdp): Handle fast tracepoints.
12557 (cmd_qtdv): Adjust.
12558 (max_jump_pad_size): New.
12559 (gdb_jump_pad_head): New.
12560 (get_jump_space_head): New.
12561 (claim_jump_space): New.
12562 (sort_tracepoints): New.
12563 (MAX_JUMP_SIZE): New.
12564 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12566 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12567 support. Upload fast traceframes, and delete internal IPA
12569 (stop_tracing_handler): New.
12570 (flush_trace_buffer_handler): New.
12571 (cmd_qtstop): Upload fast tracepoints.
12572 (response_tracepoint): Handle fast tracepoints.
12573 (tracepoint_finished_step): Upload fast traceframes. Set the
12574 tracepoint hit context's tracepoint type.
12575 (handle_tracepoint_bkpts): New.
12576 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12577 type. Add comment about fast tracepoints.
12578 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12579 non-existing action_str field.
12580 (get_context_regcache): Handle fast tracepoints.
12581 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12583 (fast_tracepoint_from_jump_pad_address): New.
12584 (fast_tracepoint_from_ipa_tpoint_address): New.
12585 (collecting_t): New.
12586 (force_unlock_trace_buffer): New.
12587 (fast_tracepoint_collecting): New.
12589 (gdb_collect): New.
12590 (write_inferior_data_ptr): New.
12591 (target_tp_heap): New.
12592 (target_malloc): New.
12593 (download_agent_expr): New.
12595 (download_tracepoints): New.
12596 (download_trace_state_variables): New.
12597 (upload_fast_traceframes): New.
12598 (IPA_FIRST_TRACEFRAME): New.
12599 (IPA_NEXT_TRACEFRAME_1): New.
12600 (IPA_NEXT_TRACEFRAME): New.
12601 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12602 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12603 (gdb_jump_pad_buffer_end): New.
12604 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12605 (initialize_tracepoint): Adjust.
12606 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12607 buffer. Initialize the low module.
12608 * utils.c (PREFIX, TOOLNAME): New.
12609 (malloc_failure): Use PREFIX.
12610 (error): In the IPA, an error causes an exit.
12611 (fatal, warning): Use PREFIX.
12612 (internal_error): Use TOOLNAME.
12613 (NUMCELLS): Increase to 10.
12614 * configure, config.in: Regenerate.
12616 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12618 * server.c (handle_query) <qSupported>: Do two passes over the
12619 qSupported string to avoid nesting strtok.
12621 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12623 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12625 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12626 -Wl,--dynamic-list.
12627 * configure: Regenerate.
12628 * proc-service.list: New.
12630 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12632 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12635 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12637 * gdbreplay.c (remote_open): Check error return from socket() call by
12638 its equality to -1 not by it being negative.
12639 * remote-utils.c (remote_open): Likewise.
12641 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12643 * config.h: Regenerate.
12645 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12647 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12648 doesn't provide PTRACE_GET_THREAD_AREA.
12650 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12652 * linux-m68k-low.c: Include <asm/ptrace.h>
12653 (ps_get_thread_area): Implement.
12655 2010-05-03 Doug Evans <dje@google.com>
12657 * event-loop.c (struct callback_event): New struct.
12658 (callback_list): New global.
12659 (append_callback_event, delete_callback_event): New functions.
12660 (process_callback): New function.
12661 (start_event_loop): Call it.
12662 * remote-utils.c (NOT_SCHEDULED): Define.
12663 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12664 moved out of readchar.
12665 (readchar): Rewrite. Call reschedule before returning.
12666 (reset_readchar): New function.
12667 (remote_close): Call it.
12668 (process_remaining, reschedule): New functions.
12669 * server.h (callback_handler_func): New typedef.
12670 (append_callback_event, delete_callback_event): Declare.
12672 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12674 * proc-service.c (ps_pglobal_lookup): Use
12675 thread_db_look_up_one_symbol.
12676 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12677 parameter. Use it instead of all_symbols_looked_up.
12678 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12680 (all_symbols_looked_up): Don't declare.
12681 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12682 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12684 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12685 Set all_symbols_looked_up here.
12686 (thread_db_look_up_one_symbol): New.
12687 (thread_db_get_tls_address): Adjust.
12688 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12689 thread_db object on the heap, and tentatively set it in the
12691 (thread_db_init): Don't set all_symbols_looked_up here.
12692 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12694 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12696 * linux-low.c (linux_kill, linux_detach): Adjust.
12697 (status_pending_p_callback): Remove redundant statement. Check
12698 for !TARGET_WAITIKIND_IGNORE, instead of
12699 TARGET_WAITKIND_STOPPED.
12700 (handle_tracepoints): Make sure LWP is locked. Adjust.
12701 (linux_wait_for_event_1): Adjust.
12702 (linux_cancel_breakpoints): New.
12703 (unsuspend_one_lwp): New.
12704 (unsuspend_all_lwps): New.
12705 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12706 (send_sigstop_callback): Change return type to int, add new
12707 `except' parameter and handle it.
12708 (suspend_and_send_sigstop_callback): New.
12709 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12710 pass them down. If SUSPEND, also increment the lwp's suspend
12712 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12713 (need_step_over_p): Don't consider suspended LWPs.
12714 (start_step_over): Adjust.
12715 (proceed_one_lwp): Change return type to int, add new `except'
12716 parameter and handle it.
12717 (unsuspend_and_proceed_one_lwp): New.
12718 (proceed_all_lwps): Use find_inferior instead of
12720 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12721 also decrement the suspend count of LWPs. Pass `except' down,
12722 instead of hacking its suspend count.
12723 (linux_pause_all): Add `freeze' parameter. Adjust.
12724 (linux_unpause_all): New.
12725 (linux_target_ops): Install linux_unpause_all.
12726 * server.c (handle_status): Adjust.
12727 * target.h (struct target_ops): New fields `unpause_all' and
12728 `cancel_breakpoints'. Add new parameter to `pause_all'.
12729 (pause_all): Add new `freeze' parameter.
12730 (unpause_all): New.
12731 (cancel_breakpoints): New.
12732 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12733 cancel breakpoints.
12734 (cmd_qtstart): Pause threads.
12735 (stop_tracing): Pause threads, and cancel breakpoints.
12736 * win32-low.c (win32_target_ops): Adjust.
12738 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12740 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12741 the inferior right away from here...
12742 (linux_wait_1): ... to here, and adjust to check the thread's
12743 last_resume_kind instead of the lwp's step or stop_expected flags.
12745 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12747 * README: Use consistent `GDB' and `GDBserver' spellings.
12749 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12751 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12752 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12753 (linux_detach_one_lwp): Assume the lwp is stopped.
12754 (any_thread_of): Delete.
12755 (linux_detach): Stop all lwps here. Don't blindly delete all
12757 (delete_lwp_callback): New.
12758 (linux_mourn): Delete all lwps of the process that is gone.
12759 (linux_wait_1): Don't delete the last lwp of the process here.
12760 * mem-break.h (mark_breakpoints_out): Declare.
12761 * mem-break.c (mark_breakpoints_out): New.
12762 (free_all_breakpoints): Use it.
12763 * server.c (handle_target_event): If the process is gone, mark
12765 * thread-db.c (struct thread_db) <create_bp>: New field.
12766 (thread_db_enable_reporting): Fix prototype. Store a thread event
12767 breakpoint reference in the thread_db struct.
12768 (thread_db_load_search): Clear the thread_db object.
12769 (try_thread_db_load_1): Ditto.
12770 (switch_to_process): New.
12771 (disable_thread_event_reporting): Use it.
12772 (remove_thread_event_breakpoints): New.
12773 (thread_db_detach, thread_db_mourn): Use it.
12775 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12777 * linux-low.c (linux_enable_event_reporting): New.
12778 (linux_wait_for_event_1, handle_extended_wait): Use it.
12780 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12782 * linux-low.c (linux_kill_one_lwp, linux_kill)
12783 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12784 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12785 SIGSTOP even if the LWP is stopped.
12786 (send_sigstop_callback): New.
12787 (stop_all_lwps): Use send_sigstop_callback instead.
12788 (linux_resume_one_thread): Adjust.
12789 (proceed_one_lwp): Still proceed an LWP that the client has
12790 requested to stop, if we haven't reported it as stopped yet. Make
12791 sure that LWPs the client want stopped, have a pending SIGSTOP.
12793 2010-04-26 Doug Evans <dje@google.com>
12795 * server.c (handle_general_set): Make static.
12797 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12798 Print received char after testing for error/eof instead of before.
12799 (input_interrupt): Tweak comment.
12801 2010-04-23 Doug Evans <dje@google.com>
12803 * server.c (start_inferior): Print inferior argv if --debug.
12805 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12807 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12808 * nto-x86-low.c: Include server.h
12810 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12812 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12813 be consistent with other sources of this directory.
12814 (init_registers_amd64): Correct name of source file of this function
12817 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12819 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12820 64-bit executables.
12822 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12824 * win32-i386-low.c: Add 64-bit support.
12825 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12826 (init_registers_amd64): Declare.
12827 (mappings): Add 64-bit version of array.
12828 (init_windows_x86): New function.
12829 (the_low_target): Change init_arch field to init_windows_x86.
12831 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12833 * win32-low.c: Adapt to support also 64-bit architecture.
12834 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12835 (get_image_name): Use SIZE_T type for local variable `done'.
12836 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12837 (toolhelp_get_dll_name): Idem.
12838 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12839 Use uintptr_t typecast to avoid warning.
12840 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12841 (handle_exception): Use phex_nz to avoid warning.
12842 (win32_wait): Remove unused local variable `process'.
12844 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12846 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12849 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12851 * configure.ac: Use `ws2_32' library for srv_mingw.
12852 * configure: Regenerate.
12853 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12854 * remote-utils.c: Likewise.
12856 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12858 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12859 if __x86_64__ is defined.
12861 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12863 * configure: Regenerate.
12865 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12867 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12868 * target.h (target_ops): New get_tib_address field.
12869 * win32-low.h (win32_thread_info): Add thread_local_base field.
12870 * win32-low.c (child_add_thread): Add tlb argument.
12871 Set thread_local_base field to TLB.
12872 (get_child_debug_event): Adapt to child_add_thread change.
12873 (win32_get_tib_address): New function.
12874 (win32_target_ops): Set get_tib_address field to
12875 win32_get_tib_address.
12876 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12878 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12880 * linux-low.c (linux_mourn): Also remove the process.
12881 * server.c (handle_target_event): Don't remove the process here.
12882 * nto-low.c (nto_mourn): New.
12883 (nto_target_ops): Install it.
12884 * spu-low.c (spu_mourn): New.
12885 (spu_target_ops): Install it.
12886 * win32-low.c (win32_mourn): New.
12887 (win32_target_ops): Install it.
12889 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12891 * server.h (buffer_xml_printf): Remove redundant `;'.
12893 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12895 * regcache.c (set_register_cache): Invalidate regcaches before
12896 changing the register cache layout.
12897 (regcache_invalidate_one): Allow a NULL regcache.
12898 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12899 regcaches before changing the register cache layout or the target
12902 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12904 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12905 variable warning on Linux/x86-64.
12907 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12909 GDBserver disconnected tracing support.
12911 * linux-low.c (linux_remove_process): Delete.
12912 (add_lwp): Don't set last_resume_kind here.
12913 (linux_kill): Use `mourn'.
12914 (linux_detach): Use `thread_db_detach', and `mourn'.
12915 (linux_mourn): New.
12916 (linux_attach_lwp_1): Adjust comment.
12917 (linux_attach): last_resume_kind moved the thread_info; adjust.
12918 (status_pending_p_callback): Adjust.
12919 (linux_wait_for_event_1): Adjust.
12920 (count_events_callback, select_singlestep_lwp_callback)
12921 (select_event_lwp_callback, cancel_breakpoints_callback)
12922 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12923 (proceed_one_lwp): Adjust.
12924 (linux_async): Add debug output.
12925 (linux_thread_stopped): New.
12926 (linux_pause_all): New.
12927 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12929 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12930 (thread_db_free): Delete declaration.
12931 (thread_db_detach, thread_db_mourn): Declare.
12932 * thread-db.c (thread_db_init): Use thread_db_mourn.
12933 (thread_db_free): Delete, split in two.
12934 (disable_thread_event_reporting): New.
12935 (thread_db_detach): New.
12936 (thread_db_mourn): New.
12938 * server.h (struct thread_info) <last_resume_kind>: New field.
12939 <attached>: Add comment.
12940 <gdb_detached>: New field.
12941 (handler_func): Change return type to int.
12942 (handle_serial_event, handle_target_event): Ditto.
12943 (gdb_connected): Declare.
12945 (disconnected_tracing): Declare.
12946 (stop_tracing): Declare.
12948 * server.c (handle_query) <qSupported>: Report support for
12949 disconnected tracing.
12950 (queue_stop_reply_callback): Account for running threads.
12951 (gdb_wants_thread_stopped): New.
12952 (gdb_wants_all_threads_stopped): New.
12953 (gdb_reattached_process): New.
12954 (handle_status): Clear the `gdb_detached' flag of all processes.
12955 In all-stop, stop all threads.
12956 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12957 (process_serial_event): If the remote connection breaks, or if an
12958 exit was forced with "monitor exit", force an event loop exit.
12959 Handle disconnected tracing on detach.
12960 (handle_serial_event): Adjust.
12961 (handle_target_event): If GDB isn't connected, forward events back
12962 to the inferior, unless the last process exited, in which case,
12963 exit gdbserver. Adjust interface.
12965 * remote-utils.c (remote_open): Don't block in accept. Instead
12966 register an event loop source on the listen socket file
12967 descriptor. Refactor bits into ...
12968 (listen_desc): ... this new global.
12969 (gdb_connected): ... this new function.
12970 (enable_async_notification): ... this new function.
12971 (handle_accept_event): ... this new function.
12972 (remote_close): Clear remote_desc.
12974 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12976 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12978 (mourn_inferior): Define.
12979 (target_process_qsupported): Avoid the dangling else problem.
12980 (thread_stopped): Define.
12981 (pause_all): Define.
12982 (target_waitstatus_to_string): Declare.
12983 * target.c (target_waitstatus_to_string): New.
12985 * tracepoint.c (tracing): Make extern.
12986 (disconnected_tracing): New.
12987 (stop_tracing): Make extern. Handle tracing stops due to GDB
12989 (cmd_qtdisconnected): New.
12990 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12991 (handle_tracepoint_general_set): Handle QTDisconnected.
12993 * event-loop.c (event_handler_func): Change return type to int.
12994 (process_event): Bail out if the event handler wants the event
12996 (handle_file_event): Ditto.
12997 (start_event_loop): Bail out if the event handler wants the event
13000 * nto-low.c (nto_target_ops): Adjust.
13001 * spu-low.c (spu_wait): Don't remove the process here.
13002 (spu_target_ops): Adjust.
13003 * win32-low.c (win32_wait): Don't remove the process here.
13004 (win32_target_ops): Adjust.
13006 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13008 * regcache.c (realloc_register_cache): Invalidate inferior's
13009 regcache before recreating it.
13011 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13013 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13015 2010-04-09 Stan Shebs <stan@codesourcery.com>
13016 Pedro Alves <pedro@codesourcery.com>
13018 * server.h (LONGEST): New.
13019 (struct thread_info) <while_stepping>: New field.
13020 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13022 (initialize_tracepoint, handle_tracepoint_general_set)
13023 (handle_tracepoint_query, tracepoint_finished_step)
13024 (tracepoint_was_hit, release_while_stepping_state_list):
13025 (current_traceframe): Declare.
13026 * server.c (handle_general_set): Handle tracepoint packets.
13027 (read_memory): New.
13028 (write_memory): New.
13029 (handle_search_memory_1): Use read_memory.
13030 (handle_query): Report support for conditional tracepoints, trace
13031 state variables, and tracepoint sources. Handle tracepoint
13033 (main): Initialize the tracepoints module.
13034 (process_serial_event): Handle traceframe reads/writes.
13036 * linux-low.c (handle_tracepoints): New.
13037 (linux_wait_1): Call it.
13038 (linux_resume_one_lwp): Handle while-stepping.
13039 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13040 (linux_target_ops): Install them.
13041 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13043 * linux-x86-low.c (x86_supports_tracepoints): New.
13044 (the_low_target). Install it.
13046 * mem-break.h (delete_breakpoint): Declare.
13047 * mem-break.c (delete_breakpoint): Make external.
13049 * target.h (struct target_ops): Add `supports_tracepoints',
13050 `read_pc', and `write_pc' fields.
13051 (target_supports_tracepoints): Define.
13052 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13055 * regcache.h (struct regcache) <registers_owned>: New field.
13056 (init_register_cache, regcache_cpy): Declare.
13057 (regcache_read_pc, regcache_write_pc): Declare.
13058 (register_cache_size): Declare.
13059 (supply_regblock): Declare.
13060 * regcache.c (init_register_cache): New.
13061 (new_register_cache): Use it.
13062 (regcache_cpy): New.
13063 (register_cache_size): New.
13064 (supply_regblock): New.
13065 (regcache_read_pc, regcache_write_pc): New.
13067 * tracepoint.c: New.
13069 * Makefile.in (OBS): Add tracepoint.o.
13070 (tracepoint.o): New rule.
13072 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13074 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13076 (i386-mmx.c): Likewise.
13077 (i386-mmx-linux.o): Likewise.
13078 (i386-mmx-linux.c): Likewise.
13080 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13081 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13082 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13083 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13085 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13086 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13087 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13089 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13091 * Makefile.in (clean): Updated.
13093 (i386-avx.c): Likewise.
13094 (i386-avx-linux.o): Likewise.
13095 (i386-avx-linux.c): Likewise.
13096 (amd64-avx.o): Likewise.
13097 (amd64-avx.c): Likewise.
13098 (amd64-avx-linux.o): Likewise.
13099 (amd64-avx-linux.c): Likewise.
13101 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13102 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13103 (srv_amd64_regobj): Add amd64-avx.o.
13104 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13105 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13106 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13107 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13108 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13109 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13110 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13112 * i387-fp.c: Include "i386-xstate.h".
13114 (i387_cache_to_xsave): Likewise.
13115 (i387_xsave_to_cache): Likewise.
13116 (x86_xcr0): Likewise.
13118 * i387-fp.h (i387_cache_to_xsave): Likewise.
13119 (i387_xsave_to_cache): Likewise.
13120 (x86_xcr0): Likewise.
13122 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13123 * linux-crisv32-low.c (target_regsets): Likewise.
13124 * linux-m68k-low.c (target_regsets): Likewise.
13125 * linux-mips-low.c (target_regsets): Likewise.
13126 * linux-ppc-low.c (target_regsets): Likewise.
13127 * linux-s390-low.c (target_regsets): Likewise.
13128 * linux-sh-low.c (target_regsets): Likewise.
13129 * linux-sparc-low.c (target_regsets): Likewise.
13130 * linux-xtensa-low.c (target_regsets): Likewise.
13132 * linux-low.c: Include <sys/uio.h>.
13133 (regsets_fetch_inferior_registers): Support nt_type.
13134 (regsets_store_inferior_registers): Likewise.
13135 (linux_process_qsupported): New.
13136 (linux_target_ops): Add linux_process_qsupported.
13138 * linux-low.h (regset_info): Add nt_type.
13139 (linux_target_ops): Add process_qsupported.
13141 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13143 (init_registers_i386_avx_linux): New.
13144 (init_registers_amd64_avx_linux): Likewise.
13145 (xmltarget_i386_linux_no_xml): Likewise.
13146 (xmltarget_amd64_linux_no_xml): Likewise.
13147 (PTRACE_GETREGSET): Likewise.
13148 (PTRACE_SETREGSET): Likewise.
13149 (x86_fill_xstateregset): Likewise.
13150 (x86_store_xstateregset): Likewise.
13151 (use_xml): Likewise.
13152 (x86_linux_update_xmltarget): Likewise.
13153 (x86_linux_process_qsupported): Likewise.
13154 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13155 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13156 init_registers_i386_linux here. Call
13157 x86_linux_update_xmltarget.
13158 (the_low_target): Add x86_linux_process_qsupported.
13160 * server.c (handle_query): Call target_process_qsupported.
13162 * target.h (target_ops): Add process_qsupported.
13163 (target_process_qsupported): New.
13165 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13167 * inferiors.c (add_thread): Set last_status kind to
13168 TARGET_WAITKIND_IGNORE.
13169 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13170 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13171 (linux_wait_1): Move `thread' local definition to block that uses
13172 it. Don't NULL initialize `event_child'.
13173 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13174 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13175 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13177 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13179 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13180 an extended waitstatus, or by a watchpoint.
13181 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13182 thread was stepping or has been stopped by a watchpoint.
13184 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13186 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13187 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13188 of another, then delete the previous, and validate all
13190 (validate_inserted_breakpoint): New.
13191 (delete_disabled_breakpoints): New.
13192 (validate_breakpoints): New.
13193 (check_mem_read): Validate breakpoints before trusting their
13194 shadow. Delete disabled breakpoints.
13195 (check_mem_write): Validate breakpoints before trusting they
13196 should be inserted. Delete disabled breakpoints.
13197 * mem-break.h (validate_breakpoints):
13198 * server.c (handle_query): Validate breakpoints when we see a
13201 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13203 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13204 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13205 if we could tell there's a GDB breakpoint at stop_pc.
13206 (need_step_over_p): Don't do a step over if we find a GDB
13207 breakpoint at the resume PC.
13209 * mem-break.c (struct raw_breakpoint): New.
13210 (enum bkpt_type): New type `gdb_breakpoint'.
13211 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13212 fields. New field `raw'.
13213 (find_raw_breakpoint_at): New.
13214 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13215 breakpoint instead.
13216 (set_breakpoint_at): Adjust.
13217 (delete_raw_breakpoint): New.
13218 (release_breakpoint): New.
13219 (delete_breakpoint): Rename to...
13220 (delete_breakpoint_1): ... this. Add proc parameter. Use
13221 release_breakpoint. Return ENOENT.
13222 (delete_breakpoint): Reimplement.
13223 (find_breakpoint_at): Delete.
13224 (find_gdb_breakpoint_at): New.
13225 (delete_breakpoint_at): Delete.
13226 (set_gdb_breakpoint_at): New.
13227 (delete_gdb_breakpoint_at): New.
13228 (gdb_breakpoint_here): New.
13229 (set_reinsert_breakpoint): Use release_breakpoint.
13230 (uninsert_breakpoint): Rename to ...
13231 (uninsert_raw_breakpoint): ... this.
13232 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13233 (reinsert_raw_breakpoint): Change parameter type to
13235 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13237 (check_breakpoints): Adjust. Use release_breakpoint.
13238 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13239 (breakpoint_inserted_here): Ditto.
13240 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13241 Don't trust the breakpoint's shadow if it is not inserted.
13242 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13243 (delete_all_breakpoints): Adjust.
13244 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13245 use delete_breakpoint_1.
13247 * mem-break.h (breakpoints_supported): Delete declaration.
13248 (set_gdb_breakpoint_at): Declare.
13249 (gdb_breakpoint_here): Declare.
13250 (delete_breakpoint_at): Delete.
13251 (delete_gdb_breakpoint_at): Declare.
13253 * server.h (struct raw_breakpoint): Forward declare.
13254 (struct process_info): New field `raw_breakpoints'.
13256 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13259 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13261 * linux-low.c (status_pending_p_callback): Fix comment.
13262 (linux_wait_for_event_1): Move most of the internal breakpoint
13263 handling from here...
13264 (linux_wait_1): ... to here.
13265 (count_events_callback): New.
13266 (select_singlestep_lwp_callback): New.
13267 (select_event_lwp_callback): New.
13268 (cancel_breakpoints_callback): New.
13269 (select_event_lwp): New.
13270 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13271 priority to all LWPs that have had events that should be reported
13272 to the client. Cancel breakpoints when about to reporting the
13273 event to the client, not while stopping lwps. No longer cancel
13274 finished single-steps here.
13275 (cancel_finished_single_step): Delete.
13276 (cancel_finished_single_steps): Delete.
13278 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13280 * mem-break.c (enum bkpt_type): New.
13281 (struct breakpoint): New field `type'.
13282 (set_breakpoint_at): Change return type to struct breakpoint
13283 pointer. Set type to `other_breakpoint' by default.
13284 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13285 in the breakpoint list.
13286 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13287 (reinsert_breakpoint): Rename to ...
13288 (reinsert_raw_breakpoint): ... this.
13289 (reinsert_breakpoints_at): Adjust.
13290 * mem-break.h (struct breakpoint): Declare.
13291 (set_breakpoint_at): Change return type to struct breakpoint
13294 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13296 * server.c (handle_query): Assign, not compare.
13298 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13300 Teach linux gdbserver to step-over-breakpoints.
13302 * linux-low.c (can_hardware_single_step): New.
13303 (supports_breakpoints): New.
13304 (handle_extended_wait): If stopping threads, read the stop pc of
13305 the new cloned LWP.
13307 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13308 low target doesn't support retrieving the PC.
13309 (add_lwp): Set last_resume_kind to resume_continue.
13310 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13311 (linux_attach): Don't clear stop_expected. Set the lwp's
13312 last_resume_kind to resume_stop.
13313 (linux_detach_one_lwp): Don't check for removed breakpoints.
13314 (check_removed_breakpoint): Delete.
13315 (status_pending_p): Rename to ...
13316 (status_pending_p_callback): ... this. Don't check for removed
13317 breakpoints. Don't consider threads that are stopped from GDB's
13319 (linux_wait_for_lwp): Always read the stop_pc here.
13320 (cancel_breakpoint): New.
13321 (step_over_bkpt): New global.
13322 (linux_wait_for_event_1): Implement stepping over breakpoints.
13323 (gdb_wants_lwp_stopped): New.
13324 (gdb_wants_all_stopped): New.
13325 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13326 single-step traps here. Store the thread's last reported target
13328 (send_sigstop): Don't clear stop_expected. Always set it,
13330 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13331 (cancel_finished_single_step): New.
13332 (cancel_finished_single_steps): New.
13333 (wait_for_sigstop): Don't cancel finished single-step traps here.
13334 (linux_resume_one_lwp): Don't check for removed breakpoints.
13335 Don't set `step' on non-hardware step archs.
13336 (linux_set_resume_request): Ignore resume_stop requests if already
13337 stopping or stopped. Set the lwp's last_resume_kind.
13338 (resume_status_pending_p): Don't check for removed breakpoints.
13339 (need_step_over_p): New.
13340 (start_step_over): New.
13341 (finish_step_over): New.
13342 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13343 requests. Clear the thread's last reported target waitstatus.
13344 Don't use the `suspended' flag. Don't consider pending breakpoints.
13345 (linux_resume): Start a step-over if necessary.
13346 (proceed_one_lwp): New.
13347 (proceed_all_lwps): New.
13348 (unstop_all_lwps): New.
13349 * linux-low.h (struct lwp_info): Rewrite comment for the
13350 `suspended' flag. Add the `stop_pc' field. Delete the
13351 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13352 Add `'last_resume_kind' and `need_step_over' fields.
13353 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13354 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13355 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13356 (set_raw_breakpoint_at): New.
13357 (set_breakpoint_at): Rewrite to use it.
13358 (reinsert_breakpoint_handler): Delete.
13359 (set_reinsert_breakpoint): New.
13360 (reinsert_breakpoint_by_bp): Delete.
13361 (delete_reinsert_breakpoints): New.
13362 (uninsert_breakpoint): Rewrite.
13363 (uninsert_breakpoints_at): New.
13364 (reinsert_breakpoint): Rewrite.
13365 (reinsert_breakpoints_at): New.
13366 (check_breakpoints): Rewrite.
13367 (breakpoint_here): New.
13368 (breakpoint_inserted_here): New.
13369 (check_mem_read): Adjust.
13370 * mem-break.h (breakpoints_supported, breakpoint_here)
13371 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13372 (reinsert_breakpoint_by_bp): Delete declaration.
13373 (delete_reinsert_breakpoints): Declare.
13374 (reinsert_breakpoint): Delete declaration.
13375 (reinsert_breakpoints_at): Declare.
13376 (uninsert_breakpoint): Delete declaration.
13377 (uninsert_breakpoints_at): Declare.
13378 (check_breakpoints): Adjust prototype.
13379 * server.h: Adjust include order.
13380 (struct thread_info): Declare here. Add a `last_status' field.
13382 2010-03-23 Michael Snyder <msnyder@vmware.com>
13384 * server.c (crc32): New function.
13385 (handle_query): Add handling for 'qCRC:' request.
13387 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13389 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13390 lwp had been stopped by a watchpoint.
13392 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13394 * server.h (internal_error): Declare.
13395 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13396 * utils.c (internal_error): New function.
13398 2010-03-15 Andreas Schwab <schwab@redhat.com>
13400 * configure.srv: Fix typo setting srv_regobj.
13402 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13404 * linux-low.c (fetch_register): Avoid passing a non string literal
13406 (usr_store_inferior_registers): Ditto.
13408 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13410 * linux-low.c (linux_write_memory): Bail out early if peeking
13413 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13415 * linux-low.h (struct lwp_info): New fields
13416 `stopped_by_watchpoint' and `stopped_data_address'.
13417 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13418 here, and cache them in the lwp object.
13419 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13421 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13423 (linux_stopped_by_watchpoint): Rewrite.
13424 (linux_stopped_data_address): Rewrite.
13426 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13428 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13429 switching the current inferior, not before.
13431 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13433 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13434 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13435 i386-linux.c and amd64-linux.c.
13436 (reg-i386.o): Removed.
13437 (reg-i386.c): Likewise.
13438 (reg-i386-linux.o): Likewise.
13439 (reg-i386-linux.c): Likewise.
13440 (reg-x86-64.o): Likewise.
13441 (reg-x86-64.c): Likewise.
13442 (reg-x86-64-linux.o): Likewise.
13443 (reg-x86-64-linux.c): Likewise.
13445 (i386.c): Likewise.
13446 (i386-linux.o): Likewise.
13447 (i386-linux.c): Likewise.
13448 (amd64.o): Likewise.
13449 (amd64.c): Likewise.
13450 (amd64-linux.o): Likewise.
13451 (amd64-linux.c): Likewise.
13453 * configure.srv (srv_i386_regobj): New.
13454 (srv_i386_linux_regobj): Likewise.
13455 (srv_amd64_regobj): Likewise.
13456 (srv_amd64_linux_regobj): Likewise.
13457 (srv_i386_32bit_xmlfiles): Likewise.
13458 (srv_i386_64bit_xmlfiles): Likewise.
13459 (srv_i386_xmlfiles): Likewise.
13460 (srv_amd64_xmlfiles): Likewise.
13461 (srv_i386_linux_xmlfiles): Likewise.
13462 (srv_amd64_linux_xmlfiles): Likewise.
13463 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13464 srv_xmlfiles to $srv_i386_xmlfiles.
13465 (i[34567]86-*-mingw32ce*): Likewise.
13466 (i[34567]86-*-mingw*): Likewise.
13467 (i[34567]86-*-nto*): Likewise.
13468 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13469 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13470 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13471 (x86_64-*-linux*): Likewise.
13473 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13474 (init_registers_amd64_linux): New.
13475 (x86_arch_setup): Replace init_registers_x86_64_linux with
13476 init_registers_amd64_linux.
13478 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13480 * configure.ac: Check for libdl. If it is not available link against
13481 static libthread_db.
13482 * configure: Regenerate.
13484 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13488 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13489 handing a read watchpoint.
13490 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13492 2010-02-12 Doug Evans <dje@google.com>
13494 * linux-low.c (linux_supports_tracefork_flag): Document.
13495 (linux_look_up_symbols): Add comment.
13497 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13499 * regcache.c (supply_register): Clear regcache if buf is NULL.
13501 2010-02-02 Nicolas Roche <roche@sourceware.org>
13502 Joel Brobecker <brobecker@adacore.com>
13504 * inferiors.c (find_inferior): Add function documentation.
13505 (unloaded_dll): Handle the case where the unloaded dll has not
13506 been previously registered in the dll list.
13508 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13510 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13511 (thumb2_breakpoint): New.
13512 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13514 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13516 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13517 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13520 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13522 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13524 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13526 * linux-s390-low.c (s390_collect_ptrace_register)
13527 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13529 2010-01-21 Doug Evans <dje@google.com>
13531 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13532 (PTRACE_ARG4_TYPE): New macro.
13533 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13534 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13535 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13536 (usr_store_inferior_registers): Ditto.
13537 (linux_read_memory, linux_write_memory): Ditto.
13538 (linux_test_for_tracefork): Ditto.
13540 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13541 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13543 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13545 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13548 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13550 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13551 prototype to take a regcache. Adjust.
13553 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13555 * regcache.h (struct thread_info): Forward declare.
13556 (struct regcache): New.
13557 (new_register_cache): Adjust prototype.
13558 (get_thread_regcache): Declare.
13559 (free_register_cache): Adjust prototype.
13560 (registers_to_string, registers_from_string): Ditto.
13561 (supply_register, supply_register_by_name, collect_register)
13562 (collect_register_as_string, collect_register_by_name): Ditto.
13563 * regcache.c (struct inferior_regcache_data): Delete.
13564 (get_regcache): Rename to ...
13565 (get_thread_regcache): ... this. Adjust. Switch inferior before
13566 fetching registers.
13567 (regcache_invalidate_one): Adjust.
13568 (regcache_invalidate): Fix prototype.
13569 (new_register_cache): Return the new register cache.
13570 (free_register_cache): Change prototype.
13571 (realloc_register_cache): Adjust.
13572 (registers_to_string): Change prototype to take a regcache. Adjust.
13573 (registers_from_string): Ditto.
13574 (register_data): Ditto.
13575 (supply_register): Ditto.
13576 (supply_register_by_name): Ditto.
13577 (collect_register): Ditto.
13578 (collect_register_as_string): Ditto.
13579 (collect_register_by_name): Ditto.
13580 * server.c (process_serial_event): Adjust.
13581 * linux-low.h (regset_fill_func, regset_store_func): Change
13583 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13585 * linux-low.c (get_stop_pc): Adjust.
13586 (check_removed_breakpoint): Adjust.
13587 (linux_wait_for_event): Adjust.
13588 (linux_resume_one_lwp): Adjust.
13589 (fetch_register): Add regcache parameter. Adjust.
13590 (usr_store_inferior_registers): Ditto.
13591 (regsets_fetch_inferior_registers): Ditto.
13592 (regsets_store_inferior_registers): Ditto.
13593 (linux_fetch_registers, linux_store_registers): Ditto.
13594 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13596 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13598 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13599 prototype to take a regcache.
13600 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13601 * remote-utils.c (convert_ascii_to_int, outreg)
13602 (prepare_resume_reply): Change prototype to take a regcache.
13604 * target.h (struct target_ops) <fetch_registers, store_registers>:
13605 Change prototype to take a regcache.
13606 (fetch_inferior_registers, store_inferior_registers): Change
13607 prototype to take a regcache. Adjust.
13608 * proc-service.c (ps_lgetregs): Adjust.
13609 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13610 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13611 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13612 take a regcache. Adjust.
13613 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13614 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13615 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13616 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13617 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13618 (cris_cannot_fetch_register):
13619 (cris_breakpoint_at): Change prototype to take a regcache.
13621 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13622 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13623 to take a regcache. Adjust.
13624 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13626 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13627 take a regcache. Adjust.
13628 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13629 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13630 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13631 * linux-mips-low.c (mips_get_pc):
13632 (mips_set_pc): Change prototype to take a regcache. Adjust.
13633 (mips_reinsert_addr): Adjust.
13634 (mips_collect_register): Change prototype to take a regcache.
13636 (mips_supply_register):
13637 (mips_collect_register_32bit, mips_supply_register_32bit)
13638 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13639 (mips_store_fpregset): Ditto.
13640 * linux-ppc-low.c (ppc_supply_ptrace_register)
13641 (ppc_supply_ptrace_register): Ditto.
13642 (parse_spufs_run): Adjust.
13643 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13644 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13645 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13646 take a regcache. Adjust.
13647 * linux-s390-low.c (s390_collect_ptrace_register)
13648 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13649 (s390_set_pc): Change prototype to take a regcache. Adjust.
13650 (s390_arch_setup): Adjust.
13651 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13652 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13653 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13654 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13655 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13657 (sparc_breakpoint_at): Adjust.
13658 * linux-xtensa-low.c (xtensa_fill_gregset):
13659 (xtensa_store_gregset):
13660 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13661 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13662 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13663 prototype to take a regcache. Adjust.
13664 * win32-arm-low.c (arm_fetch_inferior_register)
13665 (arm_store_inferior_register): Change prototype to take a
13667 * win32-i386-low.c (i386_fetch_inferior_register)
13668 (i386_store_inferior_register): Change prototype to take a
13670 * win32-low.c (child_fetch_inferior_registers)
13671 (child_store_inferior_registers): Change prototype to take a
13673 (win32_wait): Adjust.
13674 (win32_fetch_inferior_registers): Change prototype to take a
13676 (win32_store_inferior_registers): Adjust.
13677 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13678 store_inferior_register>: Change prototype to take a regcache.
13680 2010-01-20 Doug Evans <dje@google.com>
13682 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13684 (linux_wait_for_event1, linux_init_signals): Ditto.
13685 (W_STOPCODE): Provide definition if missing.
13687 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13689 * linux-low.c (linux_core_of_thread): New.
13690 (compare_ints, show_process, list_threads): New.
13691 (linux_qxfer_osdata): Report threads and cores.
13692 (linux_target_op): Register linux_core_of_thread.
13693 * remote-utils.c (prepare_resume_reply): Report the core.
13694 (buffer_xml_printf): Support %d specifier.
13695 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13697 (handle_query): Handle qXfer:threads. Announce availability
13699 * target.h (struct target_ops): New field core_of_thread.
13701 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13703 * Makefile.in (clean): Remove new generated files.
13704 (reg-s390.o, reg-s390.c): Remove rules.
13705 (reg-s390x.o, reg-s390x.c): Likewise.
13706 (s390-linux32.o, s390-linux32.c): Add rules.
13707 (s390-linux64.o, s390-linux64.c): Likewise.
13708 (s390x-linux64.o, s390x-linux64.c): Likewise.
13709 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13710 * linux-s390-low.c: Include <elf.h>.
13711 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13712 (init_registers_s390): Remove prototype.
13713 (init_registers_s390x): Likewise.
13714 (init_registers_s390_linux32): Add prototype.
13715 (init_registers_s390_linux64): Likewise.
13716 (init_registers_s390x_linux64): Likewise.
13717 (s390_num_regs_3264): New define.
13718 (s390_regmap_3264): New global variable.
13719 (s390_cannot_fetch_register): Remove obsolete check.
13720 (s390_cannot_store_register): Likewise.
13721 (s390_collect_ptrace_register): Handle upper/lower register halves.
13722 (s390_supply_ptrace_register): Likewise.
13723 (s390_fill_gregset): Update to register number changes.
13724 (s390_get_hwcap): New routine.
13725 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13726 Install appropriate regmap and register set.
13728 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13730 * server.c (gdbserver_version): Update copyright year to 2010.
13731 * gdbreplay.c (gdbreplay_version): Likewise.
13733 2009-12-28 Doug Evans <dje@google.com>
13735 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13736 elf/external.h. Include <elf.h> instead but only if necessary.
13738 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13740 * linux-low.c (linux_remove_process): Remove `detaching'
13741 parameter. Don't release/detach from thread_db here.
13742 (linux_kill): Release/detach from thread_db here, ...
13743 (linux_detach): ... and here, before actually detaching.
13744 (linux_wait_1): ... and here, when a process exits.
13745 * thread-db.c (any_thread_of): New.
13746 (thread_db_free): Switch the current inferior to a thread of the
13749 2009-12-21 Doug Evans <dje@google.com>
13751 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13753 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13754 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13755 warning ifndef __NR_tkill. Move setting of errno there too.
13756 Delete unnecessary resetting of errno after syscall.
13757 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13759 * configure.ac: Check for dladdr.
13760 * config.in: Regenerate.
13761 * configure: Regenerate.
13762 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13763 (try_thread_db_load): Update.
13765 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13767 2009-12-18 Doug Evans <dje@google.com>
13769 * event-loop.c: Include unistd.h if it exists.
13771 * linux-low.c (my_waitpid): Move definition away from being in
13772 between linux_tracefork_child/linux_test_for_tracefork.
13774 * gdb_proc_service.h (psaddr_t): Fix type.
13775 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13776 signature to match glibc.
13778 2009-12-16 Doug Evans <dje@google.com>
13780 * linux-low.c (linux_read_memory): Fix argument to read.
13782 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13784 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13785 events, don't leave current_inferior pointing at null.
13787 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13789 * win32-low.c (LOG): Delete.
13790 (OUTMSG): Output to stderr.
13791 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13792 on compile time LOG macro.
13793 (win32_wait): Fix debug output.
13795 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13797 * win32-low.c (win32_add_one_solib): If the dll name is
13798 "ntdll.dll", prepend the system directory to the dll path.
13800 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13802 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13804 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13805 Vladimir Prus <vladimir@codesourcery.com>
13807 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13808 * configure.ac: Check for __mcoldfire__ and set
13809 gdb_cv_m68k_is_coldfire.
13810 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13811 reg-cf.o and reg-m68k.o.
13812 * configure: Regenerated.
13814 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13816 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13817 Pass it to thread_db_free.
13818 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13819 proper `detaching' argument to linux_remove_process.
13820 * linux-low.h (thread_db_free): Add `detaching' parameter.
13821 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13823 (thread_db_free): Add `detaching' parameter. Only
13824 call td_ta_clear_event if detaching from process.
13826 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13828 * thread-db.c (thread_db_free): Fix typo.
13830 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13833 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13835 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13837 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13838 with an i686 compiler.
13839 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13841 * configure: Rebuilt.
13843 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13847 * server.c (handle_search_memory_1): Correct read_addr initialization
13848 in loop for searching subsequent chunks.
13850 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13852 * configure.ac: New --with-libthread-db option.
13853 * thread-db.c: Allow direct dependence on libthread_db.
13854 (thread_db_free): Adjust.
13855 * config.in: Regenerate.
13856 * configure: Likewise.
13858 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13861 * thread-db.c (attach_thread): New function.
13862 (maybe_attach_thread): Return success/failure.
13863 (find_new_threads_callback): Adjust.
13864 (thread_db_find_new_threads): Loop until no new threads.
13866 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13868 * proc-service.c (ps_lgetregs): Formatting.
13870 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13872 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13873 * configure.ac: Adjust.
13874 * linux-low.h (struct process_info_private): Move members to struct
13876 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13877 * linux-low.c (linux_remove_process): Adjust.
13878 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13879 * server.c (handle_query): Move code ...
13880 (handle_monitor_command): ... here. New function.
13881 * target.h (struct target_ops): New member.
13882 * thread-db.c (struct thread_db): New.
13883 (libthread_db_search_path): New variable.
13884 (thread_db_create_event, thread_db_enable_reporting)
13885 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13886 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13887 (try_thread_db_load_1, dladdr_to_soname): New functions.
13888 (try_thread_db_load, thread_db_load_search): New functions.
13889 (thread_db_init): Search for libthread_db.
13890 (thread_db_free): New function.
13891 (thread_db_handle_monitor_command): Likewise.
13892 * config.in: Regenerate.
13893 * configure: Regenerate.
13895 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13897 * spu-low.c (spu_kill): Wait for inferior to terminate.
13898 Call clear_inferiors.
13899 (spu_detach): Call clear_inferiors.
13901 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13903 * aclocal.m4: Regenerate.
13904 * config.in: Likewise.
13905 * configure: Likewise.
13907 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13909 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13910 (parse_spufs_run): New function.
13911 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13912 (ppc_breakpoint_at): Handle SPU breakpoints.
13914 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13916 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13917 (SPUFS_MAGIC): Define.
13918 (spu_enumerate_spu_ids): New function.
13919 (linux_qxfer_spu): New function.
13920 (linux_target_ops): Install linux_qxfer_spu.
13922 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13924 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13925 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13926 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13927 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13928 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13929 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13930 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13931 (init_registers_powerpc_cell32l): Add prototype.
13932 (init_registers_powerpc_cell64l): Likewise.
13933 (ppc_arch_setup): Detect Cell/B.E. architecture.
13935 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13937 * Makefile.in (datarootdir): New variable.
13939 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13941 * linux-low.c (linux_write_memory): Update debugging output.
13942 * Makefile.in (clean): Add new descriptions.
13943 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13944 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13945 * configure.srv: Add new files for arm*-*-linux*.
13946 * linux-arm-low.c: Add new declarations.
13947 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13948 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13949 (HWCAP_VFPv3D16): New.
13950 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13951 instead of __IWMMXT__.
13952 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13953 (arm_arch_setup): New.
13954 (target_regsets): Remove #ifdef. Add VFP regset.
13955 (the_low_target): Use arm_arch_setup.
13957 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13959 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13960 the main thread again.
13962 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13964 Adding Neutrino gdbserver.
13965 * configure: Regenerated.
13966 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13967 * configure.srv (i[34567]86-*-nto*): New target.
13968 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13969 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13970 (nto_comctrl) [__QNX__]: New function.
13971 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13973 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13975 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13978 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13979 Pedro Alves <pedro@codesourcery.com>
13981 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13982 don't support CONTEXT_EXTENDED_REGISTERS.
13983 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13984 (the_low_target): Install them.
13985 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13986 failing with ERROR_PIPE_NOT_CONNECTED.
13988 2009-06-30 Doug Evans <dje@google.com>
13989 Pierre Muller <muller@ics.u-strasbg.fr>
13991 Add h/w watchpoint support to x86-linux, win32-i386.
13992 * Makefile.in (SFILES): Add i386-low.c
13993 (i386_low_h): Define.
13994 (i386-low.o): Add dependencies.
13995 (linux-x86-low.o): Add i386-low.h dependency.
13996 (win32-i386-low.o): Ditto.
13997 * i386-low.c: New file.
13998 * i386-low.h: New file.
13999 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14000 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14001 * linux-low.c (linux_add_process): Initialize arch_private.
14002 (linux_remove_process): Free arch_private.
14003 (add_lwp): Initialize arch_private.
14004 (delete_lwp): Free arch_private.
14005 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14007 * linux-low.h (process_info_private): New member arch_private.
14008 (lwp_info): New member arch_private.
14009 (linux_target_ops): New members new_process, new_thread,
14011 (ptid_of): New macro.
14012 * linux-x86-low.c: Include stddef.h, i386-low.h.
14013 (arch_process_info): New struct.
14014 (arch_lwp_info): New struct.
14015 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14016 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14017 (i386_dr_low_get_status): New function.
14018 (x86_insert_point, x86_remove_point): New functions.
14019 (x86_stopped_by_watchpoint): New function.
14020 (x86_stopped_data_address): New function.
14021 (x86_linux_new_process, x86_linux_new_thread): New functions.
14022 (x86_linux_prepare_to_resume): New function.
14023 (the_low_target): Add entries for insert_point, remove_point,
14024 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14026 * server.c (debug_hw_points): New global.
14027 (monitor_show_help): Document set debug-hw-points.
14028 (handle_query): Process "set debug-hw-points".
14029 * server.h (debug_hw_points): Declare.
14030 (paddress): Declare.
14031 * utils.c (NUMCELLS, CELLSIZE): New macros.
14032 (get_sell, xsnprintf, paddress): New functions.
14033 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14034 remove_point, stopped_by_watchpoint, stopped_data_address.
14035 * win32-i386-low.c: Include i386-low.h.
14036 (debug_reg_state): Replaces dr.
14037 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14038 (i386_dr_low_get_status): New function.
14039 (i386_insert_point, i386_remove_point): New functions.
14040 (i386_stopped_by_watchpoint): New function.
14041 (i386_stopped_data_address): New function.
14042 (i386_initial_stuff): Update.
14043 (get_thread_context,set_thread_context,i386_thread_added): Update.
14044 (the_low_target): Add entries for insert_point,
14045 remove_point, stopped_by_watchpoint, stopped_data_address.
14046 * win32-low.c (win32_insert_watchpoint): New function.
14047 (win32_remove_watchpoint): New function.
14048 (win32_stopped_by_watchpoint): New function.
14049 (win32_stopped_data_address): New function.
14050 (win32_target_ops): Add entries for insert_watchpoint,
14051 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14052 * win32-low.h (win32_target_ops): New members insert_point,
14053 remove_point, stopped_by_watchpoint, stopped_data_address.
14055 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14057 * server.c (process_serial_event): Re-return unsupported, not
14058 error, if the type isn't recognized. Re-allow supporting only
14059 insert or remove packets. Also call require_running for
14060 breakpoints. Add missing break statement to default case. Tidy.
14061 * target.h (struct target_ops): Rename insert_watchpoint to
14062 insert_point, and remove_watchpoint to remove_point.
14064 * linux-low.h (struct linux_target_ops): Likewise.
14065 * linux-low.c (linux_insert_watchpoint): Rename to ...
14066 (linux_insert_point): ... this. Adjust.
14067 (linux_remove_watchpoint): Rename to ...
14068 (linux_remove_point): ... this. Adjust.
14069 (linux_target_ops): Adjust.
14070 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14071 (cris_insert_point): ... this.
14072 (cris_remove_watchpoint): Rename to ...
14073 (cris_remove_point): ... this.
14074 (the_low_target): Adjust.
14076 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14078 * server.c (handle_v_kill): Pass signal_pid to
14079 kill_inferior if multi_process is zero.
14081 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14083 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14084 * target.h (target_ops): Comment for *_watchpoint to make it clear
14085 the functions can get types '0' and '1'.
14087 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14089 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14090 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14091 * regcache.c (get_regcache): Likewise.
14092 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14093 * win32-low.c (child_fetch_inferior_registers): Remove check for
14096 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14097 Pedro Alves <pedro@codesourcery.com>
14099 * target.h (struct target_ops) <supports_multi_process>: New
14101 (target_supports_multi_process): New.
14102 * server.c (handle_query): Even if GDB reports support, only
14103 enable multi-process if the target also supports it. Report
14104 multi-process support only if the target backend supports it.
14105 * linux-low.c (linux_supports_multi_process): New function.
14106 (linux_target_ops): Install it as target_supports_multi_process
14109 2009-05-24 Doug Evans <dje@google.com>
14111 Global renaming of find_thread_pid to find_thread_ptid.
14112 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14113 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14114 All callers updated.
14116 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14117 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14120 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14121 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14122 (linux_resume_one_lwp): Ditto.
14124 2009-05-23 Doug Evans <dje@google.com>
14126 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14127 from struct inferior_list_entry * to struct lwp_info *.
14128 All callers updated.
14130 2009-05-13 Doug Evans <dje@google.com>
14132 * linux-x86-low.c: Don't include assert.h.
14133 (x86_siginfo_fixup): Use fatal, not assert.
14134 (x86_arch_setup): Fix comment.
14136 2009-05-12 Doug Evans <dje@google.com>
14138 Biarch support for i386/amd64 gdbserver.
14139 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14140 Add linux-x86-low.c.
14141 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14142 (linux-x86-low.o): Add.
14143 * linux-x86-64-low.c: Delete.
14144 * linux-i386-low.c: Delete.
14145 * linux-x86-low.c: New file.
14146 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14148 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14150 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14151 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14152 (linux_child_pid_to_exec_file): New function.
14153 (elf_64_header_p, elf_64_file_p): New functions.
14154 (siginfo_fixup): New function.
14155 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14156 give target a chance to convert layout.
14157 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14158 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14160 2009-05-07 Doug Evans <dje@google.com>
14162 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14163 (regsets_store_inferior_registers): Ditto.
14165 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14169 * linux-low.c (must_set_ptrace_flags): Delete.
14170 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14172 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14173 `lwp->must_set_ptrace_flags' instead.
14174 (linux_wait_for_event_1): Set ptrace options here.
14175 (linux_wait_1): ... not here.
14177 2009-04-30 Doug Evans <dje@google.com>
14179 * inferiors.c (started_inferior_callback): New function.
14180 (attached_inferior_callback): New function.
14181 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14182 * server.c (print_started_pid, print_attached_pid): New functions.
14183 (detach_or_kill_for_exit): New function.
14184 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14185 * server.h (have_started_inferiors_p): Declare.
14186 (have_attached_inferiors_p): Declare.
14188 * inferiors.c (remove_process): Fix memory leak, free process.
14189 * linux-low.c (linux_remove_process): New function.
14190 (linux_kill): Call it instead of remove_process.
14191 (linux_detach, linux_wait_1): Ditto.
14193 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14195 * configure.srv: Add x86 Windows CE target.
14197 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14199 * inferiors.c (get_thread_process): Make global.
14200 * server.h (get_thread_process): Add prototype.
14201 * thread-db.c (find_one_thread): Use get_thread_process
14202 instead of current_process.
14203 (thread_db_get_tls_address): Do not crash if called when
14204 thread layer is not yet initialized.
14206 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14208 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14209 * spu-low.c (current_tid): Rename to ...
14210 (current_ptid): ... this.
14211 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14212 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14213 ptid_get_lwp (current_ptid) instead of current_tid.
14214 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14215 instead of current_tid. Use find_process_pid to verify pid
14216 argument is valid. Pass proper argument to remove_process.
14217 (spu_thread_alive): Compare current_ptid instead of current_tid.
14218 (spu_resume): Likewise.
14220 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14222 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14225 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14227 Implement the multiprocess extensions, and add linux multiprocess
14230 * server.h (ULONGEST): Declare.
14231 (struct ptid, ptid_t): New.
14232 (minus_one_ptid, null_ptid): Declare.
14233 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14234 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14235 (struct inferior_list_entry): Change `id' type from unsigned from
14237 (struct sym_cache, struct breakpoint, struct
14238 process_info_private): Forward declare.
14239 (struct process_info): Declare.
14240 (current_process): Declare.
14241 (all_processes): Declare.
14242 (initialize_inferiors): Declare.
14243 (add_thread): Adjust to use ptid_t.
14244 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14245 (add_process, remove_process, find_thread_pid): Declare.
14246 (find_inferior_id): Adjust to use ptid_t.
14247 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14248 (multi_process): Declare.
14249 (push_event): Adjust to use ptid_t.
14250 (read_ptid, write_ptid): Declare.
14251 (prepare_resume_reply): Adjust to use ptid_t.
14252 (clear_symbol_cache): Declare.
14253 * inferiors.c (all_processes): New.
14254 (null_ptid, minus_one_ptid): New.
14255 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14256 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14257 (add_thread): Change unsigned long to ptid. Remove gdb_id
14259 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14260 (gdb_id_to_thread): Rename to ...
14261 (find_thread_pid): ... this. Change unsigned long to ptid.
14262 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14263 (loaded_dll, pull_pid_from_list): Adjust.
14264 (add_process, remove_process, find_process_pid)
14265 (get_thread_process, current_process, initialize_inferiors): New.
14266 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14267 (struct target_waitstatus) <related_pid>: Ditto.
14268 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14269 return type to int.
14270 (struct target_ops) <join>: Add `pid' argument.
14271 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14272 (struct target_ops) <wait>: Add `ptid' field. Change return type
14274 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14275 (mywait): Add `ptid' argument. Change return type to ptid_t.
14276 (target_pid_to_str): Declare.
14277 * target.c (set_desired_inferior): Adjust to use ptids.
14278 (mywait): Add new `ptid' argument. Adjust.
14279 (target_pid_to_str): New.
14280 * mem-break.h (free_all_breakpoints): Declare.
14281 * mem-break.c (breakpoints): Delelete.
14282 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14283 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14284 to use per-process breakpoint list.
14285 (free_all_breakpoints): New.
14286 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14287 (symbol_cache, all_symbols_looked_up): Delete.
14289 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14291 (prepare_resume_reply): Change ptid argument's type from unsigned
14292 long to ptid_t. Adjust. Implement W;process and X;process.
14293 (free_sym_cache, clear_symbol_cache): New.
14294 (look_up_one_symbol): Adjust to per-process symbol cache. *
14295 * server.c (cont_thread, general_thread, step_thread): Change type
14297 (attached): Delete.
14298 (multi_process): New.
14299 (last_ptid): Change type to ptid_t.
14300 (struct vstop_notif) <ptid>: Change type to ptid_t.
14301 (queue_stop_reply, push_event): Change `ptid' argument's type to
14303 (discard_queued_stop_replies): Add `pid' argument.
14304 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14305 changes. Don't reference the `attached' global.
14306 (attach_inferior): Adjust to mywait interface changes.
14307 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14308 features. Handle and report "multiprocess+". Handle
14310 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14312 (handle_v_kill): New.
14313 (handle_v_stopped): Adjust to use target_pid_to_str.
14314 (handle_v_requests): Allow multiple attaches and runs when
14315 multiprocess extensions are in effect. Handle "vKill".
14316 (myresume): Adjust to use ptids.
14317 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14318 (handle_status): Adjust to discard_queued_stop_replies interface
14320 (first_thread_of, kill_inferior_callback)
14321 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14322 (main): Call initialize_inferiors. Adjust to use ptids, killing
14323 and detaching from all inferiors. Handle multiprocess packet
14325 * linux-low.h: Include gdb_proc_service.h.
14326 (struct process_info_private): New.
14327 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14328 <lwpid_of>: Use ptid_get_lwp.
14329 (get_lwp_thread): Adjust.
14330 (struct lwp_info): Add `dead' member.
14331 (find_lwp_pid): Declare.
14332 * linux-low.c (thread_db_active): Delete.
14333 (new_inferior): Adjust comment.
14334 (inferior_pid): Delete.
14335 (linux_add_process): New.
14336 (handle_extended_wait): Adjust.
14337 (add_lwp): Change unsigned long to ptid.
14338 (linux_create_inferior): Add process to processes table. Adjust
14339 to use ptids. Don't set new_inferior here.
14340 (linux_attach_lwp): Rename to ...
14341 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14342 it. Adjust to use ptids.
14343 (linux_attach_lwp): New.
14344 (linux_attach): Add process to processes table. Don't set
14346 (struct counter): New.
14347 (second_thread_of_pid_p, last_thread_of_process_p): New.
14348 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14349 multiple processes.
14350 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14351 processes. Remove process from process table.
14352 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14353 to multiple processes.
14354 (any_thread_of): New.
14355 (linux_detach): Add `pid' argument, and handle it. Remove process
14356 from processes table.
14357 (linux_join): Add `pid' argument. Handle it.
14358 (linux_thread_alive): Change unsighed long argument to ptid_t.
14359 Consider dead lwps as not being alive.
14360 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14361 threads we're not interested in.
14362 (same_lwp, find_lwp_pid): New.
14363 (linux_wait_for_lwp): Change `pid' argument's type from int to
14365 (linux_wait_for_event): Rename to ...
14366 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14367 from int to ptid_t. Adjust.
14368 (linux_wait_for_event): New.
14369 (linux_wait_1): Add `ptid' argument. Change return type to
14370 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14371 that exit from the process table.
14372 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14374 (mark_lwp_dead): New.
14375 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14376 stopping all threads, mark its main lwp as dead.
14377 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14379 (fetch_register, usr_store_inferior_registers)
14380 (regsets_fetch_inferior_registers)
14381 (regsets_store_inferior_registers, linux_read_memory)
14382 (linux_write_memory): Inline `inferior_pid'.
14383 (linux_look_up_symbols): Adjust to use per-process
14384 `thread_db_active'.
14385 (linux_request_interrupt): Adjust to use ptids.
14386 (linux_read_auxv): Inline `inferior_pid'.
14387 (initialize_low): Don't reference thread_db_active.
14388 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14389 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14390 (ps_getpid): Return the pid of the current inferior.
14391 * thread-db.c (proc_handle, thread_agent): Delete.
14392 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14394 (find_one_thread): Change argument type to ptid_t. Adjust to
14396 (maybe_attach_thread): Adjust to per-process data and ptids.
14397 (thread_db_find_new_threads): Ditto.
14398 (thread_db_init): Ditto.
14399 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14400 processes table. Adjust to use ptids.
14401 (spu_kill, spu_detach): Adjust interface. Remove process from
14403 (spu_join, spu_thread_alive): Adjust interface.
14404 (spu_wait): Adjust interface. Remove process from processes
14405 table. Adjust to use ptids.
14406 * win32-low.c (current_inferior_tid): Delete.
14407 (current_inferior_ptid): New.
14408 (debug_event_ptid): New.
14409 (thread_rec): Take a ptid. Adjust.
14410 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14411 (child_delete_thread): Ditto.
14412 (do_initial_child_stuff): Add `attached' argument. Add process to
14414 (child_fetch_inferior_registers, child_store_inferior_registers):
14416 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14417 (win32_attach): Pass 1 to do_initial_child_stuff.
14418 (win32_kill): Adjust interface. Remove process from processes
14420 (win32_detach): Ditto.
14421 (win32_join): Adjust interface.
14422 (win32_thread_alive): Take a ptid.
14423 (win32_resume): Adjust to use ptids.
14424 (get_child_debug_event): Ditto.
14425 (win32_wait): Adjust interface. Remove exiting process from
14428 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14430 Non-stop mode support.
14432 * server.h (non_stop): Declare.
14433 (gdb_client_data, handler_func): Declare.
14434 (delete_file_handler, add_file_handler, start_event_loop):
14436 (handle_serial_event, handle_target_event, push_event)
14437 (putpkt_notif): Declare.
14438 * target.h (enum resume_kind): New.
14439 (struct thread_resume): Replace `step' field by `kind' field.
14440 (TARGET_WNOHANG): Define.
14441 (struct target_ops) <wait>: Add `options' argument.
14442 <supports_non_stop, async, start_non_stop>: New fields.
14443 (target_supports_non_stop, target_async): New.
14444 (start_non_stop): Declare.
14445 (mywait): Add `options' argument.
14446 * target.c (mywait): Add `options' argument. Print child exit
14447 notifications here.
14448 (start_non_stop): New.
14449 * server.c (non_stop, own_buf, mem_buf): New globals.
14450 (struct vstop_notif): New.
14451 (notif_queue): New global.
14452 (queue_stop_reply, push_event, discard_queued_stop_replies)
14453 (send_next_stop_reply): New.
14454 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14456 (attach_inferior): In non-stop mode, don't wait for the target
14458 (handle_general_set): Handle QNonStop.
14459 (handle_query): When handling qC, return the current general
14460 thread, instead of the first thread of the list.
14461 (handle_query): If the backend supports non-stop mode, include
14462 QNonStop+ in the qSupported query response.
14463 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14465 (handle_v_attach, handle_v_run): Handle non-stop mode.
14466 (handle_v_stopped): New.
14467 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14468 (myresume): Adjust to use resume_kind. Handle non-stop.
14469 (queue_stop_reply_callback): New.
14470 (handle_status): Handle non-stop mode.
14471 (main): Clear non_stop flag on reconnection. Use the event-loop.
14472 Refactor serial protocol handling from here ...
14473 (process_serial_event): ... to this new function. When GDB
14474 selects any thread, select one here. In non-stop mode, wait until
14475 GDB acks all pending events before exiting.
14476 (handle_serial_event, handle_target_event): New.
14477 * remote-utils.c (remote_open): Install remote_desc in the event
14479 (remote_close): Remove remote_desc from the event loop.
14480 (putpkt_binary): Rename to...
14481 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14482 (putpkt_binary): New as wrapper around putpkt_binary_1.
14483 (putpkt_notif): New.
14484 (prepare_resume_reply): In non-stop mode, don't change the
14486 * event-loop.c: New.
14487 * Makefile.in (OBJ): Add event-loop.o.
14488 (event-loop.o): New rule.
14490 * linux-low.h (pid_of): Moved here.
14492 (get_lwp_thread): Use lwpid_of.
14493 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14494 * linux-low.c (pid_of): Delete.
14495 (inferior_pid): Use lwpid_of.
14496 (linux_event_pipe): New.
14497 (target_is_async_p): New.
14499 (handle_extended_wait): Use lwpid_of.
14500 (add_lwp): Don't set lwpid field.
14501 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14502 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14503 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14504 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14505 first. Adjust to linux_wait_for_event interface changes. Use
14507 (linux_detach): Don't delete the main lwp here.
14508 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14509 (status_pending_p): Don't consider explicitly suspended lwps.
14510 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14511 pointer. Add OPTIONS argument. Change return type to int. Use
14512 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14513 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14514 pointer. Add status pointer argument. Return a pid instead of a
14515 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14516 changes. In non-stop mode, don't switch to a random thread.
14517 (linux_wait): Rename to...
14518 (linux_wait_1): ... this. Add target_options argument, and handle
14519 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14520 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14521 clean exit and signal exit code. Don't stop all threads in
14522 non-stop mode. In all-stop mode, only stop all threads when
14523 reporting a stop to GDB. Handle explicit thread stop requests.
14524 (async_file_flush, async_file_mark): New.
14526 (send_sigstop): Use lwpid_of.
14527 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14528 interface changes. In non-stop mode, don't switch to a random
14530 (linux_resume_one_lwp): Use lwpid_of.
14531 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14532 (linux_resume_one_thread): ... this. Handle resume_stop. In
14533 non-stop mode, don't look for pending flag in all threads.
14534 (resume_status_pending_p): Don't consider explicitly suspended
14536 (my_waitpid): Reimplement. Emulate __WALL.
14537 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14539 (sigchld_handler, linux_supports_non_stop, linux_async)
14540 (linux_start_non_stop): New.
14541 (linux_target_ops): Register linux_supports_non_stop, linux_async
14542 and linux_start_non_stop.
14543 (initialize_low): Install SIGCHLD handler.
14544 * thread-db.c (thread_db_create_event, find_one_thread)
14545 (thread_db_get_tls_address): Use lwpid_of.
14546 * win32-low.c (win32_detach): Adjust to use resume_kind.
14547 (win32_wait): Add `options' argument.
14548 * spu-low.c (spu_resume): Adjust to use resume_kind.
14549 (spu_wait): Add `options' argument.
14551 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14553 Decouple target code from remote protocol.
14555 * target.h (enum target_waitkind): New.
14556 (struct target_waitstatus): New.
14557 (struct target_ops) <wait>: Return an unsigned long. Take a
14558 target_waitstatus pointer instead of a char pointer.
14559 (mywait): Likewise.
14560 * target.c (mywait): Change prototype to return an unsigned long.
14561 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14562 * server.h (thread_from_wait, old_thread_from_wait): Delete
14564 (prepare_resume_reply): Change prototype to take a
14566 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14567 (last_status, last_ptid): New.
14568 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14569 pid instead of a signal.
14570 (attach_inferior): Remove "status" and "signal" parameters.
14572 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14574 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14575 (handle_v_requests, myresume): Remove "status" and "signal"
14576 parameters. Adjust.
14577 (handle_status): New.
14578 (main): Delete local `status'. Adjust.
14579 * remote-utils.c: Include target.h.
14580 (prepare_resume_reply): Change prototype to take a
14581 target_waitstatus. Adjust.
14583 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14585 * spu-low.c (spu_wait): Adjust.
14586 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14588 (win32_wait): Adjust.
14590 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14592 * target.h (struct thread_resume): Delete leave_stopped member.
14593 (struct target_ops): Add a `n' argument to the `resume' callback.
14594 * server.c (start_inferior): Adjust.
14595 (handle_v_cont, myresume): Adjust.
14596 * linux-low.c (check_removed_breakpoint): Adjust to resume
14597 interface change, and to removed leave_stopped field.
14598 (resume_ptr): Delete.
14599 (struct thread_resume_array): New.
14600 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14601 resume interface change.
14602 (linux_continue_one_thread, linux_queue_one_thread)
14603 (resume_status_pending_p): Check if the resume field is NULL
14604 instead of checking the leave_stopped member.
14605 (linux_resume): Adjust to the target resume interface change.
14606 * spu-low.c (spu_resume): Adjust to the target resume interface
14608 * win32-low.c (win32_detach, win32_resume): Ditto.
14610 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14612 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14614 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14616 (linux_continue_one_thread): Only preserve the stepping flag if
14617 there's a pending breakpoint.
14619 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14621 * server.c (main): After the inferior having exited, call
14622 remote_close before exiting gdbserver.
14624 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14626 Fix size of FPSCR in Power 7 processors.
14627 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14628 (PPC_FEATURE_HAS_DFP): New #define.
14629 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14632 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14634 * server.c (handle_query) Whitespace and formatting.
14636 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14638 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14639 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14640 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14641 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14642 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14643 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14644 Makefile.in, configure.ac: Fix whitespace throughout.
14645 * configure: Regenerate.
14647 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14649 * inferiors.c (find_inferior): Make it safe for the callback
14650 function to delete the currently iterated inferior.
14652 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14654 * Makefile.in (linuw_low_h): Move higher.
14655 (thread-db.o): Depend on $(linux_low_h).
14657 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14659 Rename "process" to "lwp" throughout.
14661 * linux-low.c (all_processes): Rename to...
14662 (all_lwps): ... this.
14663 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14664 (add_process): Rename to ...
14665 (add_lwp): ... this. Adjust.
14666 (linux_create_inferior): Adjust.
14667 (linux_attach_lwp): Adjust.
14668 (linux_attach): Adjust.
14669 (linux_kill_one_process): Rename to ...
14670 (linux_kill_one_lwp): ... this. Adjust.
14671 (linux_kill): Adjust.
14672 (linux_detach_one_process): Rename to ...
14673 (linux_detach_one_lwp): ... this. Adjust.
14674 (linux_detach): Adjust.
14675 (check_removed_breakpoint): Adjust.
14676 (status_pending_p): Adjust.
14677 (linux_wait_for_process): Rename to ...
14678 (linux_wait_for_lwp): ... this. Adjust.
14679 (linux_wait_for_event): Adjust.
14680 (send_sigstop): Adjust.
14681 (wait_for_sigstop): Adjust.
14682 (stop_all_processes): Rename to ...
14683 (stop_all_lwps): ... this.
14684 (linux_resume_one_process): Rename to ...
14685 (linux_resume_one_lwp): ... this. Adjust.
14686 (linux_set_resume_request, linux_continue_one_thread)
14687 (linux_queue_one_thread, resume_status_pending_p)
14688 (usr_store_inferior_registers, regsets_store_inferior_registers)
14689 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14691 * linux-low.h (get_process): Rename to ...
14692 (get_lwp): ... this. Adjust.
14693 (get_thread_process): Rename to ...
14694 (get_thread_lwp): ... this. Adjust.
14695 (get_process_thread): Rename to ...
14696 (get_lwp_thread): ... this. Adjust.
14697 (struct process_info): Rename to ...
14698 (struct lwp_info): ... this.
14699 (all_processes): Rename to ...
14700 (all_lwps): ... this.
14701 * proc-service.c (ps_lgetregs): Adjust.
14702 * thread-db.c (thread_db_create_event, find_one_thread)
14703 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14705 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14707 * server.c (handle_query): Handle "qAttached".
14709 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14711 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14712 GPLv3, update license URL.
14714 2009-03-01 Doug Evans <dje@google.com>
14716 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14717 (server_h): Add gdb_signals.h.
14718 (signals.o): Update.
14719 * server.h (target_signal_from_host,target_signal_to_host_p)
14720 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14722 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14724 * remote-utils.c (getpkt): Also generate remote-debug
14725 information if noack_mode is set.
14727 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14729 * server.c (handle_query): Report qXfer:siginfo:read and
14730 qXfer:siginfo:write as supported and handle them.
14731 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14732 * linux-low.c (linux_xfer_siginfo): New.
14733 (linux_target_ops): Set it.
14735 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14737 * server.c (gdbserver_usage): Mention --remote-debug.
14738 (main): Accept '--remote-debug' switch.
14740 2009-01-18 Doug Evans <dje@google.com>
14742 * regcache.c (new_register_cache): No need to check result of xcalloc.
14743 * server.c (handle_search_memory): Back out calls to xmalloc,
14744 result is checked and error is returned to user upon failure.
14745 (handle_query): Ditto. Add more checks for result of malloc.
14746 (handle_v_cont): Check result of malloc, report error back to
14748 (handle_v_run): Ditto. Call freeargv.
14749 * server.h (freeargv): Declare.
14750 * utils.c (freeargv): New fn.
14752 2009-01-15 Doug Evans <dje@google.com>
14754 * gdbreplay.c (perror_with_name): Make arg const char *.
14755 * server.h (target_signal_to_name): Make return type const char *.
14756 * thread-db.c (thread_db_err_str): Make return type const char *.
14757 * utils.c (perror_with_name): Make arg const char *.
14759 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14761 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14762 when handling a EXIT_PROCESS_DEBUG_EVENT.
14764 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14766 * gdbreplay.c (gdbreplay_version): Update copyright year.
14767 * server.c (gdbserver_version): Likewise.
14769 2009-01-05 Doug Evans <dje@google.com>
14771 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14772 (handle_extended_wait): Improve comment.
14774 2008-12-13 Doug Evans <dje@google.com>
14776 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14777 * server.h (ATTR_MALLOC): New macro.
14778 (xmalloc,xcalloc,xstrdup): Declare.
14779 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14780 * inferiors.c: Ditto.
14781 * linux-low.c: Ditto.
14782 * mem-break.c: Ditto.
14783 * regcache.c: Ditto.
14784 * remote-utils.c: Ditto.
14787 * win32-low.c: Ditto.
14789 2008-12-12 Doug Evans <dje@google.com>
14791 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14792 in debugging printf.
14794 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14796 2008-12-09 Doug Evans <dje@google.com>
14798 * linux-low.h (struct process_info): Delete member tid, unused.
14799 * thread-db.c (find_one_thread): Update.
14800 (maybe_attach_thread): Update.
14802 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14804 * target.h (struct target_ops): Add qxfer_osdata member.
14805 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14807 (linux_qxfer_osdata): New functions.
14808 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14810 * server.c (handle_query): Handle "qXfer:osdata:read:".
14811 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14812 (buffer_xml_printf): New functions.
14813 * server.h (struct buffer): New.
14814 (buffer_grow_str, buffer_grow_str0): New macros.
14815 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14816 (buffer_xml_printf): Declare.
14818 2008-11-24 Doug Evans <dje@google.com>
14820 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14822 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14824 * server.c (handle_v_run): Always use the supplied argument list.
14826 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14828 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14829 (xtensa_regmap_table): Add entry for scompare1.
14831 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14833 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14834 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14835 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14836 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14837 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14838 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14839 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14840 XML target descriptions.
14841 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14842 when inferior is running on an ISA 2.05 or later processor. Add
14843 special case to return offset for full 64-bit slot of FPSCR when
14846 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14848 * Makefile.in (SFILES, clean): Added sparc64 files.
14849 (reg-sparc64.o, reg-sparc64.c): New.
14850 * configure.srv (sparc*-*-linux*): New configuration.
14851 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14852 syscall arguments for SPARC.
14853 (regsets_store_inferior_registers): Likewise.
14854 * linux-sparc-low.c: New file.
14856 2008-10-21 Doug Evans <dje@google.com>
14858 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14859 (READLINE_DIR,READLINE_DEP): Delete.
14860 (INTERNAL_CFLAGS): Update.
14861 (LINTFLAGS): Update.
14863 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14865 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14866 whole argv from the last run, not just argv[0].
14868 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14870 * regcache.c (new_register_cache): Return NULL if the register
14871 cache size isn't known yet.
14872 (free_register_cache): Avoid dereferencing a NULL regcache.
14874 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14876 * configure.srv: Merge MIPS and MIPS64.
14878 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14880 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14882 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14884 * Makefile.in: Add required vsx dependencies.
14886 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14887 Declare init_registers_powerpc_vsx32l.
14888 Declare init_registers_powerpc_vsx64l.
14889 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14890 (ppc_arch_setup): Check for VSX in hwcap.
14891 (ppc_fill_vsxregset): New function.
14892 (ppc_store_vsxregset): New function.
14893 Add new VSX entry in regset_info target_regsets.
14895 * configure.srv: Add new VSX dependencies.
14897 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14899 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14900 (remote_open): Set or clear transport_is_reliable.
14901 (putpkt_binary): Don't expect acks in noack mode.
14902 (getpkt): Don't send ack/nac in noack mode.
14903 * server.c (handle_general_set): Handle QStartNoAckMode.
14904 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14906 (main): Reset noack_mode on every connection.
14907 * server.h (noack_mode): Declare.
14909 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14911 * Makefile.in (GDBREPLAY_OBS): New variable.
14912 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14914 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14915 Daniel Jacobowitz <dan@codesourcery.com>
14917 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14918 (usr_store_inferior_registers): Likewise.
14919 (regsets_store_inferior_registers): Likewise.
14921 2008-07-31 Rolf Jansen <rj@surtec.com>
14922 Pedro Alves <pedro@codesourcery.com>
14924 * configure.ac: Check for memmem declaration.
14925 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14926 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14927 (disable_packet_qfThreadInfo): Unconditionally compile.
14928 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14929 * configure, config.in: Regenerate.
14931 2008-07-28 Doug Kwan <dougkwan@google.com>
14933 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14934 (linux_write_memory): Remove declaration of errno.
14936 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14938 * linux-low.c (handle_extended_wait): Do not use "status"
14939 variable uninitialized.
14941 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14943 * server.c (handle_v_attach): Inhibit reporting dll changes.
14945 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14947 * remote-utils.c (prepare_resume_reply): If requested, don't
14948 output "thread:TID" in the T stop reply.
14950 * server.c (disable_packet_vCont, disable_packet_Tthread)
14951 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14952 (handle_query): If requested, disable support for qC, qfThreadInfo
14954 (handle_v_requests): If requested, disable support for vCont.
14955 (gdbserver_show_disableable): New.
14956 (main): Handle --disable-packet and --disable-packet=LIST.
14958 * server.h (disable_packet_vCont, disable_packet_Tthread)
14959 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14961 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14963 * server.c (gdbserver_usage): Mention --version.
14965 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14967 * Makefile.in (gdbreplay.o): New rule.
14969 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14971 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14972 message, not gdbserver.
14974 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14975 Nathan Sidwell <nathan@codesourcery.com>
14976 Joseph Myers <joseph@codesourcery.com>
14978 * acinclude.m4: Include ../../config/acx.m4.
14979 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14980 * configure, config.in: Regenerate.
14981 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14982 * server.c (gdbserver_version): Print PKGVERSION.
14983 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14984 (main): Adjust gdbserver_usage calls.
14985 * gdbreplay.c (version, host_name): Add declarations.
14986 (gdbreplay_version, gdbreplay_usage): New.
14987 (main): Accept --version and --help options.
14989 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14991 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14992 (arm_breakpoint_at): Handle Thumb.
14993 (the_low_target): Add comment.
14995 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14997 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14999 2008-05-09 Doug Evans <dje@google.com>
15001 * server.h (decode_search_memory_packet): Declare.
15002 * remote-utils.c (decode_search_memory_packet): New fn.
15003 * server.c (handle_search_memory_1): New fn.
15004 (handle_search_memory): New fn.
15005 (handle_query): Process qSearch:memory packets.
15007 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15009 * regcache.c (registers_length): Remove.
15010 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15011 full register packet.
15012 * regcache.h (registers_length): Remove prototype.
15013 * server.h (PBUFSIZ): Define to 16384.
15015 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15017 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15018 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15019 powerpc-64l.o, and powerpc-altivec64l.o.
15020 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15021 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15022 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15023 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15024 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15027 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15028 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15029 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15030 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15031 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15032 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15033 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15034 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15035 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15036 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15039 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15040 (init_registers_powerpc_32l): ... this new prototype.
15041 (init_registers_powerpc_32): Remove, replace by ...
15042 (init_registers_powerpc_altivec32l): ... this new prototype.
15043 (init_registers_powerpc_e500): Remove, replace by ...
15044 (init_registers_powerpc_e500l): ... this new prototype.
15045 (init_registers_ppc64): Remove, replace by ...
15046 (init_registers_powerpc_64l): ... this new prototype.
15047 (init_registers_powerpc_64): Remove, replace by ...
15048 (init_registers_powerpc_altivec64l): ... this new prototype.
15049 (ppc_num_regs): Set to 73.
15050 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15051 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15052 (ppc_cannot_store_register): Handle orig_r3 and trap.
15053 (ppc_arch_setup): Update init_registers_... calls.
15054 (ppc_fill_gregset): Handle orig_r3 and trap.
15056 * inferiors.c (clear_inferiors): Reset current_inferior.
15058 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15060 * acinclude.m4: Add override.m4.
15061 * configure: Regenerate.
15063 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15065 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15066 initial call to init_register_ppc64.
15068 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15070 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15071 single powerpc*-*-linux* case.
15072 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15074 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15076 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15077 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15079 * linux-ppc-low.c: Include <elf.h>.
15080 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15081 (ppc_hwcap): New global variable.
15082 (ppc_regmap): Remove __SPE__ #ifdef sections.
15083 (ppc_regmap_e500): New global variable.
15084 (ppc_cannot_store_register): Update __SPE__ special case.
15085 (ppc_get_hwcap): New function.
15086 (ppc_arch_setup): Use it to determine whether inferior supports
15087 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15088 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15089 Do not access registers if target does not support AltiVec.
15090 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15091 Do not access registers if target does not support SPE.
15092 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15094 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15096 * linux-low.c (disabled_regsets, num_regsets): New.
15097 (use_regsets_p): Delete.
15098 (linux_wait_for_process): Clear disabled_regsets.
15099 (regsets_fetch_inferior_registers): Check and set it.
15100 (regsets_store_inferior_registers): Likewise.
15101 (linux_fetch_registers, linux_store_registers): Do not use
15103 (initialize_low): Allocate disabled_regsets.
15105 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15107 * Makefile.in (LIBOBJS): New.
15108 (OBS): Use LIBOBJS.
15109 (memmem.o): New rule.
15110 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15111 * configure: Regenerated.
15113 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15115 * server.c (handle_query): Never return "unsupported" for
15116 qXfer:features:read queries.
15118 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15120 * server.c (get_features_xml): Fix inverted condition.
15121 (handle_query): Always support qXfer:feature:read.
15123 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15125 * server.c (wrapper_argv): New.
15126 (start_inferior): Handle wrapper_argv. If set, expect an extra
15128 (gdbserver_usage): Document --wrapper.
15129 (main): Parse --wrapper.
15131 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15133 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15134 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15135 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15136 (ppc_set_pc): Likewise.
15137 (ppc_arch_setup): New function.
15138 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15139 of collect_register.
15140 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15142 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15144 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15145 instead of linux-ppc64-low.o.
15146 * linux-ppc64-low.c: Remove file.
15147 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15148 (linux-ppc64-low.o): Remove rule.
15150 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15151 (init_registers_powerpc_64): Likewise.
15152 (ppc_regmap): Conditionally define depending on __powerpc64__.
15153 (ppc_cannot_store_register): Do not special-case "fpscr" when
15154 compiled on __powerpc64__.
15155 (ppc_collect_ptrace_register): New function.
15156 (ppc_supply_ptrace_register): New function.
15157 (ppc_breakpoint): Change type to "unsigned int".
15158 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15159 (the_low_target): Conditionally provide initializers for the
15160 arch_setup member depending on __powerpc64__. Install
15161 collect_ptrace_register and supply_ptrace_register members.
15163 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15165 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15166 * server.c (gdbserver_xmltarget): Define.
15167 (get_features_xml): Use it to replace "target.xml" and arch_string.
15169 * configure.srv: Remove srv_xmltarget. Add XML files that were
15170 mentioned there to srv_xmlfiles instead. Remove conditional tests
15171 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15172 srv_xmlfiles and srv_regobj to include all possible choices.
15173 * configure.ac (srv_xmltarget): Remove.
15174 (srv_xmlfiles): Do not add "target.xml".
15175 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15176 checks for supplementary target information.
15177 * configure: Regenerate.
15178 * Makefile.in (XML_TARGET): Remove.
15179 (target.xml): Remove rule.
15180 (clean): Do not clean up target.xml.
15181 (.PRECIOUS): Do not mention target.xml.
15183 * target.h (struct target_ops): Remove arch_string member.
15184 * linux-low.c (linux_arch_string): Remove.
15185 (linux_target_ops): Remove arch_string initializer.
15186 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15187 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15188 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15189 * spu-low.c (spu_arch_string): Remove.
15190 (spu_target_ops): Remove arch_string initializer.
15191 * win32-low.c (win32_arch_string): Remove.
15192 (win32_target_ops): Remove arch_string initializer.
15193 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15194 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15195 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15197 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15199 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15200 by collect_ptrace_register and supply_ptrace_register hooks.
15201 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15202 instead of checking for the_low_target.left_pad_xfer.
15203 (usr_store_inferior_registers): Use collect_ptrace_register callback
15204 instead of checking for the_low_target.left_pad_xfer.
15206 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15207 (s390_supply_ptrace_register): Likewise.
15208 (s390_fill_gregset): Call s390_collect_ptrace_register.
15209 (the_low_target): Update.
15211 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15212 (ppc_supply_ptrace_register): Likewise.
15213 (the_low_target): Update.
15215 * linux-i386-low.c (the_low_target): Update.
15216 * linux-x86-64-low.c (the_low_target): Update.
15218 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15220 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15221 reg-s390.o and reg-s390x.o.
15223 * linux-low.c (new_inferior): New global variable.
15224 (linux_create_inferior, linux_attach): Set it.
15225 (linux_wait_for_process): Call the_low_target.arch_setup after the
15226 target has stopped for the first time.
15227 (initialize_low): Do not call the_low_target.arch_setup.
15229 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15230 (s390_set_pc): Likewise.
15231 (s390_arch_setup): New function.
15232 (the_low_target): Use s390_arch_setup as arch_setup routine.
15234 * regcache.c (realloc_register_cache): New function.
15235 (set_register_cache): Call it for each existing regcache.
15237 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15239 * server.h (init_registers): Remove prototype.
15241 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15242 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15243 instead of init_registers ().
15244 * linux-arm-low.c (init_registers_arm): Add prototype.
15245 (init_registers_arm_with_iwmmxt): Likewise.
15246 (the_low_target): Add initializer for arch_setup field.
15247 * linux-cris-low.c (init_registers_cris): Add prototype.
15248 (the_low_target): Add initializer for arch_setup field.
15249 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15250 (the_low_target): Add initializer for arch_setup field.
15251 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15252 (the_low_target): Add initializer for arch_setup field.
15253 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15254 (the_low_target): Add initializer for arch_setup field.
15255 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15256 (the_low_target): Add initializer for arch_setup field.
15257 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15258 (the_low_target): Add initializer for arch_setup field.
15259 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15260 (init_registers_mips64_linux): Likewise.
15261 (the_low_target): Add initializer for arch_setup field.
15262 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15263 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15264 (the_low_target): Add initializer for arch_setup field.
15265 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15266 (init_registers_powerpc_64): Likewise.
15267 (the_low_target): Add initializer for arch_setup field.
15268 * linux-s390-low.c (init_registers_s390): Add prototype.
15269 (init_registers_s390x): Likewise.
15270 (the_low_target): Add initializer for arch_setup field.
15271 * linux-sh-low.c (init_registers_sh): Add prototype.
15272 (the_low_target): Add initializer for arch_setup field.
15273 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15274 (the_low_target): Add initializer for arch_setup field.
15275 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15276 (the_low_target): Add initializer for arch_setup field.
15278 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15279 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15280 instead of init_registers ().
15281 * win32-arm-low.c (init_registers_arm): Add prototype.
15282 (the_low_target): Add initializer for arch_setup field.
15283 * win32-i386-low.c (init_registers_i386): Add prototype.
15284 (the_low_target): Add initializer for arch_setup field.
15286 * spu-low.c (init_registers_spu): Add prototype.
15287 (initialize_low): Call initialie_registers_spu () instead of
15288 initialize_registers ().
15290 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15292 * server.c (handle_v_requests): When handling the vRun and vAttach
15293 packets, if already debugging a process, don't kill it. Return an
15296 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15298 * server.c (handle_query): Correct length check.
15300 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15302 * win32-low.c (do_initial_child_stuff): Add process handle
15303 parameter. Set current_process_handle and current_process_id from the
15304 parameters. Clear globals.
15305 (win32_create_inferior): Don't set current_process_handle and
15306 current_process_id here. Instead pass them on the call to
15307 do_initial_child_stuff.
15308 (win32_attach): Likewise.
15309 (win32_clear_inferiors): New.
15310 (win32_kill): Don't close the current process handle or the
15311 current thread handle here. Instead call win32_clear_inferiors.
15312 (win32_detach): Don't open a new handle to the process. Call
15313 win32_clear_inferiors.
15314 (win32_join): Don't rely on current_process_handle; open a new
15315 handle using the process id.
15316 (win32_wait): Call win32_clear_inferiors when the inferior process
15319 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15321 * server.c (monitor_show_help): Add "exit".
15323 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15325 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15326 (clean): Add reg-xtensa.c.
15327 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15328 * configure.srv (xtensa*-*-linux*) New target.
15329 * linux-xtensa-low.c: New.
15330 * xtensa-xtregs.c: New.
15332 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15334 * hostio.c: Don't include errno.h.
15335 (errno_to_fileio_errno): Move to hostio-errno.
15336 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15337 error number outputting to the target->hostio_last_error callback.
15338 (hostio_packet_error): Use FILEIO_EINVAL directly.
15339 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15340 calls to hostio_error.
15341 * hostio-errno.c: New.
15342 * server.h (hostio_last_error_from_errno): Declare.
15343 * target.h (target_ops): Add hostio_last_error member.
15344 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15345 as hostio_last_error handler.
15346 * spu-low.c (spu_target_ops): Likewise.
15347 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15348 (wince_hostio_last_error): New functions.
15349 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15350 as hostio_last_error handler.
15351 (win32_target_ops) [!_WIN32_WCE]: Register
15352 hostio_last_error_from_errno as hostio_last_error handler.
15353 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15354 (hostio-errno.o): New rule.
15355 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15356 * configure.srv (srv_hostio_err_objs): New variable. Default to
15358 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15359 * configure: Regenerate.
15361 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15363 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15364 (linux_kill, linux_detach): Clean up the process list.
15365 * remote-utils.c (remote_open): Improve port number parsing.
15366 (putpkt_binary, input_interrupt): Only send interrupts if the target
15368 * server.c (extended_protocol): Make static.
15369 (attached): Define earlier.
15370 (exit_requested, response_needed, program_argv): New variables.
15371 (target_running): New.
15372 (start_inferior): Clear attached here.
15373 (attach_inferior): Set attached here.
15374 (require_running): Define.
15375 (handle_query): Use require_running and target_running. Implement
15377 (handle_v_attach, handle_v_run): New.
15378 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15379 (gdbserver_usage): Update.
15380 (main): Redo argument parsing. Handle --debug and --multi. Handle
15381 --attach along with other options or after the port. Save
15382 program_argv. Support no initial program. Resynchronize
15383 communication with GDB after an error. Handle "monitor exit".
15384 Use require_running and target_running. Always allow the extended
15385 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15386 restart in extended mode.
15387 * README: Refer to the GDB manual. Update --attach usage.
15389 2007-12-20 Andreas Schwab <schwab@suse.de>
15391 * linux-low.c (STACK_SIZE): Define.
15392 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15393 (linux_test_for_tracefork): Likewise.
15395 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15397 * linux-low.c (linux_wait_for_event): Update messages. Do not
15398 reinsert auto-delete breakpoints.
15399 * mem-break.c (struct breakpoint): Change return type of handler to
15401 (set_breakpoint_at): Update handler type.
15402 (reinsert_breakpoint_handler): Return 1 instead of calling
15404 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15406 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15407 * mem-break.h (set_breakpoint_at): Update handler type.
15408 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15409 * win32-low.c (auto_delete_breakpoint): New.
15410 (get_child_debug_event): Use it.
15412 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15414 * configure.ac: Check for pread and pwrite.
15415 * hostio.c (handle_pread): Fall back to lseek and read.
15416 (handle_pwrite): Fall back to lseek and write.
15417 * config.in, configure: Regenerated.
15419 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15421 * server.c (myresume): Add own_buf argument.
15422 (main): Update calls.
15424 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15426 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15427 * remote-utils.c (remote_open): Do not call disable_async_io.
15428 (block_async_io): Delete.
15429 (unblock_async_io): Make static.
15430 (initialize_async_io): New.
15431 * server.c (handle_v_cont): Handle async I/O here.
15432 (myresume): Likewise. Move other common resume tasks here...
15433 (main): ... from here. Call initialize_async_io. Disable async
15434 I/O before the main loop.
15435 * server.h (initialize_async_io): Declare.
15436 (block_async_io, unblock_async_io): Delete prototypes.
15437 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15439 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15441 * remote-utils.c (readchar): Allow binary data in received messages.
15443 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15445 * win32-low.c (attaching): New global.
15446 (win32_create_inferior): Clear the `attaching' global.
15447 (win32_attach): Set the `attaching' global.
15448 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15449 attaching. Only set a breakpoint at the entry point if not
15452 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15454 * server.c (main): Don't report dll events on the initial
15455 connection on attaches.
15457 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15459 * server.c (main): Relax numerical bases supported for the pid of
15460 the --attach command line argument.
15462 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15464 * win32-low.c (win32_attach): Call OpenProcess before
15465 DebugActiveProcess, not after. Add last error output to error
15468 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15470 * win32-low.c (win32_get_thread_context)
15471 (win32_set_thread_context): New functions.
15472 (thread_rec): Use win32_get_thread_context.
15473 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15474 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15477 2007-12-03 Leo Zayas
15478 Pedro Alves <pedro_alves@portugalmail.pt>
15480 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15482 (child_add_thread): Minor cleanup.
15483 (child_continue): Resume artificially suspended threads before
15484 calling ContinueDebugEvent.
15485 (suspend_one_thread): New.
15486 (fake_breakpoint_event): New.
15487 (get_child_debug_event): Change return type to int. Check here if
15488 gdb sent an interrupt request. If a soft interrupt was requested,
15489 fake a breakpoint event. Return 0 if there is no event to handle,
15491 (win32_wait): Don't check here if gdb sent an interrupt request.
15492 Ensure there is a valid event to handle.
15493 (win32_request_interrupt): Add soft interruption method as last
15496 2007-12-03 Leo Zayas
15497 Pedro Alves <pedro_alves@portugalmail.pt>
15499 * win32-low.h (win32_thread_info): Add descriptions to the
15500 structure members. Replace `suspend_count' counter by a
15502 * win32-low.c (thread_rec): Update condition of when to get the
15503 context from the inferior. Rely on ContextFlags being set if it
15504 has already been retrieved. Only suspend the inferior thread if
15505 we haven't already. Warn if that fails.
15506 (continue_one_thread): s/suspend_count/suspended/. Only call
15507 ResumeThread once. Warn if that fails.
15509 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15511 * win32-low.c (win32_wait): Don't read from the inferior when it
15512 has already exited.
15514 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15516 * Makefile.in (win32_low_h): New variable.
15517 (win32-low.o): Add dependency on $(win32_low_h).
15518 (win32-arm-low.o, win32-i386-low.o): New rules.
15520 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15522 * hostio.c: Correct copyright year.
15524 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15526 * Makefile.in (OBS): Add hostio.o.
15527 (hostio.o): New rule.
15528 * server.h (handle_vFile): Declare.
15529 * hostio.c: New file.
15530 * server.c (handle_v_requests): Take packet_len and new_packet_len
15531 for binary packets. Call handle_vFile.
15532 (main): Update call to handle_v_requests.
15534 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15536 * linux-low.c: Include <sched.h>.
15538 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15540 * linux-low.c (linux_tracefork_grandchild): New.
15541 (linux_tracefork_child): Use clone.
15542 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15544 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15546 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15548 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15550 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15552 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15554 * inferiors.c (change_inferior_id): Delete.
15555 (add_pid_to_list, pull_pid_from_list): New.
15556 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15557 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15558 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15559 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15560 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15561 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15562 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15563 (using_threads): Always set to 1.
15564 (handle_extended_wait): New.
15565 (add_process): Do not set TID.
15566 (linux_create_inferior): Set must_set_ptrace_flags.
15567 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15568 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15569 (linux_thread_alive): Rename TID argument to LWPID.
15570 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15571 (linux_wait_for_event): Do not use TID or check using_threads. Update
15572 call to dead_thread_notify. Call handle_extended_wait.
15573 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15574 (send_sigstop): Delete sigstop_sent.
15575 (wait_for_sigstop): Avoid TID.
15576 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15577 (linux_test_for_tracefork): New.
15578 (linux_lookup_signals): Use thread_db_active and
15579 linux_supports_tracefork_flag.
15580 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15581 * linux-low.h (get_process_thread): Avoid TID.
15582 (struct process_ifo): Move thread_known and tid to the end. Remove
15584 (linux_attach_lwp, thread_db_init): Update prototypes.
15585 * server.h (change_inferior_id): Delete prototype.
15586 (add_pid_to_list, pull_pid_from_list): New prototypes.
15587 * thread-db.c (thread_db_use_events): New.
15588 (find_first_thread): Rename to...
15589 (find_one_thread): ...this. Update callers and messages. Do not
15590 call fatal. Check thread_db_use_events. Do not call
15591 change_inferior_id or new_thread_notify.
15592 (maybe_attach_thread): Update. Do not call new_thread_notify.
15593 (thread_db_init): Set thread_db_use_events. Check use_events.
15594 * utils.c (fatal, warning): Correct message prefix.
15596 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15598 * Makefile.in (clean): Remove new files.
15599 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15600 (powerpc-64.o, powerpc-64.c): New rules.
15601 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15602 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15604 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15606 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15607 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15608 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15609 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15610 (target_regsets): Add AltiVec and SPE register sets.
15611 * configure.ac: Check for AltiVec and SPE.
15612 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15613 (ppc_fill_vrregset, ppc_store_vrregset): New.
15614 (target_regsets): Add AltiVec register set.
15615 * configure: Regenerated.
15617 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15619 * linux-low.c (O_LARGEFILE): Define.
15620 (linux_read_memory): Use /proc/PID/mem.
15621 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15622 * configure, config.in: Regenerated.
15624 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15626 * linux-low.c (linux_wait_for_event): Do not pass signals while
15629 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15631 * win32-low.c (create_process): New.
15632 (win32_create_inferior): Use create_process instead of
15633 CreateProcess. If create_process failed retry appending an ".exe"
15634 suffix. Store the GetLastError result immediatelly after
15635 create_process calls and use it on the call to error.
15637 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15639 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15641 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15643 * configure.ac: Switch license to GPLv3.
15645 2007-08-01 Michael Snyder <msnyder@access-company.com>
15647 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15649 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15651 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15653 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15654 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15655 CloseToolhelp32Snapshot.
15656 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15657 CloseToolhelp32Snapshot.
15659 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15661 * server.c (main): Check for inferior exit before main loop.
15663 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15665 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15666 instead of on tmp_desc.
15668 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15669 Daniel Jacobowitz <dan@codesourcery.com>
15671 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15672 (add_thread): Minor cleanups.
15673 (clear_inferiors): Move lower in the file. Clear the DLL
15675 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15676 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15677 (xml_escape_text): New.
15678 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15680 (handle_v_cont): Report errors.
15681 (gdbserver_version): Update.
15682 (main): Correct size of own_buf. Do not report initial DLL events.
15683 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15684 (unloaded_dll, xml_escape_text): New.
15685 * win32-low.c (enum target_waitkind): Update comments.
15686 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15687 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15688 (win32_EnumProcessModules, win32_GetModuleInformation)
15689 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15690 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15691 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15692 (win32_Module32First, win32_Module32Next, load_toolhelp)
15693 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15694 (get_child_debug_event): Handle DLL events.
15695 (win32_wait): Likewise.
15697 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15699 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15700 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15702 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15704 * win32-low.c (handle_output_debug_string): Ignore event if not
15707 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15709 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15711 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15713 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15715 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15717 * inferiors.c (change_inferior_id): Add comment.
15718 * linux-low.c (check_removed_breakpoint): Add an early
15719 prototype. Improve debug output.
15720 (linux_attach): Doc update.
15721 (linux_detach_one_process, linux_detach): Clean up before releasing
15723 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15724 * linux-low.h (struct process_info): Doc improvement.
15725 * mem-break.c (delete_all_breakpoints): New.
15726 * mem-break.h (delete_all_breakpoints): New prototype.
15727 * thread-db.c (find_first_thread): New.
15728 (thread_db_create_event): Call it instead of
15729 thread_db_find_new_threads. Clean up unused variables.
15730 (maybe_attach_thread): Remove first thread handling.
15731 (thread_db_find_new_threads): Use find_first_thread.
15732 (thread_db_get_tls_address): Likewise.
15734 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15736 * thread-db.c (thread_db_find_new_threads): Add prototype.
15737 (thread_db_create_event): Check for the main thread before adding
15739 (maybe_attach_thread): Only enable event reporting if TID == 0.
15740 (thread_db_get_tls_address): Check for new threads.
15742 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15744 * linux-low.c (linux_create_inferior): Try execv before execvp.
15745 * spu-low.c (spu_create_inferior): Likewise.
15747 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15749 * linux-low.c (linux_create_inferior): Change execv to execvp.
15750 * spu-low.c (spu_create_inferior): Likewies.
15752 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15754 * Makefile.in (clean): Clean new files instead of deleted ones.
15755 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15756 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15758 * configure.srv: Specify XML files and new regformats for MIPS and
15760 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15761 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15762 an entry for the restart register.
15763 (mips_cannot_fetch_register, mips_cannot_store_register)
15764 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15765 register names to match the XML descriptions.
15766 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15767 restart register instead of $0.
15769 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15770 Markus Deuling <deuling@de.ibm.com>
15772 * remote-utils.c (decode_xfer_write): New function.
15773 * server.h (decode_xfer_write): Add prototype.
15774 * server.c (handle_query): Add PACKET_LEN argument. Support
15775 qXfer:spu:read and qXfer:spu:write packets.
15776 (main): Pass packet_len to handle_query.
15777 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15778 * target.h (target_ops): Add qxfer_spu.
15780 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15782 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15783 accessing non-seekable spufs files.
15785 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15787 * server.c (handle_query): Add reply for qC packet.
15789 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15790 Leo Zayas <lerele@champenstudios@com>
15792 * server.h (check_remote_input_interrupt_request): New function.
15793 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15794 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15795 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15796 (check_remote_input_interrupt_request): New function.
15797 * server.h (check_remote_input_interrupt_request): Declare.
15798 * win32-low.c (winapi_DebugBreakProcess,
15799 winapi_GenerateConsoleCtrlEvent): New typedefs.
15800 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15802 (win32_wait): Check for remote interrupt request
15803 with check_remote_input_interrupt_request.
15804 (win32_request_interrupt): New function.
15805 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15807 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15809 * win32-low.c (debug_registers_changed,
15810 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15811 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15812 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15813 (thread_rec): Get context using the low target.
15814 (child_add_thread): Call thread_added on the low target,
15815 which does the same thing.
15817 (do_initial_child_stuff): Remove debug registers references.
15818 Set context using the low target. Resume threads after
15819 setting the contexts.
15820 (child_continue): Remove dead variable. Remove debug
15821 registers references.
15822 (child_fetch_inferior_registers): Go through the low target.
15823 (do_child_store_inferior_registers): Remove.
15824 (child_store_inferior_registers): Go through the low target.
15825 (win32_resume): Remove debug registers references.
15826 Set context using the low target.
15827 (handle_exception): Change return type to void. Don't record
15828 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15829 first chance exception.
15830 (get_child_debug_event): Change return type to void. Remove
15831 goto loop. Always return after waiting for debug event.
15832 (win32_wait): Convert to switch statement. Handle spurious
15835 * win32-i386-low.c (debug_registers_changed,
15836 debug_registers_used): New.
15837 (initial_stuff): Rename to ...
15838 (i386_initial_stuff): ... this. Clear debug registers
15840 (store_debug_registers): Delete.
15841 (i386_get_thread_context): New.
15842 (load_debug_registers): Delete.
15843 (i386_set_thread_context): New.
15844 (i386_thread_added): New.
15845 (single_step): Rename to ...
15846 (i386_single_step): ... this.
15847 (do_fetch_inferior_registers): Rename to ...
15848 (i386_fetch_inferior_register): ... this.
15849 (i386_store_inferior_register): New.
15850 (the_low_target): Adapt to new interface.
15852 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15853 (arm_get_thread_context): New.
15854 (arm_set_thread_context): New.
15856 (do_fetch_inferior_registers): Rename to ...
15857 (arm_fetch_inferior_register): ... this.
15858 (arm_store_inferior_register): New.
15859 (arm_wince_breakpoint): Reimplement as unsigned long.
15860 (arm_wince_breakpoint_len): Define.
15861 (the_low_target): Adapt to new interface.
15863 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15864 load_debug_registers. Add get_thread_context, set_thread_context,
15865 thread_added and store_inferior_register. Rename
15866 fetch_inferior_registers to fetch_inferior_register.
15867 (regptr): Remove declaration.
15869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15871 * linux-low.c (linux_detach): Change return type to int. Return 0.
15872 * spu-low.c (spu_detach): Likewise.
15874 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15876 * target.h (target_ops): Change return type of detach to int.
15878 (join_inferior): New.
15879 * server.c (main): Don't skip detach support on mingw32.
15880 If the inferior doesn't support detaching return error.
15881 Call join_inferior instead of using waitpid.
15882 * linux-low.c (linux_join): New.
15883 (linux_target_op): Add linux_join.
15884 * spu-low.c (spu_join): New.
15885 (spu_target_ops): Add spu_join.
15886 * win32-low.c (win32_detach): Adapt to new interface.
15887 Reopen current_process_handle before detaching. Issue a child
15888 resume before detaching.
15890 (win32_target_op): Add win32_join.
15892 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15894 * win32-low.c (win32-attach): Fix return value.
15895 * target.h (target_ops): Describe ATTACH return values.
15897 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15899 * win32-low.c (GETPROCADDRESS): Define.
15900 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15901 (winapi_DebugSetProcessKillOnExit): Likewise.
15902 (win32_create_inferior): Force usage of ansi CreateProcessA.
15903 (win32_attach): Use GETPROCADDRESS.
15904 (win32_detach): Likewise.
15906 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15908 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15910 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15912 * win32-low.c: Commit leftover changes from 2007-03-29.
15914 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15916 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15917 fields short instead of int. Add explicit padding.
15918 (i387_cache_to_fsave): Remove unnecessary casts.
15919 (i387_fsave_to_cache): Doc fix.
15920 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15922 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15924 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15925 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15927 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15929 * configure.srv (arm*-*-mingw32ce*): Move near the other
15932 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15934 * configure.ac: Add errno checking.
15935 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15936 sys/file.h and malloc.h.
15937 (AC_CHECK_DECLS): Add perror.
15938 (srv_mingwce): Handle.
15939 * configure.srv (i[34567]86-*-cygwin*): Add
15940 win32-i386-low.o to srv_tgtobj.
15941 (i[34567]86-*-mingw*): Likewise.
15942 (arm*-*-mingw32ce*): Add case.
15943 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15944 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15945 [__MINGW32CE__] (strerror): New function.
15946 [__MINGW32CE__] (errno): Define to GetLastError.
15947 [__MINGW32CE__] (COUNTOF): New macro.
15948 (remote_open): Remove extra close call.
15949 * mem-break.c (delete_breakpoint_at): New function.
15950 * mem-break.h (delete_breakpoint_at): Declare.
15951 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15952 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15953 [USE_WIN32API] (read, write): Add char* casts.
15954 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15955 * server.h: Include wincecompat.h on Windows CE.
15956 [HAVE_ERRNO_H]: Check.
15957 (perror): Declare if not declared.
15958 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15959 (perror_with_name): Remove errno declaration.
15960 * wincecompat.h: New.
15961 * wincecompat.c: New.
15962 * win32-low.h: New.
15963 * win32-arm-low.c: New.
15964 * win32-i386-low.c: New.
15965 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15966 (OUTMSG2): Make it safe.
15968 (COUNTOF): New macro.
15969 (NUM_REGS): Get it from the low target.
15970 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15971 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15972 (thread_rec): Let low target handle debug registers.
15973 (child_add_thread): Likewise.
15974 (child_init_thread_list): Likewise.
15975 (continue_one_thread): Likewise.
15977 (do_child_fetch_inferior_registers): Move to ...
15978 * win32-i386-low.c: ... here, and rename to ...
15979 (do_fetch_inferior_registers): ... this.
15980 * win32-low.c (child_fetch_inferior_registers):
15981 Go through the low target.
15982 (do_child_store_inferior_registers): Use regptr.
15983 (strwinerror): New function.
15984 (win32_create_inferior): Handle Windows CE.
15985 Use strwinerror instead of strerror on Windows error
15986 codes. Add program to the error output.
15987 Don't close the main thread handle on Windows CE.
15988 (win32_attach): Use coredll.dll on Windows CE.
15989 (win32_kill): Close current process and current
15991 (win32_detach): Use coredll.dll on Windows CE.
15992 (win32_resume): Let low target handle debug registers, and
15994 (handle_exception): Add/Remove initial breakpoint. Avoid
15995 non-existant WSTOPSIG on Windows CE.
15996 (win32_read_inferior_memory): Cast to remove warning.
15997 (win32_arch_string): Go through the low target.
15998 (initialize_low): Call set_breakpoint_data with the low
15999 target's breakpoint.
16000 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16001 FOP_REGNUM, mappings): Move to ...
16002 * win32-i386-low.c: ... here.
16003 * win32-low.c (win32_thread_info): Move to ...
16004 * win32-low.h: ... here.
16005 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16006 win32-arm-low.c and wincecompat.c.
16007 (all:): Add $EXEEXT.
16008 (install-only:): Likewise.
16009 (gdbserver:): Likewise.
16010 (gdbreplay:): Likewise.
16011 * config.in: Regenerate.
16012 * configure: Regenerate.
16014 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16016 * win32-low.c: Rename typedef thread_info to
16017 win32_thread_info throughout.
16019 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16021 * win32-i386-low.c: Rename to ...
16022 * win32-low.c: ... this.
16023 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16024 * Makefile.in: Likewise.
16026 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16028 * remote-utils.c (monitor_output): Constify msg parameter.
16029 * server.h (monitor_output): Likewise.
16030 * win32-i386-low.c (handle_output_debug_string): New.
16031 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16032 handle_output_debug_string.
16033 (get_child_debug_event): Likewise.
16035 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16037 * server.c (main): Correct strtoul check.
16039 2007-03-27 Jon Ringle <jon@ringle.org>
16041 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16043 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16045 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16047 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16049 * terminal.h: Check HAVE_SGTTY_H.
16051 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16053 * remote-utils.c (remote_open): Print out the assigned port number.
16055 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16057 * remote-utils.c (monitor_output): New function.
16058 * server.c (debug_threads): Define here.
16059 (monitor_show_help): New function.
16060 (handle_query): Handle qRcmd.
16061 (main): Do not handle 'd' packet.
16062 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16063 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16066 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16068 * Makefile.in (EXEEXT): New.
16069 (clean): Use $(EXEEXT).
16071 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16073 * target.h (target_ops): Rename send_signal to request_interrupt,
16074 and remove enum target_signal parameter.
16075 * linux-low.c (linux_request_interrupt): Rename from
16076 linux_send_signal, and always send SIGINT.
16077 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16078 and always send SIGINT.
16079 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16081 (input_interrupt): Likewise.
16083 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16085 * server.c (get_features_xml): Check if target implemented
16087 * win32-i386-low.c (win32_arch_string): New.
16088 (win32_target_ops): Add win32_arch_string as arch_string member.
16090 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16092 * spu-low.c (spu_arch_string): New.
16093 (spu_target_ops): Add spu_arch_string.
16095 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16097 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16098 * configure.ac: Do not check for terminal.h.
16099 * configure, config.in: Regenerated.
16101 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16103 * Makefile.in (OBS): Add $(XML_BUILTIN).
16104 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16106 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16107 (arm-with-iwmmxt.c): New.
16108 * config.in, configure: Regenerate.
16109 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16110 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16111 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16112 (arm*-*-linux*): Add iWMMXt and regset support.
16113 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16114 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16115 (arm_store_wmmxregset, target_regsets): New.
16116 * server.c (get_features_xml): Take annex argument. Check builtin
16118 (handle_query): Handle multiple annexes.
16120 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16122 * remote-utils.c [USE_WIN32API] (read, write): Define.
16123 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16126 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16128 * linux-i386-low.c (the_low_target): Set arch_string.
16129 * linux-x86-64-low.c (the_low_target): Likewise.
16130 * linux-low.c (linux_arch_string): New.
16131 (linux_target_ops): Add it.
16132 * linux-low.h (struct linux_target_ops): Add arch_string.
16133 * server.c (write_qxfer_response): Use const void * for DATA.
16134 (get_features_xml): New.
16135 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16136 * target.h (struct target_ops): Add arch_string method.
16138 2007-01-03 Denis Pilat <denis.pilat@st.com>
16139 Daniel Jacobowitz <dan@codesourcery.com>
16141 * linux-low.c (linux_kill): Handle being called with no threads.
16142 * win32-i386-low.c (win32_kill): Likewise.
16143 (get_child_debug_event): Clear current_process_handle.
16145 2006-12-30 Denis PILAT <denis.pilat@st.com>
16146 Daniel Jacobowitz <dan@codesourcery.com>
16148 * remote-utils.c (remote_open): Check the type of specified
16149 serial port devices before opening them.
16150 * server.c (main): Kill the inferior if an error occurs during
16151 the first remote_open.
16153 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16155 * README: Update supported targets.
16157 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16159 * Makefile.in (clean): Remove reg-mips64.c.
16160 (reg-mips64.c, reg-mips64.o): New rules.
16161 * configure.srv: Handle mips64. Include regset support for mips.
16162 * linux-mips-low.c (union mips_register): New.
16163 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16164 (mips_breakpoint, mips_breakpoint_at): Use int.
16165 (mips_collect_register, mips_supply_register)
16166 (mips_collect_register_32bit, mips_supply_register_32bit)
16167 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16168 (mips_store_fpregset, target_regsets): New.
16169 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16171 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16173 * configure.srv: Add target "spu*-*-*".
16174 * Makefile.in (clean): Remove reg-spu.c.
16175 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16176 * spu-low.c: New file.
16178 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16180 * configure.ac: Correct td_thr_tls_get_addr test.
16181 * configure: Regenerated.
16183 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16185 * linux-low.c (linux_wait_for_event): Reformat. Use the
16186 pass_signals array.
16187 * remote-utils.c (decode_address_to_semicolon): New.
16188 * server.c (pass_signals, handle_general_set): New.
16189 (handle_query): Mention QPassSignals for qSupported.
16190 (main): Call handle_general_set.
16191 * server.h (pass_signals, decode_address_to_semicolon): New.
16193 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16195 * server.c (handle_query): Correct error handling for read_auxv.
16197 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16199 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16200 and srv_linux_thread_db to yes.
16201 * linux-s390-low.c (s390_fill_gregset): New function.
16202 (target_regsets): Define data structure.
16204 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16206 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16207 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16208 * config.in, configure: Regenerated.
16209 * inferiors.c (gdb_id_to_thread): New function.
16210 (gdb_id_to_thread_id): Use it.
16211 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16212 * linux-low.h (struct process_info): Add th member.
16213 (thread_db_get_tls_address): New prototype.
16214 * remote-utils.c (decode_address): Make non-static.
16215 * server.c (handle_query): Handle qGetTLSAddr.
16216 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16217 * target.h (struct target_ops): Add get_tls_address.
16218 * thread-db.c (maybe_attach_thread): Save the thread handle.
16219 (thread_db_get_tls_address): New.
16221 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16223 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16224 (linux_resume_one_process): Take a siginfo_t *. Update all
16225 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16226 (struct pending_signals): Add a siginfo_t.
16227 (linux_wait_for_process): Always set last_status.
16228 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16229 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16230 * linux-low.h (struct process_info): Add last_status.
16232 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16234 * remote-utils.c (try_rle): New function.
16235 (putpkt_binary): Use it.
16237 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16239 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16240 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16241 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16242 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16243 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16246 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16248 * server.c (terminal_fd): New variable.
16249 (old_foreground_pgrp): Likewise.
16250 (restore_old_foreground_pgrp): New function.
16251 (start_inferior): Record the terminal file descriptor in terminal_fd
16252 and its original foreground group in old_foreground_pgrp. Register
16253 restore_old_foreground_pgrp with atexit().
16255 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16257 * server.c (handle_query): Correct qPart to qXfer.
16259 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16261 * configure.ac: Check for more headers which are missing on
16262 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16263 * configure.srv: Add Cygwin and mingw32.
16264 * remote-utils.c: Don't include headers unconditionally which
16265 are missing on mingw32. Include <winsock.h> for mingw32.
16266 (remote_open): Adjust for mingw32 support. Flush
16267 standard error after writing to it.
16268 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16269 (unblock_async_io, enable_async_io, disable_async_io)
16270 (readchar, getpkt): Update for Winsock support.
16271 (prepare_resume_reply): Expect a protocol signal number.
16272 * server.c: Disable <sys/wait.h> on mingw32.
16273 (start_inferior): Adjust for mingw32 support. Flush
16274 standard error after writing to it.
16275 (attach_inferior): Likewise. Use protocol signal
16277 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16279 * win32-i386-low.c: New file.
16280 * Makefile.in (XM_CLIBS): Set.
16281 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16282 (win32-i386-low.o): New dependency rule.
16283 * linux-low.c (linux_wait): Use target signal numbers.
16284 * target.h (struct target_ops): Doc fix.
16285 * server.h (target_signal_to_name): New prototype.
16286 * gdbreplay.c: Don't include headers unconditionally which
16287 are missing on mingw32. Include <winsock.h> for mingw32.
16288 (remote_close, remote_open): Adjust for Winsock support.
16289 * configure, config.in: Regenerated.
16291 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16293 * server.c (decode_xfer_read, write_qxfer_response): New.
16294 (handle_query): Take a packet length argument. Handle
16295 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16296 the qSupported response.
16297 (main): Update call to handle_query.
16299 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16301 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16302 (putpkt_binary): Renamed from putpkt and adjusted for binary
16304 (putpkt): New wrapper for putpkt_binary.
16305 (readchar): Don't mask off the high bit.
16306 (decode_X_packet): New function.
16307 * server.c (main): Call putpkt_binary if a handler sets the packet
16308 length. Save the length of the incoming packet. Handle 'X'.
16309 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16311 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16313 * server.c (handle_query): Handle qSupported.
16315 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16317 * remote-utils.c (all_symbols_looked_up): New variable.
16318 (look_up_one_symbol): Check it.
16319 * server.h (look_up_one_symbol): New declaration.
16320 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16322 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16324 * Makefile.in (linux-arm-low.o): Update dependencies.
16325 * linux-arm-low.c: Include "gdb_proc_service.h".
16326 (PTRACE_GET_THREAD_AREA): Define.
16327 (ps_get_thread_area): New function.
16329 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16331 * configure.srv (m68k*-*-uclinux*): New target.
16332 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16333 (linux_resume_one_process): Remove extraneous cast.
16334 (linux_read_offsets): New.
16335 (linux_target_op): Add linux_read_offsets on mmuless systems.
16336 * server.c (handle_query): Add qOffsets logic.
16337 * target.h (struct target_ops): Add read_offsets.
16339 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16341 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16342 (PTRACE_GET_THREAD_AREA): Define.
16343 (ps_get_thread_area): New function.
16344 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16345 (linux-x86-64-low.o): Update.
16347 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16349 * configure.ac: Remove checks for prfpregset_t.
16350 * gdb_proc_service.h: New file.
16351 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16352 new "gdb_proc_service.h".
16353 * proc-service.c: Likewise.
16354 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16355 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16356 * Makefile.in (gdb_proc_service_h): Updated.
16357 * configure, config.in: Regenerated.
16359 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16361 * remote-utils.c (prepare_resume_reply): Move declaration
16362 of gdb_id_from_wait to the top of the block.
16364 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16366 * linux-low.c (regsets_store_inferior_registers): Read the regset
16367 from the target before filling it.
16369 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16371 * server.c (attach_inferior): Return SIGTRAP for a successful
16374 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16376 * Makefile.in (OBS): Add version.o.
16377 (STAGESTUFF): Delete.
16378 (version.o): Add dependencies.
16379 (version.c): Replace rule.
16380 (clean): Remove version.c.
16381 * server.c (gdbserver_version): New.
16382 (gdbserver_usage): Use printf.
16383 (main): Handle --version and --help.
16384 * server.h (version, host_name): Add declarations.
16386 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16398 * linux-x86-64-low.c:
16400 * linux-s390-low.c:
16401 * linux-ppc64-low.c:
16403 * linux-mips-low.c:
16404 * linux-m68k-low.c:
16405 * linux-m32r-low.c:
16408 * linux-ia64-low.c:
16409 * linux-i386-low.c:
16410 * linux-crisv32-low.c:
16422 * gdbserver.1: Add (C) after Copyright. Update the FSF
16425 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16427 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16428 (arm_breakpoint_at): Recognize both breakpoints.
16429 (the_low_target): Use the correct breakpoint instruction.
16431 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16433 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16434 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16435 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16436 (the_low_target): Update.
16438 2005-10-25 Andreas Schwab <schwab@suse.de>
16440 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16442 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16443 (ia64_num_regs): Reduce to 462.
16445 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16447 * acinclude.m4: Correct quoting.
16448 * aclocal.m4: Regenerated.
16450 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16451 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16452 (thread_db_init): Call thread_db_err_str.
16453 * configure.ac: Check for TD_VERSION.
16454 * config.in, configure: Regenerated.
16456 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16458 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16460 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16462 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16463 is not available. Define HAVE_PTRACE_GETREGS if it is.
16464 * config.in, configure: Regenerated.
16465 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16466 * linux-i386-low.c, linux-m68k-low.c: Update to use
16467 HAVE_PTRACE_GETREGS.
16468 * linux-low.c (regsets_fetch_inferior_registers)
16469 (regsets_store_inferior_registers): Only return 0 if we processed
16471 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16472 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16474 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16476 * inferiors.c (struct thread_info): Add gdb_id.
16477 (add_thread): Add gdb_id argument.
16478 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16479 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16480 calls to add_thread.
16481 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16482 * server.c (handle_query): Use thread_to_gdb_id.
16483 (handle_v_cont, main): Use gdb_id_to_thread_id.
16484 * server.h (add_thread): Update prototype.
16485 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16488 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16490 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16491 left-padded registers.
16492 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16493 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16495 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16497 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16498 * configure: Regenerate.
16499 * config.in: Regenerate.
16500 * server.h (NEED_DECLARATION_STRERROR):
16501 Replace with !HAVE_DECL_STRERROR.
16503 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16505 * linux-low.c (linux_wait, linux_send_signal): Don't test
16506 an unsigned long variable for > 0 if it could be MAX_ULONG.
16507 * server.c (myresume): Likewise.
16508 * target.c (set_desired_inferior): Likewise.
16510 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16512 * configure.ac: Simplify and improve check for socklen_t.
16513 * configure, config.in: Regenerate.
16515 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16517 * acconfig.h: Remove.
16518 * configure.ac: Add a test for socklen_t. Use three-argument
16519 AC_DEFINE throughout.
16520 * config.in: Regenerated using autoheader 2.59.
16521 * configure: Regenerated.
16523 * gdbreplay.c (socklen_t): Provide a default.
16524 (remote_open): Use socklen_t.
16525 * remote-utils.c (socklen_t): Provide a default.
16526 (remote_open): Use socklen_t.
16527 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16530 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16532 * linux-low.c (linux_read_memory, linux_write_memory)
16533 (linux_read_auxv): Likewise.
16534 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16535 (check_mem_write): Likewise.
16536 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16538 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16539 (registers_from_string, register_data): Likewise.
16540 * server.c (handle_query, main): Likewise.
16541 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16542 (decode_M_packet): Likewise.
16543 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16544 * target.h (struct target_ops): Update read_memory, write_memory,
16546 (read_inferior_memory, write_inferior_memory): Update.
16547 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16548 to unsigned char *.
16549 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16550 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16551 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16552 linux-s390-low.c, linux-sh-low.c: Update for changes in
16553 read_inferior_memory and the_low_target->breakpoint.
16555 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16557 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16558 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16559 * configure.srv: Add powerpc64-*-linux*.
16560 * linux-ppc64-low.c: New file.
16562 2005-05-23 Orjan Friberg <orjanf@axis.com>
16564 * linux-cris-low.c: New file with support for CRIS.
16565 * linux-crisv32-low.c: Ditto for CRISv32.
16566 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16567 (clean): Add reg-cris.c and reg-crisv32.c.
16568 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16569 reg-crisv32.o, and reg-crisv32.c to make rules.
16570 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16571 recognized targets.
16573 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16575 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16576 of sizeof (PTRACE_XFER_TYPE).
16577 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16579 2005-05-12 Orjan Friberg <orjanf@axis.com>
16581 * target.h (struct target_ops): Add insert_watchpoint,
16582 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16583 pointers for hardware watchpoint support.
16584 * linux-low.h (struct linux_target_ops): Ditto.
16585 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16586 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16587 to linux_target_ops.
16588 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16590 * server.c (main): Recognize 'Z' and 'z' packets.
16592 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16594 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16595 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16596 (the_low_target): Add new members.
16598 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16600 * proc-service.c (ps_lgetregs): Search all_processes instead of
16603 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16605 * server.c (start_inferior): Change return type to int.
16606 (attach_inferior): Change sigptr to int *.
16607 (handle_v_cont, handle_v_requests): Change signal to int *.
16608 (main): Change signal to int.
16610 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16612 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16613 * configure.srv: Add m32r*-*-linux*.
16614 * linux-m32r-low.c: New file.
16616 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16618 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16620 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16622 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16623 Take unsigned long arguments for PIDs.
16624 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16625 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16626 (wait_for_sigstop, linux_resume_one_process)
16627 (regsets_fetch_inferior_registers, linux_send_signal)
16628 (linux_read_auxv): Likewise. Update the types of variables holding
16629 PIDs. Update format string specifiers.
16630 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16631 * remote-utils.c (prepare_resume_reply): Likewise.
16632 * server.c (cont_thread, general_thread, step_thread)
16633 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16635 (handle_query): Update format specifiers.
16636 (handle_v_cont, main): Use strtoul for thread IDs.
16637 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16638 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16639 (general_thread, step_thread, thread_from_wait)
16640 (old_thread_from_wait): Update.
16641 * target.h (struct thread_resume): Use unsigned long for THREAD.
16642 (struct target_ops): Use unsigned long for arguments to attach and
16645 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16647 * acinclude.m4: Include bfd/bfd.m4 directly.
16648 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16649 <agriffis@toolchain.org>.
16650 * aclocal.m4, configure: Regenerated.
16652 2005-01-07 Andrew Cagney <cagney@gnu.org>
16654 * configure.ac: Rename configure.in, require autoconf 2.59.
16655 * configure: Re-generate.
16657 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16659 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16660 LIBS when finished.
16661 * aclocal.m4: Regenerated.
16662 * configure: Regenerated.
16664 2004-11-21 Andreas Schwab <schwab@suse.de>
16666 * linux-m68k-low.c (m68k_num_gregs): Define.
16667 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16668 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16669 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16670 (m68k_breakpoint_at): New. Add to the_low_target.
16672 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16673 srv_linux_thread_db to yes.
16675 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16677 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16678 (ARCH_SET_FS): Likewise.
16679 (ARCH_GET_FS): Likewise.
16680 (ARCH_GET_GS): Likewise.
16682 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16684 * linux-i386-low.c (ps_get_thread_area): New.
16685 * linux-x86-64-low.c (ps_get_thread_area): New.
16686 * linux-low.c: Include <sys/syscall.h>.
16687 (linux_kill_one_process): Don't kill the first thread here.
16688 (linux_kill): Kill the first thread here.
16689 (kill_lwp): New function.
16690 (send_sigstop, linux_send_signal): Use it.
16691 * proc-service.c: Clean up #ifdefs.
16692 (fpregset_info): Delete.
16693 (ps_lgetregs): Update and enable implementation.
16694 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16696 * remote-utils.c (struct sym_cache, symbol_cache): New.
16697 (input_interrupt): Print a clearer message.
16698 (async_io_enabled): New variable.
16699 (enable_async_io, disable_async_io): Use it. Update comments.
16700 (look_up_one_symbol): Use the symbol cache.
16701 * thread-db.c (thread_db_look_up_symbols): New function.
16702 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16704 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16706 * configure.in: Test for -rdynamic.
16707 * configure: Regenerated.
16708 * Makefile (INTERNAL_LDFLAGS): New.
16709 (gdbserver, gdbreplay): Use it.
16711 2004-09-02 Andrew Cagney <cagney@gnu.org>
16713 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16715 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16717 * linux-low.c (linux_wait): Clear all_processes list also.
16719 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16721 * linux-low.c: Include <errno.h>. Remove extern declaration of
16724 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16726 * gdbreplay.c, server.h, utils.c: Update copyright years.
16728 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16730 * server.c (main): Print child status or termination signal from
16731 variable 'signal', not 'sig'.
16733 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16735 * linux-low.c (linux_read_memory): Change return type to
16736 int. Check for and return error from ptrace().
16737 * target.c (read_inferior_memory): Change return type to int. Pass
16738 back return status from the_target->read_memory().
16739 * target.h (struct target_ops): Adapt *read_memory() prototype.
16741 (read_inferior_memory): Adapt prototype.
16742 * server.c (main): Return an error packet if
16743 read_inferior_memory() returns an error.
16745 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16747 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16748 Unify with other clean targets.
16750 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16752 * server.c (handle_v_cont): Call set_desired_inferior.
16754 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16756 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16758 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16760 * linux-low.c (linux_wait): Unblock async I/O.
16761 (linux_resume): Block and enable async I/O.
16762 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16763 * server.h (block_async_io, unblock_async_io): Add prototypes.
16765 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16767 * remote-utils.c (remote_open): Print a status notice after
16768 opening a TCP port.
16769 * server.c (attach_inferior): Print a status notice after
16772 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16774 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16776 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16778 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16780 * server.c, target.h: Update copyright years.
16782 2004-02-25 Roland McGrath <roland@redhat.com>
16784 * target.h (struct target_ops): New member `read_auxv'.
16785 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16786 * linux-low.c (linux_read_auxv): New function.
16787 (linux_target_ops): Initialize `read_auxv' member to that.
16789 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16791 Committed by Jim Blandy <jimb@redhat.com>.
16793 * linux-s390-low.c (s390_num_regs): Update.
16794 (s390_regmap): Remove control registers. Use __s390x__ predefine
16795 instead of GPR_SIZE to distiguish s390 and s390x targets.
16797 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16799 * linux-low.c: Update copyright year.
16800 (check_removed_breakpoint): Clear pending_is_breakpoint.
16801 (linux_set_resume_request, linux_queue_one_thread)
16802 (resume_status_pending_p): New functions.
16803 (linux_continue_one_thread): Use process->resume.
16804 (linux_resume): Only resume threads if there are no pending events.
16805 * linux-low.h (struct process_info): Add resume request
16808 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16810 * regcache.c (new_register_cache): Clear the allocated register
16811 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16813 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16815 * linux-low.c (linux_resume): Take a struct thread_resume *
16817 (linux_wait): Update call.
16818 (resume_ptr): New static variable.
16819 (linux_continue_one_thread): Renamed from
16820 linux_continue_one_process. Use resume_ptr.
16821 (linux_resume): Use linux_continue_one_thread.
16822 * server.c (handle_v_cont, handle_v_requests): New functions.
16823 (myresume): New function.
16824 (main): Handle 'v' case.
16825 * target.h (struct thread_resume): New type.
16826 (struct target_ops): Change argument of "resume" to struct
16828 (myresume): Delete macro.
16830 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16832 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16833 (uninstall): Support DESTDIR.
16835 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16837 * configure.srv: Add xscale*linux copy of arm*linux entry.
16839 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16841 * linux-arm-low.c (arm_reinsert_addr): New function.
16842 (the_low_target): Add arm_reinsert_addr.
16844 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16846 * mem-break.c: Remove whitespace at end of file.
16848 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16850 * configure.in: Check whether we need to prototype strerror.
16851 * server.h: Optionally prototype strerror.
16852 * gdbreplay.c (perror_with_name): Use strerror.
16853 * linux-low.c (linux_attach_lwp): Use strerror.
16854 * utils.c (perror_with_name): Use strerror.
16855 * config.in, configure: Regenerated.
16857 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16859 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16860 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16862 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16864 * Makefile.in (SFILES): Update.
16865 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16866 low-sun3.c: Remove files.
16868 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16870 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16871 (linux_detach_one_process, linux_detach): New functions.
16872 (linux_target_ops): Add linux_detach.
16873 * server.c (main): Handle 'D' packet.
16874 * target.h (struct target_ops): Add "detach" member.
16875 (detach_inferior): Define.
16877 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16879 From Kelley Cook <kelleycook@wideopenwest.com>:
16880 * configure.srv: Accept i[34567]86 variants.
16882 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16884 * linux-low.c (linux_wait_for_event): Correct comment typos.
16885 (linux_resume_one_process): Call check_removed_breakpoint.
16886 (linux_send_signal): New function.
16887 (linux_target_ops): Add linux_send_signal.
16888 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16890 * target.h (struct target_ops): Add send_signal.
16892 2003-05-29 Jim Blandy <jimb@redhat.com>
16894 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16895 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16896 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16897 away part of the register's value.
16899 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16901 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16902 (linux_wait_for_event, linux_init_signals): Likewise.
16904 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16906 * configure.in: Check for stdlib.h.
16907 * configure: Regenerated.
16908 * config.in: Regenerated.
16910 2003-01-04 Andreas Schwab <schwab@suse.de>
16912 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16914 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16916 * Makefile.in: Remove obsolete code.
16918 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16920 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16921 defined(PT_FPR0_HI).
16923 2002-11-17 Stuart Hughes <seh@zee2.com>
16925 * linux-arm-low.c (arm_num_regs): Increase.
16926 (arm_regmap): Include status register.
16928 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16930 * linux-low.c (register_addr): Remove incorrect -1 check.
16932 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16934 * linux-low.c (linux_create_inferior): Call setpgid. Return
16936 (unstopped_p, linux_signal_pid): Remove.
16937 (linux_target_ops): Remove linux_signal_pid.
16938 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16939 global instead of target method.
16940 * target.h (struct target_ops): Remove signal_pid. Update comment
16941 for create_inferior.
16942 * server.c (signal_pid): New variable.
16943 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16944 gdbserver. Set the child to be the foreground process group.
16945 (attach_inferior): Set signal_pid.
16947 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16949 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16951 2002-08-20 Jim Blandy <jimb@redhat.com>
16953 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16956 2002-08-01 Andrew Cagney <cagney@redhat.com>
16958 * Makefile.in: Make chill references obsolete.
16960 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16962 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16963 * configure: Regenerate.
16964 * config.in: Regenerate.
16966 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16968 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16969 (perror_with_name, remote_close, remote_open, expect, play): Static.
16971 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16973 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16974 byte offsets instead of an array of indexes.
16975 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16977 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16979 * regcache.c: Add comment.
16981 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16983 * thread-db.c: New file.
16984 * proc-service.c: New file.
16985 * acinclude.m4: New file.
16986 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16987 proc-service.o, and thread-db.o.
16988 (linux-low.o): Add USE_THREAD_DB.
16989 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16990 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16991 * aclocal.m4: Regenerated.
16992 * config.in: Regenerated.
16993 * configure: Regenerated.
16994 * configure.in: Check for proc_service.h, sys/procfs.h,
16995 thread_db.h, and linux/elf.h headrs.
16996 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16997 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16998 Check for -lthread_db and thread support.
16999 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17000 PowerPC, and SuperH.
17001 * i387-fp.c: Constify arguments.
17002 * i387-fp.h: Likewise.
17003 * inferiors.c: (struct thread_info): Renamed from
17004 `struct inferior_info'. Remove PID member. Use generic inferior
17005 list header. All uses updated.
17006 (inferiors, signal_pid): Removed.
17007 (all_threads): New variable.
17008 (get_thread): Define.
17009 (add_inferior_to_list): New function.
17010 (for_each_inferior): New function.
17011 (change_inferior_id): New function.
17012 (add_inferior): Removed.
17013 (remove_inferior): New function.
17014 (add_thread): New function.
17015 (free_one_thread): New function.
17016 (remove_thread): New function.
17017 (clear_inferiors): Use for_each_inferior and free_one_thread.
17018 (find_inferior): New function.
17019 (find_inferior_id): New function.
17020 (inferior_target_data): Update argument type.
17021 (set_inferior_target_data): Likewise.
17022 (inferior_regcache_data): Likewise.
17023 (set_inferior_regcache_data): Likewise.
17024 * linux-low.c (linux_bp_reinsert): Remove.
17025 (all_processes, stopping_threads, using_thrads)
17026 (struct pending_signals, debug_threads, pid_of): New.
17027 (inferior_pid): Replace with macro.
17028 (struct inferior_linux_data): Remove.
17029 (get_stop_pc, add_process): New functions.
17030 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17031 Use add_process and add_thread.
17032 (linux_attach_lwp): New function, based on old linux_attach. Use
17033 add_process and add_thread. Set stop_expected for new threads.
17034 (linux_attach): New function.
17035 (linux_kill_one_process): New function.
17036 (linux_kill): Kill all LWPs.
17037 (linux_thread_alive): Use find_inferior_id.
17038 (check_removed_breakpoints, status_pending_p): New functions.
17039 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17040 Update. Use WNOHANG. Wait for cloned processes also. Update process
17041 struct for the found process.
17042 (linux_wait_for_event): New function.
17043 (linux_wait): Use it. Support LWPs.
17044 (send_sigstop, wait_for_sigstop, stop_all_processes)
17045 (linux_resume_one_process, linux_continue_one_process): New functions.
17046 (linux_resume): Support LWPs.
17047 (REGISTER_RAW_SIZE): Remove.
17048 (fetch_register): Use register_size instead. Call supply_register.
17049 (usr_store_inferior_registers): Likewise. Call collect_register.
17050 Fix recursive case.
17051 (regsets_fetch_inferior_registers): Improve error message.
17052 (regsets_store_inferior_registers): Add debugging.
17053 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17054 (unstopped_p, linux_signal_pid): New functions.
17055 (linux_target_ops): Add linux_signal_pid.
17056 (linux_init_signals): New function.
17057 (initialize_low): Call it. Initialize using_threads.
17058 * regcache.c (inferior_regcache_data): Add valid
17060 (get_regcache): Fetch registers lazily. Add fetch argument
17061 and update all callers.
17062 (regcache_invalidate_one, regcache_invalidate): New
17064 (new_register_cache): Renamed from create_register_cache.
17065 Return the new regcache.
17066 (free_register_cache): Change argument to a void *.
17067 (registers_to_string, registers_from_string): Call get_regcache
17068 with fetch flag set.
17069 (register_data): Make static. Pass fetch flag to get_regcache.
17070 (supply_register): Call get_regcache with fetch flag clear.
17071 (collect_register): Call get_regcache with fetch flag set.
17072 (collect_register_as_string): New function.
17073 * regcache.h: Update.
17074 * remote-utils.c (putpkt): Flush after debug output and use
17076 Handle input interrupts while waiting for an ACK.
17077 (input_interrupt): Use signal_pid method.
17078 (getpkt): Flush after debug output and use stderr.
17079 (outreg): Use collect_register_as_string.
17080 (new_thread_notify, dead_thread_notify): New functions.
17081 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17082 and general_thread.
17083 (look_up_one_symbol): Flush after debug output.
17084 * server.c (step_thread, server_waiting): New variables.
17085 (start_inferior): Don't use signal_pid. Update call to mywait.
17086 (attach_inferior): Update call to mywait.
17087 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17088 (main): Don't fetch/store registers explicitly. Use
17089 set_desired_inferior. Support proposed ``Hs'' packet. Update
17091 * server.h: Update.
17092 (struct inferior_list, struct_inferior_list_entry): New.
17093 * target.c (set_desired_inferior): New.
17094 (write_inferior_memory): Constify.
17095 (mywait): New function.
17096 * target.h: Update.
17097 (struct target_ops): New signal_pid method.
17098 (mywait): Removed macro, added prototype.
17100 * linux-low.h (regset_func): Removed.
17101 (regset_fill_func, regset_store_func): New.
17102 (enum regset_type): New.
17103 (struct regset_info): Add type field. Use new operation types.
17104 (struct linux_target_ops): stop_pc renamed to get_pc.
17105 Add decr_pc_after_break and breakpoint_at.
17106 (get_process, get_thread_proess, get_process_thread)
17107 (strut process_info, all_processes, linux_attach_lwp)
17108 (thread_db_init): New.
17110 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17111 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17112 (the_low_target): Add new members.
17113 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17114 (i386_store_fpxregset): Constify.
17115 (target_regsets): Add new kind identifier.
17116 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17117 (i386_set_pc): Add debugging.
17118 (i386_breakpoint_at): New function.
17119 (the_low_target): Add new members.
17120 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17121 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17122 (mips_breakpoint_at): New.
17123 (the_low_target): Add new members.
17124 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17125 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17126 (the_low_target): Add new members.
17127 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17128 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17129 (the_low_target): Add new members.
17130 * linux-x86-64-low.c (target_regsets): Add new kind
17133 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17135 From Martin Pool <mbp@samba.org>:
17136 * server.c (gdbserver_usage): New function.
17139 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17141 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17142 stop_at -> stop_pc.
17144 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17146 * Makefile.in: Remove obsolete code.
17148 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17150 * linux-low.c (regsets_fetch_inferior_registers),
17151 (regsets_store_inferior_registers): Removed cast to int from
17153 * regcache.h: Added declaration of struct inferior_info.
17155 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17157 * inferiors.c (struct inferior_info): Add regcache_data.
17158 (add_inferior): Call create_register_cache.
17159 (clear_inferiors): Call free_register_cache.
17160 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17161 * regcache.c (struct inferior_regcache_data): New.
17162 (registers): Remove.
17163 (get_regcache): New function.
17164 (create_register_cache, free_register_cache): New functions.
17165 (set_register_cache): Don't initialize the register cache here.
17166 (registers_to_string, registers_from_string, register_data): Call
17168 * regcache.h: Add prototypes.
17169 * server.h: Likewise.
17171 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17173 * mem-break.c: New file.
17174 * mem-break.h: New file.
17175 * Makefile.in: Add mem-break.o rule; update server.h
17177 * inferiors.c (struct inferior_info): Add target_data
17179 (clear_inferiors): Free target_data member if set.
17180 (inferior_target_data, set_inferior_target_data): New functions.
17181 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17182 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17183 * linux-low.c (linux_bp_reinsert): New variable.
17184 (struct inferior_linux_data): New.
17185 (linux_create_inferior): Use set_inferior_target_data.
17186 (linux_attach): Likewise. Call add_inferior.
17187 (linux_wait_for_one_inferior): New function.
17188 (linux_wait): Call it.
17189 (linux_write_memory): Add const.
17190 (initialize_low): Call set_breakpoint_data.
17191 * linux-low.h (struct linux_target_ops): Add breakpoint
17193 * server.c (attach_inferior): Remove extra add_inferior
17195 * server.h: Include mem-break.h. Update inferior.c
17197 * target.c (read_inferior_memory)
17198 (write_inferior_memory): New functions.
17199 * target.h (read_inferior_memory)
17200 (write_inferior_memory): Change macros to prototypes.
17201 (struct target_ops): Update comments. Add const to write_memory
17204 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17206 * linux-low.c (usr_store_inferior_registers): Support
17207 registers which are allowed to fail to store.
17208 * linux-low.h (linux_target_ops): Likewise.
17209 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17210 (ppc_cannot_store_register): FPSCR may not be storable.
17212 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17214 * server.h: Include <string.h> if HAVE_STRING_H.
17215 * ChangeLog: Correct paths in last ChangeLog entry.
17217 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17219 * linux-low.h: Remove obsolete prototypes.
17220 (struct linux_target_ops): New.
17221 (extern the_low_target): New.
17222 * linux-low.c (num_regs, regmap): Remove declarations.
17223 (register_addr): Use the_low_target explicitly.
17224 (fetch_register): Likewise.
17225 (usr_fetch_inferior_registers): Likewise.
17226 (usr_store_inferior_registers): Likewise.
17227 * linux-arm-low.c (num_regs): Remove.
17228 (arm_num_regs): Define.
17229 (arm_regmap): Renamed from regmap, made static.
17230 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17232 (arm_cannot_store_register): Renamed from cannot_store_register,
17234 (the_low_target): New.
17235 * linux-i386-low.c (num_regs): Remove.
17236 (i386_num_regs): Define.
17237 (i386_regmap): Renamed from regmap, made static.
17238 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17240 (i386_cannot_store_register): Renamed from cannot_store_register,
17242 (the_low_target): New.
17243 * linux-ia64-low.c (num_regs): Remove.
17244 (ia64_num_regs): Define.
17245 (ia64_regmap): Renamed from regmap, made static.
17246 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17248 (ia64_cannot_store_register): Renamed from cannot_store_register,
17250 (the_low_target): New.
17251 * linux-m68k-low.c (num_regs): Remove.
17252 (m68k_num_regs): Define.
17253 (m68k_regmap): Renamed from regmap, made static.
17254 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17256 (m68k_cannot_store_register): Renamed from cannot_store_register,
17258 (the_low_target): New.
17259 * linux-mips-low.c (num_regs): Remove.
17260 (mips_num_regs): Define.
17261 (mips_regmap): Renamed from regmap, made static.
17262 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17264 (mips_cannot_store_register): Renamed from cannot_store_register,
17266 (the_low_target): New.
17267 * linux-ppc-low.c (num_regs): Remove.
17268 (ppc_num_regs): Define.
17269 (ppc_regmap): Renamed from regmap, made static.
17270 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17272 (ppc_cannot_store_register): Renamed from cannot_store_register,
17274 (the_low_target): New.
17275 * linux-s390-low.c (num_regs): Remove.
17276 (s390_num_regs): Define.
17277 (s390_regmap): Renamed from regmap, made static.
17278 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17280 (s390_cannot_store_register): Renamed from cannot_store_register,
17282 (the_low_target): New.
17283 * linux-sh-low.c (num_regs): Remove.
17284 (sh_num_regs): Define.
17285 (sh_regmap): Renamed from regmap, made static.
17286 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17288 (sh_cannot_store_register): Renamed from cannot_store_register,
17290 (the_low_target): New.
17291 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17292 (the_low_target): New.
17294 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17296 * Makefile.in: Add stamp-h target.
17297 * configure.in: Create stamp-h.
17298 * configure: Regenerated.
17300 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17302 * inferiors.c: New file.
17303 * target.c: New file.
17304 * target.h: New file.
17305 * Makefile.in: Add target.o and inferiors.o. Update
17307 * linux-low.c (inferior_pid): New static variable,
17308 moved from server.c.
17309 (linux_create_inferior): Renamed from create_inferior.
17310 Call add_inferior. Return 0 on success instead of a PID.
17311 (linux_attach): Renamed from myattach.
17312 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17313 (linux_thread_alive): Renamed from mythread_alive.
17314 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17316 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17317 (regsets_store_inferior_registers): Correct error message.
17318 Add missing ``return 0''.
17319 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17320 (linux_store_registers): Renamed from store_inferior_registers.
17321 (linux_read_memory): Renamed from read_inferior_memory.
17322 (linux_write_memory): Renamed from write_inferior_memory.
17323 (linux_target_ops): New structure.
17324 (initialize_low): Call set_target_ops ().
17325 * remote-utils.c (unhexify): New function.
17326 (hexify): New function.
17327 (input_interrupt): Send signals to ``signal_pid''.
17328 * server.c (inferior_pid): Remove.
17329 (start_inferior): Update create_inferior call.
17330 (attach_inferior): Call add_inferior.
17331 (handle_query): New function.
17332 (main): Call handle_query for `q' packets.
17333 * server.h: Include "target.h". Remove obsolete prototypes.
17334 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17336 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17338 * Makefile.in: Add WARN_CFLAGS. Update configury
17340 * configure.in: Check for <string.h>
17341 * configure: Regenerate.
17342 * config.in: Regenerate.
17343 * gdbreplay.c: Include needed system headers.
17344 (remote_open): Remove strchr prototype.
17345 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17346 * regcache.c (supply_register): Change buf argument to const void *.
17347 (supply_register_by_name): Likewise.
17348 (collect_register): Change buf argument to void *.
17349 (collect_register_by_name): Likewise.
17350 * regcache.h: Add missing prototypes.
17351 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17352 * server.c (handle_query): New function.
17353 (attached): New static variable, moved out of main.
17354 (main): Quiet longjmp clobber warnings.
17355 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17356 * utils.c (error): Remove NORETURN.