1 2019-04-08 Tom Tromey <tom@tromey.com>
3 * server.c: Use C++ exception handling.
4 * linux-low.c: Use C++ exception handling.
5 * gdbreplay.c: Use C++ exception handling.
7 2019-04-08 Tom Tromey <tom@tromey.com>
9 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
10 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
11 (captured_main, main): Update.
12 * gdbreplay.c (main): Update.
14 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
16 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
17 value in argument pointer, return 1 if the entry is found and 0
18 otherwise. Move comment.
19 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
20 * linux-low.h (linux_get_auxv): Declare.
21 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
23 2019-04-05 Tom Tromey <tromey@adacore.com>
25 * server.c (gdbserver_usage): Use upper-case for metasyntactic
28 2019-03-28 Alan Hayward <alan.hayward@arm.com>
30 * linux-low.c (AT_HWCAP2): Add define if not already included.
32 2019-03-26 Alan Hayward <alan.hayward@arm.com>
34 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
35 (aarch64_arch_setup): Call linux_get_hwcap.
36 * linux-arm-low.c (arm_get_hwcap): Remove function.
37 (arm_read_description): Call linux_get_hwcap.
38 * linux-low.c (linux_get_auxv): New function.
39 (linux_get_hwcap): Likewise.
40 (linux_get_hwcap2): Likewise.
41 * linux-low.h (linux_get_hwcap): New declaration.
42 (linux_get_hwcap2): Likewise.
43 * linux-ppc-low.c (ppc_get_auxv): Remove function.
44 (ppc_arch_setup): Call linux_get_hwcap.
45 * linux-s390-low.c (s390_get_hwcap): Remove function.
46 (s390_arch_setup): Call linux_get_hwcap.
48 2019-03-22 Alan Hayward <alan.hayward@arm.com>
49 Jiong Wang <jiong.wang@arm.com>
51 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
52 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
54 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
56 2019-03-22 Alan Hayward <alan.hayward@arm.com>
57 Jiong Wang <jiong.wang@arm.com>
59 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
60 (aarch64_get_hwcap): New function.
61 (aarch64_arch_setup): Read APIA hwcap.
63 2019-03-22 Alan Hayward <alan.hayward@arm.com>
64 Jiong Wang <jiong.wang@arm.com>
66 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
67 (initialize_low_tracepoint): Likewise.
68 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
69 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
70 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
71 (aarch64_linux_read_description): Likewise.
72 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
74 2019-03-12 John Baldwin <jhb@FreeBSD.org>
76 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
77 i386_create_target_description for 'segments' parameter.
78 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
79 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
80 * win32-i386-low.c (i386_arch_setup): Likewise.
82 2019-03-12 Tom Tromey <tromey@adacore.com>
84 * linux-low.c (iterate_over_lwps): Update.
86 2019-03-06 Tom Tromey <tom@tromey.com>
88 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
89 (captured_main): Use SCOPE_EXIT.
91 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
93 * configure.srv: Use '$enable_unittest' instead of '$development'
94 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
97 2019-02-27 Tom Tromey <tromey@adacore.com>
99 * gdbreplay.c (logchar): Handle \r\n.
101 2019-02-07 Alan Hayward <alan.hayward@arm.com>
103 * linux-low.c (linux_attach): Add process before lwp.
104 * server.c (attach_inferior): Check if already attached.
106 2019-02-07 Tom Tromey <tom@tromey.com>
108 * x86-tdesc.h: Rename include guard.
109 * x86-low.h: Add include guard.
110 * wincecompat.h: Rename include guard.
111 * win32-low.h: Add include guard.
112 * utils.h: Rename include guard.
113 * tracepoint.h: Rename include guard.
114 * tdesc.h: Rename include guard.
115 * target.h: Rename include guard.
116 * server.h: Rename include guard.
117 * remote-utils.h: Rename include guard.
118 * regcache.h: Rename include guard.
119 * nto-low.h: Rename include guard.
120 * notif.h: Add include guard.
121 * mem-break.h: Rename include guard.
122 * lynx-low.h: Add include guard.
123 * linux-x86-tdesc.h: Add include guard.
124 * linux-s390-tdesc.h: Add include guard.
125 * linux-ppc-tdesc-init.h: Add include guard.
126 * linux-low.h: Add include guard.
127 * linux-aarch64-tdesc.h: Add include guard.
128 * linux-aarch32-low.h: Add include guard.
129 * inferiors.h: Rename include guard.
130 * i387-fp.h: Rename include guard.
131 * hostio.h: Rename include guard.
132 * gdbthread.h: Rename include guard.
133 * gdb_proc_service.h: Rename include guard.
134 * event-loop.h: Rename include guard.
135 * dll.h: Rename include guard.
136 * debug.h: Rename include guard.
137 * ax.h: Rename include guard.
139 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
142 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
143 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
145 2019-01-25 Tom Tromey <tom@tromey.com>
147 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
149 2019-01-25 Tom Tromey <tom@tromey.com>
151 * win32-low.c: Fix common/ includes.
152 * win32-i386-low.c: Fix common/ includes.
153 * tracepoint.c: Fix common/ includes.
154 * thread-db.c: Fix common/ includes.
155 * target.h: Fix common/ includes.
156 * symbol.c: Fix common/ includes.
157 * spu-low.c: Fix common/ includes.
158 * server.h: Fix common/ includes.
159 * server.c: Fix common/ includes.
160 * remote-utils.c: Fix common/ includes.
161 * regcache.h: Fix common/ includes.
162 * regcache.c: Fix common/ includes.
163 * nto-x86-low.c: Fix common/ includes.
164 * notif.h: Fix common/ includes.
165 * mem-break.h: Fix common/ includes.
166 * lynx-low.c: Fix common/ includes.
167 * lynx-i386-low.c: Fix common/ includes.
168 * linux-x86-tdesc-selftest.c: Fix common/ includes.
169 * linux-x86-low.c: Fix common/ includes.
170 * linux-low.c: Fix common/ includes.
171 * inferiors.h: Fix common/ includes.
172 * i387-fp.c: Fix common/ includes.
173 * hostio.c: Fix common/ includes.
174 * hostio-errno.c: Fix common/ includes.
175 * gdbthread.h: Fix common/ includes.
176 * gdbreplay.c: Fix common/ includes.
177 * fork-child.c: Fix common/ includes.
178 * event-loop.c: Fix common/ includes.
180 (enum gdb_agent_op): Fix common/ includes.
182 2019-01-21 Tom Tromey <tom@tromey.com>
184 * tracepoint.c: Fix includes.
185 * remote-utils.c: Fix includes.
186 * linux-x86-low.c: Fix includes.
188 2019-01-01 Joel Brobecker <brobecker@adacore.com>
190 * gdbreplay.c (gdbreplay_version): Update copyright year in
192 * server.c (gdbserver_version): Likewise.
194 2018-12-05 Alan Hayward <alan.hayward@arm.com>
196 * linux-low.c (add_lwp): Switch ordering.
198 2018-11-29 Tom Tromey <tom@tromey.com>
200 * win32-low.c (win32_join): Take pid, not process.
201 * target.h (struct target_ops) <join>: Change argument type.
202 (join_inferior): Change argument name.
203 * spu-low.c (spu_join): Take pid, not process.
204 * server.c (handle_detach): Preserve pid before destroying
206 * lynx-low.c (lynx_join): Take pid, not process.
207 * linux-low.c (linux_join): Take pid, not process.
209 2018-11-23 Alan Hayward <alan.hayward@arm.com>
211 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
212 (aarch64_cannot_fetch_register): Likewise.
213 (struct linux_target_ops): Update references.
215 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
217 * linux-ppc-low.c: Include nat/linux-ptrace.h.
219 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
221 * configure.srv (ipa_ppc_linux_regobj): Add
222 powerpc-isa207-htm-vsx32l-ipa.o and
223 powerpc-isa207-htm-vsx64l-ipa.o.
224 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
225 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
226 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
227 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
228 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
229 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
230 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
231 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
232 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
233 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
234 (init_registers_powerpc_isa207_htm_vsx32l)
235 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
236 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
237 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
238 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
239 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
240 (ppc_store_tm_ctarregset): New functions.
241 (ppc_regsets): Add entries for HTM regsets.
242 (ppc_arch_setup): Set htm in features struct when needed. Set
243 sizes for the HTM regsets.
244 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
245 (initialize_low_arch): Call
246 init_registers_powerpc_isa207_htm_vsx32l and
247 init_registers_powerpc_isa207_htm_vsx64l.
248 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
249 PPC_TDESC_ISA207_HTM_VSX.
250 (initialize_low_tracepoint): Call
251 init_registers_powerpc_isa207_htm_vsx32l and
252 init_registers_powerpc_isa207_htm_vsx64l.
254 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
256 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
257 rs6000/power-linux-pmu.xml to srv_xmlfiles.
258 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
259 (ppc_store_pmuregset): New functions.
260 (ppc_regsets): Add entries for ebb and pmu regsets.
261 (ppc_arch_setup): Set isa207 in features struct if the ebb and
262 pmu regsets are available. Set sizes for these regsets.
264 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
266 * configure.srv (ipa_ppc_linux_regobj): Add
267 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
268 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
269 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
270 rs6000/powerpc-isa207-vsx32l.xml, and
271 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
272 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
273 <PPC_TDESC_ISA207_VSX>: New enum value.
274 (init_registers_powerpc_isa207_vsx32l): Declare.
275 (init_registers_powerpc_isa207_vsx64l): Declare.
276 * linux-ppc-low.c (ppc_fill_tarregset): New function.
277 (ppc_store_tarregset): New function.
278 (ppc_regsets): Add entry for the TAR regset.
279 (ppc_arch_setup): Set isa207 in features struct when needed. Set
280 size for the TAR regsets.
281 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
282 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
283 and init_registers_powerpc_isa207_vsx64l.
284 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
285 (initialize_low_tracepoint): Call
286 init_registers_powerpc_isa207_vsx32l and
287 init_registers_powerpc_isa207_vsx64l.
289 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
290 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
292 * configure.srv (ipa_ppc_linux_regobj): Add
293 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
294 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
295 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
296 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
297 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
298 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
299 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
300 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
301 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
302 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
303 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
304 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
305 (ppc_hwcap): Add comment.
306 (ppc_hwcap2): New global.
307 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
308 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
309 (ppc_regsets): Add entries for the DSCR and PPR regsets.
310 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
311 when needed. Set sizes for the the DSCR and PPR regsets.
312 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
313 (initialize_low_arch): Call
314 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
315 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
316 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
317 PPC_TDESC_ISA205_PPR_DSCR_VSX.
318 (initialize_low_tracepoint): Call
319 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
320 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
322 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
324 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
326 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
327 Simon Marchi <simark@simark.ca>
329 * acinclude.m4: Include "../selftest.m4".
330 * configure: Regenerate.
331 * configure.ac: Use "GDB_AC_SELFTEST".
332 * configure.srv: Use "$enable_unittests" instead of
333 "$development" when checking whether unit tests have been
335 * server.c (captured_main): Update message informing that
336 selftests have been disabled.
338 2018-10-04 Tom Tromey <tom@tromey.com>
340 * configure: Rebuild.
342 2018-10-04 Tom Tromey <tom@tromey.com>
344 * server.c (handle_status): Rename inner "thread".
345 (process_serial_event): Declare "res" in 'm' case.
346 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
347 (iterate_over_lwps): Rename inner "thread".
348 (linux_qxfer_libraries_svr4): Rename inner "len".
349 * gdbthread.h (find_thread_in_random): Rename inner "thread".
351 2018-10-01 Gary Benson <gbenson@redhat.com>
353 * gdb_proc_service.h: Moved common code to
354 common/gdb_proc_service.h.
356 2018-10-01 Gary Benson <gbenson@redhat.com>
358 * gdb_proc_service.h: Synchronize comments and whitespace with
359 GDB's version of this file.
361 2018-09-25 Tom Tromey <tom@tromey.com>
363 * configure: Rebuild.
364 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
366 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
368 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
369 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
370 ($(IPA_LIB)): Sort IPA_OBJS.
372 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
374 * Makefile.in: Remove references to $(ADD_DEPS).
376 2018-09-16 Tom Tromey <tom@tromey.com>
378 * remote-utils.c (remote_open): Use GNU style for metasyntactic
380 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
383 2018-09-05 Tom Tromey <tom@tromey.com>
385 * configure: Rebuild.
387 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
390 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
392 2018-08-27 Tom Tromey <tom@tromey.com>
395 * configure: Rebuild.
397 2018-08-27 Tom Tromey <tom@tromey.com>
399 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
400 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
401 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
402 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
403 (s390x_emit_stack_adjust): Add casts to unsigned char.
405 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
409 * server.h (struct client_state) <disable_randomization>:
412 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
414 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
416 (mips_supply_ptrace_register): Likewise.
418 2018-07-22 Tom Tromey <tom@tromey.com>
420 * configure: Rebuild.
422 2018-07-22 Tom Tromey <tom@tromey.com>
424 * win32-low.c (win32_create_inferior): Remove unused variables.
425 * gdbreplay.c (remote_open): Remove unused variable.
426 * remote-utils.c (remote_prepare): Remove unused variable.
427 * x86-tdesc.h (X86_TDESC_H): Define.
428 (amd64_expedite_regs): Define conditionally.
429 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
430 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
431 * remote-utils.c (readchar): Remove unused variable.
433 2018-07-13 Pedro Alves <palves@redhat.com>
435 * linux-low.c (linux_kill): Change parameter to process_info
436 pointer instead of pid. Adjust.
437 * lynx-low.c (lynx_kill): Likewise.
438 * nto-low.c (nto_kill): Likewise.
439 * spu-low.c (spu_kill): Likewise.
440 * win32-low.c (win32_kill): Likewise.
441 * server.c (handle_v_kill, kill_inferior_callback)
442 (detach_or_kill_for_exit): Adjust.
443 * target.c (kill_inferior): Change parameter to process_info
444 pointer instead of pid. Adjust.
445 * target.h (struct target_ops) <kill>: Change parameter to
446 process_info pointer instead of pid. Adjust all implementations
448 (kill_inferior): Likewise.
450 2018-07-13 Pedro Alves <palves@redhat.com>
452 * linux-low.c (linux_detach, linux_join): Change parameter to
453 process_info pointer instead of pid. Adjust.
454 * lynx-low.c (lynx_detach, lynx_join): Likewise.
455 * nto-low.c (nto_detach): Likewise.
456 * spu-low.c (spu_detach, spu_join): Likewise.
457 * win32-low.c (win32_detach, win32_join): Likewise.
458 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
459 * target.h (struct target_ops) <detach, join>: Change parameter to
460 process_info pointer instead of pid. Adjust all implementations
462 (detach_inferior, join_inferior): Rename 'pid' parameter to
465 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
466 Jan Kratochvil <jan.kratochvil@redhat.com>
467 Paul Fertser <fercerpav@gmail.com>
468 Tsutomu Seki <sekiriki@gmail.com>
470 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
471 (OBS): Add 'common/netstuff.o'.
472 (GDBREPLAY_OBS): Likewise.
473 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
474 (remote_open): Implement support for IPv6
476 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
478 (handle_accept_event): Accept connections from IPv6 sources.
479 (remote_prepare): Handle IPv6-style hostnames; implement
480 support for IPv6 connections.
481 (remote_open): Implement support for printing connections from
484 2018-07-11 Pedro Alves <palves@redhat.com>
487 * mem-break.c (any_persistent_commands): Add process_info
488 parameter and use it instead of relying on the current process.
489 Change return type to bool.
490 * mem-break.h (any_persistent_commands): Add process_info
491 parameter and change return type to bool.
492 * server.c (handle_detach): Remove require_running_or_return call.
493 Look up the process_info for the process we're about to detach.
494 If not found, return back error to GDB. Adjust
495 any_persistent_commands call to pass down a process pointer.
497 2018-07-11 Pedro Alves <palves@redhat.com>
499 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
500 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
501 instead of collect_register_by_name.
502 * regcache.c (regcache_raw_get_unsigned_by_name): New.
503 * regcache.h (regcache_raw_get_unsigned_by_name): New.
505 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
506 Pedro Alves <palves@redhat.com>
508 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
510 2018-07-03 Tom Tromey <tom@tromey.com>
512 * linux-low.c: Update.
513 * lynx-low.c: Update.
514 * mem-break.c: Update.
516 * remote-utils.c: Update.
520 * win32-low.c: Update.
522 2018-07-03 Tom Tromey <tom@tromey.com>
526 2018-07-03 Tom Tromey <tom@tromey.com>
528 * linux-low.c: Update.
530 2018-07-03 Tom Tromey <tom@tromey.com>
534 2018-07-03 Tom Tromey <tom@tromey.com>
536 * linux-low.c: Update.
537 * linux-mips-low.c: Update.
538 * lynx-low.c: Update.
540 * remote-utils.c: Update.
544 * thread-db.c: Update.
546 2018-07-03 Tom Tromey <tom@tromey.com>
548 * linux-low.c: Update.
549 * linux-mips-low.c: Update.
550 * lynx-low.c: Update.
551 * mem-break.c: Update.
553 * remote-utils.c: Update.
557 * tracepoint.c: Update.
559 2018-07-03 Tom Tromey <tom@tromey.com>
561 * linux-low.c: Update.
562 * linux-ppc-low.c: Update.
563 * linux-x86-low.c: Update.
564 * proc-service.c: Update.
567 * thread-db.c: Update.
568 * win32-low.c: Update.
570 2018-07-03 Tom Tromey <tom@tromey.com>
572 * linux-low.c: Update.
573 * lynx-low.c: Update.
575 * remote-utils.c: Update.
577 * thread-db.c: Update.
578 * win32-low.c: Update.
580 2018-06-29 Joel Brobecker <brobecker@adacore.com>
582 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
583 parameter in call to 'amd64_create_target_description'.
585 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
587 * x86-tdesc.h: Remove executable permission flag.
589 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
591 * configure.ac: Remove AC_PREREQ, add missing quoting.
592 * configure: Re-generate.
593 * config.in: Re-generate.
594 * aclocal.m4: Re-generate.
596 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
598 * tracepoint.h (current_traceframe): Remove declaration.
600 2018-06-18 Alan Hayward <alan.hayward@arm.com>
602 * linux-aarch64-low.c (is_sve_tdesc): New function.
603 (aarch64_sve_regs_copy_to_regcache): Likewise.
604 (aarch64_sve_regs_copy_from_regcache): Likewise.
605 (aarch64_regs_info): Add SVE checks.
606 (initialize_low_arch): Initialize SVE.
608 2018-06-18 Alan Hayward <alan.hayward@arm.com>
610 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
612 2018-06-11 Alan Hayward <alan.hayward@arm.com>
614 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
615 (initialize_low_tracepoint): Likewise
616 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
617 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
619 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
621 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
623 2018-06-11 Alan Hayward <alan.hayward@arm.com>
625 * server.h (PBUFSIZ): Increase size
627 2018-06-11 Alan Hayward <alan.hayward@arm.com>
629 * regcache.c (regcache::raw_compare): New function.
630 * regcache.h (regcache::raw_compare): New declaration.
632 2018-06-11 Alan Hayward <alan.hayward@arm.com>
634 * regcache.c (new_register_cache): Use new.
635 (free_register_cache): Use delete.
636 (register_data): Use const.
637 (supply_register): Move body inside regcache.
638 (regcache::raw_supply): New override function.
639 (collect_register): Move body inside regcache.
640 (regcache::raw_collect): New override function.
641 (regcache::get_register_status): New override function.
642 * regcache.h (struct regcache): Inherit from reg_buffer_common.
644 2018-06-09 Tom Tromey <tom@tromey.com>
646 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
648 (event_queue): Use std::queue.
649 (gdb_event_xfree): Remove.
650 (initialize_event_loop, process_event, wait_for_event): Update.
652 2018-06-08 Stan Cox <scox@redhat.com>
654 * win32-low.c (win32_create_inferior): last_ptid and last_status
655 moved to client_state.
657 2018-06-08 Pedro Alves <palves@redhat.com>
659 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
660 common/common-exceptions.o, common/common-utils.o,
661 common/errors.o, common/print-utils.o and utils.o.
662 * gdbreplay.c: Include "common-defs.h" instead of the two
663 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
664 string.h or alloca.h.
665 (perror_with_name): Delete.
666 (remote_open): Use xstrdup instead of strdup.
667 (main): Rename to ...
668 (captured_main): ... this.
671 2018-06-08 Tom Tromey <tom@tromey.com>
673 * linux-low.c (linux_low_read_btrace): Update.
675 2018-06-04 Stan Cox <scox@redhat.com>
677 * server.h (struct client_state): New.
678 * server.c (cont_thread, general_thread, multi_process)
679 (report_fork_events, report_vfork_events, report_exec_events)
680 (report_thread_events, swbreak_feature, hwbreak_feature)
681 (vCont_supported, disable_randomization, pass_signals)
682 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
683 Moved to client_state.
684 * remote-utils.c (remote_debug, noack_mode)
685 (transport_is_reliable): Moved to client_state.
686 * tracepoint.c (current_traceframe): Moved to client_state.
689 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
690 linux-low.c, remote-utils.h, target.c: Use client_state.
692 2018-05-31 Alan Hayward <alan.hayward@arm.com>
694 * configure.srv: Add new c/h file.
696 2018-05-31 Alan Hayward <alan.hayward@arm.com>
698 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
701 2018-05-25 Maciej W. Rozycki <macro@mips.com>
703 * gdb.arch/mips-fpregset-core.exp: New test.
704 * gdb.arch/mips-fpregset-core.c: New test source.
706 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
709 * hostio.c (require_int): Do not report overflow for integers
710 between 0xfffffff and 0x7fffffff.
712 2018-05-22 Maciej W. Rozycki <macro@mips.com>
714 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
715 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
716 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
718 (the_low_target): Wire them.
720 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
722 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
723 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
724 mode. Call collect_register_by_name with vscr using
725 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
726 (ppc_store_vrregset): Add and set vscr_offset variable as in
727 ppc_fill_vrregset. Call supply_register_by_name with vscr using
730 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
732 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
733 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
734 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
736 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
738 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
739 (ppc_store_vsxregset): Likewise.
740 (ppc_fill_vrregset): Likewise.
741 (ppc_store_vrregset): Likewise.
742 (ppc_fill_evrregset): Likewise.
743 (ppc_store_evrregset): Likewise.
744 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
745 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
748 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
750 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
751 wordsize of the inferior. Call ppc_linux_target_wordsize.
753 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
755 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
756 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
757 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
758 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
759 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
760 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
761 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
762 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
763 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
764 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
765 (tdesc_powerpc_e500l): Remove.
766 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
767 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
768 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
769 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
771 (ppc_arch_setup): Remove target description matching code. Fill a
772 ppc_linux_features struct and call ppc_linux_match_description
775 2018-05-22 Maciej W. Rozycki <macro@mips.com>
777 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
778 width of the requested register exceeds the width of the
780 (mips_cannot_store_register): Likewise.
782 2018-05-21 Maciej W. Rozycki <macro@mips.com>
784 * linux-mips-low.c (mips_fetch_register): New function. Update
786 (mips_store_gregset): Supply 0 rather than $restart for $zero.
787 (the_low_target): Wire `mips_fetch_register'.
789 2018-05-10 Joel Brobecker <brobecker@adacore.com>
791 * lynx-i386-low.c (LYNXOS_178): New macro.
792 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
793 the layout on LynxOS-178.
794 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
795 handle floating point registers that are not supported by
798 2018-05-10 Tom Tromey <tom@tromey.com>
800 * configure: Rebuild.
802 2018-05-10 Joel Brobecker <brobecker@adacore.com>
805 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
806 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
807 Use it to set the expedite_regs field in the given tdesc.
808 * x86-tdesc.h: New file.
809 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
810 Adjust following the addition of the new expedite_regs parameter
812 * linux-tic6x-low.c (tic6x_read_description): Likewise.
813 * linux-x86-tdesc.c: #include "x86-tdesc.h".
814 (i386_linux_read_description, amd64_linux_read_description):
815 Adjust following the addition of the new expedite_regs parameter
817 * lynx-i386-low.c: #include "x86-tdesc.h".
818 (lynx_i386_arch_setup): Adjust following the addition of the new
819 expedite_regs parameter to init_target_desc.
820 * nto-x86-low.c: #include "x86-tdesc.h".
821 (nto_x86_arch_setup): Adjust following the addition of the new
822 expedite_regs parameter to init_target_desc.
823 * win32-i386-low.c: #include "x86-tdesc.h".
824 (i386_arch_setup): Adjust following the addition of the new
825 expedite_regs parameter to init_target_desc.
827 2018-05-10 Joel Brobecker <brobecker@adacore.com>
830 * win32-low.c (win32_create_inferior): Add call to my_wait
831 setting last_status global.
833 2018-05-10 Joel Brobecker <brobecker@adacore.com>
836 * win32-low.c (create_process): Only call gdb_tilde_expand if
837 inferior_cwd is not NULL.
839 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
841 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
842 registers to the cache if their values have changed.
843 (i387_xsave_to_cache): Provide default values for x87 control
844 registers when these features are available, but disabled.
845 * regcache.c (supply_register_by_name_zeroed): New function.
846 * regcache.h (supply_register_by_name_zeroed): Declare new
849 2018-05-07 Tom Tromey <tom@tromey.com>
851 * configure: Rebuild.
853 2018-05-04 Tom Tromey <tom@tromey.com>
855 * configure: Rebuild.
857 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
858 Pedro Alves <palves@redhat.com>
860 * linux-aarch64-low.c (aarch64_stopped_data_address):
863 2018-04-27 Tom Tromey <tom@tromey.com>
865 * configure: Rebuild.
867 2018-04-23 Tom Tromey <tom@tromey.com>
869 * configure: Rebuild.
871 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
873 * Makefile.in (depcomp): Add "..".
874 (all_deps_files): New and use it.
876 2018-04-18 Alan Hayward <alan.hayward@arm.com>
878 * configure.srv (aarch64*-*-linux*): Don't include xml.
879 (i[34567]86-*-cygwin*): Likewise.
880 (i[34567]86-*-linux*): Likewise.
881 (i[34567]86-*-lynxos*): Likewise.
882 (i[34567]86-*-mingw32ce*): Likewise.
883 (i[34567]86-*-mingw*): Likewise.
884 (i[34567]86-*-nto*): Likewise.
885 (tic6x-*-uclinux): Likewise.
886 (x86_64-*-linux*): Likewise.
887 (x86_64-*-mingw*): Likewise.
888 (x86_64-*-cygwin*): Likewise.
890 2018-04-18 Alan Hayward <alan.hayward@arm.com>
892 * tdesc.c: Remove xml parameter.
894 2018-04-18 Alan Hayward <alan.hayward@arm.com>
896 * server.c (get_features_xml): Remove cast.
897 * tdesc.c (void target_desc::accept): Fill in function.
898 (tdesc_get_features_xml): Remove old xml creation.
899 (print_xml_feature::visit_pre): Add xml vistor.
900 * tdesc.h (struct target_desc): Make xmltarget mutable.
901 (tdesc_get_features_xml): Remove declaration.
903 2018-04-18 Alan Hayward <alan.hayward@arm.com>
905 * tdesc.c (tdesc_architecture_name): Add new function.
906 (tdesc_osabi_name): Likewise.
907 (tdesc_get_features_xml): Use new functions.
909 2018-04-18 Alan Hayward <alan.hayward@arm.com>
911 * tdesc.c (tdesc_create_flags): Remove.
912 (tdesc_add_flag): Likewise.
913 (tdesc_named_type): Likewise.
914 (tdesc_create_union): Likewise.
915 (tdesc_create_struct): Likewise.
916 (tdesc_create_vector): Likewise.
917 (tdesc_add_bitfield): Likewise.
918 (tdesc_add_field): Likewise.
919 (tdesc_set_struct_size): Likewise.
921 2018-04-18 Alan Hayward <alan.hayward@arm.com>
923 * tdesc.c (~target_desc): Remove implictly deleted items.
924 (init_target_desc): Iterate all features.
925 (tdesc_get_features_xml): Use vector.
926 (tdesc_create_feature): Create feature.
927 * tdesc.h (tdesc_feature) Remove
928 (target_desc): Add features.
930 2018-04-18 Alan Hayward <alan.hayward@arm.com>
932 * Makefile.in: Add common/tdesc.c
933 * tdesc.c (init_target_desc): init all reg_defs from register
935 (tdesc_create_reg): Create tdesc_reg.
936 * tdesc.h (tdesc_feature): Add register vector.
938 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
940 * tdesc.h (struct target_desc) <features>: Change type to
941 std::vector<std::string>.
942 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
944 (tdesc_get_features_xml): Likewise.
945 (tdesc_create_feature): Likewise.
947 2018-03-26 Alan Hayward <alan.hayward@arm.com>
949 * regcache.c (find_register_by_number): Return a ref.
950 (find_regno): Use references.
951 (register_size): Likewise.
952 (register_data): Likewise.
953 * tdesc.c (target_desc::~target_desc): Remove free calls.
954 (target_desc::operator==): Use std::vector compare.
955 (init_target_desc): Use reference.
956 (tdesc_create_reg): Use reg constructors.
957 * tdesc.h (struct target_desc): Replace pointer with object.
959 2018-03-23 Alan Hayward <alan.hayward@arm.com>
961 * regcache.c (find_register_by_number): Make static.
962 (find_regno): Use find_register_by_number
963 * regcache.h (struct reg): Remove declaration.
965 2018-03-23 Alan Hayward <alan.hayward@arm.com>
967 * tdesc.c (target_desc::~target_desc): Move to here.
968 (target_desc::operator==): Likewise.
969 * tdesc.h (target_desc::~target_desc): Move from here.
970 (target_desc::operator==): Likewise.
972 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
974 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
976 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
978 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
980 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
981 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
982 and init_registers_s390_gs_linux64.
984 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
986 * linux-s390-low.c (s390_fill_gs): Remove function.
987 (s390_fill_gsbc): Remove function.
988 (s390_regsets): Set fill functions for the guarded storage regsets
991 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
993 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
994 the word size. Add comment.
995 (s390_get_wordsize): New function.
996 (s390_arch_setup): No longer select a temporary tdesc to fetch the
997 pswm with it. Instead, use s390_get_wordsize to determine the
998 word size first and derive the correct tdesc from that directly.
1000 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1002 * Makefile.in: Include silent-rules.mk.
1003 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1004 (COMPILE): Add ECHO_CXX.
1005 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1006 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1007 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1008 (version-generated.c): Add ECHO_GEN.
1009 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1010 (IPAGENT_COMPILE): Add ECHO_CXX.
1011 (%-generated.c): Add ECHO_REGDAT.
1013 2018-03-14 Tom Tromey <tom@tromey.com>
1016 * ax.c (ax_printf): Special case for NULL.
1018 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1020 * linux-low.c (linux_qxfer_libraries_svr4): Use
1021 xml_escape_text_append.
1023 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1025 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1027 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1029 * server.c (handle_general_set): Remove unnecessary xstrdup.
1031 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1033 * server.c (parse_debug_format_options): Adjust to
1034 delim_string_to_char_ptr_vec changes.
1035 * thread-db.c (thread_db_load_search): Adjust to
1036 dirnames_to_char_ptr_vec changes.
1038 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1040 * target.h (target_enable_btrace, target_disable_btrace)
1041 (target_read_btrace, target_read_btrace_conf): Turn macro into
1042 inline function. Throw error if target method is not defined.
1043 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1044 check for btrace target method. Be prepared to handle exceptions
1045 from btrace target methods.
1047 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1049 * server.c (captured_main): Change order of error message printed
1050 when the current working directory cannot be found.
1052 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1054 * server.c: Include "filenames.h" and "pathstuff.h".
1055 (program_name): Delete variable.
1056 (program_path): New anonymous class.
1057 (get_exec_wrapper): Use "program_path" instead of
1059 (handle_v_run): Likewise.
1060 (captured_main): Likewise.
1061 (process_serial_event): Likewise.
1063 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1065 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1066 (OBJS): Add "pathstuff.o".
1067 * server.c (current_directory): New global variable.
1068 (captured_main): Initialize "current_directory".
1070 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1072 * tdesc.c: Use common/tdesc.h.
1073 * tdesc.h: Likewise.
1075 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1076 Simon Marchi <simon.marchi@ericsson.com>
1078 * Makefile.in: Switch order of make rules.
1080 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1082 * Makefile.in: Add common directory in build.
1083 * configure.ac: Add common reference.
1084 * configure: Regenerate.
1086 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1088 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1089 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1090 * spu-low.c (spu_target_ops): Likewise.
1091 * win32-low.c (win32_target_ops): Likewise.
1092 * server.c (supported_btrace_packets): Report packets unconditionally.
1093 * target.h (target_ops) <supports_btrace>: Remove.
1094 (target_supports_btrace): Remove.
1096 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1098 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1099 (handle_btrace_disable): Change return type to void. Use exceptions
1101 (handle_btrace_general_set): Catch exception and copy message to
1104 2018-02-08 Tom Tromey <tom@tromey.com>
1106 * linux-low.c (install_software_single_step_breakpoints): Use
1107 make_scoped_restore.
1108 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1109 (do_restore_current_thread_cleanup): Remove.
1110 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1113 2018-02-08 Tom Tromey <tom@tromey.com>
1115 * mem-break.c (set_raw_breakpoint_at): Use
1116 gdb::unique_xmalloc_ptr.
1118 2018-01-30 Pedro Alves <palves@redhat.com>
1121 * target.c (target_terminal::terminal_state): Rename to ...
1122 (target_terminal::m_terminal_state): ... this.
1124 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1126 * linux-low.c (handle_extended_wait): Surround call to
1127 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1129 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1131 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1132 linux_ptrace_attach_fail_reason_string now returning an
1134 (linux_attach): Likewise.
1135 * thread-db.c (attach_thread): Likewise.
1137 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1140 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1141 checking for fs_base/gs_base fields in struct user_regs_struct.
1142 * configure: Regenerate.
1144 2018-01-16 Yao Qi <yao.qi@linaro.org>
1147 * linux-low.c (fetch_register): Call supply_register instead of
1150 2018-01-08 Yao Qi <yao.qi@linaro.org>
1151 Simon Marchi <simon.marchi@ericsson.com>
1153 * Makefile.in (OBS): Remove selftest.o.
1154 * configure.ac: Set srv_selftest_objs if $development is true.
1155 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1156 * configure: Re-generated.
1157 * server.c (captured_main): Wrap variable selftest_filter with
1160 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1162 * server.c (parse_debug_format_options): Return std::string.
1163 (handle_monitor_command, captured_main): Adjust.
1165 2018-01-05 Pedro Alves <palves@redhat.com>
1168 * server.c (captured_main): Pass quiet=false to
1169 save_original_signals_state.
1171 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1173 * gdbreplay.c (gdbreplay_version): Update copyright year in
1175 * server.c (gdbserver_version): Likewise.
1177 2017-12-08 Tom Tromey <tom@tromey.com>
1179 * ax.c (ax_printf): Update.
1181 2017-12-07 Yao Qi <yao.qi@linaro.org>
1183 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1184 aarch64_linux_read_description.
1185 * linux-amd64-ipa.c (idx2mask): New array.
1186 (get_ipa_tdesc): Move idx2mask out.
1187 (initialize_low_tracepoint): Initialize target descriptions.
1188 * linux-i386-ipa.c (idx2mask): New array.
1189 (get_ipa_tdesc): Move idx2mask out.
1190 (initialize_low_tracepoint): Initialize target descriptions.
1192 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1194 * tdesc.c (struct tdesc_type): Change return type.
1195 (tdesc_add_flag): Change parameter type.
1196 (tdesc_add_bitfield): Likewise.
1197 (tdesc_add_field): Likewise.
1198 (tdesc_set_struct_size): Likewise.
1200 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1202 * regcache.c (registers_to_string): Remove unused variable.
1204 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1206 * inferiors.c (for_each_inferior_with_data): Remove.
1207 * inferiors.h (for_each_inferior_with_data): Remove.
1208 * server.c (handle_qxfer_threads_worker): Change parameter type.
1209 (handle_qxfer_threads_proper): Use for_each_thread.
1211 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1213 * inferiors.c (for_each_inferior): Remove.
1214 (clear_inferiors): Use for_each_thread.
1215 * inferiors.h (for_each_inferior): Remove.
1216 * linux-low.c (linux_wait_for_event_filtered): Use
1218 (linux_stabilize_threads): Likewise.
1219 * regcache.c (regcache_release): Likewise.
1220 * server.c (gdb_wants_all_threads_stopped): Likewise.
1221 (clear_pending_status_callback): Remove.
1222 (handle_status): Use for_each_thread.
1223 (captured_main): Likewise.
1224 * win32-low.c (child_init_thread_list): Likewise.
1225 (win32_clear_inferiors): Likewise.
1226 (fake_breakpoint_event): Likewise.
1228 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1230 * inferiors.h (find_inferior): Remove.
1231 * inferiors.c (find_inferior): Remove.
1233 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1235 * linux-low.c (resume_status_pending_p): Update comment.
1236 (need_step_over_p): Update comment.
1238 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1240 * linux-low.c (proceed_one_lwp): Return void, change parameter
1242 (unsuspend_and_proceed_one_lwp): Likewise.
1243 (proceed_all_lwps): Use for_each_thread.
1244 (unstop_all_lwps): Likewise.
1246 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1248 * linux-low.c (linux_resume_one_thread): Return void, take
1250 (linux_resume): Use for_each_thread.
1252 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1254 * linux-low.c (send_sigstop_callback): Return void, change
1255 parameter type. Rename to...
1256 (send_sigstop): ... this.
1257 (suspend_and_send_sigstop_callback): Return void, change parameter
1259 (suspend_and_send_sigstop): ... this.
1260 (stop_all_lwps): Use for_each_thread.
1262 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1264 * linux-low.c (lwp_running): Return bool, remove unused
1266 (linux_stabilize_threads): Use find_thread.
1268 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1270 * linux-low.c (select_singlestep_lwp_callback): Remove.
1271 (count_events_callback): Remove.
1272 (select_event_lwp_callback): Remove.
1273 (select_event_lwp): Use find_thread/for_each_thread.
1275 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1277 * linux-low.c (not_stopped_callback): Return bool, take filter
1279 (linux_wait_for_event_filtered): Use find_thread.
1280 (linux_wait_1): Likewise.
1282 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1284 * linux-low.c (same_lwp): Remove.
1285 (find_lwp_pid): Use find_thread.
1287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1289 * linux-low.c (delete_lwp_callback): Remove.
1290 (linux_mourn): Use for_each_thread.
1292 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1294 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1295 args parameter, don't check for pid.
1296 (linux_detach): Use for_each_thread.
1298 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1300 * linux-low.c (struct counter): Remove.
1301 (second_thread_of_pid_p): Remove.
1302 (last_thread_of_process_p): Use find_thread.
1304 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1306 * inferiors.c (find_inferior_in_random): Remove.
1307 * inferiors.h (find_inferior_in_random): Remove.
1308 * linux-low.c (status_pending_p_callback): Return bool, accept
1309 parameter ptid directly.
1310 (linux_wait_for_event_filtered): Use find_thread_in_random.
1311 (linux_wait_1): Likewise.
1313 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1315 * inferiors.c (find_inferior_id): Remove.
1316 (find_thread_ptid): Move implemention from find_inferior_id to
1318 * inferiors.h (find_inferior_id): Remove.
1319 * server.c (handle_status): Use find_thread_ptid.
1320 (process_serial_event): Likewise.
1321 * thread-db.c (find_one_thread): Likewise.
1322 (thread_db_thread_handle): Likewise.
1323 * win32-low.c (thread_rec): Likewise.
1324 (child_delete_thread): Likewise.
1325 (win32_thread_alive): Likewise.
1326 (get_child_debug_event): Likewise.
1328 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1330 * linux-mips-low.c (update_watch_registers_callback): Return
1331 void, remove pid_p parameter, don't check for pid.
1332 (mips_insert_point, mips_remove_point): Use for_each_thread.
1334 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1336 * lynx.low (lynx_delete_thread_callback): Remove.
1337 (lynx_mourn): Use for_each_thread.
1339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1341 * regcache.c (regcache_invalidate_one): Remove.
1342 (regcache_invalidate_pid): use for_each_thread.
1344 2017-11-26 Tom Tromey <tom@tromey.com>
1346 * linux-low.c (linux_create_inferior): Update.
1348 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1350 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1352 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1354 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1355 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1356 * linux-aarch64-tdesc-selftest.c: New file.
1357 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1359 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1361 * configure.srv: Add new file.
1362 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1363 * linux-aarch64-tdesc-selftest.c: New file.
1364 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1366 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1368 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1369 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1370 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1372 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1374 * configure.srv: Add new files.
1375 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1376 aarch64_linux_read_description.
1377 * linux-aarch64-low.c (aarch64_linux_read_description):
1378 Merge with aarch64_arch_setup.
1379 (aarch64_arch_setup): Call aarch64_linux_read_description.
1380 * linux-aarch64-tdesc.c: New file.
1381 * linux-aarch64-tdesc.h: New file.
1383 2017-11-24 Yao Qi <yao.qi@linaro.org>
1385 * configure.srv: Set $srv_regobj for tic6x-linux.
1386 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1387 (tic6x_read_description): Move some code to tic6x_arch_setup.
1388 (tic6x_tdesc_test): New function.
1389 (initialize_low_arch): Call selftests::register_test.
1391 2017-11-22 Yao Qi <yao.qi@linaro.org>
1393 * remote-utils.c (prepare_resume_reply): Use memcpy.
1395 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1397 * linux-low.c (kill_one_lwp_callback): Return void, take
1398 argument directly, don't filter on pid.
1399 (linux_kill): Use for_each_thread.
1401 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1403 * linux-low.c (need_step_over_p): Return bool, remove dummy
1405 (linux_resume, proceed_all_lwps): Use find_thread.
1407 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1409 * linux-low.c (resume_status_pending_p): Return bool, remove
1411 (linux_resume): Use find_thread.
1413 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1415 * linux-low.c (struct thread_resume_array): Remove.
1416 (linux_set_resume_request): Return void, take arguments
1418 (linux_resume): Use for_each_thread.
1420 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1422 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1423 return bool, remove data argument.
1424 (linux_stabilize_threads): Use find_thread.
1426 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1428 * linux-low.c (unsuspend_one_lwp): Remove.
1429 (unsuspend_all_lwps): Use for_each_thread, inline code from
1432 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1434 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1435 * linux-low.c (struct iterate_over_lwps_args): Remove.
1436 (iterate_over_lwps_filter): Remove.
1437 (iterate_over_lwps): Use find_thread.
1439 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1441 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1442 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1443 code from reset_lwp_ptrace_options_callback.
1445 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1447 * linux-arm-low.c (struct update_registers_data): Remove.
1448 (update_registers_callback): Return void, take arguments
1449 directly, don't check thread's pid.
1450 (arm_insert_point, arm_remove_point): Use for_each_thread.
1452 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1454 * win32-low.c (continue_one_thread): Return void, take argument
1456 (child_continue): Use for_each_thread.
1458 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1460 * win32-i386-low.c (update_debug_registers_callback): Rename
1462 (update_debug_registers): ... this, return void, remove pid_p arg.
1463 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1465 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1467 * inferiors.h (struct process_info): Add constructor, initialize
1469 <syscalls_to_catch>: Change type to std::vector<int>.
1470 * inferiors.c (add_process): Allocate process_info with new.
1471 (remove_process): Free process_info with delete.
1472 * linux-low.c (handle_extended_wait): Adjust.
1473 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1474 * server.c (handle_general_set): Adjust.
1476 2017-11-16 Pedro Alves <palves@redhat.com>
1478 * remote-utils.c (remote_close): Block SIGIO signals instead of
1479 uninstalling the SIGIO handler.
1481 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1483 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1485 2017-11-16 Yao Qi <yao.qi@linaro.org>
1487 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1488 (tic6x_store_gregset): Likewise.
1489 (tic6x_usrregs_info): Move it up.
1491 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1493 * Makefile.in: Update arch rules.
1494 * configure.srv: Explicitly mark arch/ files.
1496 2017-11-13 Andreas Schwab <schwab@suse.de>
1498 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1500 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1502 2017-11-06 Pedro Alves <palves@redhat.com>
1504 * config.in, configure: Regenerate.
1506 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1508 * target.c (struct thread_search): Remove.
1509 (thread_search_callback): Remove.
1510 (prepare_to_access_memory): Use for_each_thread instead of
1511 find_inferior. Inline code from thread_search_callback.
1513 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1515 * server.c (struct visit_actioned_threads_data): Remove.
1516 (visit_actioned_threads): Change prototype to take arguments
1518 (resume): Use find_thread instead of find_inferior.
1520 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1522 * server.c (queue_stop_reply_callback): Change prototype, return
1524 (find_status_pending_thread_callback): Remove.
1525 (handle_status): Replace find_inferior with find_thread and
1528 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1530 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1532 (aarch64_store_gregset): Likewise.
1533 (aarch64_fill_fpregset): Likewise.
1534 (aarch64_store_fpregset): Likewise.
1536 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1538 * gdbthread.h (find_thread, for_each_thread): New functions.
1539 * inferiors.c (thread_of_pid): Remove.
1540 (find_any_thread_of_pid): Use find_thread.
1541 * linux-low.c (num_lwps): Use for_each_thread.
1543 2017-10-17 Yao Qi <yao.qi@linaro.org>
1545 * Makefile.in: Remove one rule.
1546 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1548 2017-10-17 Yao Qi <yao.qi@linaro.org>
1550 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1551 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1553 2017-10-17 Yao Qi <yao.qi@linaro.org>
1555 * configure.srv: Rename arm.o with arch/arm.o.
1557 2017-10-17 Yao Qi <yao.qi@linaro.org>
1559 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1560 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1561 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1562 (arch-i386.o, arch-amd64.o): Remove rules.
1563 (arch/%.o): New rule.
1564 Update POSTCOMPILE and COMPILE.pre.
1565 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1566 * configure: Re-generated.
1567 * configure.srv: Replace arch-i386.o with arch/i386.o.
1568 Replace arch-amd64.o with arch/amd64.o.
1570 2017-10-16 Yao Qi <yao.qi@linaro.org>
1572 * configure: Regenerated.
1574 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1576 * inferiors.h: (struct inferior_list): Remove.
1577 (struct inferior_list_entry); Remove.
1578 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1579 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1580 get_first_inferior): Remove.
1581 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1582 find_inferior_id, find_inferior_in_random): Change signature.
1583 * inferiors.c (all_threads): Change type to
1584 std::list<thread_info *>.
1585 (get_thread): Remove macro.
1586 (find_inferior, find_inferior_id): Change signature, implement
1588 (find_inferior_in_random): Change signature, implement using
1589 find_thread_in_random.
1590 (for_each_inferior, for_each_inferior_with_data): Change
1591 signature, implement using for_each_thread.
1592 (add_inferior_to_list, remove_inferior): Remove.
1593 (add_thread, get_first_thread, thread_of_pid,
1594 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1595 (get_first_inferior, one_inferior_p, clear_inferior_list):
1597 (clear_inferiors, get_thread_process): Update.
1598 * gdbthread.h: Include <list>.
1599 (struct thread_info) <entry>: Remove field.
1601 (all_threads): Change type to std::list<thread_info *>.
1602 (get_first_inferior): Add doc.
1603 (find_thread, for_each_thread, find_thread_in_random): New
1605 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1606 * linux-arm-low.c (update_registers_callback): Update.
1607 * linux-low.c (second_thread_of_pid_p): Update.
1608 (kill_one_lwp_callback, linux_detach_lwp_callback,
1609 delete_lwp_callback, status_pending_p_callback, same_lwp,
1610 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1611 iterate_over_lwps, not_stopped_callback,
1612 resume_stopped_resumed_lwps, count_events_callback,
1613 select_singlestep_lwp_callback, select_event_lwp_callback,
1614 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1615 suspend_and_send_sigstop_callback, wait_for_sigstop,
1616 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1617 lwp_running, linux_set_resume_request, resume_status_pending_p,
1618 need_step_over_p, start_step_over, linux_resume_one_thread,
1619 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1620 reset_lwp_ptrace_options_callback): Update.
1621 * linux-mips-low.c (update_watch_registers_callback): Update.
1622 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1624 (free_register_cache_thread_one): Remove.
1625 (regcache_release): Update.
1626 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1627 handle_qxfer_threads_worker): Update.
1628 (handle_query): Update, use list iterator.
1629 (visit_actioned_threads, handle_pending_status,
1630 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1631 clear_pending_status_callback, set_pending_status_callback,
1632 find_status_pending_thread_callback, handle_status,
1633 process_serial_event): Update.
1634 * target.c (thread_search_callback): Update.
1635 * thread-db.c (thread_db_get_tls_address): Update.
1636 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1638 * win32-i386-low.c (update_debug_registers_callback): Update.
1639 * win32-low.c (delete_thread_info, child_delete_thread,
1640 continue_one_thread, suspend_one_thread,
1641 get_child_debug_event): Adjust.
1643 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1645 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1646 * inferiors.h: Include <list>.
1647 (struct process_info) <entry>: Remove field.
1649 (pid_of): Change macro to function.
1650 (ptid_of, lwpid_of): Remove macro.
1651 (all_processes): Change type to std::list<process_info *>.
1652 (ALL_PROCESSES): Remove macro.
1653 (for_each_process, find_process): New function.
1654 * inferiors.c (all_processes): Change type to
1655 std::list<process_info *>.
1656 (find_thread_process): Adjust.
1657 (add_process): Likewise.
1658 (remove_process): Likewise.
1659 (find_process_pid): Likewise.
1660 (get_first_process): Likewise.
1661 (started_inferior_callback): Remove.
1662 (have_started_inferiors_p): Adjust.
1663 (attached_inferior_callback): Remove.
1664 (have_attached_inferiors_p): Adjust.
1665 * linux-low.c (check_zombie_leaders): Likewise.
1666 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1667 (x86_linux_update_xmltarget): Adjust.
1668 * server.c (handle_query): Likewise.
1669 (gdb_reattached_process): Remove.
1670 (handle_status): Adjust.
1671 (kill_inferior_callback): Likewise.
1672 (detach_or_kill_inferior): Remove.
1673 (print_started_pid): Likewise.
1674 (print_attached_pid): Likewise.
1675 (detach_or_kill_for_exit): Update.
1676 (process_serial_event): Likewise.
1677 * linux-arm-low.c (arm_new_fork): Likewise.
1679 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1681 * dll.h: Include <list>.
1682 (struct dll_info): Add constructor.
1683 <entry>: Remove field.
1684 (all_dlls): Change type to std::list<dll_info>.
1685 * dll.c: Include <algorithm>.
1686 (get_dll): Remove macro.
1687 (all_dlls): Change type to std::list<dll_info *>.
1688 (free_one_dll): Remove.
1689 (match_dll): Likewise.
1690 (loaded_dll): Adjust.
1691 (unloaded_dll): Adjust to all_dlls type change, use
1692 std::find_if. Inline code from match_dll.
1693 (clear_dlls): Adjust to all_dlls type change.
1694 * server.c (emit_dll_description): Remove.
1695 (handle_qxfer_libraries): Adjust to all_dlls type change,
1696 integrate emit_dll_description's functionality.
1698 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1700 * linux-low.h (struct linux_target_ops) <delete_process>: New
1702 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1703 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1704 (struct linux_target_ops): Add delete_process callback.
1705 * linux-arm-low.c (arm_delete_process): New.
1706 (struct linux_target_ops): Add delete_process callback.
1707 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1708 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1709 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1710 * linux-mips-low.c (mips_linux_delete_process): New.
1711 (struct linux_target_ops): Add delete_process callback.
1712 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1713 * linux-s390-low.c (struct linux_target_ops): Likewise.
1714 * linux-sh-low.c (struct linux_target_ops): Likewise.
1715 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1716 * linux-tile-low.c (struct linux_target_ops): Likewise.
1717 * linux-x86-low.c (x86_linux_delete_process): New.
1718 (struct linux_target_ops): Add delete_process callback.
1719 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1721 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1723 * linux-aarch64-low.c (the_low_target): Add thread delete
1725 * linux-arm-low.c (arm_delete_thread): New function.
1726 (the_low_target): Add thread delete callback.
1727 * linux-bfin-low.c (the_low_target): Likewise.
1728 * linux-crisv32-low.c (the_low_target): Likewise.
1729 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1731 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1733 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1734 * linux-mips-low.c (mips_linux_delete_thread): New function.
1735 (the_low_target): Add thread delete callback.
1736 * linux-ppc-low.c (the_low_target): Likewise.
1737 * linux-s390-low.c (the_low_target): Likewise.
1738 * linux-sh-low.c (the_low_target): Likewise.
1739 * linux-tic6x-low.c (the_low_target): Likewise.
1740 * linux-tile-low.c (the_low_target): Likewise.
1741 * linux-x86-low.c (the_low_target): Likewise.
1742 * linux-xtensa-low.c (the_low_target): Likewise.
1744 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1746 * win32-low.c: Include "common-inferior.h".
1748 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1750 * inferiors.c (set_inferior_cwd): New function.
1751 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1752 (handle_query): Inform that QSetWorkingDir is supported.
1753 * win32-low.c (create_process): Pass the inferior's cwd to
1756 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1758 * inferiors.c (current_inferior_cwd): New global variable.
1759 (get_inferior_cwd): New function.
1760 * inferiors.h (struct process_info) <cwd>: New field.
1762 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1764 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1765 (OBS): Add gdb_tilde_expand.o.
1767 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1769 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1770 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1772 2017-09-29 Pedro Alves <palves@redhat.com>
1774 * ax.c (gdb_parse_agent_expr): Constify.
1775 * ax.h (gdb_parse_agent_expr): Constify.
1776 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1778 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1779 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1780 * remote-utils.h (read_ptid): Constify.
1781 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1782 (process_point_options, process_serial_event): Constify.
1783 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1784 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1785 (cmd_qtbuffer): Constify.
1787 2017-09-29 Pedro Alves <palves@redhat.com>
1789 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1792 2017-09-29 Pedro Alves <palves@redhat.com>
1794 * linux-low.c (handle_extended_wait): Pass parent thread instead
1795 of process to thread_db_notice_clone.
1796 * linux-low.h (thread_db_notice_clone): Replace parent process
1797 parameter with parent thread parameter.
1798 * thread-db.c (find_one_thread): Add comment.
1799 (thread_db_notice_clone): Replace parent process parameter with
1800 parent thread parameter. Temporarily switch to the parent thread.
1802 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1804 * gdbthread.h: Include "common-gdbthread.h".
1805 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1806 "if" when validating the ptid.
1807 * remote-utils.c: Include "gdbthread.h".
1808 (prepare_resume_reply): Use "switch_to_thread".
1809 * target.c (done_accessing_memory): Likewise.
1811 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1813 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1814 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1815 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1816 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1817 s390x-gs-linux64-ipa.o to ipa_obj.
1818 * linux-s390-low.c (HWCAP_S390_GS): New define.
1819 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1821 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1822 (s390_arch_setup): Check for guarded-storage support and choose
1824 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1825 init_registers_s390x_gs_linux64.
1826 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1828 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1829 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1831 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1833 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1835 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1837 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1838 (thread_db_thread_handle): Declare.
1839 * linux-low.c (linux_target_ops): Initialize thread_handle.
1840 * server.c (handle_qxfer_threads_worker): Add support for
1842 * target.h (struct target_ops): Add new function pointer,
1844 (target_thread_handle): Define.
1845 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1847 (thread_db_thread_handle): New function.
1849 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1851 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1852 * linux-low.h (thread_db_notice_clone): Declare.
1853 * thread-db.c (thread_db_notice_clone): New function.
1855 2017-09-21 Pedro Alves <palves@redhat.com>
1857 * server.c (gdb_read_memory, handle_status, process_serial_event)
1858 (handle_serial_event, handle_target_event): Adjust to
1859 set_desired_thread prototype change.
1860 * target.c (set_desired_thread): Remove 'use_general' parameter
1862 * target.h (set_desired_thread): Remove 'use_general' parameter.
1864 2017-09-20 Tom Tromey <tom@tromey.com>
1866 * target.c (target_terminal::terminal_state): Define.
1867 (target_terminal::init): Rename from target_terminal_init.
1868 (target_terminal::inferior): Rename from
1869 target_terminal_inferior.
1870 (target_terminal::ours): Rename from target_terminal_ours.
1871 (target_terminal::ours_for_output, target_terminal::info): New.
1873 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1875 * server.c (accumulate_file_name_length): Remove.
1876 (emit_dll_description): Adjust to std::string change.
1877 (handle_qxfer_libraries): Use std::string to hold document.
1879 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1881 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1882 return type of xml_escape_text.
1883 * server.c (emit_dll_description): Likewise.
1885 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1887 * server.c (captured_main): Accept argument for --selftest.
1888 Update run_tests call.
1889 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1890 when registering selftests.
1892 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1894 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1895 instead of "VEC" for "target_desc.reg_defs".
1896 (regcache_cpy): Likewise.
1897 (registers_to_string): Likewise.
1898 (registers_from_string): Likewise.
1899 (find_regno): Likewise.
1900 (supply_regblock): Likewise.
1901 (regcache_raw_read_unsigned): Likewise.
1902 * tdesc.c (init_target_desc): Likewise.
1903 (tdesc_create_reg): Likewise.
1904 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1905 (struct target_desc) <reg_defs>: Convert to "std::vector".
1906 (target_desc): Do not initialize "reg_defs".
1907 (~target_desc): Update code to use "std::vector" instead of "VEC"
1908 for "target_desc.reg_defs".
1909 (operator==): Likewise.
1911 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1913 * inferiors.h (thread_to_gdb_id): Remove.
1914 * inferiors.c (thread_to_gdb_id): Remove.
1915 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1916 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1917 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1919 * nto-low.c (nto_fetch_registers, nto_store_registers,
1920 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1922 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1924 * inferiors.h (gdb_id_to_thread_id): Remove.
1925 * inferiors.c (gdb_id_to_thread_id): Remove.
1926 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1927 removal. Move pid declaration closer to where it's used.
1929 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1931 * server.c (handle_detach): New function.
1932 (process_serial_event): Move code out, call handle_detach.
1934 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1936 * server.c (require_running): Rename to ...
1937 (require_running_or_return): ... this ...
1938 (require_running_or_break): ... and this.
1939 (handle_query, process_serial_event): Adjust.
1941 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1943 * linux-low.c (linux_set_resume_request): Remove unused
1946 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1948 * server.c (first_thread_of): Remove.
1949 (process_serial_event): Replace usage of first_thread_of with
1950 find_any_thread_of_pid.
1951 * tracepoint.c (same_process_p): Remove.
1952 (gdb_agent_about_to_close): Replace usage of same_process_p with
1953 find_any_thread_of_pid.
1954 * linux-x86-low.c (same_process_callback): Remove.
1955 (x86_arch_setup_process_callback): Replace usage of
1956 same_process_callback with find_any_thread_of_pid.
1957 * thread-db.c (any_thread_of): Remove.
1958 (switch_to_process): Replace usage of any_thread_of with
1959 find_any_thread_of_pid.
1960 * inferiors.c (thread_pid_matches_callback): Remove.
1961 (find_thread_process): Adjust to use find_any_thread_of_pid.
1963 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1965 * regcache.c (get_thread_regcache): Guard calls to "memset"
1968 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1970 * linux-low.c (handle_extended_wait): Use
1971 "allocate_target_description" instead of "XNEW".
1972 * linux-x86-low.c (initialize_low_arch): Likewise.
1974 2017-09-05 Yao Qi <yao.qi@linaro.org>
1976 * configure.srv (srv_i386_regobj): Remove.
1977 (srv_amd64_regobj): Remove.
1978 (srv_regobj): Set it to "" for x86 non-linux targets.
1979 * linux-x86-tdesc.c (i386_linux_read_description):
1980 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1981 (init_registers_i386): Remove the declaration.
1982 (tdesc_i386): Remove the declaration.
1983 (lynx_i386_arch_setup): Call i386_create_target_description.
1984 * nto-x86-low.c: Likewise.
1985 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1986 [!__x86_64__]: include arch/i386.h.
1987 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1989 2017-09-05 Yao Qi <yao.qi@linaro.org>
1991 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1992 i386/amd64-XXX-linux from it.
1994 2017-09-05 Yao Qi <yao.qi@linaro.org>
1996 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1998 (ipa_amd64_linux_regobj): Remove.
1999 (ipa_x32_linux_regobj): Remove.
2001 2017-09-05 Yao Qi <yao.qi@linaro.org>
2003 * Makefile.in (arch-amd64.o): New rule.
2004 * configure.srv: Append arch-amd64.o.
2005 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2006 (get_ipa_tdesc): Call amd64_linux_read_description.
2007 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2008 and init_registers_amd64_XXX.
2009 * linux-x86-low.c (x86_linux_read_description): Call
2010 amd64_linux_read_description.
2011 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2012 (initialize_low_arch): Don't call init_registers_x32_XXX and
2013 init_registers_amd64_XXX.
2014 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2015 and tdesc_amd64_XXX.
2016 [__x86_64__] (amd64_tdesc_test): New function.
2017 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2018 and init_registers_amd64_XXX.
2019 * linux-x86-tdesc.c: Include arch/amd64.h.
2020 (xcr0_to_tdesc_idx): New function.
2021 (i386_linux_read_description): New function.
2022 (amd64_get_ipa_tdesc_idx): New function.
2023 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2024 (amd64_get_ipa_tdesc): Declare.
2026 2017-09-05 Yao Qi <yao.qi@linaro.org>
2028 * configure.srv (srv_i386_linux_xmlfiles): Remove
2029 i386/i386-XXX-linux.xml from it.
2031 2017-09-05 Yao Qi <yao.qi@linaro.org>
2033 * configure.srv: Set srv_i386_linux_regobj empty if $development
2035 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2036 initialize_low_tdesc.
2037 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2038 with #if initialize_low_tdesc.
2039 * linux-x86-tdesc-selftest.c: New file.
2040 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2042 2017-09-05 Yao Qi <yao.qi@linaro.org>
2044 * Makefile.in (arch-i386.o): New rule.
2045 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2046 (x86_64-*-linux*): Likewise.
2047 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2048 include arch/i386.h.
2049 (i386_linux_read_description): Remove code and call
2050 i386_create_target_description.
2051 * tdesc.c (allocate_target_description): New function.
2052 * tdesc.h (set_tdesc_architecture): Remove declaration.
2053 (set_tdesc_osabi): Likewise.
2055 2017-09-05 Yao Qi <yao.qi@linaro.org>
2057 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2058 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2059 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2061 * server.c (get_features_xml): Call tdesc_get_features_xml.
2062 * tdesc.c (set_tdesc_architecture): New function.
2063 (set_tdesc_osabi): New function.
2064 (tdesc_get_features_xml): New function.
2065 (tdesc_create_feature): Add an argument.
2066 * tdesc.h (struct target_desc) <features>: New field.
2067 <arch, osabi>: New field.
2068 (~target_desc): xfree features, arch, and osabi.
2069 (target_desc::oerator==): Don't compare .xmltarget.
2070 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2071 (set_tdesc_osabi): Likewise.
2072 (tdesc_get_features_xml): Likewise.
2074 2017-09-05 Yao Qi <yao.qi@linaro.org>
2076 * linux-x86-tdesc.c: Include selftest.h.
2077 (i386_tdesc_test): New function.
2078 (initialize_low_tdesc): Call selftests::register_test.
2079 * tdesc.h: Include regdef.h.
2080 (target_desc): Override operator == and !=.
2082 2017-09-05 Yao Qi <yao.qi@linaro.org>
2084 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2085 (ipa_obj): Likewise.
2086 * linux-i386-ipa.c: Include common/x86-xstate.h
2087 (get_ipa_tdesc): Call i386_linux_read_description.
2088 (initialize_low_tracepoint): Don't call init_registers_XXX
2089 functions, call initialize_low_tdesc instead.
2090 * linux-x86-low.c (x86_linux_read_description): Call
2091 i386_linux_read_description.
2092 (initialize_low_arch): Don't call init_registers_i386_XXX
2093 functions, call initialize_low_tdesc.
2094 * linux-x86-tdesc.c: New file.
2095 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2096 (i386_get_ipa_tdesc_idx): Declare.
2097 (i386_get_ipa_tdesc): Declare.
2098 (initialize_low_tdesc): Declare.
2100 2017-09-05 Yao Qi <yao.qi@linaro.org>
2102 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2105 2017-09-05 Yao Qi <yao.qi@linaro.org>
2107 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2108 * regcache.c (get_thread_regcache): Use VEC_length.
2109 (init_register_cache): Likewise.
2110 (regcache_cpy): Likewise.
2111 (registers_to_string): Iterate reg_defs via VEC_iterate.
2112 (find_regno): Likewise.
2113 (find_register_by_number): Use VEC_index.
2114 (register_size): Call find_register_by_number.
2115 (register_data): Call find_register_by_number.
2116 (supply_regblock): Use VEC_length.
2117 (regcache_raw_read_unsigned): Likewise.
2118 * tdesc.c (init_target_desc): Iterate reg_defs via
2120 (default_description): Update initializer.
2121 (copy_target_description): Don't update field num_registers.
2122 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2123 <num_registers>: Remove.
2125 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2127 * Makefile.in (.SECONDARY): Define target.
2129 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2131 * linux-low.c (linux_wait_1): Adjust.
2132 * server.c (queue_stop_reply_callback): Adjust.
2134 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2136 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2137 QEnvironmentUnset and QEnvironmentReset packets.
2138 (handle_query): Inform remote that QEnvironmentHexEncoded,
2139 QEnvironmentUnset and QEnvironmentReset are supported.
2141 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2143 * inferiors.h (inferior_target_data): Rename to ...
2144 (thread_target_data): ... this.
2145 (inferior_regcache_data): Rename to ...
2146 (thread_regcache_data): ... this.
2147 (set_inferior_regcache_data): Rename to ...
2148 (set_thread_regcache_data): ... this.
2149 * inferiors.c (inferior_target_data): Rename to ...
2150 (thread_target_data): ... this.
2151 (inferior_regcache_data): Rename to ...
2152 (thread_regcache_data): ... this.
2153 (set_inferior_regcache_data): Rename to ...
2154 (set_thread_regcache_data): ... this.
2155 (free_one_thread): Update.
2156 * linux-low.h (get_thread_lwp): Update.
2157 * regcache.c (get_thread_regcache): Update.
2158 (regcache_invalidate_thread): Update.
2159 (free_register_cache_thread): Update.
2160 * win32-i386-low.c (update_debug_registers_callback): Update.
2161 (win32_get_current_dr): Update.
2162 * win32-low.c (thread_rec): Update.
2163 (delete_thread_info): Update.
2164 (continue_one_thread): Update.
2165 (suspend_one_thread): Update.
2167 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2169 * inferiors.c (set_inferior_target_data): Remove.
2170 * inferiors.h (set_inferior_target_data): Remove.
2172 2017-08-18 Yao Qi <yao.qi@linaro.org>
2174 * Makefile.in (OBS): Add selftest.o.
2175 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2176 * configure, config.in: Re-generated.
2177 * server.c: Include common/sefltest.h.
2178 (captured_main): Handle option --selftest.
2180 2017-08-09 Yao Qi <yao.qi@linaro.org>
2182 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2183 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2184 i386-avx-mpx.o and i386-mmx.o.
2185 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2186 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2187 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2188 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2189 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2190 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2191 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2192 i386/amd64-avx-mpx.xml.
2194 2017-08-09 Yao Qi <yao.qi@linaro.org>
2196 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2197 and x32-avx-avx512.o.
2198 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2199 i386/x32-avx-avx512.xml.
2201 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2203 * tracepoint.h (enum class fast_tpoint_collect_result): New
2205 (fast_tracepoint_collecting): Change return type to
2206 fast_tpoint_collect_result.
2207 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2208 * linux-low.h: Include tracepoint.h.
2209 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2210 fast_tpoint_collect_result.
2211 * linux-low.c (handle_tracepoints): Adjust.
2212 (linux_fast_tracepoint_collecting): Change return type to
2213 fast_tpoint_collect_result.
2214 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2215 linux_wait_1, stuck_in_jump_pad_callback,
2216 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2217 proceed_one_lwp): Adjust to type change.
2219 2017-07-10 Yao Qi <yao.qi@linaro.org>
2221 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2223 2017-06-29 Yao Qi <yao.qi@linaro.org>
2225 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2227 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2229 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2231 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2233 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2235 * linux-low.c (linux_create_inferior): Adjust code to access the
2236 environment information via 'gdb_environ' class.
2237 * lynx-low.c (lynx_create_inferior): Likewise.
2238 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2239 (get_environ): Return a pointer to 'our_environ'.
2240 (captured_main): Initialize 'our_environ'.
2241 * server.h (get_environ): Adjust prototype.
2242 * spu-low.c (spu_create_inferior): Adjust code to access the
2243 environment information via 'gdb_environ' class.
2245 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2247 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2248 usage of "register" keyword.
2250 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2252 * configure: Re-generate.
2254 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2256 * configure: Re-generate.
2258 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2260 * Makefile.in (COMPILE.pre): Add "-x c++".
2262 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2264 * fork-child.c: Conditionally include <signal.h>.
2266 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2268 * server.c (handle_general_set): Handle new packet
2269 "QStartupWithShell".
2270 (handle_query): Add "QStartupWithShell" to the list of supported
2272 (gdbserver_usage): Add help text explaining the
2273 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2275 (captured_main): Recognize and act upon the presence of the new
2278 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2279 Pedro Alves <palves@redhat.com>
2281 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2282 * configure: Regenerate.
2283 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2285 (i[34567]86-*-lynxos*): Likewise.
2286 (spu*-*-*): Likewise.
2287 * fork-child.c: New file.
2288 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2290 (linux_ptrace_fun): New function.
2291 (linux_create_inferior): Adjust function prototype to reflect
2292 change on "target.h". Adjust function code to use
2294 (linux_request_interrupt): Delete "signal_pid".
2295 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2296 (lynx_ptrace_fun): New function.
2297 (lynx_create_inferior): Adjust function prototype to reflect
2298 change on "target.h". Adjust function code to use
2300 * nto-low.c (nto_create_inferior): Adjust function prototype and
2301 code to reflect change on "target.h". Update comments.
2302 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2303 "common-terminal.h" and "environ.h".
2304 (terminal_fd): Moved to fork-child.c.
2305 (old_foreground_pgrp): Likewise.
2306 (restore_old_foreground_pgrp): Likewise.
2307 (last_status): Make it global.
2308 (last_ptid): Likewise.
2309 (our_environ): New variable.
2310 (startup_with_shell): Likewise.
2311 (program_name): Likewise.
2312 (program_argv): Rename to...
2313 (program_args): ...this.
2314 (wrapper_argv): New variable.
2315 (start_inferior): Delete function.
2316 (get_exec_wrapper): New function.
2317 (get_exec_file): Likewise.
2318 (get_environ): Likewise.
2319 (prefork_hook): Likewise.
2320 (post_fork_inferior): Likewise.
2321 (postfork_hook): Likewise.
2322 (postfork_child_hook): Likewise.
2323 (handle_v_run): Update code to deal with arguments coming from the
2324 remote host. Update calls from "start_inferior" to
2326 (captured_main): Likewise. Initialize environment variable. Call
2328 * server.h (post_fork_inferior): New prototype.
2329 (get_environ): Likewise.
2330 (last_status): Declare.
2331 (last_ptid): Likewise.
2332 (signal_pid): Likewise.
2333 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2334 (spu_ptrace_fun): New function.
2335 (spu_create_inferior): Adjust function prototype to reflect change
2336 on "target.h". Adjust function code to use "fork_inferior".
2337 * target.c (target_terminal_init): New function.
2338 (target_terminal_inferior): Likewise.
2339 (target_terminal_ours): Likewise.
2340 * target.h: Include <vector>.
2341 (struct target_ops) <create_inferior>: Update prototype.
2342 (create_inferior): Update macro.
2343 * utils.c (gdb_flush_out_err): New function.
2344 * win32-low.c (win32_create_inferior): Adjust function prototype
2345 and code to reflect change on "target.h".
2347 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2349 * inferiors.c (switch_to_thread): New function.
2351 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2353 * Makefile.in (SFILE): Add "common/job-control.c".
2354 (OBS): Add "job-control.o".
2356 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2358 * Makefile: Remove "@host_makefile_frag@".
2360 2017-05-05 Pedro Alves <palves@redhat.com>
2362 * configure: Regenerate.
2364 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2366 * configure: Regenerate.
2368 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2370 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2371 software_single_step change of return type to
2372 std::vector<CORE_ADDR>.
2373 * linux-low.c (install_software_single_step_breakpoints):
2375 * linux-low.h (install_software_single_step_breakpoints):
2378 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2380 * remote-utils.c: Include "gdb_termios.h" instead of
2382 * terminal.h: Delete file.
2384 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2386 * server.c: Include <vector>.
2387 <program_argv, wrapper_argv>: Convert to std::vector.
2388 (start_inferior): Rewrite function to use C++.
2389 (handle_v_run): Likewise. Update code that calculates the argv
2390 based on the vRun packet; use C++.
2391 (captured_main): Likewise.
2393 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2395 * server.c (handle_v_cont): Initialize thread_resume::thread
2398 2017-04-05 Pedro Alves <palves@redhat.com>
2400 * configure: Regenerate.
2402 2017-04-05 Pedro Alves <palves@redhat.com>
2404 * gdbreplay.c (sync_error): Constify.
2405 * linux-x86-low.c (push_opcode): Constify.
2407 2017-04-05 Pedro Alves <palves@redhat.com>
2409 * win32-low.c (get_child_debug_event)
2410 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2411 Report TARGET_WAITKIND_SPURIOUS instead.
2413 2017-04-05 Pedro Alves <palves@redhat.com>
2415 * remote-utils.c (remote_prepare, remote_open): Constify.
2416 * remote-utils.h (remote_prepare, remote_open): Constify.
2417 * server.c (captured_main): Constify 'port' handling.
2419 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2421 * Makefile.in (clean): Clear .deps.
2423 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2425 * .gitignore: Remove generated files, replace with wildcard.
2426 * (clean): Replace removal of generated files with wildcard.
2427 (version.c): Replace with...
2428 (version-generated.c): ...this.
2429 (xml-builtin.c): Replace with...
2430 (xml-builtin-generated.c): ...this.
2431 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2432 (%.c: *regformats*): Replace with...
2433 (%-generated.c: *regformats*): ...this.
2435 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2437 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2438 (xtensa_fill_gregset): Call collect_register_by_name for
2440 (xtensa_store_gregset): Call supply_register_by_name for
2443 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2445 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2446 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2447 (xtensa_store_gregset): Call supply_register for all registers in
2448 a0_regnum..a0_regnum + C0_NREGS range.
2450 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2452 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2453 (ax-ipa.o: ax.c): Remove.
2454 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2455 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2456 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2457 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2458 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2460 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2462 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2463 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2464 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2465 (errors-ipa.o: ../common/errors.c): Remove.
2466 (format-ipa.o: ../common/format.c): Remove.
2467 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2469 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2471 * Makefile.in (%-ipa.o: %.c): New rule.
2472 (tracepoint-ipa.o: tracepoint.c): Remove.
2473 (utils-ipa.o: utils.c): Remove.
2474 (remote-utils-ipa.o: remote-utils.c): Remove.
2475 (regcache-ipa.o: regcache.c): Remove.
2476 (i386-linux-ipa.o: i386-linux.c): Remove.
2477 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2478 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2479 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2480 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2481 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2482 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2483 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2484 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2485 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2486 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2487 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2488 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2489 (aarch64-ipa.o: aarch64.c): Remove.
2490 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2491 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2492 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2493 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2494 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2495 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2496 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2497 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2498 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2499 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2500 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2501 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2502 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2503 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2504 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2505 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2506 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2507 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2508 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2509 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2510 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2511 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2512 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2513 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2514 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2515 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2516 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2517 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2518 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2519 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2520 (tdesc-ipa.o: tdesc.c): Remove.
2521 (x32-linux-ipa.o: x32-linux.c): Remove.
2522 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2523 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2525 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2527 * Makefile.in (%.o: ../arch/%.c): New rule.
2528 (arm.o: ../arch/arm.c): Remove.
2529 (arm-linux.o: ../arch/arm-linux.c): Remove.
2530 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2531 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2533 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2535 * Makefile.in (%.o: ../nat/%.c): New rule.
2536 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2537 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2538 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2539 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2540 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2541 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2542 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2543 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2544 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2545 (linux-personality.o: ../nat/linux-personality.c): Remove.
2546 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2547 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2548 (x86-linux.o: ../nat/x86-linux.c): Remove.
2549 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2550 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2552 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2554 * Makefile.in (%.o: ../common/%.c): New rule.
2555 (signals.o: ../common/signals.c): Remove.
2556 (print-utils.o: ../common/print-utils.c): Remove.
2557 (rsp-low.o: ../common/rsp-low.c): Remove.
2558 (common-utils.o: ../common/common-utils.c): Remove.
2559 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2560 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2561 (vec.o: ../common/vec.c): Remove.
2562 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2563 (xml-utils.o: ../common/xml-utils.c): Remove.
2564 (ptid.o: ../common/ptid.c): Remove.
2565 (buffer.o: ../common/buffer.c): Remove.
2566 (format.o: ../common/format.c): Remove.
2567 (filestuff.o: ../common/filestuff.c): Remove.
2568 (agent.o: ../common/agent.c): Remove.
2569 (errors.o: ../common/errors.c): Remove.
2570 (environ.o: ../common/environ.c): Remove.
2571 (common-debug.o: ../common/common-debug.c): Remove.
2572 (cleanups.o: ../common/cleanups.c): Remove.
2573 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2574 (fileio.o: ../common/fileio.c): Remove.
2575 (common-regcache.o: ../common/common-regcache.c): Remove.
2576 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2577 (new-op.o: ../common/new-op.c): Remove.
2578 (btrace-common.o: ../common/btrace-common.c): Remove.
2580 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2582 * Makefile.in (%.o: ../target/%.c): New rule.
2583 (waitstatus.o: ../target/waitstatus.c): Remove.
2585 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2588 (%.c: ../regformats/%.dat,
2589 (%.c: ../regformats/arm/%.dat,
2590 (%.c: ../regformats/i386/%.dat,
2591 (%.c: ../regformats/rs6000/%.dat): New rules.
2592 (aarch64.c): Remove.
2593 (reg-arm.c): Remove.
2594 (arm-with-iwmmxt.c): Remove.
2595 (arm-with-vfpv2.c): Remove.
2596 (arm-with-vfpv3.c): Remove.
2597 (arm-with-neon.c): Remove.
2598 (reg-bfin.c): Remove.
2599 (reg-cris.c): Remove.
2600 (reg-crisv32.c): Remove.
2602 (i386-linux.c): Remove.
2603 (i386-avx.c): Remove.
2604 (i386-avx-linux.c): Remove.
2605 (i386-avx-avx512.c): Remove.
2606 (i386-avx-avx512-linux.c): Remove.
2607 (i386-mpx.c): Remove.
2608 (i386-mpx-linux.c): Remove.
2609 (i386-avx-mpx-avx512-pku.c): Remove.
2610 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2611 (i386-avx-mpx.c): Remove.
2612 (i386-avx-mpx-linux.c): Remove.
2613 (i386-mmx.c): Remove.
2614 (i386-mmx-linux.c): Remove.
2615 (reg-ia64.c): Remove.
2616 (reg-m32r.c): Remove.
2617 (reg-m68k.c): Remove.
2619 (mips-linux.c): Remove.
2620 (mips-dsp-linux.c): Remove.
2621 (mips64-linux.c): Remove.
2622 (mips64-dsp-linux.c): Remove.
2623 (nios2-linux.c): Remove.
2624 (powerpc-32.c): Remove.
2625 (powerpc-32l.c): Remove.
2626 (powerpc-altivec32l.c): Remove.
2627 (powerpc-cell32l.c): Remove.
2628 (powerpc-vsx32l.c): Remove.
2629 (powerpc-isa205-32l.c): Remove.
2630 (powerpc-isa205-altivec32l.c): Remove.
2631 (powerpc-isa205-vsx32l.c): Remove.
2632 (powerpc-e500l.c): Remove.
2633 (powerpc-64l.c): Remove.
2634 (powerpc-altivec64l.c): Remove.
2635 (powerpc-cell64l.c): Remove.
2636 (powerpc-vsx64l.c): Remove.
2637 (powerpc-isa205-64l.c): Remove.
2638 (powerpc-isa205-altivec64l.c): Remove.
2639 (powerpc-isa205-vsx64l.c): Remove.
2640 (s390-linux32.c): Remove.
2641 (s390-linux32v1.c): Remove.
2642 (s390-linux32v2.c): Remove.
2643 (s390-linux64.c): Remove.
2644 (s390-linux64v1.c): Remove.
2645 (s390-linux64v2.c): Remove.
2646 (s390-te-linux64.c): Remove.
2647 (s390-vx-linux64.c): Remove.
2648 (s390-tevx-linux64.c): Remove.
2649 (s390x-linux64.c): Remove.
2650 (s390x-linux64v1.c): Remove.
2651 (s390x-linux64v2.c): Remove.
2652 (s390x-te-linux64.c): Remove.
2653 (s390x-vx-linux64.c): Remove.
2654 (s390x-tevx-linux64.c): Remove.
2655 (tic6x-c64xp-linux.c): Remove.
2656 (tic6x-c64x-linux.c): Remove.
2657 (tic6x-c62x-linux.c): Remove.
2659 (reg-sparc64.c): Remove.
2660 (reg-spu.c): Remove.
2662 (amd64-linux.c): Remove.
2663 (amd64-avx.c): Remove.
2664 (amd64-avx-linux.c): Remove.
2665 (amd64-avx-avx512.c): Remove.
2666 (amd64-avx-avx512-linux.c): Remove.
2667 (amd64-mpx.c): Remove.
2668 (amd64-mpx-linux.c): Remove.
2669 (amd64-avx-mpx-avx512-pku.c): Remove.
2670 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2671 (amd64-avx-mpx.c): Remove.
2672 (amd64-avx-mpx-linux.c): Remove.
2674 (x32-linux.c): Remove.
2675 (x32-avx.c): Remove.
2676 (x32-avx-linux.c): Remove.
2677 (x32-avx-avx512.c): Remove.
2678 (x32-avx-avx512-linux.c): Remove.
2679 (reg-xtensa.c): Remove.
2680 (reg-tilegx.c): Remove.
2681 (reg-tilegx32.c): Remove.
2683 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2685 * Makefile.in (SFILES): Add "common/environ.c".
2686 (OBJS): Add "common/environ.h".
2688 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2690 * configure.ac: Check if the fs_base and gs_base members of
2691 `struct user_regs_struct' exist.
2692 * config.in: Regenerated.
2693 * configure: Likewise.
2695 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2697 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2699 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2700 (get_next_pcs_syscall_next_pc): Likewise.
2702 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2704 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2705 * nto-x86-low.c: Likewise.
2707 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2709 * Makefile.in: Include disable-implicit-rules.mk.
2711 2016-11-23 Pedro Alves <palves@redhat.com>
2713 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2714 (debug_vprintf): Use std::chrono::steady_clock instead of
2715 gettimeofday. Use '.' instead of ':'.
2716 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2717 (get_timestamp): Use std::chrono::steady_clock instead of
2720 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2722 * Makefile.in: Fix whitespace formatting.
2724 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2726 * Makefile.in (SFILES, OBS): Flatten list and order
2729 2016-11-23 Pedro Alves <palves@redhat.com>
2731 * event-loop.c (handle_file_event): Use warning.
2732 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2733 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2736 2016-11-23 Pedro Alves <palves@redhat.com>
2738 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2740 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2741 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2742 debug_printf and debug_flush for debug output.
2743 * server.c (handle_general_set): Likewise.
2744 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2747 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2749 * Makefile.in (.c.o): Replace rule with ...
2750 (%.o: %.c): ... this one.
2752 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2754 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2755 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2757 * configure.ac: Remove checks for the make program.
2758 * configure: Re-generate.
2760 2016-10-28 Pedro Alves <palves@redhat.com>
2762 * Makefile.in (CXX_DIALECT): Get from configure.
2763 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2764 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2765 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2766 * config.in: Regenerate.
2767 * configure: Regenerate.
2769 2016-10-27 Yao Qi <yao.qi@linaro.org>
2771 * linux-low.c (linux_supports_range_stepping): Return true if
2772 can_software_single_step return true.
2774 2016-10-27 Yao Qi <yao.qi@linaro.org>
2776 * inferiors.c (find_inferior_in_random): New function.
2777 * inferiors.h (find_inferior_in_random): Declare.
2778 * linux-low.c (linux_wait_for_event_filtered): Call
2779 find_inferior_in_random instead of find_inferior.
2781 2016-10-27 Yao Qi <yao.qi@linaro.org>
2783 * linux-low.c (linux_wait_1): If single-step breakpoints are
2784 inserted, remove them.
2786 2016-10-26 Pedro Alves <palves@redhat.com>
2788 * linux-low.c (handle_extended_wait): Link parent/child fork
2790 (linux_wait_1): Unlink them.
2791 (linux_set_resume_request): Ignore resume requests for
2792 already-resumed and unhandled fork child threads.
2793 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2794 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2796 (handle_v_requests) <vCont>: Don't call require_running.
2797 * server.h (in_queued_stop_replies): New declaration.
2799 2016-10-24 Yao Qi <yao.qi@linaro.org>
2802 * linux-aarch64-low.c (append_insns): Cast the return value to
2805 2016-10-10 Yao Qi <yao.qi@linaro.org>
2807 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2809 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2811 * target.c (target_supports_multi_process): New function, moved
2813 * target.h (target_supports_multi_process): ... here. Remove
2816 2016-10-05 Tom Tromey <tom@tromey.com>
2819 * tracepoint.c (handle_tracepoint_bkpts): Check
2820 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2822 2016-10-05 Yao Qi <yao.qi@linaro.org>
2824 * configure.srv: Update the path of arm-*.xml files.
2826 2016-10-05 Terry Guo <terry.guo@arm.com>
2827 Yao Qi <yao.qi@linaro.org>
2829 * Makefile.in: Adjust the path of rules.
2830 * configure.srv: Update the path of xml files.
2831 * regformats/arm-with-iwmmxt.dat: Regenerated.
2832 * regformats/arm-with-neon.dat: Likewise.
2833 * regformats/arm-with-vfpv2.dat: Likewise.
2834 * regformats/arm-with-vfpv3.dat Likewise.
2836 2016-09-30 Yao Qi <yao.qi@linaro.org>
2839 * target.c (target_stop_and_wait): Don't call
2840 target_continue_no_signal, use resume_stop instead.
2842 2016-09-26 Yao Qi <yao.qi@linaro.org>
2844 * linux-low.c (linux_wait_1): Call debug_exit.
2846 2016-09-23 Pedro Alves <palves@redhat.com>
2848 * Makefile.in (SFILES): Add common/new-op.c.
2849 (OBS): Add common/new-op.o.
2850 (new-op.o): New rule.
2852 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2854 * .gitinore: Ignore more files.
2856 2016-09-21 Yao Qi <yao.qi@linaro.org>
2858 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2861 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2863 * server.c (start_inferior): Call target_mourn_inferior instead of
2864 mourn_inferior; pass ptid_t argument to it.
2866 (handle_target_event): Likewise.
2867 * target.c (target_mourn_inferior): New function.
2868 * target.h (mourn_inferior): Delete macro.
2870 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2872 * linux-low.c (lwp_is_stepping): New function.
2874 2016-09-06 Carl Love <cel@us.ibm.com>
2876 * server.c (start_inferior): Fixed comment, requested comment change
2877 didn't get updated correctly. Removed reference to ptrace () call as
2878 it is only true on Linux systems.
2880 2016-09-06 Carl Love <cel@us.ibm.com>
2882 * server.c (start_inferior): Do not call
2883 function target_post_create_inferior () if the
2884 inferior process has already exited.
2886 2016-09-05 Pedro Alves <palves@redhat.com>
2888 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2889 (COMPILE.pre, CC_LD): Use CXX directly.
2890 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2891 * acinclude.m4: Don't include build-with-cxx.m4.
2892 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2893 * configure: Regenerate.
2895 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2898 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2899 call writing data to own_buf.
2901 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2903 * target.c (mywait): Call target_wait instead of
2905 (target_wait): New function.
2907 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2909 * server.c (start_inferior): New variable 'ptid'. Replace calls
2910 to the_target->resume by target_continue{,_no_signal}, depending
2912 * target.c (target_stop_and_wait): Call target_continue_no_signal
2913 instead of the_target->resume.
2914 (target_continue): New function.
2916 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2918 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2920 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2923 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2925 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2926 * linux-arm-low.c (ps_get_thread_area): Likewise.
2927 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2928 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2929 * linux-mips-low.c (ps_get_thread_area): Likewise.
2930 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2931 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2932 * linux-x86-low.c (ps_get_thread_area): Likewise.
2933 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2935 2016-08-19 Pedro Alves <palves@redhat.com>
2937 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2939 2016-08-19 Pedro Alves <palves@redhat.com>
2941 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2942 comment. Use memcpy instead of casting through unsigned long.
2944 2016-08-19 Pedro Alves <palves@redhat.com>
2946 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2947 allocating around 0x80000000.
2949 2016-08-19 Pedro Alves <palves@redhat.com>
2952 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2953 (x32-avx512-linux-ipa.o): New rules.
2954 * configure.ac (x86_64-*-linux*): New x32 check.
2955 * configure.srv (ipa_x32_linux_regobj): New.
2956 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2957 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2959 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2961 * configure: Regenerate.
2963 2016-08-09 Pedro Alves <palves@redhat.com>
2966 * Makefile.in (OBS): Add signals-state-save-restore.o.
2967 (signals-state-save-restore.o): New rule.
2968 * config.in: Regenerate.
2969 * configure: Regenerate.
2970 * linux-low.c: Include "signals-state-save-restore.h".
2971 (linux_create_inferior): Call
2972 restore_original_signals_state.
2973 * server.c: Include "dispositions-save-restore.h".
2974 (captured_main): Call save_original_signals_state.
2976 2016-08-05 Pedro Alves <palves@redhat.com>
2978 * configure: Regenerate.
2980 2016-08-04 Yao Qi <yao.qi@linaro.org>
2982 * linux-low.c (regsets_fetch_inferior_registers): Check
2983 errno is ESRCH or not.
2985 2016-08-02 Yao Qi <yao.qi@linaro.org>
2987 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2988 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2989 (thread_db_load_search): Update.
2990 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2991 td_ta_set_event and td_ta_event_getmsg.
2993 2016-07-26 Pedro Alves <palves@redhat.com>
2996 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2997 of unsigned long for 64-bit registers and use uint32_t instead of
2998 unsigned int for 32-bit registers.
3000 2016-07-26 Pedro Alves <palves@redhat.com>
3002 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3005 2016-07-21 Tom Tromey <tom@tromey.com>
3007 * configure: Rebuild.
3009 2016-07-21 Yao Qi <yao.qi@linaro.org>
3011 * mem-break.c (find_gdb_breakpoint): Cast bp to
3012 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3014 2016-07-21 Yao Qi <yao.qi@linaro.org>
3016 * server.c (handle_v_requests): Support s and S actions
3017 if target_supports_software_single_step return true.
3019 2016-07-21 Yao Qi <yao.qi@linaro.org>
3021 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3022 is resume_step, call maybe_hw_step.
3023 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3025 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3027 (proceed_one_lwp): If resume request is resume_step, install
3028 reinsert breakpoints and call maybe_hw_step.
3030 2016-07-21 Yao Qi <yao.qi@linaro.org>
3032 * linux-low.c (proceed_one_lwp): Declare.
3033 (linux_resume_one_thread): Remove local variable 'step'.
3034 Lift code enqueue signal. Call proceed_one_lwp instead of
3035 linux_resume_one_lwp.
3037 2016-07-21 Yao Qi <yao.qi@linaro.org>
3039 * linux-low.c (linux_resume_one_thread): Call
3040 enqueue_pending_signal.
3042 2016-07-21 Yao Qi <yao.qi@linaro.org>
3044 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3045 * inferiors.c (do_restore_current_thread_cleanup): New function.
3046 (make_cleanup_restore_current_thread): Likewise.
3047 * linux-low.c (install_software_single_step_breakpoints): Call
3048 make_cleanup_restore_current_thread. Switch current_thread to
3051 2016-07-21 Yao Qi <yao.qi@linaro.org>
3053 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3054 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3055 (clone_one_breakpoint): Likewise.
3056 (delete_reinsert_breakpoints): Change parameter to thread.
3058 (has_reinsert_breakpoints): Likewise.
3059 (uninsert_reinsert_breakpoints): Likewise.
3060 (reinsert_reinsert_breakpoints): Likewise.
3061 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3062 (delete_reinsert_breakpoints): Likewise.
3063 (reinsert_reinsert_breakpoints): Likewise.
3064 (uninsert_reinsert_breakpoints): Likewise.
3065 (has_reinsert_breakpoints): Likewise.
3067 2016-07-21 Yao Qi <yao.qi@linaro.org>
3069 * inferiors.c (get_thread_process): Make parameter const.
3070 * inferiors.h (get_thread_process): Update declaration.
3071 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3072 Add new parameters child_thread and parent_thread. Callers
3074 * mem-break.h (clone_all_breakpoints): Update declaration.
3076 2016-07-21 Yao Qi <yao.qi@linaro.org>
3078 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3079 <command_list, handler>: Remove.
3080 (struct gdb_breakpoint): New.
3081 (struct other_breakpoint): New.
3082 (struct reinsert_breakpoint): New.
3083 (is_gdb_breakpoint): New function.
3084 (any_persistent_commands): Update command_list if
3085 is_gdb_breakpoint returns true.
3086 (set_breakpoint): Create breakpoints according to their types.
3087 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3088 (set_gdb_breakpoint_1): Likewise.
3089 (set_gdb_breakpoint): Likewise.
3090 (clear_breakpoint_conditions): Change parameter type to
3091 'struct gdb_breakpoint *'.
3092 (clear_breakpoint_commands): Likewise.
3093 (clear_breakpoint_conditions_and_commands): Likewise.
3094 (add_condition_to_breakpoint): Likewise.
3095 (add_breakpoint_condition): Likewise.
3096 (add_commands_to_breakpoint): Likewise.
3097 (check_breakpoints): Check other_breakpoint.
3098 (clone_one_breakpoint): Clone breakpopint according to its type.
3099 * mem-break.h (struct gdb_breakpoint): Declare.
3100 (set_gdb_breakpoint): Update declaration.
3101 (clear_breakpoint_conditions_and_commands): Likewise.
3102 (add_breakpoint_condition): Likewise.
3103 (add_breakpoint_commands): Likewise.
3104 * server.c (process_point_options): Change parameter type to
3105 'struct gdb_breakpoint *'.
3107 2016-07-21 Yao Qi <yao.qi@linaro.org>
3109 * mem-break.c (set_breakpoint_at): Rename it to ...
3110 (set_breakpoint_type_at): ... it.
3111 (set_breakpoint_at): Call set_breakpoint_type_at.
3112 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3113 * mem-break.h (set_breakpoint_at): Update comments.
3115 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3117 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3119 (nios2_store_gregset): Likewise.
3121 2016-07-01 Pedro Alves <palves@redhat.com>
3122 Antoine Tremblay <antoine.tremblay@ericsson.com>
3124 * linux-low.c: Change interface to take the target lwp_info
3125 pointer directly and return void. Handle detaching from a zombie
3127 (linux_detach_lwp_callback): New function.
3128 (linux_detach): Detach from the leader thread after detaching from
3131 2016-06-28 Yao Qi <yao.qi@linaro.org>
3133 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3134 for variable new_offset.
3135 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3136 (aarch64_ftrace_insn_reloc_cb): Likewise.
3137 (aarch64_ftrace_insn_reloc_tb): Likewise.
3138 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3139 PRIx64 instead of PRIx32.
3141 2016-06-28 Yao Qi <yao.qi@linaro.org>
3143 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3144 (the_low_target): Install arm_get_syscall_trapinfo.
3146 2016-06-28 Yao Qi <yao.qi@linaro.org>
3148 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3150 (the_low_target): Install aarch64_get_syscall_trapinfo.
3152 2016-06-28 Yao Qi <yao.qi@linaro.org>
3154 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3156 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3157 Remove parameter sysno.
3158 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3161 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3163 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3164 (s390_emit_ne_goto): Likewise.
3165 (s390_emit_lt_goto): Likewise.
3166 (s390_emit_le_goto): Likewise.
3167 (s390_emit_gt_goto): Likewise.
3168 (s390_emit_ge_goto): Likewise.
3169 (s390x_emit_eq_goto): Likewise.
3170 (s390x_emit_ne_goto): Likewise.
3171 (s390x_emit_lt_goto): Likewise.
3172 (s390x_emit_le_goto): Likewise.
3173 (s390x_emit_gt_goto): Likewise.
3174 (s390x_emit_ge_goto): Likewise.
3175 (s390_emit_ops_impl): Mark variable static.
3176 (s390x_emit_ops): Likewise.
3178 2016-06-17 Yao Qi <yao.qi@linaro.org>
3180 * linux-low.c (handle_extended_wait): Call
3181 uninsert_reinsert_breakpoints for the parent process. Remove
3182 reinsert breakpoints from the child process. Reinsert them to
3183 the parent process when vfork is done.
3184 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3185 (reinsert_reinsert_breakpoints): New function.
3186 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3187 (reinsert_reinsert_breakpoints): Declare.
3189 2016-06-17 Yao Qi <yao.qi@linaro.org>
3191 * linux-low.c (handle_extended_wait): If the parent is doing
3192 step-over, remove the reinsert breakpoints from the forked child.
3194 2016-06-17 Yao Qi <yao.qi@linaro.org>
3196 * linux-low.c (unsuspend_all_lwps): Declare.
3197 (linux_low_filter_event): If thread exited, call finish_step_over.
3198 If step-over is finished, unsuspend other threads.
3200 2016-06-17 Yao Qi <yao.qi@linaro.org>
3202 * linux-low.c (linux_resume_one_lwp_throw): Assert
3203 has_reinsert_breakpoints returns false.
3204 * mem-break.c (delete_disabled_breakpoints): Assert
3205 bp type isn't reinsert_breakpoint.
3207 2016-06-17 Yao Qi <yao.qi@linaro.org>
3209 * linux-low.c (maybe_hw_step): New function.
3210 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3211 (finish_step_over): Switch current_thread to lwp temporarily,
3212 and assert has_reinsert_breakpoints returns true.
3213 (proceed_one_lwp): Call maybe_hw_step.
3214 * mem-break.c (has_reinsert_breakpoints): New function.
3215 * mem-break.h (has_reinsert_breakpoints): Declare.
3217 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3219 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3221 2016-05-17 Yao Qi <yao.qi@linaro.org>
3223 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3224 instead of find_inferior.
3226 2016-05-05 Yao Qi <yao.qi@linaro.org>
3228 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3229 Initialize res to zero.
3231 2016-05-05 Yao Qi <yao.qi@linaro.org>
3233 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3236 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3238 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3239 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3240 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3242 2016-04-28 Par Olsson <par.olsson@windriver.com>
3243 Simon Marchi <simon.marchi@ericsson.com>
3245 * tracepoint.c (write_inferior_int8): New function.
3246 (cmd_qtenable_disable): Write enable flag using
3247 write_inferior_int8.
3249 2016-04-25 Yao Qi <yao.qi@linaro.org>
3251 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3252 (need_step_over_p): Return zero if the LWP has pending signals
3253 can be delivered on software single step target.
3255 2016-04-25 Yao Qi <yao.qi@linaro.org>
3257 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3258 return instead of error.
3260 2016-04-22 Yao Qi <yao.qi@linaro.org>
3262 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3265 2016-04-22 Yao Qi <yao.qi@linaro.org>
3267 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3268 signal when stepping over breakpoint with software single
3271 2016-04-21 Pedro Alves <palves@redhat.com>
3273 * linux-s390-low.c (s390_collect_ptrace_register)
3274 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3276 (s390_check_regset): Use void * instead of gdb_byte *.
3278 2016-04-20 Pedro Alves <palves@redhat.com>
3280 * configure: Renegerate.
3282 2016-04-20 Yao Qi <yao.qi@linaro.org>
3284 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3285 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3287 (arm_store_gregset): Likewise.
3289 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3291 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3292 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3293 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3294 (amd64-avx-mpx-linux.c): New rules.
3295 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3296 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3297 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3298 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3299 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3300 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3301 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3302 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3303 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3304 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3305 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3306 * linux-x86-low.c (x86_linux_read_description): Add case for
3307 X86_XSTATE_AVX_MPX_MASK.
3308 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3309 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3310 init_registers_i386_avx_mpx_linux.
3311 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3312 (initialize_low_tracepoint): Call
3313 init_registers_i386_avx_mpx_linux.
3314 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3315 (initialize_low_tracepoint): Call
3316 init_registers_amd64_avx_mpx_linux.
3317 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3318 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3319 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3322 2016-04-18 Pedro Alves <palves@redhat.com>
3324 * configure: Regenerate.
3326 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3328 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3329 (aarch64_emit_sub): Likewise.
3331 2016-04-12 Pedro Alves <palves@redhat.com>
3333 * utils.c (prepare_to_throw_exception): Delete.
3335 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3337 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3339 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3341 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3343 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3345 * linux-aarch64-ipa.c: Add <elf.h> include.
3346 * linux-ppc-ipa.c: Add <elf.h> include.
3347 * linux-s390-ipa.c: Add <elf.h> include.
3349 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3351 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3352 (get_raw_reg_ptr): Likewise.
3353 (get_trace_state_variable_value_ptr): Likewise.
3354 (set_trace_state_variable_value_ptr): Likewise.
3355 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3358 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3359 Marcin Kościelnicki <koriakin@0x04.net>
3362 * linux-ppc-low.c (emit_insns): New function.
3363 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3364 (ppc_emit_prologue): New function.
3365 (ppc_emit_epilogue): New function.
3366 (ppc_emit_add): New function.
3367 (ppc_emit_sub): New function.
3368 (ppc_emit_mul): New function.
3369 (ppc_emit_lsh): New function.
3370 (ppc_emit_rsh_signed): New function.
3371 (ppc_emit_rsh_unsigned): New function.
3372 (ppc_emit_ext): New function.
3373 (ppc_emit_zero_ext): New function.
3374 (ppc_emit_log_not): New function.
3375 (ppc_emit_bit_and): New function.
3376 (ppc_emit_bit_or): New function.
3377 (ppc_emit_bit_xor): New function.
3378 (ppc_emit_bit_not): New function.
3379 (ppc_emit_equal): New function.
3380 (ppc_emit_less_signed): New function.
3381 (ppc_emit_less_unsigned): New function.
3382 (ppc_emit_ref): New function.
3383 (ppc_emit_const): New function.
3384 (ppc_emit_reg): New function.
3385 (ppc_emit_pop): New function.
3386 (ppc_emit_stack_flush): New function.
3387 (ppc_emit_swap): New function.
3388 (ppc_emit_stack_adjust): New function.
3389 (ppc_emit_call): New function.
3390 (ppc_emit_int_call_1): New function.
3391 (ppc_emit_void_call_2): New function.
3392 (ppc_emit_if_goto): New function.
3393 (ppc_emit_goto): New function.
3394 (ppc_emit_eq_goto): New function.
3395 (ppc_emit_ne_goto): New function.
3396 (ppc_emit_lt_goto): New function.
3397 (ppc_emit_le_goto): New function.
3398 (ppc_emit_gt_goto): New function.
3399 (ppc_emit_ge_goto): New function.
3400 (ppc_write_goto_address): New function.
3401 (ppc_emit_ops_impl): New static variable.
3402 (ppc64v1_emit_prologue): New function.
3403 (ppc64v2_emit_prologue): New function.
3404 (ppc64_emit_epilogue): New function.
3405 (ppc64_emit_add): New function.
3406 (ppc64_emit_sub): New function.
3407 (ppc64_emit_mul): New function.
3408 (ppc64_emit_lsh): New function.
3409 (ppc64_emit_rsh_signed): New function.
3410 (ppc64_emit_rsh_unsigned): New function.
3411 (ppc64_emit_ext): New function.
3412 (ppc64_emit_zero_ext): New function.
3413 (ppc64_emit_log_not): New function.
3414 (ppc64_emit_bit_and): New function.
3415 (ppc64_emit_bit_or): New function.
3416 (ppc64_emit_bit_xor): New function.
3417 (ppc64_emit_bit_not): New function.
3418 (ppc64_emit_equal): New function.
3419 (ppc64_emit_less_signed): New function.
3420 (ppc64_emit_less_unsigned): New function.
3421 (ppc64_emit_ref): New function.
3422 (ppc64_emit_const): New function.
3423 (ppc64v1_emit_reg): New function.
3424 (ppc64v2_emit_reg): New function.
3425 (ppc64_emit_pop): New function.
3426 (ppc64_emit_stack_flush): New function.
3427 (ppc64_emit_swap): New function.
3428 (ppc64v1_emit_call): New function.
3429 (ppc64v2_emit_call): New function.
3430 (ppc64v1_emit_int_call_1): New function.
3431 (ppc64v2_emit_int_call_1): New function.
3432 (ppc64v1_emit_void_call_2): New function.
3433 (ppc64v2_emit_void_call_2): New function.
3434 (ppc64_emit_if_goto): New function.
3435 (ppc64_emit_eq_goto): New function.
3436 (ppc64_emit_ne_goto): New function.
3437 (ppc64_emit_lt_goto): New function.
3438 (ppc64_emit_le_goto): New function.
3439 (ppc64_emit_gt_goto): New function.
3440 (ppc64_emit_ge_goto): New function.
3441 (ppc64v1_emit_ops_impl): New static variable.
3442 (ppc64v2_emit_ops_impl): New static variable.
3443 (ppc_emit_ops): New function.
3444 (linux_low_target): Wire in ppc_emit_ops.
3446 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3447 Marcin Kościelnicki <koriakin@0x04.net>
3450 * Makefile.in: Add powerpc-*-ipa.o
3451 * configure.srv: Add ipa_obj for powerpc*-linux.
3452 * linux-ppc-ipa.c: New file.
3453 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3455 (PPC_FIELD): New macro.
3456 (PPC_SEXT): New macro.
3457 (PPC_OP6): New macro.
3458 (PPC_BO): New macro.
3459 (PPC_LI): New macro.
3460 (PPC_BD): New macro.
3461 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3462 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3463 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3464 (ppc_get_thread_area): New function.
3465 (is_elfv2_inferior): New function.
3466 (gen_ds_form): New function.
3467 (GEN_STD): New macro.
3468 (GEN_STDU): New macro.
3469 (GEN_LD): New macro.
3470 (GEN_LDU): New macro.
3471 (gen_d_form): New function.
3472 (GEN_ADDI): New macro.
3473 (GEN_ADDIS): New macro.
3474 (GEN_LI): New macro.
3475 (GEN_LIS): New macro.
3476 (GEN_ORI): New macro.
3477 (GEN_ORIS): New macro.
3478 (GEN_LWZ): New macro.
3479 (GEN_STW): New macro.
3480 (GEN_STWU): New macro.
3481 (gen_xfx_form): New function.
3482 (GEN_MFSPR): New macro.
3483 (GEN_MTSPR): New macro.
3484 (GEN_MFCR): New macro.
3485 (GEN_MTCR): New macro.
3486 (GEN_SYNC): New macro.
3487 (GEN_LWSYNC): New macro.
3488 (gen_x_form): New function.
3489 (GEN_OR): New macro.
3490 (GEN_MR): New macro.
3491 (GEN_LWARX): New macro.
3492 (GEN_STWCX): New macro.
3493 (GEN_CMPW): New macro.
3494 (gen_md_form): New function.
3495 (GEN_RLDICL): New macro.
3496 (GEN_RLDICR): New macro.
3497 (gen_i_form): New function.
3499 (GEN_BL): New macro.
3500 (gen_b_form): New function.
3501 (GEN_BNE): New macro.
3502 (GEN_LOAD): New macro.
3503 (GEN_STORE): New macro.
3504 (gen_limm): New function.
3505 (gen_atomic_xchg): New function.
3506 (gen_call): New function.
3507 (ppc_relocate_instruction): New function.
3508 (ppc_install_fast_tracepoint_jump_pad): New function.
3509 (ppc_get_min_fast_tracepoint_insn_len): New function.
3510 (ppc_get_ipa_tdesc_idx): New function.
3511 (the_low_target): Wire in the new functions.
3512 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3514 * linux-ppc-tdesc.h: New file.
3516 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3518 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3519 (alloc_jump_pad_buffer): New function.
3520 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3521 (alloc_jump_pad_buffer): New function.
3522 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3523 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3524 (alloc_jump_pad_buffer): New function.
3525 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3526 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3527 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3528 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3530 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3532 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3533 * linux-amd64-ipa.c: Likewise.
3534 * linux-i386-ipa.c: Likewise.
3535 * linux-s390-ipa.c: Likewise.
3536 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3537 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3538 set_trace_state_variable_value_ptr.
3539 (struct ipa_sym_addresses): Likewise.
3540 (symbol_list): Likewise.
3541 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3542 accessing gdb_collect directly.
3543 (gdb_collect_ptr_type): New typedef.
3544 (get_raw_reg_ptr_type): New typedef.
3545 (get_trace_state_variable_value_ptr_type): New typedef.
3546 (set_trace_state_variable_value_ptr_type): New typedef.
3547 (gdb_collect_ptr): New global.
3548 (get_raw_reg_ptr): New global.
3549 (get_trace_state_variable_value_ptr): New global.
3550 (set_trace_state_variable_value_ptr): New global.
3551 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3552 accessing get_raw_reg directly.
3553 (get_get_tsv_func_addr): Likewise for
3554 get_trace_state_variable_value_ptr.
3555 (get_set_tsv_func_addr): Likewise for
3556 set_trace_state_variable_value_ptr.
3557 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3559 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3561 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3563 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3565 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3567 (relocate_instruction): Remove own_buf.
3568 * server.c (own_buf): Make global.
3569 (handle_v_requests): Make global.
3570 * server.h (own_buf): New declaration.
3571 (handle_v_requests): New prototype.
3573 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3576 * linux-s390-low.c (add_insns): New function.
3577 (s390_emit_prologue): New function.
3578 (s390_emit_epilogue): New function.
3579 (s390_emit_add): New function.
3580 (s390_emit_sub): New function.
3581 (s390_emit_mul): New function.
3582 (s390_emit_lsh): New function.
3583 (s390_emit_rsh_signed): New function.
3584 (s390_emit_rsh_unsigned): New function.
3585 (s390_emit_ext): New function.
3586 (s390_emit_log_not): New function.
3587 (s390_emit_bit_and): New function.
3588 (s390_emit_bit_or): New function.
3589 (s390_emit_bit_xor): New function.
3590 (s390_emit_bit_not): New function.
3591 (s390_emit_equal): New function.
3592 (s390_emit_less_signed): New function.
3593 (s390_emit_less_unsigned): New function.
3594 (s390_emit_ref): New function.
3595 (s390_emit_if_goto): New function.
3596 (s390_emit_goto): New function.
3597 (s390_write_goto_address): New function.
3598 (s390_emit_litpool): New function.
3599 (s390_emit_const): New function.
3600 (s390_emit_call): New function.
3601 (s390_emit_reg): New function.
3602 (s390_emit_pop): New function.
3603 (s390_emit_stack_flush): New function.
3604 (s390_emit_zero_ext): New function.
3605 (s390_emit_swap): New function.
3606 (s390_emit_stack_adjust): New function.
3607 (s390_emit_set_r2): New function.
3608 (s390_emit_int_call_1): New function.
3609 (s390_emit_void_call_2): New function.
3610 (s390_emit_eq_goto): New function.
3611 (s390_emit_ne_goto): New function.
3612 (s390_emit_lt_goto): New function.
3613 (s390_emit_le_goto): New function.
3614 (s390_emit_gt_goto): New function.
3615 (s390_emit_ge_goto): New function.
3616 (s390x_emit_prologue): New function.
3617 (s390x_emit_epilogue): New function.
3618 (s390x_emit_add): New function.
3619 (s390x_emit_sub): New function.
3620 (s390x_emit_mul): New function.
3621 (s390x_emit_lsh): New function.
3622 (s390x_emit_rsh_signed): New function.
3623 (s390x_emit_rsh_unsigned): New function.
3624 (s390x_emit_ext): New function.
3625 (s390x_emit_log_not): New function.
3626 (s390x_emit_bit_and): New function.
3627 (s390x_emit_bit_or): New function.
3628 (s390x_emit_bit_xor): New function.
3629 (s390x_emit_bit_not): New function.
3630 (s390x_emit_equal): New function.
3631 (s390x_emit_less_signed): New function.
3632 (s390x_emit_less_unsigned): New function.
3633 (s390x_emit_ref): New function.
3634 (s390x_emit_if_goto): New function.
3635 (s390x_emit_const): New function.
3636 (s390x_emit_call): New function.
3637 (s390x_emit_reg): New function.
3638 (s390x_emit_pop): New function.
3639 (s390x_emit_stack_flush): New function.
3640 (s390x_emit_zero_ext): New function.
3641 (s390x_emit_swap): New function.
3642 (s390x_emit_stack_adjust): New function.
3643 (s390x_emit_int_call_1): New function.
3644 (s390x_emit_void_call_2): New function.
3645 (s390x_emit_eq_goto): New function.
3646 (s390x_emit_ne_goto): New function.
3647 (s390x_emit_lt_goto): New function.
3648 (s390x_emit_le_goto): New function.
3649 (s390x_emit_gt_goto): New function.
3650 (s390x_emit_ge_goto): New function.
3651 (s390_emit_ops): New function.
3652 (struct linux_target_ops): Fill in emit_ops hook.
3654 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3657 * Makefile.in: Add s390 IPA files.
3658 * configure.srv: Build IPA for s390.
3659 * linux-s390-ipa.c: New file.
3660 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3661 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3662 (tdesc_s390_linux32): Likewise.
3663 (init_registers_s390_linux32v1): Likewise.
3664 (tdesc_s390_linux32v1): Likewise.
3665 (init_registers_s390_linux32v2): Likewise.
3666 (tdesc_s390_linux32v2): Likewise.
3667 (init_registers_s390_linux64): Likewise.
3668 (tdesc_s390_linux64): Likewise.
3669 (init_registers_s390_linux64v1): Likewise.
3670 (tdesc_s390_linux64v1): Likewise.
3671 (init_registers_s390_linux64v2): Likewise.
3672 (tdesc_s390_linux64v2): Likewise.
3673 (init_registers_s390_te_linux64): Likewise.
3674 (tdesc_s390_te_linux64): Likewise.
3675 (init_registers_s390_vx_linux64): Likewise.
3676 (tdesc_s390_vx_linux64): Likewise.
3677 (init_registers_s390_tevx_linux64): Likewise.
3678 (tdesc_s390_tevx_linux64): Likewise.
3679 (init_registers_s390x_linux64): Likewise.
3680 (tdesc_s390x_linux64): Likewise.
3681 (init_registers_s390x_linux64v1): Likewise.
3682 (tdesc_s390x_linux64v1): Likewise.
3683 (init_registers_s390x_linux64v2): Likewise.
3684 (tdesc_s390x_linux64v2): Likewise.
3685 (init_registers_s390x_te_linux64): Likewise.
3686 (tdesc_s390x_te_linux64): Likewise.
3687 (init_registers_s390x_vx_linux64): Likewise.
3688 (tdesc_s390x_vx_linux64): Likewise.
3689 (init_registers_s390x_tevx_linux64): Likewise.
3690 (tdesc_s390x_tevx_linux64): Likewise.
3691 (have_hwcap_s390_vx): New static variable.
3692 (s390_arch_setup): Fill have_hwcap_s390_vx.
3693 (s390_get_thread_area): New function.
3694 (s390_ft_entry_gpr_esa): New const.
3695 (s390_ft_entry_gpr_zarch): New const.
3696 (s390_ft_entry_misc): New const.
3697 (s390_ft_entry_fr): New const.
3698 (s390_ft_entry_vr): New const.
3699 (s390_ft_main_31): New const.
3700 (s390_ft_main_64): New const.
3701 (s390_ft_exit_fr): New const.
3702 (s390_ft_exit_vr): New const.
3703 (s390_ft_exit_misc): New const.
3704 (s390_ft_exit_gpr_esa): New const.
3705 (s390_ft_exit_gpr_zarch): New const.
3706 (append_insns): New function.
3707 (s390_relocate_instruction): New function.
3708 (s390_install_fast_tracepoint_jump_pad): New function.
3709 (s390_get_min_fast_tracepoint_insn_len): New function.
3710 (s390_get_ipa_tdesc_idx): New function.
3711 (struct linux_target_ops): Wire in the above functions.
3712 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3713 * linux-s390-tdesc.h: New file.
3715 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3717 * linux-s390-low.c (s390_supports_tracepoints): New function.
3718 (struct linux_target_ops): Fill supports_tracepoints hook.
3720 2016-03-18 Yao Qi <yao.qi@linaro.org>
3722 * linux-low.c (lwp_signal_can_be_delivered): New function.
3723 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3725 2016-03-18 Yao Qi <yao.qi@linaro.org>
3727 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3728 0 if signal is enqueued. Remove 'signal' from one debugging
3729 message. Move one debugging message to some lines below.
3730 Remove code setting 'signal' to 0.
3732 2016-03-18 Yao Qi <yao.qi@linaro.org>
3734 * linux-low.c (linux_low_filter_event): Remove redundant
3735 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3737 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3739 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3740 (struct linux_target_ops): Wire in the above.
3742 2016-03-03 Yao Qi <yao.qi@linaro.org>
3744 * linux-low.c: Update comments to start_step_over.
3746 2016-03-03 Yao Qi <yao.qi@linaro.org>
3749 * linux-low.c (handle_extended_wait): Set child suspended
3750 if event_lwp->bp_reinsert isn't zero.
3752 2016-03-02 Yao Qi <yao.qi@linaro.org>
3754 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3755 enqueue_pending_signal.
3757 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3759 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3762 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3764 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3765 (s390_regmap_3264) [!__s390x__]: New global.
3766 (s390_collect_ptrace_register): Skip map entries containing -1.
3767 (s390_supply_ptrace_register): Ditto.
3768 (s390_fill_gprs_high): New function.
3769 (s390_store_gprs_high): New function.
3770 (s390_regsets): Add NT_S390_HIGH_GPRS.
3771 (s390_get_hwcap): Enable on 31-bit.
3772 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3773 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3774 Detect NT_S390_HIGH_GPRS.
3775 (s390_usrregs_info_3264): Enable on 31-bit.
3776 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3777 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3779 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3782 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3783 * configure.srv: Ditto.
3784 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3785 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3786 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3787 (init_registers_amd64_linux): Remove prototype.
3788 (tdesc_amd64_linux): Remove declaration.
3789 (get_ipa_tdesc): New function.
3790 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3791 initialize remaining tdescs.
3792 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3793 (init_registers_i386_linux): Remove prototype.
3794 (tdesc_i386_linux): Remove declaration.
3795 (get_ipa_tdesc): New function.
3796 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3797 initialize remaining tdescs.
3798 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3799 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3800 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3801 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3802 (x86_get_ipa_tdesc_idx): New function.
3803 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3804 * linux-x86-tdesc.h: New file.
3805 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3806 (target_get_ipa_tdesc_idx): New macro.
3807 * tracepoint.c (ipa_tdesc_idx): New macro.
3808 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3809 (symbol_list): Add ipa_tdesc_idx.
3810 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3811 (ipa_tdesc): Remove.
3812 (ipa_tdesc_idx): New variable.
3813 (get_context_regcache): Use get_ipa_tdesc.
3814 (gdb_collect): Ditto.
3816 * tracepoint.h (get_ipa_tdesc): New prototype.
3817 (ipa_tdesc): Remove.
3819 2016-02-24 Pedro Alves <palves@redhat.com>
3821 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3822 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3823 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3824 Factor out common code between the USE_SIGTRAP_SIGINFO and
3825 !USE_SIGTRAP_SIGINFO blocks.
3826 (linux_low_filter_event): Call save_stop_reason instead of
3827 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3829 (linux_wait_1): Update comments.
3831 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3833 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3834 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3835 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3836 ppc_insert_point, ppc_remove_point.
3838 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3840 * linux-s390-low.c (s390_supports_z_point_type): New function.
3841 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3843 2016-02-16 Yao Qi <yao.qi@linaro.org>
3845 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3846 PC. Get pc from regcache_read_pc.
3848 2016-02-12 Yao Qi <yao.qi@linaro.org>
3850 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3851 or linux_get_pc_32bit.
3852 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3854 2016-02-12 Yao Qi <yao.qi@linaro.org>
3856 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3857 arm_linux_get_next_pcs_fixup.
3859 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3861 * tracepoint.c (x_tracepoint_action_download): Change
3862 write_inferior_data_ptr to write_inferior_data_pointer.
3863 (cmd_qtstart): Likewise.
3864 (write_inferior_data_ptr): Remove.
3865 (download_agent_expr): Change write_inferior_data_ptr to
3866 write_inferior_data_pointer.
3867 (download_tracepoint_1): Likewise.
3868 (download_tracepoint): Likewise.
3869 (download_trace_state_variables): Likewise.
3871 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3872 Marcin Kościelnicki <koriakin@0x04.net>
3874 * tracepoint.c (struct tracepoint_action_ops): Remove.
3875 (struct tracepoint_action): Remove ops.
3876 (m_tracepoint_action_download, r_tracepoint_action_download)
3877 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3878 size and offset accordingly.
3879 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3880 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3881 (tracepoint_action_send, tracepoint_action_download): New functions.
3882 Helpers for trace action handlers.
3883 (add_tracepoint_action): Remove setup actions ops.
3884 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3886 2016-02-10 Yao Qi <yao.qi@linaro.org>
3888 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3890 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3892 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3894 * configure: Regenerate.
3896 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3898 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3899 void * to gdb_byte *.
3900 * linux-low.c (siginfo_fixup): Likewise.
3901 (linux_xfer_siginfo): Likewise.
3902 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3904 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3906 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3908 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3910 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3912 * linux-x86-low.c [__x86_64__]: Include
3913 "nat/amd64-linux-siginfo.h".
3914 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3915 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3916 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3917 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3918 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3919 (cpt_si_fd, si_timerid, si_overrun): Move from
3920 nat/amd64-linux-siginfo.c.
3921 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3923 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3925 * server.c (skip_to_semicolon): Remove.
3926 (process_point_options): Use strchrnul instead of
3929 2016-01-26 Yao Qi <yao.qi@linaro.org>
3931 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3932 * linux-low.c (install_software_single_step_breakpoints): Don't
3933 call regcache_read_pc.
3934 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3937 2016-01-26 Yao Qi <yao.qi@linaro.org>
3939 * linux-low.c (install_software_single_step_breakpoints): Call
3940 regcache_read_pc instead of get_pc.
3942 2016-01-26 Yao Qi <yao.qi@linaro.org>
3944 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3945 (unblock_async_io): Rename to ...
3946 (block_unblock_async_io): ... it. New function.
3947 (enable_async_io): Don't install SIGIO handler. Unblock it
3949 (disable_async_io): Don't ignore SIGIO. Block it instead.
3950 (initialize_async_io): Install SIGIO handler. Don't call
3953 2016-01-26 Yao Qi <yao.qi@linaro.org>
3955 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3956 first character is '\003', call *the_target->request_interrupt.
3958 2016-01-25 Yao Qi <yao.qi@linaro.org>
3960 * remote-utils.c (new_thread_notify): Remove.
3961 (dead_thread_notify): Likewise.
3962 * remote-utils.h (new_thread_notify): Remove declaration.
3963 (dead_thread_notify): Likewise.
3965 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3967 * gdb.trace/pending.exp: Fix expected message on continue.
3969 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3971 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3972 it works properly on big-endian machines where sizeof (CORE_ADDR)
3975 2016-01-21 Pedro Alves <palves@redhat.com>
3977 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3978 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3979 * configure: Regenerate.
3981 2016-01-21 Yao Qi <yao.qi@linaro.org>
3983 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3984 is_thumb and set it according to CPSR saved on the stack.
3985 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3986 arm_sigreturn_next_pc.
3988 2016-01-18 Yao Qi <yao.qi@linaro.org>
3990 * linux-low.c (linux_set_pc_64bit): New function.
3991 (linux_get_pc_64bit): New function.
3992 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3994 * linux-sparc-low.c (debug_threads): Remove declaration.
3995 (sparc_get_pc): Remove.
3996 (the_low_target): Use linux_get_pc_64bit instead of
3998 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3999 (the_low_target): Use linux_get_pc_64bit and
4002 2016-01-18 Yao Qi <yao.qi@linaro.org>
4004 * linux-arm-low.c (debug_threads): Remove declaration.
4005 (arm_get_pc, arm_set_pc): Remove.
4006 (the_low_target): Use linux_get_pc_32bit and
4008 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4009 (the_low_target): Use linux_get_pc_32bit and
4011 * linux-cris-low.c (debug_threads): Remove declaration.
4012 (cris_get_pc, cris_set_pc,): Remove.
4013 (the_low_target): Use linux_get_pc_32bit and
4015 * linux-crisv32-low.c (debug_threads): Remove declaration.
4016 (cris_get_pc, cris_set_pc): Remove.
4017 (the_low_target): Use linux_get_pc_32bit and
4019 * linux-low.c: Include inttypes.h.
4020 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4021 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4022 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4023 (the_low_target): Use linux_get_pc_32bit and
4025 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4026 (the_low_target): Use linux_get_pc_32bit and
4028 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4029 (the_low_target): Use linux_get_pc_32bit and
4031 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4032 (the_low_target): Use linux_get_pc_32bit and
4034 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4035 (the_low_target): Use linux_get_pc_32bit and
4038 2016-01-18 Gary Benson <gbenson@redhat.com>
4040 * configure.ac (AC_FUNC_FORK): New check.
4041 * config.in: Regenerate.
4042 * configure: Likewise.
4044 2016-01-14 Yao Qi <yao.qi@linaro.org>
4046 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4047 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4048 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4049 arm_get_next_pcs_ctor.
4051 2016-01-12 Josh Stone <jistone@redhat.com>
4052 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4054 * inferiors.h: Include "gdb_vecs.h".
4055 (struct process_info): Add syscalls_to_catch.
4056 * inferiors.c (remove_process): Free syscalls_to_catch.
4057 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4058 syscall_return stops.
4059 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4060 * server.c (handle_general_set): Handle QCatchSyscalls.
4061 (handle_query): Report support for QCatchSyscalls.
4062 * target.h (struct target_ops): Add supports_catch_syscall.
4063 (target_supports_catch_syscall): New macro.
4064 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4065 (struct lwp_info): Add syscall_state.
4066 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4067 Maintain syscall_state and syscalls_to_catch across exec.
4068 (get_syscall_trapinfo): New function, proxy to the_low_target.
4069 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4070 (linux_low_filter_event): Toggle syscall_state entry/return for
4071 syscall traps, and set it ignored for all others.
4072 (gdb_catching_syscalls_p): New function.
4073 (gdb_catch_this_syscall_p): New function.
4074 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4075 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4076 (linux_supports_catch_syscall): New function.
4077 (linux_target_ops): Install it.
4078 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4079 (the_low_target): Install it.
4081 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4083 * acinclude.m4: Include new ../warning.m4 file.
4084 * configure: Regenerated.
4085 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4087 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4089 * ax.c (is_goto_target): Mark static.
4090 * linux-low.c (register_addr): Likewise.
4091 (linux_fetch_registers, linux_store_registers): Likewise.
4092 * mem-break.c (any_persistent_commands): Fix old prototype.
4093 (add_commands_to_breakpoint): Mark static.
4094 * regcache.c (find_register_by_name): Delete unused func.
4095 * remote-utils.c (hex_or_minus_one): Mark static.
4096 * server.c (monitor_show_help): Mark static.
4097 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4098 handle_v_requests): Likewise.
4100 2016-01-12 Pedro Alves <palves@redhat.com>
4102 Remove use of the registered trademark symbol throughout.
4104 2016-01-08 Yao Qi <yao.qi@linaro.org>
4106 * remote-utils.c (getpkt): If c is '\003', call target hook
4109 2016-01-06 Yao Qi <yao.qi@linaro.org>
4111 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4112 linux-aarch32-low.c.
4113 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4114 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4115 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4116 (thumb2_breakpoint): Declare.
4117 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4118 linux-aarch32-low.h.
4119 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4120 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4121 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4123 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4125 * gdbreplay.c (gdbreplay_version): Change copyright year in
4127 * server.c (gdbserver_version): Likewise.
4129 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4131 * server.c (crc32_table): Delete.
4132 (crc32): Use libiberty's xcrc32 function.
4134 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4136 * lynx-low.c (lynx_delete_thread_callback): New function.
4137 (lynx_mourn): Properly delete our process and all of its
4138 threads. Remove call to clear_inferiors.
4140 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4142 * target.c (thread_search_callback): Add check that
4143 the thread_stopped target callback is not NULL before
4146 2015-12-21 Yao Qi <yao.qi@linaro.org>
4148 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4151 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4153 * server.c (handle_query): Call target_supports_software_single_step.
4155 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4157 * linux-low.c (single_step): New function.
4158 (linux_resume_one_lwp_throw): Call single_step.
4159 (start_step_over): Likewise.
4161 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4163 * Makefile.in (SFILES): Append arch/arm-linux.c,
4164 arch/arm-get-next-pcs.c.
4165 (arm-linux.o): New rule.
4166 (arm-get-next-pcs.o): New rule.
4167 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4169 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4170 to linux-aarch32-low.c.
4171 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4172 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4173 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4174 (thumb2_breakpoint_len): Likewise.
4175 (arm_is_thumb_mode): Make non-static.
4176 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4177 from linux-aarch32-low.c.
4178 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4179 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4180 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4181 (thumb2_breakpoint_len): Likewise.
4182 (arm_is_thumb_mode): New declaration.
4183 * linux-arm-low.c: Include arch/arm-linux.h
4184 aarch/arm-get-next-pcs.h, sys/syscall.h.
4185 (get_next_pcs_ops): New struct.
4186 (get_next_pcs_addr_bits_remove): New function.
4187 (get_next_pcs_is_thumb): New function.
4188 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4189 (arm_sigreturn_next_pc): Likewise.
4190 (get_next_pcs_syscall_next_pc): Likewise.
4191 (arm_gdbserver_get_next_pcs): Likewise.
4192 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4194 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4195 * server.h: Include gdb_vecs.h.
4197 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4199 * Makefile.in (SFILES): Append common/common-regcache.c.
4200 (OBS): Append common-regcache.o.
4201 (common-regcache.o): New rule.
4202 * regcache.c (init_register_cache): Initialize cache to
4204 (regcache_raw_read_unsigned): New function.
4205 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4206 register_status enum.
4208 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4210 * linux-aarch64-low.c (the_low_targets): Rename
4211 breakpoint_reinsert_addr to get_next_pcs.
4212 * linux-arm-low.c (the_low_targets): Likewise.
4213 * linux-bfin-low.c (the_low_targets): Likewise.
4214 * linux-cris-low.c (the_low_targets): Likewise.
4215 * linux-crisv32-low.c (the_low_targets): Likewise.
4216 * linux-low.c (can_software_single_step): Likewise.
4217 (install_software_single_step_breakpoints): New function.
4218 (start_step_over): Use install_software_single_step_breakpoints.
4219 * linux-low.h: New CORE_ADDR vector.
4220 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4222 * linux-mips-low.c (the_low_targets): Likewise.
4223 * linux-nios2-low.c (the_low_targets): Likewise.
4224 * linux-sparc-low.c (the_low_targets): Likewise.
4226 2015-12-17 Pedro Alves <palves@redhat.com>
4228 * linux-low.c (linux_kill_one_lwp): Remove references to
4230 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4232 (linux_init_signals): Delete.
4233 (initialize_low): Adjust.
4234 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4236 2015-12-16 Pedro Alves <palves@redhat.com>
4238 * configure.ac (compiler warning flags): When testing a
4239 -Wno-foo option, check whether -Wfoo works instead.
4240 * configure: Regenerate.
4242 2015-12-11 Don Breazeal <donb@codesourcery.com>
4244 * server.c (process_serial_event): Don't exit from gdbserver
4245 in remote mode if there are still active inferiors.
4247 2015-12-11 Yao Qi <yao.qi@linaro.org>
4249 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4250 arm_breakpoint_at if the process is 32-bit.
4252 2015-12-11 Yao Qi <yao.qi@linaro.org>
4254 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4257 2015-12-07 Yao Qi <yao.qi@linaro.org>
4259 * configure.srv: Append arm.o to srv_tgtobj for
4260 aarch64*-*-linux* target.
4261 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4262 from linux-arm-low.c.
4263 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4264 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4265 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4266 (thumb2_breakpoint_len): Likewise.
4267 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4268 (arm_breakpoint_kinds): Likewise.
4269 (arm_breakpoint_kind_from_pc): Likewise.
4270 (arm_sw_breakpoint_from_kind): Likewise.
4271 (arm_breakpoint_kind_from_current_state): Likewise.
4272 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4273 (arm_sw_breakpoint_from_kind): Declare.
4274 (arm_breakpoint_kind_from_current_state): Declare.
4275 (arm_breakpoint_at): Declare.
4276 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4277 arm_sw_breakpoint_from_kind if process is 32-bit.
4278 (aarch64_breakpoint_kind_from_pc): New function.
4279 (aarch64_breakpoint_kind_from_current_state): New function.
4280 (the_low_target): Initialize fields breakpoint_kind_from_pc
4281 and breakpoint_kind_from_current_state.
4282 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4283 linux-aarch32-low.c.
4284 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4285 (arm_breakpoint, arm_breakpoint_len): Likewise.
4286 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4287 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4288 (arm_is_thumb_mode): Likewise.
4289 (arm_breakpoint_at): Likewise.
4290 (arm_breakpoint_kind_from_pc): Likewise.
4291 (arm_sw_breakpoint_from_kind): Likewise.
4292 (arm_breakpoint_kind_from_current_state): Likewise.
4295 2015-08-04 Yao Qi <yao.qi@linaro.org>
4297 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4298 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4299 * server.c (extended_protocol): Remove "static".
4300 * server.h (extended_protocol): Declare it.
4302 2015-12-04 Josh Stone <jistone@redhat.com>
4304 * target.h (struct target_ops) <arch_setup>: Rename to ...
4305 (struct target_ops) <post_create_inferior>: ... this.
4306 (target_arch_setup): Rename to ...
4307 (target_post_create_inferior): ... this, calling post_create_inferior.
4308 * server.c (start_inferior): Update target_arch_setup calls to
4309 target_post_create_inferior.
4310 * linux-low.c (linux_low_ptrace_options): Forward declare.
4311 (linux_arch_setup): Update its comment for general use.
4312 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4313 (struct linux_target_ops): Use linux_post_create_inferior.
4314 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4315 to post_create_inferior.
4316 * nto-low.c (struct nto_target_ops): Likewise.
4317 * spu-low.c (struct spu_target_ops): Likewise.
4318 * win32-low.c (struct win32_target_ops): Likewise.
4320 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4322 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4324 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4326 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4327 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4328 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4329 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4330 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4331 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4332 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4333 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4334 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4335 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4336 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4337 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4339 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4341 * linux-low.c (linux_look_up_symbols): Don't call
4342 linux_supports_traceclone.
4343 * linux-low.h (thread_db_init): Remove use_events argument.
4344 * thread-db.c (thread_db_use_event): Remove global variable.
4345 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4346 (struct thread_db) <td_create_bp>: Remove field.
4347 (thread_db_create_event): Remove function.
4348 (thread_db_enable_reporting): Likewise.
4349 (find_one_thread): Don't check for thread_db_use_events.
4350 (attach_thread): Likewise.
4351 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4352 (try_thread_db_load_1): Don't check for thread_db_use_events.
4353 (thread_db_init): Remove use_events argument and thread events
4355 (remove_thread_event_breakpoints): Remove function.
4356 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4358 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4360 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4362 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4363 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4364 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4365 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4366 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4368 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4370 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4371 * linux-low.c (can_hardware_single_step): Use
4372 supports_hardware_single_step.
4373 (can_software_single_step): New function.
4374 (start_step_over): Call can_software_single_step.
4375 (linux_supports_hardware_single_step): New function.
4376 (struct target_ops) <supports_software_single_step>: Initialize.
4377 * linux-low.h (struct linux_target_ops)
4378 <supports_hardware_single_step>: Initialize.
4379 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4380 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4381 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4382 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4383 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4384 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4385 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4386 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4387 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4388 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4390 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4391 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4393 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4394 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4395 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4397 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4398 * target.h (struct target_ops): <supports_software_single_step>:
4400 (target_supports_software_single_step): New macro.
4402 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4404 * linux-low.c (linux_wait_1): Fix pc advance condition.
4405 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4406 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4408 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4410 * linux-arm-low.c (arm_is_thumb_mode): New function.
4411 (arm_breakpoint_at): Use arm_is_thumb_mode.
4412 (arm_breakpoint_kind_from_current_state): New function.
4413 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4415 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4416 (linux_breakpoint_kind_from_current_state): New function.
4417 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4418 * linux-low.h (struct linux_target_ops)
4419 <breakpoint_kind_from_current_state>: New field.
4420 * target.h (struct target_ops): Likewise.
4421 (target_breakpoint_kind_from_current_state): New macro.
4423 2015-11-30 Pedro Alves <palves@redhat.com>
4425 * linux-low.c (linux_resume): Wake up the event loop before
4428 2015-11-30 Pedro Alves <palves@redhat.com>
4430 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4432 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4434 * target.c (struct thread_search): New structure.
4435 (thread_search_callback): New function.
4436 (prev_general_thread): New global.
4437 (prepare_to_access_memory, done_accessing_memory): New functions.
4438 * target.h (prepare_to_access_memory, done_accessing_memory):
4439 Replace macros with function declarations.
4441 2015-11-30 Pedro Alves <palves@redhat.com>
4444 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4445 report TARGET_WAITKIND_NO_RESUMED.
4446 * remote-utils.c (prepare_resume_reply): Handle
4447 TARGET_WAITKIND_NO_RESUMED.
4448 * server.c (report_no_resumed): New global.
4449 (handle_query) <qSupported>: Handle "no-resumed+". Report
4450 "no-resumed+" support.
4451 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4452 return error if the client doesn't support no-resumed events.
4453 (push_stop_notification): New function.
4454 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4455 events if the client supports them.
4457 2015-11-30 Pedro Alves <palves@redhat.com>
4459 * linux-low.c (thread_still_has_status_pending_p): Don't check
4461 (lwp_resumed): New function.
4462 (status_pending_p_callback): Return early if the LWP is not
4463 supposed to be resumed.
4465 2015-11-30 Pedro Alves <palves@redhat.com>
4467 * linux-low.c (handle_extended_wait): Assert that the LWP's
4468 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4469 thread create events, leave the new child's status pending.
4470 (linux_low_filter_event): If GDB wants to hear about thread exit
4471 events, leave the LWP marked dead and don't delete it.
4472 (linux_wait_for_event_filtered): Don't check for thread exit.
4473 (filter_exit_event): New function.
4474 (linux_wait_1): Use it, when returning an exit event.
4475 (linux_resume_one_lwp_throw): Assert that the LWP's
4476 waitstatus is TARGET_WAITKIND_IGNORE.
4477 * remote-utils.c (prepare_resume_reply): Handle
4478 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4479 * server.c (report_thread_events): New global.
4480 (handle_general_set): Handle QThreadEvents.
4481 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4482 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4483 TARGET_WAITKIND_THREAD_EXITED.
4484 * server.h (report_thread_events): Declare.
4486 2015-11-30 Pedro Alves <palves@redhat.com>
4488 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4489 the thread's last_resume_kind was resume_stop.
4491 2015-11-30 Pedro Alves <palves@redhat.com>
4493 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4496 2015-11-30 Pedro Alves <palves@redhat.com>
4498 * server.c (handle_v_requests): Handle vCtrlC.
4500 2015-11-30 Pedro Alves <palves@redhat.com>
4502 * gdbthread.h (find_any_thread_of_pid): Declare.
4503 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4505 * server.c (handle_query): If current_thread is NULL, look for
4506 another thread of the selected process.
4508 2015-11-26 Daniel Colascione <dancol@dancol.org>
4509 Simon Marchi <simon.marchi@ericsson.com>
4511 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4512 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4514 * target.h (struct target_ops) <thread_name>: New field.
4515 (target_thread_name): New macro.
4517 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4519 * regcache.h (regcache_invalidate_pid): Add declaration.
4520 * regcache.c (regcache_invalidate_pid): New function, extracted
4521 from regcache_invalidate.
4522 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4523 Add trivial documentation comment.
4524 * lynx-low.c: Use regcache_invalidate_pid instead of
4525 regcache_invalidate.
4527 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4529 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4530 and Elf64_auxv_t if the target is Android.
4532 2015-11-22 Doug Evans <xdje42@gmail.com>
4534 * target.h: #include <sys/types.h>.
4536 2015-11-19 Pedro Alves <palves@redhat.com>
4538 * linux-low.c (linux_process_qsupported): Change prototype.
4540 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4542 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4543 and adjust to loop over all features.
4544 * server.c (handle_query) <qSupported>: Adjust to call
4545 target_process_qsupported once, passing it a vector of unprocessed
4547 * target.h (struct target_ops) <process_qsupported>: Change
4549 (target_process_qsupported): Adjust.
4551 2015-11-19 Pedro Alves <palves@redhat.com>
4553 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4555 * configure: Regenerate.
4557 2015-11-19 Pedro Alves <palves@redhat.com>
4559 * configure: Regenerate.
4561 2015-11-19 Yao Qi <yao.qi@linaro.org>
4563 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4566 2015-11-19 Yao Qi <yao.qi@linaro.org>
4568 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4569 (struct aarch64_operand): Move enum out.
4571 2015-11-19 Yao Qi <yao.qi@linaro.org>
4573 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4574 struct user_fpsimd_state *.
4575 (aarch64_store_fpregset): Likewise.
4577 2015-11-19 Yao Qi <yao.qi@linaro.org>
4579 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4580 struct user_pt_regs *.
4581 (aarch64_store_gregset): Likewise.
4583 2015-11-18 Pedro Alves <palves@redhat.com>
4585 * Makefile.in (all_object_files): Add $IPA_OBJS.
4587 2015-11-17 Pedro Alves <palves@redhat.com>
4589 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4590 GDB_SIGNAL_0 and gdb_signal_to_string.
4592 2015-11-17 Pedro Alves <palves@redhat.com>
4594 * win32-low.c (handle_output_debug_string): Remove parameter.
4595 (win32_kill): Remove our_status local and adjust call to
4596 handle_output_debug_string.
4597 (get_child_debug_event): Adjust call to
4598 handle_output_debug_string.
4600 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4602 * linux-mips-low.c (mips_fill_gregset): Add cast.
4603 (mips_store_gregset): Likewise.
4604 (mips_fill_fpregset): Likewise.
4605 (mips_store_fpregset): Likewise.
4607 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4609 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4612 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4614 * linux-mips-low.c (mips_linux_new_thread): Change type of
4615 watch_type to enum target_hw_bp_type.
4617 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4619 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4620 Change return type to arm_hwbp_type.
4622 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4624 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4625 (arm_store_gregset): Likewise.
4626 * linux-arm-low.c (arm_get_hwcap): Likewise.
4627 (arm_read_description): Likewise.
4629 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4631 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4633 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4635 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4636 (ppc_fill_vsxregset): Likewise.
4637 (ppc_store_vsxregset): Likewise.
4638 (ppc_fill_vrregset): Likewise.
4639 (ppc_store_vrregset): Likewise.
4640 (ppc_fill_evrregset): Likewise.
4641 (ppc_store_evrregset): Likewise.
4643 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4645 * linux-ppc-low.c (ppc_usrregs_info): Remove
4646 forward-declaration.
4647 (ppc_arch_setup): Move lower in file.
4649 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4651 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4652 (ps_pdwrite): Likewise.
4654 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4656 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4657 to after assert checks.
4659 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4661 * proc-service.c (ps_pdread): Add/adjust casts.
4662 (ps_pdwrite): Add/adjust casts.
4664 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4666 * server.c (handle_search_memory_1): Cast return value of
4669 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4671 * server.c (write_qxfer_response): Change type of data to
4674 2015-10-29 Pedro Alves <palves@redhat.com>
4676 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4678 2015-10-29 Pedro Alves <palves@redhat.com>
4680 * tracepoint.c (clear_installed_tracepoints): Add casts.
4682 2015-10-29 Pedro Alves <palves@redhat.com>
4684 * server.c (handle_v_cont, process_serial_event): Add enum
4685 gdb_signal casts to signal parsing code.
4687 2015-10-29 Pedro Alves <palves@redhat.com>
4689 * linux-low.h (NULL_REGSET): Define.
4690 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4691 * linux-arm-low.c (arm_regsets): Likewise.
4692 * linux-crisv32-low.c (cris_regsets): Likewise.
4693 * linux-m68k-low.c (m68k_regsets): Likewise.
4694 * linux-mips-low.c (mips_regsets): Likewise.
4695 * linux-nios2-low.c (nios2_regsets): Likewise.
4696 * linux-ppc-low.c (ppc_regsets): Likewise.
4697 * linux-s390-low.c (s390_regsets): Likewise.
4698 * linux-sh-low.c (sh_regsets): Likewise.
4699 * linux-sparc-low.c (sparc_regsets): Likewise.
4700 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4701 * linux-tile-low.c (tile_regsets): Likewise.
4702 * linux-x86-low.c (x86_regsets): Likewise.
4703 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4705 2015-10-29 Pedro Alves <palves@redhat.com>
4707 * linux-low.h (NULL_REGSET): Define.
4708 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4709 * linux-arm-low.c (arm_regsets): Likewise.
4710 * linux-crisv32-low.c (cris_regsets): Likewise.
4711 * linux-m68k-low.c (m68k_regsets): Likewise.
4712 * linux-mips-low.c (mips_regsets): Likewise.
4713 * linux-nios2-low.c (nios2_regsets): Likewise.
4714 * linux-ppc-low.c (ppc_regsets): Likewise.
4715 * linux-s390-low.c (s390_regsets): Likewise.
4716 * linux-sh-low.c (sh_regsets): Likewise.
4717 * linux-sparc-low.c (sparc_regsets): Likewise.
4718 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4719 * linux-tile-low.c (tile_regsets): Likewise.
4720 * linux-x86-low.c (x86_regsets): Likewise.
4721 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4723 2015-10-26 Doug Evans <dje@google.com>
4725 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4727 2015-10-26 Doug Evans <dje@google.com>
4729 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4731 2015-10-26 Doug Evans <dje@google.com>
4733 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4735 (attach_thread, find_new_threads_callback): Ditto.
4737 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4739 * mem-break.h (set_breakpoint_data): Remove.
4741 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4743 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4744 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4745 (initialize_low): Remove set_breakpoint_data call.
4746 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4747 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4748 (initialize_low): Remove set_breakpoint_data call.
4749 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4750 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4751 (initialize_low): Remove set_breakpoint_data call.
4753 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4755 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4756 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4757 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4758 * target.h (target_breakpoint_kind_from_pc): New macro.
4760 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4762 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4763 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4764 the default breakpoint kind.
4766 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4768 * linux-arm-low.c (arm_supports_z_point_type): Add software
4771 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4773 * linux-arm-low.c: Refactor breakpoint definitions.
4774 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4775 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4777 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4779 * Makefile.in: Add arm.c/o.
4780 * configure.srv: Likewise.
4781 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4782 (arm_breakpoint_kind_from_pc): New function.
4783 (arm_sw_breakpoint_from_kind): Return proper kind.
4784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4786 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4788 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4790 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4791 (struct raw_breakpoint) <size>: Remove.
4792 (struct raw_breakpoint) <kind>: Add.
4793 (bp_size): New function.
4794 (bp_opcode): Likewise.
4795 (find_raw_breakpoint_at): Adjust for kind.
4796 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4797 (remove_memory_breakpoint): Adjust for kind call bp_size.
4798 (set_raw_breakpoint_at): Adjust for kind.
4799 (set_breakpoint): Likewise.
4800 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4801 (delete_raw_breakpoint): Adjust for kind.
4802 (delete_breakpoint): Likewise.
4803 (find_gdb_breakpoint): Likewise.
4804 (set_gdb_breakpoint_1): Likewise.
4805 (set_gdb_breakpoint): Likewise.
4806 (delete_gdb_breakpoint_1): Likewise.
4807 (delete_gdb_breakpoint): Likewise.
4808 (uninsert_raw_breakpoint): Likewise.
4809 (reinsert_raw_breakpoint): Likewise.
4810 (set_breakpoint_data): Remove.
4811 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4812 (check_mem_read): Adjust for kind call bp_size.
4813 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4814 (clone_one_breakpoint): Adjust for kind.
4815 * mem-break.h (set_gdb_breakpoint): Likewise.
4816 (delete_gdb_breakpoint): Likewise.
4817 * server.c (process_serial_event): Likewise.
4819 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4821 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4822 (struct linux_target_ops) <breakpoint>: Remove.
4823 (struct linux_target_ops) <breakpoint_len>: Remove.
4824 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4825 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4826 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4827 (arm_sw_breakpoint_from_kind): New function.
4828 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4829 (struct linux_target_ops) <breakpoint>: Remove.
4830 (struct linux_target_ops) <breakpoint_len>: Remove.
4831 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4832 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4833 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4834 (struct linux_target_ops) <breakpoint>: Remove.
4835 (struct linux_target_ops) <breakpoint_len>: Remove.
4836 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4837 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4838 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4839 (struct linux_target_ops) <breakpoint>: Remove.
4840 (struct linux_target_ops) <breakpoint_len>: Remove.
4841 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4842 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4843 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4844 and sw_breakpoint_from_kind to increment the pc.
4845 (linux_breakpoint_kind_from_pc): New function.
4846 (linux_sw_breakpoint_from_kind): New function.
4847 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4848 (initialize_low): Call breakpoint_kind_from_pc and
4849 sw_breakpoint_from_kind to replace breakpoint_data/len.
4850 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4852 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4853 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4854 (struct linux_target_ops) <breakpoint>: Remove.
4855 (struct linux_target_ops) <breakpoint_len>: Remove.
4856 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4857 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4858 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4859 (struct linux_target_ops) <breakpoint>: Remove.
4860 (struct linux_target_ops) <breakpoint_len>: Remove.
4861 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4862 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4863 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4864 (struct linux_target_ops) <breakpoint>: Remove.
4865 (struct linux_target_ops) <breakpoint_len>: Remove.
4866 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4867 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4868 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4884 (struct linux_target_ops) <breakpoint>: Remove.
4885 (struct linux_target_ops) <breakpoint_len>: Remove.
4886 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4887 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4888 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4889 (struct linux_target_ops) <breakpoint>: Remove.
4890 (struct linux_target_ops) <breakpoint_len>: Remove.
4891 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4892 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4893 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4899 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4900 (struct linux_target_ops) <breakpoint>: Remove.
4901 (struct linux_target_ops) <breakpoint_len>: Remove.
4902 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4903 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4904 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4905 (struct linux_target_ops) <breakpoint>: Remove.
4906 (struct linux_target_ops) <breakpoint_len>: Remove.
4907 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4908 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4910 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4912 * linux-cris-low.c (cris_get_pc): Remove void arg.
4914 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4916 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4919 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4921 * inferiors.c (thread_pid_matches_callback): New function.
4922 (find_thread_process): New function.
4923 (remove_thread): Reset current_thread.
4924 (remove_process): Assert threads have been removed first.
4926 2015-10-15 Yao Qi <yao.qi@linaro.org>
4928 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4930 (aarch64_remove_point): Likewise.
4931 * regcache.c (regcache_register_size): New function.
4933 2015-10-12 Yao Qi <yao.qi@linaro.org>
4935 * linux-aarch64-low.c: Update all callers as emit_load_store
4936 is renamed to aarch64_emit_load_store.
4938 2015-10-12 Yao Qi <yao.qi@linaro.org>
4940 * linux-aarch64-low.c: Update all callers of function renaming
4941 from emit_insn to aarch64_emit_insn.
4943 2015-10-12 Yao Qi <yao.qi@linaro.org>
4945 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4946 arch/aarch64-insn.h.
4947 (struct aarch64_memory_operand): Likewise.
4949 (emit_insn): Move to arch/aarch64-insn.c.
4950 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4951 (emit_load_store): Move to arch/aarch64-insn.c.
4952 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4953 (can_encode_int32): Remove.
4955 2015-10-12 Yao Qi <yao.qi@linaro.org>
4957 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4958 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4959 (aarch64_relocate_instruction): Likewise.
4960 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4961 (struct aarch64_insn_visitor): Likewise.
4963 2015-10-12 Yao Qi <yao.qi@linaro.org>
4965 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4966 (struct aarch64_insn_visitor): New.
4967 (struct aarch64_insn_relocation_data): New.
4968 (aarch64_ftrace_insn_reloc_b): New function.
4969 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4970 (aarch64_ftrace_insn_reloc_cb): Likewise.
4971 (aarch64_ftrace_insn_reloc_tb): Likewise.
4972 (aarch64_ftrace_insn_reloc_adr): Likewise.
4973 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4974 (aarch64_ftrace_insn_reloc_others): Likewise.
4976 (aarch64_relocate_instruction): Use visitor.
4978 2015-10-12 Yao Qi <yao.qi@linaro.org>
4980 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4981 int. Add argument buf.
4982 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4983 aarch64_relocate_instruction.
4985 2015-10-12 Yao Qi <yao.qi@linaro.org>
4987 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4988 argument insn. Remove local variable insn. Don't call
4990 (aarch64_install_fast_tracepoint_jump_pad): Call
4993 2015-09-30 Yao Qi <yao.qi@linaro.org>
4995 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4996 (emit_load_store_pair): Likewise.
4998 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5000 * dll.c (match_dll): Add cast(s).
5001 (unloaded_dll): Likewise.
5002 * linux-low.c (second_thread_of_pid_p): Likewise.
5003 (delete_lwp_callback): Likewise.
5004 (count_events_callback): Likewise.
5005 (select_event_lwp_callback): Likewise.
5006 (linux_set_resume_request): Likewise.
5007 * server.c (accumulate_file_name_length): Likewise.
5008 (emit_dll_description): Likewise.
5009 (handle_qxfer_threads_worker): Likewise.
5010 (visit_actioned_threads): Likewise.
5011 * thread-db.c (any_thread_of): Likewise.
5012 * tracepoint.c (same_process_p): Likewise.
5013 (match_blocktype): Likewise.
5014 (build_traceframe_info_xml): Likewise.
5016 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5018 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5020 (gdb_unparse_agent_expr): Likewise.
5021 * hostio.c (require_data): Likewise.
5022 (handle_pread): Likewise.
5023 * linux-low.c (disable_regset): Likewise.
5024 (fetch_register): Likewise.
5025 (store_register): Likewise.
5026 (get_dynamic): Likewise.
5027 (linux_qxfer_libraries_svr4): Likewise.
5028 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5029 (set_fast_tracepoint_jump): Likewise.
5030 (uninsert_fast_tracepoint_jumps_at): Likewise.
5031 (reinsert_fast_tracepoint_jumps_at): Likewise.
5032 (validate_inserted_breakpoint): Likewise.
5033 (clone_agent_expr): Likewise.
5034 * regcache.c (init_register_cache): Likewise.
5035 * remote-utils.c (putpkt_binary_1): Likewise.
5036 (decode_M_packet): Likewise.
5037 (decode_X_packet): Likewise.
5038 (look_up_one_symbol): Likewise.
5039 (relocate_instruction): Likewise.
5040 (monitor_output): Likewise.
5041 * server.c (handle_search_memory): Likewise.
5042 (handle_qxfer_exec_file): Likewise.
5043 (handle_qxfer_libraries): Likewise.
5044 (handle_qxfer): Likewise.
5045 (handle_query): Likewise.
5046 (handle_v_cont): Likewise.
5047 (handle_v_run): Likewise.
5048 (captured_main): Likewise.
5049 * target.c (write_inferior_memory): Likewise.
5050 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5051 * tracepoint.c (init_trace_buffer): Likewise.
5052 (add_tracepoint_action): Likewise.
5053 (add_traceframe): Likewise.
5054 (add_traceframe_block): Likewise.
5055 (cmd_qtdpsrc): Likewise.
5056 (cmd_qtdv): Likewise.
5057 (cmd_qtstatus): Likewise.
5058 (response_source): Likewise.
5059 (response_tsv): Likewise.
5060 (cmd_qtnotes): Likewise.
5061 (gdb_collect): Likewise.
5062 (initialize_tracepoint): Likewise.
5064 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5066 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5067 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5068 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5070 (enum aarch64_condition_codes): New enum.
5071 (w0): New static global.
5074 (struct aarch64_memory_operand) <type>: New
5075 MEMORY_OPERAND_POSTINDEX type.
5076 (postindex_memory_operand): New helper function.
5077 (emit_ret): New function.
5078 (emit_load_store_pair): New function, factored out of emit_stp
5079 with support for MEMORY_OPERAND_POSTINDEX.
5080 (emit_stp): Rewrite using emit_load_store_pair.
5081 (emit_ldp): New function.
5082 (emit_load_store): Likewise.
5083 (emit_ldr): Mention post-index instruction in comment.
5084 (emit_ldrh): New function.
5085 (emit_ldrb): New function.
5086 (emit_ldrsw): Mention post-index instruction in comment.
5087 (emit_str): Likewise.
5088 (emit_subs): New function.
5089 (emit_cmp): Likewise.
5090 (emit_and): Likewise.
5091 (emit_orr): Likewise.
5092 (emit_orn): Likewise.
5093 (emit_eor): Likewise.
5094 (emit_mvn): Likewise.
5095 (emit_lslv): Likewise.
5096 (emit_lsrv): Likewise.
5097 (emit_asrv): Likewise.
5098 (emit_mul): Likewise.
5099 (emit_sbfm): Likewise.
5100 (emit_sbfx): Likewise.
5101 (emit_ubfm): Likewise.
5102 (emit_ubfx): Likewise.
5103 (emit_csinc): Likewise.
5104 (emit_cset): Likewise.
5105 (emit_nop): Likewise.
5106 (emit_ops_insns): New helper function.
5107 (emit_pop): Likewise.
5108 (emit_push): Likewise.
5109 (aarch64_emit_prologue): New function.
5110 (aarch64_emit_epilogue): Likewise.
5111 (aarch64_emit_add): Likewise.
5112 (aarch64_emit_sub): Likewise.
5113 (aarch64_emit_mul): Likewise.
5114 (aarch64_emit_lsh): Likewise.
5115 (aarch64_emit_rsh_signed): Likewise.
5116 (aarch64_emit_rsh_unsigned): Likewise.
5117 (aarch64_emit_ext): Likewise.
5118 (aarch64_emit_log_not): Likewise.
5119 (aarch64_emit_bit_and): Likewise.
5120 (aarch64_emit_bit_or): Likewise.
5121 (aarch64_emit_bit_xor): Likewise.
5122 (aarch64_emit_bit_not): Likewise.
5123 (aarch64_emit_equal): Likewise.
5124 (aarch64_emit_less_signed): Likewise.
5125 (aarch64_emit_less_unsigned): Likewise.
5126 (aarch64_emit_ref): Likewise.
5127 (aarch64_emit_if_goto): Likewise.
5128 (aarch64_emit_goto): Likewise.
5129 (aarch64_write_goto_address): Likewise.
5130 (aarch64_emit_const): Likewise.
5131 (aarch64_emit_call): Likewise.
5132 (aarch64_emit_reg): Likewise.
5133 (aarch64_emit_pop): Likewise.
5134 (aarch64_emit_stack_flush): Likewise.
5135 (aarch64_emit_zero_ext): Likewise.
5136 (aarch64_emit_swap): Likewise.
5137 (aarch64_emit_stack_adjust): Likewise.
5138 (aarch64_emit_int_call_1): Likewise.
5139 (aarch64_emit_void_call_2): Likewise.
5140 (aarch64_emit_eq_goto): Likewise.
5141 (aarch64_emit_ne_goto): Likewise.
5142 (aarch64_emit_lt_goto): Likewise.
5143 (aarch64_emit_le_goto): Likewise.
5144 (aarch64_emit_gt_goto): Likewise.
5145 (aarch64_emit_ge_got): Likewise.
5146 (aarch64_emit_ops_impl): New static global variable.
5147 (aarch64_emit_ops): New target function, return
5148 &aarch64_emit_ops_impl.
5149 (struct linux_target_ops): Install it.
5151 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5153 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5154 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5156 * linux-aarch64-ipa.c: New file.
5157 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5159 (aarch64_get_thread_area): New target method.
5160 (extract_signed_bitfield): New helper function.
5161 (aarch64_decode_ldr_literal): New function.
5162 (enum aarch64_opcodes): New enum.
5163 (struct aarch64_register): New struct.
5164 (struct aarch64_operand): New struct.
5165 (x0): New static global.
5174 (aarch64_register): New helper function.
5175 (register_operand): Likewise.
5176 (immediate_operand): Likewise.
5177 (struct aarch64_memory_operand): New struct.
5178 (offset_memory_operand): New helper function.
5179 (preindex_memory_operand): Likewise.
5180 (enum aarch64_system_control_registers): New enum.
5181 (ENCODE): New macro.
5182 (emit_insn): New helper function.
5183 (emit_b): New function.
5184 (emit_bcond): Likewise.
5185 (emit_cb): Likewise.
5186 (emit_tb): Likewise.
5187 (emit_blr): Likewise.
5188 (emit_stp): Likewise.
5189 (emit_ldp_q_offset): Likewise.
5190 (emit_stp_q_offset): Likewise.
5191 (emit_load_store): Likewise.
5192 (emit_ldr): Likewise.
5193 (emit_ldrsw): Likewise.
5194 (emit_str): Likewise.
5195 (emit_ldaxr): Likewise.
5196 (emit_stxr): Likewise.
5197 (emit_stlr): Likewise.
5198 (emit_data_processing_reg): Likewise.
5199 (emit_data_processing): Likewise.
5200 (emit_add): Likewise.
5201 (emit_sub): Likewise.
5202 (emit_mov): Likewise.
5203 (emit_movk): Likewise.
5204 (emit_mov_addr): Likewise.
5205 (emit_mrs): Likewise.
5206 (emit_msr): Likewise.
5207 (emit_sevl): Likewise.
5208 (emit_wfe): Likewise.
5209 (append_insns): Likewise.
5210 (can_encode_int32_in): New helper function.
5211 (aarch64_relocate_instruction): New function.
5212 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5213 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5214 (struct linux_target_ops): Install aarch64_get_thread_area,
5215 aarch64_install_fast_tracepoint_jump_pad and
5216 aarch64_get_min_fast_tracepoint_insn_len.
5218 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5220 * Makefile.in (aarch64-insn.o): New rule.
5221 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5223 2015-09-21 Yao Qi <yao.qi@linaro.org>
5225 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5227 2015-09-21 Yao Qi <yao.qi@linaro.org>
5229 * tracepoint.c (max_jump_pad_size): Remove.
5231 2015-09-18 Yao Qi <yao.qi@linaro.org>
5233 * linux-aarch64-low.c: Don't include sys/uio.h.
5234 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5236 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5238 * tracepoint.c (eval_result_type): Change prototype.
5239 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5241 2015-09-15 Pedro Alves <palves@redhat.com>
5243 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5244 Check whether to report exec events instead of checking whether
5245 multiprocess is enabled.
5247 2015-09-15 Pedro Alves <palves@redhat.com>
5250 * remote-utils.c (prepare_resume_reply): Merge
5251 TARGET_WAITKIND_VFORK_DONE switch case with the
5252 TARGET_WAITKIND_FORKED case.
5254 2015-09-15 Yao Qi <yao.qi@linaro.org>
5256 * server.c (handle_query): Check string comparison using
5257 "else if" instead of "if".
5259 2015-09-15 Yao Qi <yao.qi@linaro.org>
5261 * server.c (vCont_supported): New global variable.
5262 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5263 matches. Append ";vContSupported+" to own_buf.
5264 (handle_v_requests): Append ";s;S" to own_buf if target supports
5265 hardware single step or vCont_supported is false.
5266 (capture_main): Set vCont_supported to zero.
5268 2015-09-15 Yao Qi <yao.qi@linaro.org>
5270 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5272 (linux_supports_hardware_single_step): ... New function.
5273 (linux_target_ops): Update.
5274 * lynx-low.c (lynx_target_ops): Set field
5275 supports_hardware_single_step to target_can_do_hardware_single_step.
5276 * nto-low.c (nto_target_ops): Likewise.
5277 * spu-low.c (spu_target_ops): Likewise.
5278 * win32-low.c (win32_target_ops): Likewise.
5279 * target.c (target_can_do_hardware_single_step): New function.
5280 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5281 Remove. <supports_hardware_single_step>: New field.
5282 (target_supports_conditional_breakpoints): Remove.
5283 (target_supports_hardware_single_step): New macro.
5284 (target_can_do_hardware_single_step): Declare.
5285 * server.c (handle_query): Use target_supports_hardware_single_step
5286 instead of target_supports_conditional_breakpoints.
5288 2015-09-15 Yao Qi <yao.qi@linaro.org>
5290 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5292 (struct linux_target_ops the_low_target): Install
5293 aarch64_linux_siginfo_fixup.
5295 2015-09-11 Don Breazeal <donb@codesourcery.com>
5296 Luis Machado <lgustavo@codesourcery.com>
5298 * linux-low.c (linux_mourn): Static declaration.
5299 (linux_arch_setup): Move in front of
5300 handle_extended_wait.
5301 (linux_arch_setup_thread): New function.
5302 (handle_extended_wait): Handle exec events. Call
5303 linux_arch_setup_thread. Make event_lwp argument a
5304 pointer-to-a-pointer.
5305 (check_zombie_leaders): Do not check stopped threads.
5306 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5307 (linux_low_filter_event): Add lwp and thread for exec'ing
5308 non-leader thread if leader thread has been deleted.
5309 Refactor code into linux_arch_setup_thread and call it.
5310 Pass child lwp pointer by reference to handle_extended_wait.
5311 (linux_wait_for_event_filtered): Update comment.
5312 (linux_wait_1): Prevent clobbering exec event status.
5313 (linux_supports_exec_events): New function.
5314 (linux_target_ops) <supports_exec_events>: Initialize new member.
5315 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5317 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5318 * server.c (report_exec_events): New global variable.
5319 (handle_query): Handle qSupported query for exec-events feature.
5320 (captured_main): Initialize report_exec_events.
5321 * server.h (report_exec_events): Declare new global variable.
5322 * target.h (struct target_ops) <supports_exec_events>: New
5324 (target_supports_exec_events): New macro.
5325 * win32-low.c (win32_target_ops) <supports_exec_events>:
5326 Initialize new member.
5328 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5330 * linux-low.c (linux_low_enable_btrace): Remove.
5331 (linux_target_ops): Replace linux_low_enable_btrace with
5332 linux_enable_btrace.
5334 2015-09-03 Yao Qi <yao.qi@linaro.org>
5336 * linux-aarch64-low.c (aarch64_insert_point): Call
5337 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5340 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5342 * linux-low.c (check_stopped_by_breakpoint): Use
5343 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5345 2015-08-27 Pedro Alves <palves@redhat.com>
5347 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5349 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5351 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5352 the XNEW-family equivalent.
5353 (compile_bytecodes): Likewise.
5354 * dll.c (loaded_dll): Likewise.
5355 * event-loop.c (append_callback_event): Likewise.
5356 (create_file_handler): Likewise.
5357 (create_file_event): Likewise.
5358 * hostio.c (handle_open): Likewise.
5359 * inferiors.c (add_thread): Likewise.
5360 (add_process): Likewise.
5361 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5362 * linux-arm-low.c (arm_new_process): Likewise.
5363 (arm_new_thread): Likewise.
5364 * linux-low.c (add_to_pid_list): Likewise.
5365 (linux_add_process): Likewise.
5366 (handle_extended_wait): Likewise.
5367 (add_lwp): Likewise.
5368 (enqueue_one_deferred_signal): Likewise.
5369 (enqueue_pending_signal): Likewise.
5370 (linux_resume_one_lwp_throw): Likewise.
5371 (linux_resume_one_thread): Likewise.
5372 (linux_read_memory): Likewise.
5373 (linux_write_memory): Likewise.
5374 * linux-mips-low.c (mips_linux_new_process): Likewise.
5375 (mips_linux_new_thread): Likewise.
5376 (mips_add_watchpoint): Likewise.
5377 * linux-x86-low.c (initialize_low_arch): Likewise.
5378 * lynx-low.c (lynx_add_process): Likewise.
5379 * mem-break.c (set_raw_breakpoint_at): Likewise.
5380 (set_breakpoint): Likewise.
5381 (add_condition_to_breakpoint): Likewise.
5382 (add_commands_to_breakpoint): Likewise.
5383 (clone_agent_expr): Likewise.
5384 (clone_one_breakpoint): Likewise.
5385 * regcache.c (new_register_cache): Likewise.
5386 * remote-utils.c (look_up_one_symbol): Likewise.
5387 * server.c (queue_stop_reply): Likewise.
5388 (start_inferior): Likewise.
5389 (queue_stop_reply_callback): Likewise.
5390 (handle_target_event): Likewise.
5391 * spu-low.c (fetch_ppc_memory): Likewise.
5392 (store_ppc_memory): Likewise.
5393 * target.c (set_target_ops): Likewise.
5394 * thread-db.c (thread_db_load_search): Likewise.
5395 (try_thread_db_load_1): Likewise.
5396 * tracepoint.c (add_tracepoint): Likewise.
5397 (add_tracepoint_action): Likewise.
5398 (create_trace_state_variable): Likewise.
5399 (cmd_qtdpsrc): Likewise.
5400 (cmd_qtro): Likewise.
5401 (add_while_stepping_state): Likewise.
5402 * win32-low.c (child_add_thread): Likewise.
5403 (get_image_name): Likewise.
5405 2015-08-25 Yao Qi <yao.qi@linaro.org>
5407 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5409 2015-08-25 Yao Qi <yao.qi@linaro.org>
5411 * Makefile.in (aarch64-linux.o): New rule.
5412 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5414 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5415 (aarch64_init_debug_reg_state): Make it extern.
5416 (aarch64_linux_prepare_to_resume): Remove.
5418 2015-08-25 Yao Qi <yao.qi@linaro.org>
5420 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5421 lwp_arch_private_info and ptid_of_lwp.
5423 2015-08-25 Yao Qi <yao.qi@linaro.org>
5425 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5426 Find proc_info by find_process_pid. All callers updated.
5428 2015-08-25 Yao Qi <yao.qi@linaro.org>
5430 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5432 (debug_reg_change_callback): Remove.
5433 (aarch64_notify_debug_reg_change): Remove.
5435 2015-08-25 Yao Qi <yao.qi@linaro.org>
5437 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5438 Call current_lwp_ptid.
5440 2015-08-25 Yao Qi <yao.qi@linaro.org>
5442 * linux-aarch64-low.c (debug_reg_change_callback): Use
5445 2015-08-25 Yao Qi <yao.qi@linaro.org>
5447 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5449 2015-08-25 Yao Qi <yao.qi@linaro.org>
5451 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5453 2015-08-25 Yao Qi <yao.qi@linaro.org>
5455 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5458 2015-08-25 Yao Qi <yao.qi@linaro.org>
5460 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5462 (debug_reg_change_callback): Remove argument entry and add argument
5463 lwp. Remove local variable thread. Don't print thread id in the
5464 debugging output. Don't check whether pid of thread equals to pid.
5465 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5466 iterate_over_lwps instead find_inferior.
5468 2015-08-24 Pedro Alves <palves@redhat.com>
5470 * inferiors.c (get_first_process): New function.
5471 * inferiors.h (get_first_process): New declaration.
5472 * remote-utils.c (read_ptid): Default to the first process in the
5473 list, instead of to the current thread's process.
5475 2015-08-24 Pedro Alves <palves@redhat.com>
5477 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5478 * event-loop.c: Likewise.
5479 * remote-utils.c: Likewise.
5480 * tracepoint.c: Likewise.
5482 2015-08-24 Pedro Alves <palves@redhat.com>
5484 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5487 2015-08-21 Pedro Alves <palves@redhat.com>
5489 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5490 instead of literal 1.
5492 2015-08-21 Pedro Alves <palves@redhat.com>
5494 * tdesc.c (default_description): Explicitly zero-initialize.
5496 2015-08-21 Pedro Alves <palves@redhat.com>
5499 * inferiors.c (remove_thread): Discard any pending stop reply for
5501 * server.c (remove_all_on_match_pid): Rename to ...
5502 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5504 (discard_queued_stop_replies): Change parameter to a ptid. Now
5506 (handle_v_kill, kill_inferior_callback, captured_main)
5507 (process_serial_event): Adjust.
5508 * server.h (discard_queued_stop_replies): Declare.
5510 2015-08-21 Pedro Alves <palves@redhat.com>
5512 * linux-low.c (wait_for_sigstop): Always switch to no thread
5513 selected if the previously current thread dies.
5514 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5515 process instead of the current thread's.
5516 * remote-utils.c (input_interrupt): Don't check if there's no
5518 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5519 current thread to the general thread fails, error out.
5520 (handle_qxfer_auxv, handle_qxfer_libraries)
5521 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5522 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5523 (handle_query): Check if there's a thread selected instead of
5524 checking whether there's any thread in the thread list.
5525 (handle_qxfer_threads, handle_qxfer_btrace)
5526 (handle_qxfer_btrace_conf): Don't error out early if there's no
5527 thread in the thread list.
5528 (handle_v_cont, myresume): Don't set the current thread to the
5530 (process_serial_event) <Hg handling>: Also set thread_id if the
5531 previous general thread is still alive.
5532 (process_serial_event) <g/G handling>: If setting the current
5533 thread to the general thread fails, error out.
5534 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5535 thread's lwp instead of the current thread's.
5536 * target.c (set_desired_thread): If the desired thread was not
5537 found, leave the current thread pointing to NULL. Return an int
5538 (boolean) indicating success.
5539 * target.h (set_desired_thread): Change return type to int.
5541 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5543 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5544 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5546 (ps_get_thread_area): New function.
5548 2015-08-19 Gary Benson <gbenson@redhat.com>
5550 * hostio.c (handle_pread): Do not attempt to read more data
5551 than hostio_reply_with_data can fit in a packet.
5553 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5555 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5557 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5559 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5561 2015-08-06 Pedro Alves <palves@redhat.com>
5563 * tracepoint.c (expr_eval_result): Now an int.
5565 2015-08-06 Pedro Alves <palves@redhat.com>
5567 * gdbthread.h (struct regcache): Forward declare.
5568 (struct thread_info) <regcache_data>: Now a struct regcache
5570 * inferiors.c (inferior_regcache_data)
5571 (set_inferior_regcache_data): Now work with struct regcache
5573 * inferiors.h (struct regcache): Forward declare.
5574 (inferior_regcache_data, set_inferior_regcache_data): Now work
5575 with struct regcache pointers.
5576 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5577 (free_register_cache_thread): Remove struct regcache pointer
5580 2015-08-06 Pedro Alves <palves@redhat.com>
5582 * server.c (captured_main): On error, print the exception message
5583 to stderr, and if run_once is set, throw a quit.
5585 2015-08-06 Pedro Alves <palves@redhat.com>
5587 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5590 2015-08-06 Pedro Alves <palves@redhat.com>
5592 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5593 reading beyond the passed in buffer length.
5595 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5597 * tracepoint.c (symbol_list) <required>: Remove.
5599 2015-08-06 Pedro Alves <palves@redhat.com>
5601 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5602 count if stopping and suspending threads.
5603 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5604 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5605 (linux_detach): Complete an ongoing step-over.
5606 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5608 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5609 (linux_wait_1): If passing a signal to the inferior after
5610 finishing a step-over, unsuspend and re-resume all lwps. If we
5611 see a single-step event but the thread should be continuing, don't
5612 pass the trap to gdb.
5613 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5614 internal_error instead of gdb_assert.
5615 (enqueue_pending_signal): New function.
5616 (check_ptrace_stopped_lwp_gone): Add debug output.
5617 (start_step_over): Use internal_error instead of gdb_assert.
5618 (complete_ongoing_step_over): New function.
5619 (linux_resume_one_thread): Don't resume a suspended thread.
5620 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5623 2015-08-06 Pedro Alves <palves@redhat.com>
5625 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5626 (linux_thread_alive): Use lwp_is_marked_dead.
5627 (extended_event_reported): Delete.
5628 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5629 instead of extended_event_reported.
5630 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5632 (lwp_is_marked_dead): New function.
5633 (lwp_running): Use lwp_is_marked_dead.
5634 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5637 2015-08-06 Pedro Alves <palves@redhat.com>
5639 * linux-low.c (linux_wait_1): Move fork event output out of the
5640 !report_to_gdb check. Pass event_child->waitstatus to
5641 target_waitstatus_to_string instead of ourstatus.
5643 2015-08-04 Yao Qi <yao.qi@linaro.org>
5645 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5646 if current_thread is 32 bit.
5648 2015-08-04 Yao Qi <yao.qi@linaro.org>
5650 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5651 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5652 * server.c (extended_protocol): Remove "static".
5653 * server.h (extended_protocol): Declare it.
5655 2015-08-04 Yao Qi <yao.qi@linaro.org>
5657 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5658 both aarch64 and aarch32.
5659 (aarch64_set_pc): Likewise.
5661 2015-08-04 Yao Qi <yao.qi@linaro.org>
5663 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5664 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5665 arm-with-neon.xml to srv_xmlfiles.
5666 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5667 (is_64bit_tdesc): New function.
5668 (aarch64_linux_read_description): New function.
5669 (aarch64_arch_setup): Call aarch64_linux_read_description.
5670 (regs_info): Rename to regs_info_aarch64.
5671 (aarch64_regs_info): Return right regs_info.
5672 (initialize_low_arch): Call initialize_low_arch_aarch32.
5674 2015-08-04 Yao Qi <yao.qi@linaro.org>
5676 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5677 * linux-aarch32-low.c: New file.
5678 * linux-aarch32-low.h: New file.
5679 * linux-arm-low.c (arm_fill_gregset): Move it to
5680 linux-aarch32-low.c.
5681 (arm_store_gregset): Likewise.
5682 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5683 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5684 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5685 (regs_info): Rename to regs_info_arm.
5686 (arm_regs_info): Return regs_info_aarch32 if
5687 have_ptrace_getregset is 1 and target description is
5688 arm_with_neon or arm_with_vfpv3.
5689 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5690 Call initialize_low_arch_aarch32 instead.
5692 2015-08-04 Yao Qi <yao.qi@linaro.org>
5694 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5695 * linux-low.c: ... here.
5696 * linux-low.h (have_ptrace_getregset): Declare it.
5698 2015-08-04 Pedro Alves <palves@redhat.com>
5700 * thread-db.c (struct thread_db): Use new typedefs.
5701 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5703 (disable_thread_event_reporting): Cast result of dlsym to
5704 destination function pointer type.
5705 (thread_db_mourn): Use td_ta_delete_ftype.
5707 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5709 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5711 (CDX_BREAKPOINT): Define for R2.
5712 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5713 (the_low_target): Add comments.
5715 2015-07-30 Yao Qi <yao.qi@linaro.org>
5717 * linux-arm-low.c (arm_hwcap): Remove it.
5718 (arm_read_description): New local variable arm_hwcap. Don't
5719 set arm_hwcap to zero.
5721 2015-07-30 Yao Qi <yao.qi@linaro.org>
5723 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5724 Use regcache->tdesc instead.
5725 (arm_store_wmmxregset): Likewise.
5726 (arm_fill_vfpregset): Likewise.
5727 (arm_store_vfpregset): Likewise.
5729 2015-07-30 Yao Qi <yao.qi@linaro.org>
5731 * linux-arm-low.c: Include arch/arm.h.
5732 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5733 (arm_store_gregset): Likewise.
5735 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5737 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5738 ptrace's 4th parameter.
5740 2015-07-27 Yao Qi <yao.qi@linaro.org>
5742 * configure.srv (case aarch64*-*-linux*): Don't set
5745 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5747 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5749 * linux-arm-low.c: Likewise.
5750 * linux-cris-low.c: Likewise.
5751 * linux-crisv32-low.c: Likewise.
5752 * linux-low.c: Likewise.
5753 * linux-m68k-low.c: Likewise.
5754 * linux-mips-low.c: Likewise.
5755 * linux-nios2-low.c: Likewise.
5756 * linux-s390-low.c: Likewise.
5757 * linux-sparc-low.c: Likewise.
5758 * linux-tic6x-low.c: Likewise.
5759 * linux-tile-low.c: Likewise.
5760 * linux-x86-low.c: Likewise.
5762 2015-07-24 Pedro Alves <palves@redhat.com>
5764 * config.in: Regenerate.
5765 * configure: Regenerate.
5767 2015-07-24 Pedro Alves <palves@redhat.com>
5769 * acinclude.m4: Include ../ptrace.m4.
5770 * configure.ac: Call GDB_AC_PTRACE.
5771 * config.in, configure: Regenerate.
5773 2015-07-24 Yao Qi <yao.qi@linaro.org>
5775 * linux-low.c (linux_create_inferior): Remove setting to
5776 proc->priv->new_inferior.
5777 (linux_attach): Likewise.
5778 (linux_low_filter_event): Likewise.
5779 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5781 2015-07-24 Yao Qi <yao.qi@linaro.org>
5783 * linux-low.c (linux_arch_setup): New function.
5784 (linux_low_filter_event): If proc->tdesc is NULL and
5785 proc->attached is true, call the_low_target.arch_setup.
5786 Otherwise, keep status pending, and return.
5787 (linux_resume_one_lwp_throw): Don't call get_pc if
5788 thread->while_stepping isn't NULL. Don't call
5789 get_thread_regcache if proc->tdesc is NULL.
5790 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5791 (linux_target_ops): Install arch_setup.
5792 * server.c (start_inferior): Call the_target->arch_setup.
5793 * target.h (struct target_ops) <arch_setup>: New field.
5794 (target_arch_setup): New marco.
5795 * lynx-low.c (lynx_target_ops): Update.
5796 * nto-low.c (nto_target_ops): Update.
5797 * spu-low.c (spu_target_ops): Update.
5798 * win32-low.c (win32_target_ops): Update.
5800 2015-07-24 Yao Qi <yao.qi@linaro.org>
5802 * linux-low.c (linux_add_process): Don't set
5803 proc->priv->new_inferior.
5804 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5805 (linux_attach): Likewise.
5807 2015-07-24 Yao Qi <yao.qi@linaro.org>
5809 * server.c (start_inferior): Code refactor.
5811 2015-07-24 Yao Qi <yao.qi@linaro.org>
5813 * server.c (process_serial_event): Set general_thread.
5815 2015-07-21 Yao Qi <yao.qi@linaro.org>
5817 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5818 aarch64_linux_get_debug_reg_capacity.
5820 2015-07-17 Yao Qi <yao.qi@linaro.org>
5822 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5823 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5824 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5825 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5826 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5827 (AARCH64_HWP_ALIGNMENT): Likewise.
5828 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5829 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5830 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5831 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5832 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5833 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5834 (struct aarch64_debug_reg_state): Likewise.
5835 (struct arch_lwp_info): Likewise.
5836 (aarch64_align_watchpoint): Likewise.
5837 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5838 (aarch64_watchpoint_length): Likewise.
5839 (aarch64_point_encode_ctrl_reg): Likewise
5840 (aarch64_point_is_aligned): Likewise.
5841 (aarch64_align_watchpoint): Likewise.
5842 (aarch64_linux_set_debug_regs):
5843 (aarch64_dr_state_insert_one_point): Likewise.
5844 (aarch64_dr_state_remove_one_point): Likewise.
5845 (aarch64_handle_breakpoint): Likewise.
5846 (aarch64_handle_aligned_watchpoint): Likewise.
5847 (aarch64_handle_unaligned_watchpoint): Likewise.
5848 (aarch64_handle_watchpoint): Likewise.
5850 2015-07-17 Yao Qi <yao.qi@linaro.org>
5852 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5853 and don't aarch64_get_debug_reg_state. All callers update.
5854 (aarch64_handle_aligned_watchpoint): Likewise.
5855 (aarch64_handle_unaligned_watchpoint): Likewise.
5856 (aarch64_handle_watchpoint): Likewise.
5857 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5858 (aarch64_remove_point): Likewise.
5860 2015-07-17 Yao Qi <yao.qi@linaro.org>
5862 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5864 (aarch64_handle_unaligned_watchpoint): Likewise.
5866 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5868 Revert the previous 3 commits:
5869 Move gdb_regex* to common/
5870 Move linux_find_memory_regions_full & co.
5871 gdbserver build-id attribute generator
5873 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5874 Jan Kratochvil <jan.kratochvil@redhat.com>
5876 gdbserver build-id attribute generator.
5877 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5878 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5879 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5881 (get_dynamic): Use find_pdhr to traverse program headers.
5882 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5883 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5884 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5885 (get_hex_build_id): New.
5886 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5887 to reply XML document.
5889 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5890 Jan Kratochvil <jan.kratochvil@redhat.com>
5892 * target.c: Include target/target-utils.h and fcntl.h.
5893 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5894 (target_fileio_read_stralloc): New functions.
5896 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5898 * Makefile.in (OBS): Add gdb_regex.o.
5900 * config.in: Rebuilt.
5901 * configure: Rebuilt.
5903 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5904 Jan Kratochvil <jan.kratochvil@redhat.com>
5906 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5907 * Makefile.in (OBS): Add target-utils.o.
5908 (linux-maps.o, target-utils.o): New.
5909 * configure.srv (srv_linux_obj): Add linux-maps.o.
5911 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5913 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5915 (the_low_target): Install it.
5917 2015-07-14 Pedro Alves <palves@redhat.com>
5919 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5920 Instead, ignore ECHILD, and throw an error for other errnos.
5922 2015-07-10 Pedro Alves <palves@redhat.com>
5924 * event-loop.c (struct callback_event) <data>: Change type to
5925 gdb_client_data instance instead of gdb_client_data pointer.
5926 (append_callback_event): Adjust.
5928 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5930 * linux-aarch64-low.c: Add comments for each linux_target_ops
5931 method. Remove comments already covered in target_ops and
5932 linux_target_ops definitions.
5933 (the_low_target): Add comments for each unimplemented method.
5935 2015-07-09 Yao Qi <yao.qi@linaro.org>
5937 * linux-aarch64-low.c (aarch64_regmap): Remove.
5938 (aarch64_usrregs_info): Remove.
5939 (regs_info): Set field usrregs to NULL.
5941 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5943 * linux-low.c: Include "rsp-low.h"
5944 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5945 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5946 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5947 (handle_btrace_enable_pt): New.
5948 (handle_btrace_general_set): Support "pt".
5949 (handle_btrace_conf_general_set): Support "pt:size".
5951 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5953 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5956 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5958 * linux-aarch64-low.c: Remove comment about endianness.
5959 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5960 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5963 2015-06-24 Gary Benson <gbenson@redhat.com>
5965 * linux-i386-ipa.c (stdint.h): Do not include.
5966 * lynx-i386-low.c (stdint.h): Likewise.
5967 * lynx-ppc-low.c (stdint.h): Likewise.
5968 * mem-break.c (stdint.h): Likewise.
5969 * thread-db.c (stdint.h): Likewise.
5970 * tracepoint.c (stdint.h): Likewise.
5971 * win32-low.c (stdint.h): Likewise.
5973 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5975 * server.c (write_qxfer_response): Update call to
5976 remote_escape_output.
5978 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5981 Merge multiple hex conversions.
5982 * gdbreplay.c (tohex): Rename to 'fromhex'.
5983 (logchar): Use fromhex.
5985 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5987 * server.c (handle_qxfer_libraries): Set `version' attribute for
5990 2015-06-10 Gary Benson <gbenson@redhat.com>
5992 * target.h (struct target_ops) <multifs_open>: New field.
5993 <multifs_unlink>: Likewise.
5994 <multifs_readlink>: Likewise.
5995 * linux-low.c (nat/linux-namespaces.h): New include.
5996 (linux_target_ops): Initialize the_target->multifs_open,
5997 the_target->multifs_unlink and the_target->multifs_readlink.
5998 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5999 * hostio.c (hostio_fs_pid): New static variable.
6000 (hostio_handle_new_gdb_connection): New function.
6001 (handle_setfs): Likewise.
6002 (handle_open): Use the_target->multifs_open as appropriate.
6003 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6004 (handle_readlink): Use the_target->multifs_readlink as
6006 (handle_vFile): Handle vFile:setfs packets.
6007 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6008 after target_handle_new_gdb_connection.
6010 2015-06-10 Gary Benson <gbenson@redhat.com>
6012 * configure.ac (AC_CHECK_FUNCS): Add setns.
6013 * config.in: Regenerate.
6014 * configure: Likewise.
6015 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6016 (linux-namespaces.o): New rule.
6017 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6019 2015-06-09 Gary Benson <gbenson@redhat.com>
6021 * hostio.c (handle_open): Process mode argument with
6022 fileio_to_host_mode.
6024 2015-06-01 Yao Qi <yao.qi@linaro.org>
6026 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6027 * linux-x86-low.c: Likewise.
6029 2015-05-28 Don Breazeal <donb@codesourcery.com>
6031 * linux-low.c (handle_extended_wait): Initialize
6032 thread_info.last_resume_kind for new fork children.
6034 2015-05-15 Pedro Alves <palves@redhat.com>
6036 * target.h (target_handle_new_gdb_connection): Rewrite using if
6037 wrapped in do/while.
6039 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6041 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6042 * configure, config.in: Regenerate.
6043 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6046 2015-05-12 Don Breazeal <donb@codesourcery.com>
6048 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6049 PTRACE_EVENT_VFORK_DONE.
6050 (linux_low_ptrace_options, extended_event_reported): Add vfork
6052 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6053 and "vforkdone" for RSP 'T' Stop Reply Packet.
6054 * server.h (report_vfork_events): Declare
6057 2015-05-12 Don Breazeal <donb@codesourcery.com>
6059 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6060 (the_low_target) <new_fork>: Initialize new member.
6061 * linux-arm-low.c (arm_new_fork): New function.
6062 (the_low_target) <new_fork>: Initialize new member.
6063 * linux-low.c (handle_extended_wait): Call new target function
6065 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6066 * linux-mips-low.c (mips_add_watchpoint): New function
6067 extracted from mips_insert_point.
6068 (the_low_target) <new_fork>: Initialize new member.
6069 (mips_linux_new_fork): New function.
6070 (mips_insert_point): Call mips_add_watchpoint.
6071 * linux-x86-low.c (x86_linux_new_fork): New function.
6072 (the_low_target) <new_fork>: Initialize new member.
6074 2015-05-12 Don Breazeal <donb@codesourcery.com>
6076 * linux-low.c (handle_extended_wait): Implement return value,
6077 rename argument 'event_child' to 'event_lwp', handle
6078 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6079 (linux_low_ptrace_options): New function.
6080 (linux_low_filter_event): Call linux_low_ptrace_options,
6081 use different argument fo linux_enable_event_reporting,
6082 use return value from handle_extended_wait.
6083 (extended_event_reported): New function.
6084 (linux_wait_1): Call extended_event_reported and set
6085 status to report fork events.
6086 (linux_write_memory): Add pid to debug message.
6087 (reset_lwp_ptrace_options_callback): New function.
6088 (linux_handle_new_gdb_connection): New function.
6089 (linux_target_ops): Initialize new structure member.
6090 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6091 * lynx-low.c: Initialize new structure member.
6092 * remote-utils.c (prepare_resume_reply): Implement stop reason
6093 "fork" for "T" stop message.
6094 * server.c (handle_query): Call handle_new_gdb_connection.
6095 * server.h (report_fork_events): Declare global flag.
6096 * target.h (struct target_ops) <handle_new_gdb_connection>:
6098 (target_handle_new_gdb_connection): New macro.
6099 * win32-low.c: Initialize new structure member.
6101 2015-05-12 Don Breazeal <donb@codesourcery.com>
6103 * mem-break.c (APPEND_TO_LIST): Define macro.
6104 (clone_agent_expr): New function.
6105 (clone_one_breakpoint): New function.
6106 (clone_all_breakpoints): New function.
6107 * mem-break.h: Declare new functions.
6109 2015-05-12 Don Breazeal <donb@codesourcery.com>
6111 * linux-low.c (linux_supports_fork_events): New function.
6112 (linux_supports_vfork_events): New function.
6113 (linux_target_ops): Initialize new structure members.
6114 (initialize_low): Call linux_check_ptrace_features.
6115 * lynx-low.c (lynx_target_ops): Initialize new structure
6117 * server.c (report_fork_events, report_vfork_events):
6119 (handle_query): Add new features to qSupported packet and
6121 (captured_main): Initialize new global variables.
6122 * target.h (struct target_ops) <supports_fork_events>:
6124 <supports_vfork_events>: New member.
6125 (target_supports_fork_events): New macro.
6126 (target_supports_vfork_events): New macro.
6127 * win32-low.c (win32_target_ops): Initialize new structure
6130 2015-05-12 Gary Benson <gbenson@redhat.com>
6132 * server.c (handle_qxfer_exec_file): Use current process
6135 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6137 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6138 Remove HAVE_PTRACE_GETREGS conditionals.
6139 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6140 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6142 2015-05-08 Yao Qi <yao.qi@linaro.org>
6144 * linux-low.c (linux_supports_conditional_breakpoints): New
6146 (linux_target_ops): Install new target method.
6147 * lynx-low.c (lynx_target_ops): Install NULL hook for
6148 supports_conditional_breakpoints.
6149 * nto-low.c (nto_target_ops): Likewise.
6150 * spu-low.c (spu_target_ops): Likewise.
6151 * win32-low.c (win32_target_ops): Likewise.
6152 * server.c (handle_query): Check
6153 target_supports_conditional_breakpoints.
6154 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6156 (target_supports_conditional_breakpoints): New macro.
6158 2015-05-06 Pedro Alves <palves@redhat.com>
6161 * server.c (start_inferior): If the process exits, mourn it.
6163 2015-04-21 Gary Benson <gbenson@redhat.com>
6165 * hostio.c (fileio_open_flags_to_host): Factored out to
6166 fileio_to_host_openflags in common/fileio.c. Single use
6169 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6171 * linux-xtensa-low.c (xtensa_fill_gregset)
6172 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6175 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6177 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6178 (regs_info): Replace usrregs pointer with NULL.
6180 2015-04-17 Gary Benson <gbenson@redhat.com>
6182 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6183 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6184 * server.c (handle_qxfer_exec_file): New function.
6185 (qxfer_packets): Add exec-file entry.
6186 (handle_query): Report qXfer:exec-file:read as supported packet.
6188 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6190 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6192 2015-04-09 Gary Benson <gbenson@redhat.com>
6194 * hostio-errno.c (errno_to_fileio_error): Remove function.
6195 Update caller to use remote_fileio_to_fio_error.
6197 2015-04-09 Yao Qi <yao.qi@linaro.org>
6199 * linux-low.c (linux_insert_point): Call
6200 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6201 (linux_remove_point): Call remove_memory_breakpoint if type is
6203 * linux-x86-low.c (x86_insert_point): Don't call
6204 insert_memory_breakpoint.
6205 (x86_remove_point): Don't call remove_memory_breakpoint.
6207 2015-04-01 Pedro Alves <palves@redhat.com>
6208 Cleber Rosa <crosa@redhat.com>
6210 * server.c (gdbserver_usage): Reorganize and extend the usage
6213 2015-03-24 Pedro Alves <palves@redhat.com>
6215 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6216 output. Also dump TRAP_TRACE.
6217 (linux_low_filter_event): In debug output, distinguish a
6218 resume_stop SIGSTOP from a delayed SIGSTOP.
6220 2015-03-24 Gary Benson <gbenson@redhat.com>
6222 * linux-x86-low.c (x86_linux_new_thread): Moved to
6224 (x86_linux_prepare_to_resume): Likewise.
6226 2015-03-24 Gary Benson <gbenson@redhat.com>
6228 * Makefile.in (x86-linux-dregs.o): New rule.
6229 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6230 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6231 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6232 (x86_linux_dr_get): Likewise.
6233 (x86_linux_dr_set): Likewise.
6234 (update_debug_registers_callback): Likewise.
6235 (x86_linux_dr_set_addr): Likewise.
6236 (x86_linux_dr_get_addr): Likewise.
6237 (x86_linux_dr_set_control): Likewise.
6238 (x86_linux_dr_get_control): Likewise.
6239 (x86_linux_dr_get_status): Likewise.
6240 (x86_linux_update_debug_registers): Likewise.
6242 2015-03-24 Gary Benson <gbenson@redhat.com>
6244 * linux-x86-low.c (x86_linux_update_debug_registers):
6245 New function, factored out from...
6246 (x86_linux_prepare_to_resume): ...this.
6248 2015-03-24 Gary Benson <gbenson@redhat.com>
6250 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6251 (x86_linux_dr_set): Likewise.
6252 (update_debug_registers_callback): Likewise.
6253 (x86_linux_dr_set_addr): Likewise.
6254 (x86_linux_dr_get_addr): Likewise.
6255 (x86_linux_dr_set_control): Likewise.
6256 (x86_linux_dr_get_control): Likewise.
6257 (x86_linux_dr_get_status): Likewise.
6258 (x86_linux_prepare_to_resume): Likewise.
6260 2015-03-24 Gary Benson <gbenson@redhat.com>
6262 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6263 Use perror_with_name. Pass string through gettext.
6264 (x86_linux_dr_set): Likewise.
6266 2015-03-24 Gary Benson <gbenson@redhat.com>
6268 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6269 (x86_linux_dr_set_addr): ...this.
6270 (x86_dr_low_get_addr): Rename to...
6271 (x86_linux_dr_get_addr): ...this.
6272 (x86_dr_low_set_control): Rename to...
6273 (x86_linux_dr_set_control): ...this.
6274 (x86_dr_low_get_control): Rename to...
6275 (x86_linux_dr_get_control): ...this.
6276 (x86_dr_low_get_status): Rename to...
6277 (x86_linux_dr_get_status): ...this.
6278 (x86_dr_low): Update with new function names.
6280 2015-03-24 Gary Benson <gbenson@redhat.com>
6282 * Makefile.in (x86-linux.o): New rule.
6283 * configure.srv: Add x86-linux.o to relevant targets.
6284 * linux-low.c (lwp_set_arch_private_info): New function.
6285 (lwp_arch_private_info): Likewise.
6286 * linux-x86-low.c: Include nat/x86-linux.h.
6287 (arch_lwp_info): Removed structure.
6288 (update_debug_registers_callback):
6289 Use lwp_set_debug_registers_changed.
6290 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6291 and lwp_set_debug_registers_changed.
6292 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6294 2015-03-24 Gary Benson <gbenson@redhat.com>
6296 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6297 * linux-arm-low.c (arm_new_thread): Likewise.
6298 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6299 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6300 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6301 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6303 2015-03-24 Gary Benson <gbenson@redhat.com>
6305 * linux-low.c (ptid_of_lwp): New function.
6306 (lwp_is_stopped): Likewise.
6307 (lwp_stop_reason): Likewise.
6308 * linux-x86-low.c (update_debug_registers_callback):
6310 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6313 2015-03-24 Gary Benson <gbenson@redhat.com>
6315 * linux-low.h (linux_stop_lwp): Remove declaration.
6317 2015-03-24 Gary Benson <gbenson@redhat.com>
6319 * linux-low.h: Include nat/linux-nat.h.
6320 * linux-low.c (iterate_over_lwps_args): New structure.
6321 (iterate_over_lwps_filter): New function.
6322 (iterate_over_lwps): Likewise.
6323 * linux-x86-low.c (update_debug_registers_callback):
6324 Update signature to what iterate_over_lwps expects.
6325 Remove PID check that iterate_over_lwps now performs.
6326 (x86_dr_low_set_addr): Use iterate_over_lwps.
6327 (x86_dr_low_set_control): Likewise.
6329 2015-03-24 Gary Benson <gbenson@redhat.com>
6331 * linux-x86-low.c (x86_debug_reg_state): New function.
6332 (x86_linux_prepare_to_resume): Use the above.
6334 2015-03-24 Gary Benson <gbenson@redhat.com>
6336 * linux-low.c (current_lwp_ptid): New function.
6337 * linux-x86-low.c: Include nat/linux-nat.h.
6338 (x86_dr_low_get_addr): Use current_lwp_ptid.
6339 (x86_dr_low_get_control): Likewise.
6340 (x86_dr_low_get_status): Likewise.
6342 2015-03-20 Pedro Alves <palves@redhat.com>
6344 * tracepoint.c (cmd_qtstatus): Make "str" const.
6346 2015-03-20 Pedro Alves <palves@redhat.com>
6348 * server.c (handle_general_set): Make "req_str" const.
6350 2015-03-19 Pedro Alves <palves@redhat.com>
6352 * linux-low.c (linux_resume_one_lwp): Rename to ...
6353 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6354 instead call perror_with_name.
6355 (check_ptrace_stopped_lwp_gone): New function.
6356 (linux_resume_one_lwp): Reimplement as wrapper around
6357 linux_resume_one_lwp_throw that swallows errors if the LWP is
6360 2015-03-19 Pedro Alves <palves@redhat.com>
6362 * linux-low.c (count_events_callback, select_event_lwp_callback):
6363 No longer check whether the thread has resume_stop as last resume
6366 2015-03-19 Pedro Alves <palves@redhat.com>
6368 * linux-low.c (count_events_callback, select_event_lwp_callback):
6369 Use the lwp's status_pending_p field, not the thread's.
6371 2015-03-19 Pedro Alves <palves@redhat.com>
6373 * linux-low.c (select_event_lwp_callback): Update comments to
6374 no longer mention SIGTRAP.
6376 2015-03-18 Gary Benson <gbenson@redhat.com>
6378 * server.c (handle_query): Do not report vFile:fstat as supported.
6380 2015-03-11 Gary Benson <gbenson@redhat.com>
6382 * hostio.c (sys/types.h): New include.
6383 (sys/stat.h): Likewise.
6384 (common-remote-fileio.h): Likewise.
6385 (handle_fstat): New function.
6386 (handle_vFile): Handle vFile:fstat packets.
6388 2015-03-11 Gary Benson <gbenson@redhat.com>
6390 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6391 struct stat.st_blocks and struct stat.st_blksize.
6392 * configure: Regenerate.
6393 * config.in: Likewise.
6394 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6395 (OBS): Add common-remote-fileio.o.
6396 (common-remote-fileio.o): New rule.
6398 2015-03-09 Pedro Alves <palves@redhat.com>
6400 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6401 'struct sockaddr' pointer in 'accept' call.
6403 2015-03-09 Pedro Alves <palves@redhat.com>
6406 2015-03-07 Pedro Alves <palves@redhat.com>
6407 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6408 or <winsock2.h> here. Instead include "gdb_socket.h".
6409 (remote_open): Use union gdb_sockaddr_u.
6410 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6411 or <winsock2.h> here. Instead include "gdb_socket.h".
6412 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6413 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6415 (init_named_socket, gdb_agent_helper_thread): Use union
6418 2015-03-07 Pedro Alves <palves@redhat.com>
6420 * configure.ac (build_warnings): Move
6421 -Wdeclaration-after-statement to the C-specific set.
6422 * configure: Regenerate.
6424 2015-03-07 Pedro Alves <palves@redhat.com>
6426 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6427 or <winsock2.h> here. Instead include "gdb_socket.h".
6428 (remote_open): Use union gdb_sockaddr_u.
6429 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6430 or <winsock2.h> here. Instead include "gdb_socket.h".
6431 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6432 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6434 (init_named_socket, gdb_agent_helper_thread): Use union
6437 2015-03-07 Pedro Alves <palves@redhat.com>
6439 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6442 2015-03-06 Yao Qi <yao.qi@linaro.org>
6444 * linux-aarch64-low.c (aarch64_insert_point): Use
6445 show_debug_regs as a boolean.
6446 (aarch64_remove_point): Likewise.
6448 2015-03-05 Pedro Alves <palves@redhat.com>
6450 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6451 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6452 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6453 * nto-low.c (nto_target_ops): Likewise.
6454 * spu-low.c (spu_target_ops): Likewise.
6455 * win32-low.c (win32_target_ops): Likewise.
6457 2015-03-04 Pedro Alves <palves@redhat.com>
6459 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6460 Decide whether a breakpoint triggered based on the SIGTRAP's
6462 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6463 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6464 (linux_low_filter_event): Check for breakpoints before checking
6466 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6468 (linux_stopped_by_sw_breakpoint)
6469 (linux_supports_stopped_by_sw_breakpoint)
6470 (linux_stopped_by_hw_breakpoint)
6471 (linux_supports_stopped_by_hw_breakpoint): New functions.
6472 (linux_target_ops): Install new target methods.
6474 2015-03-04 Pedro Alves <palves@redhat.com>
6476 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6477 * server.c (swbreak_feature, hwbreak_feature): New globals.
6478 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6479 (captured_main): Clear swbreak_feature and hwbreak_feature.
6480 * server.h (swbreak_feature, hwbreak_feature): Declare.
6481 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6482 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6483 supports_stopped_by_hw_breakpoint>: New fields.
6484 (target_supports_stopped_by_sw_breakpoint)
6485 (target_stopped_by_sw_breakpoint)
6486 (target_supports_stopped_by_hw_breakpoint)
6487 (target_stopped_by_hw_breakpoint): Declare.
6489 2015-03-04 Pedro Alves <palves@redhat.com>
6491 enum lwp_stop_reason -> enum target_stop_reason
6492 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6493 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6494 (linux_wait_1, stuck_in_jump_pad_callback)
6495 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6496 (linux_stopped_by_watchpoint):
6497 * linux-low.h (enum lwp_stop_reason): Delete.
6498 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6499 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6501 2015-03-04 Yao Qi <yao.qi@linaro.org>
6503 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6505 2015-03-03 Gary Benson <gbenson@redhat.com>
6507 * hostio.c (handle_vFile): Fix prefix lengths.
6509 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6511 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6514 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6516 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6517 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6518 (clean): Add "rm -f" for above C files.
6519 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6520 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6521 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6522 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6523 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6524 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6525 (init_registers_s390x_vx_linux64)
6526 (init_registers_s390x_tevx_linux64)
6527 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6528 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6530 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6531 (s390_store_vxrs_high): New functions.
6532 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6534 (s390_arch_setup): Add logic for selecting one of the new target
6535 descriptions. Activate the new vector regsets if applicable.
6536 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6537 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6538 and init_registers_s390x_tevx_linux64.
6540 2015-03-01 Pedro Alves <palves@redhat.com>
6542 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6545 2015-02-27 Pedro Alves <palves@redhat.com>
6547 * linux-x86-low.c (u_debugreg_offset): New function.
6548 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6550 2015-02-27 Pedro Alves <palves@redhat.com>
6552 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6553 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6554 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6555 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6556 (ps_lsetfpregs, ps_getpid)
6557 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6558 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6559 (ps_lsetxregs, ps_plog): Declare.
6561 2015-02-27 Pedro Alves <palves@redhat.com>
6563 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6564 IP_AGENT_EXPORT_FUNC.
6565 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6566 IP_AGENT_EXPORT_FUNC.
6567 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6568 (IP_AGENT_EXPORT): Delete.
6569 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6570 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6571 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6572 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6573 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6574 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6575 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6576 (traceframe_read_count, traceframe_write_count)
6577 (traceframes_created, trace_state_variables, get_raw_reg)
6578 (get_trace_state_variable_value, set_trace_state_variable_value)
6579 (ust_loaded, helper_thread_id, cmd_buf): Use
6580 IPA_SYM_EXPORTED_NAME.
6581 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6582 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6583 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6584 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6585 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6586 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6587 EXTERN_C_PUSH/EXTERN_C_POP.
6588 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6589 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6590 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6591 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6592 (traceframe_write_count, traceframe_read_count)
6593 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6594 (about_to_request_buffer_space, get_trace_state_variable_value)
6595 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6596 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6597 EXTERN_C_PUSH/EXTERN_C_POP.
6598 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6599 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6600 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6601 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6602 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6603 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6604 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6605 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6607 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6608 (IP_AGENT_EXPORT_VAR_DECL): Define.
6610 (gdb_agent_get_raw_reg): Declare.
6612 2015-02-27 Tom Tromey <tromey@redhat.com>
6613 Pedro Alves <palves@redhat.com>
6615 Rename symbols whose names are reserved C++ keywords throughout.
6617 2015-02-27 Pedro Alves <palves@redhat.com>
6619 * Makefile.in (COMPILER): New, get it from autoconf.
6620 (CXX): Get from autoconf instead.
6621 (COMPILE.pre): Use COMPILER.
6622 (CC-LD): Rename to ...
6623 (CC_LD): ... this. Use COMPILER.
6624 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6625 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6626 * acinclude.m4: Include build-with-cxx.m4.
6627 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6628 Disable -Werror by default if building in C++ mode.
6629 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6630 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6631 the C++ compiler. Save/restore CXXFLAGS too.
6632 * configure: Regenerate.
6634 2015-02-27 Pedro Alves <palves@redhat.com>
6636 * acinclude.m4: Include libiberty.m4.
6637 * configure.ac: Call libiberty_INIT.
6638 * config.in, configure: Regenerate.
6640 2015-02-26 Pedro Alves <palves@redhat.com>
6642 * linux-low.c (linux_wait_1): When incrementing the PC past a
6643 program breakpoint always use the_low_target.breakpoint_len as
6644 increment, rather than the maximum between that and
6645 the_low_target.decr_pc_after_break.
6647 2015-02-23 Pedro Alves <palves@redhat.com>
6649 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6650 thread was doing a step-over; always adjust the PC if
6651 we stepped over a permanent breakpoint.
6652 (linux_wait_1): If we stepped over breakpoint that was on top of a
6653 permanent breakpoint, manually advance the PC past it.
6655 2015-02-23 Pedro Alves <palves@redhat.com>
6657 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6659 (x86_fill_gregset, x86_store_gregset): Use it when handling
6662 2015-02-20 Pedro Alves <palves@redhat.com>
6664 * thread-db.c: Include "nat/linux-procfs.h".
6665 (thread_db_init): Skip listing new threads if the kernel supports
6666 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6668 2015-02-20 Pedro Alves <palves@redhat.com>
6670 * linux-low.c (status_pending_p_callback): Use ptid_match.
6672 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6674 PR breakpoints/16812
6675 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6676 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6677 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6679 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6681 PR breakpoints/15956
6682 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6684 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6686 * linux-low.c (linux_low_btrace_conf): Print size.
6687 * server.c (handle_btrace_conf_general_set): New.
6688 (hanle_general_set): Call handle_btrace_conf_general_set.
6689 (handle_query): Report Qbtrace-conf:bts:size as supported.
6691 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6693 * linux-low.c (linux_low_enable_btrace): Update parameters.
6694 (linux_low_btrace_conf): New.
6695 (linux_target_ops)<to_btrace_conf>: Initialize.
6696 * server.c (current_btrace_conf): New.
6697 (handle_btrace_enable): Rename to ...
6698 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6699 to target_enable_btrace. Update comment. Update users.
6700 (handle_qxfer_btrace_conf): New.
6701 (qxfer_packets): Add btrace-conf entry.
6702 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6703 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6704 (target_ops)<read_btrace_conf>: New.
6705 (target_enable_btrace): Update parameters.
6706 (target_read_btrace_conf): New.
6708 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6710 * server.c (handle_btrace_general_set): Remove call to
6711 target_supports_btrace.
6712 (supported_btrace_packets): New.
6713 (handle_query): Call supported_btrace_packets.
6714 * target.h: include btrace-common.h.
6715 (btrace_target_info): Removed.
6716 (supports_btrace, target_supports_btrace): Update parameters.
6718 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6720 * Makefile.in (SFILES): Add common/btrace-common.c.
6721 (OBS): Add common/btrace-common.o.
6722 (btrace-common.o): Add build rules.
6723 * linux-low: Include btrace-common.h.
6724 (linux_low_read_btrace): Use struct btrace_data. Call
6725 btrace_data_init and btrace_data_fini.
6727 2015-02-06 Pedro Alves <palves@redhat.com>
6729 * thread-db.c (find_new_threads_callback): Add debug output.
6731 2015-02-04 Pedro Alves <palves@redhat.com>
6733 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6734 (resume_stopped_resumed_lwps): New function.
6735 (linux_wait_for_event_filtered): Use it.
6737 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6739 * Makefile.in (SFILES): Add linux-personality.c.
6740 (linux-personality.o): New rule.
6741 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6742 list of objects to be built.
6743 * linux-low.c: Include nat/linux-personality.h.
6744 (linux_create_inferior): Remove code to disable address space
6745 randomization (moved to ../nat/linux-personality.c). Create
6746 cleanup to disable address space randomization.
6748 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6750 * Makefile.in (posix-strerror.o): New rule.
6751 (mingw-strerror.o): Likewise.
6752 * configure: Regenerated.
6753 * configure.ac: Source file ../common/common.host. Initialize new
6754 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6756 2015-01-14 Yao Qi <yao@codesourcery.com>
6758 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6759 (ppc-linux.o): New rule.
6760 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6761 * configure.ac: AC_CHECK_FUNCS(getauxval).
6762 * config.in: Re-generated.
6763 * configure: Re-generated.
6764 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6765 ppc64_64bit_inferior_p
6767 2015-01-14 Yao Qi <yao@codesourcery.com>
6769 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6770 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6771 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6772 (PT_ORIG_R3, PT_TRAP): Likewise.
6773 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6774 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6775 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6777 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6779 * i387-fp.c (i387_cache_to_xsave): In look over
6780 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6781 zmmh_low_space field by use of zmmh_high_space.
6783 2015-01-09 Pedro Alves <palves@redhat.com>
6785 * linux-low.c (step_over_bkpt): Move higher up in the file.
6786 (handle_extended_wait): Don't store the stop_pc here.
6787 (get_stop_pc): Adjust comments and rename to ...
6788 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6789 stopped for a software breakpoint or hardware breakpoint.
6790 (thread_still_has_status_pending_p): New function.
6791 (status_pending_p_callback): Use
6792 thread_still_has_status_pending_p. If the event is no longer
6793 interesting, resume the LWP.
6794 (handle_tracepoints): Add assert.
6795 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6796 (wstatus_maybe_breakpoint): New function.
6797 (cancel_breakpoint): Delete function.
6798 (check_stopped_by_watchpoint): New function, factored out from
6799 linux_low_filter_event.
6800 (lp_status_maybe_breakpoint): Delete function.
6801 (linux_low_filter_event): Remove filter_ptid argument.
6802 Leave thread group exits pending here. Store the LWP's stop PC.
6803 Always leave events pending.
6804 (linux_wait_for_event_filtered): Pull all events out of the
6805 kernel, and leave them all pending.
6806 (count_events_callback, select_event_lwp_callback): Consider all
6808 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6809 (select_event_lwp): Only give preference to the stepping LWP in
6810 all-stop mode. Adjust comments.
6811 (ignore_event): New function.
6812 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6813 references to cancel_breakpoints. Adjust to renames. Also give
6814 equal priority to all LWPs that have had events in non-stop mode.
6815 If reporting a software breakpoint event, unadjust the LWP's PC.
6816 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6817 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6819 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6820 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6821 (linux_stopped_by_watchpoint): Adjust.
6822 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6823 * linux-low.h (enum lwp_stop_reason): New.
6824 (struct lwp_info) <stop_pc>: Adjust comment.
6825 <stopped_by_watchpoint>: Delete field.
6826 <stop_reason>: New field.
6827 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6828 * mem-break.c (software_breakpoint_inserted_here)
6829 (hardware_breakpoint_inserted_here): New function.
6830 * mem-break.h (software_breakpoint_inserted_here)
6831 (hardware_breakpoint_inserted_here): Declare.
6832 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6833 (cancel_breakpoints): Delete.
6834 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6835 (upload_fast_traceframes): Remove references to
6838 2015-01-09 Pedro Alves <palves@redhat.com>
6840 * thread-db.c (find_new_threads_callback): Ignore thread if the
6841 kernel thread ID is -1.
6843 2015-01-09 Pedro Alves <palves@redhat.com>
6845 * linux-low.c (linux_attach_fail_reason_string): Move to
6846 nat/linux-ptrace.c, and rename.
6847 (linux_attach_lwp): Update comment.
6848 (attach_proc_task_lwp_callback): New function.
6849 (linux_attach): Adjust to rename and use
6850 linux_proc_attach_tgid_threads.
6851 (linux_attach_fail_reason_string): Delete declaration.
6853 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6855 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6856 * server.c (gdbserver_version): Likewise.
6858 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6860 * remote-utils.c: Include ctype.h.
6861 (input_interrupt): Explicitly handle the case when the char
6862 received is the NUL byte. Improve the printing of non-ASCII
6865 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6867 * linux-low.c (linux_low_filter_event): Update call to
6868 linux_enable_event_reporting following the addition of
6869 a new parameter to that function.
6871 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6874 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6875 (AARCH64_FPCR_REGNO): Likewise.
6876 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6877 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6878 (aarch64_store_fpregset): Likewise.
6880 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6882 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6883 Remove FIXME comment about assumption about N.
6885 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6887 * configure.ac: If large-file support is disabled in GDBserver,
6888 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6889 * configure: Regenerate.
6891 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6893 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6894 warning upon ENODATA from ptrace.
6895 * linux-s390-low.c (s390_store_tdb): New.
6896 (s390_regsets): Add regset for NT_S390_TDB.
6898 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6900 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6901 without a fill_function.
6902 * linux-s390-low.c (s390_fill_last_break): Remove.
6903 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6904 (s390_arch_setup): Use regset's size instead of fill_function for
6907 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6909 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6910 the regset's store function when ptrace returned an error.
6911 * regcache.c (get_thread_regcache): Invalidate register cache
6912 before fetching inferior's registers.
6914 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6916 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6917 while-loop as for-loop.
6918 (regsets_store_inferior_registers): Likewise.
6920 2014-11-28 Yao Qi <yao@codesourcery.com>
6922 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6923 * config.in, configure: Re-generate.
6924 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6927 2014-11-21 Yao Qi <yao@codesourcery.com>
6929 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6930 (AC_CHECK_HEADERS): Remove malloc.h.
6931 * configure: Re-generated.
6932 * config.in: Re-generated.
6933 * server.h: Don't include alloca.h and malloc.h.
6934 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6935 Don't include malloc.h.
6937 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6939 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6940 corresponding ERRNO check in same block.
6942 2014-11-12 Pedro Alves <palves@redhat.com>
6944 * server.c (cont_thread): Update comment.
6945 (start_inferior, attach_inferior): No longer clear cont_thread.
6946 (handle_v_cont): No longer set cont_thread.
6947 (captured_main): Clear cont_thread each time a GDB connects.
6949 2014-11-12 Pedro Alves <palves@redhat.com>
6951 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6952 thread, and don't resume all threads if the Hc thread has exited.
6954 2014-11-12 Pedro Alves <palves@redhat.com>
6956 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6957 the process group instead of to a specific LWP.
6959 2014-10-15 Pedro Alves <palves@redhat.com>
6962 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6964 (arm_set_thread_context): Delete.
6965 (the_low_target): Adjust.
6966 * win32-i386-low.c (debug_registers_changed)
6967 (debug_registers_used): Delete.
6968 (update_debug_registers_callback): New function.
6969 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6970 needing to update their debug registers.
6971 (win32_get_current_dr): New function.
6972 (x86_dr_low_get_addr, x86_dr_low_get_control)
6973 (x86_dr_low_get_status): Fetch the debug register from the thread
6975 (i386_initial_stuff): Adjust.
6976 (i386_get_thread_context): Remove current_event parameter. Don't
6977 clear debug_registers_changed nor copy DR values to
6979 (i386_set_thread_context): Delete.
6980 (i386_prepare_to_resume): New function.
6981 (i386_thread_added): Mark the thread as needing to update irs
6983 (the_low_target): Remove i386_set_thread_context and install
6984 i386_prepare_to_resume.
6985 * win32-low.c (win32_get_thread_context): Adjust.
6986 (win32_set_thread_context): Use SetThreadContext
6988 (win32_prepare_to_resume): New function.
6989 (win32_require_context): New function, factored out from ...
6990 (thread_rec): ... this.
6991 (continue_one_thread): Call win32_prepare_to_resume on each thread
6992 we're about to continue.
6993 (win32_resume): Call win32_prepare_to_resume on the event thread.
6994 * win32-low.h (struct win32_thread_info)
6995 <debug_registers_changed>: New field.
6996 (struct win32_target_ops): Change prototype of set_thread_context,
6997 delete set_thread_context and add prepare_to_resume.
6998 (win32_require_context): New declaration.
7000 2014-10-08 Gary Benson <gbenson@redhat.com>
7002 * server.h: Do not include common-exceptions.h.
7004 2014-10-08 Gary Benson <gbenson@redhat.com>
7006 * server.h: Do not include cleanups.h.
7008 2014-09-30 James Hogan <james.hogan@imgtec.com>
7010 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7013 2014-09-23 Yao Qi <yao@codesourcery.com>
7015 * linux-low.c (lp_status_maybe_breakpoint): New function.
7016 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7017 (count_events_callback): Likewise.
7018 (select_event_lwp_callback): Likewise.
7019 (cancel_breakpoints_callback): Likewise.
7021 2014-09-19 Don Breazeal <donb@codesourcery.com>
7023 * linux-low.c (handle_extended_wait): Call
7024 linux_ptrace_get_extended_event.
7025 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7026 linux_is_extended_waitstatus.
7028 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7030 * Makefile.in (CPPFLAGS): Define.
7031 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7032 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7034 2014-09-16 Gary Benson <gbenson@redhat.com>
7036 * inferiors.h (current_inferior): Renamed as...
7037 (current_thread): New variable. All uses updated.
7038 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7039 (maybe_move_out_of_jump_pad): Likewise.
7040 (cancel_breakpoint): Likewise.
7041 (linux_low_filter_event): Likewise.
7042 (wait_for_sigstop): Likewise.
7043 (linux_resume_one_lwp): Likewise.
7044 (need_step_over_p): Likewise.
7045 (start_step_over): Likewise.
7046 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7047 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7048 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7049 and save_inferior as saved_thread.
7050 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7052 (regcache_invalidate_thread): Likewise.
7053 * remote-utils.c (prepare_resume_reply): Likewise.
7054 * thread-db.c (thread_db_get_tls_address): Likewise.
7055 (disable_thread_event_reporting): Likewise.
7056 (remove_thread_event_breakpoints): Likewise.
7057 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7059 * target.h (set_desired_inferior): Renamed as...
7060 (set_desired_thread): New declaration. All uses updated.
7061 * server.c (myresume): Updated comment to reference thread instead
7063 (handle_serial_event): Likewise.
7064 (handle_target_event): Likewise.
7066 2014-09-12 Tom Tromey <tromey@redhat.com>
7067 Gary Benson <gbenson@redhat.com>
7069 * regcache.h: Include common-regcache.h.
7070 (regcache_read_pc): Don't declare.
7071 * regcache.c (get_thread_regcache_for_ptid): New function.
7073 2014-09-11 Tom Tromey <tromey@redhat.com>
7074 Gary Benson <gbenson@redhat.com>
7076 * symbol.c: New file.
7077 * Makefile.in (SFILES): Add symbol.c.
7078 (OBS): Add symbol.o.
7080 2014-09-11 Gary Benson <gbenson@redhat.com>
7082 * target.c (target_stop_ptid, target_continue_ptid): New
7085 2014-09-11 Tom Tromey <tromey@redhat.com>
7086 Gary Benson <gbenson@redhat.com>
7088 * target.h: Include target/target.h.
7089 * target.c (target_read_memory, target_read_uint32)
7090 (target_write_memory): New functions.
7092 2014-09-11 Gary Benson <gbenson@redhat.com>
7094 * server.h (debug_hw_points): Don't declare.
7095 * server.c (debug_hw_points): Don't define. Replace all uses
7096 with show_debug_regs.
7097 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7098 all uses with show_debug_regs.
7100 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7102 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7103 endianness into account.
7104 (ppc_supply_ptrace_register): Likewise.
7106 2014-09-03 James Hogan <james.hogan@imgtec.com>
7108 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7109 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7111 2014-09-03 Gary Benson <gbenson@redhat.com>
7113 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7114 ALL_DEBUG_ADDRESS_REGISTERS.
7116 2014-09-02 Gary Benson <gbenson@redhat.com>
7118 * i386-low.h: Renamed as...
7119 * x86-low.h: New file. All type, function and variable name
7120 prefixes changed from "i386_" to "x86_". All references updated.
7121 * i386-low.c: Renamed as...
7122 * x86-low.c: New file. All type, function and variable name
7123 prefixes changed from "i386_" to "x86_". All references updated.
7125 2014-09-02 Gary Benson <gbenson@redhat.com>
7127 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7128 (x86_linux_new_thread): Likewise.
7130 2014-08-29 Gary Benson <gbenson@redhat.com>
7132 * server.h (setjmp.h): Do not include.
7133 (toplevel): Do not declare.
7134 (common-exceptions.h): Include.
7135 (cleanups.h): Likewise.
7136 * server.c (toplevel): Do not define.
7137 (exit_code): New static global.
7138 (detach_or_kill_for_exit_cleanup): New function.
7139 (main): New function. Original main renamed to...
7140 (captured_main): New function.
7141 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7143 2014-08-29 Gary Benson <gbenson@redhat.com>
7145 * Makefile.in (SFILES): Add common/common-exceptions.c.
7146 (OBS): Add common-exceptions.o.
7147 (common-exceptions.o): New rule.
7148 * utils.c (prepare_to_throw_exception): New function.
7150 2014-08-29 Gary Benson <gbenson@redhat.com>
7152 * config.in: Regenerate.
7153 * configure: Likewise.
7155 2014-08-29 Gary Benson <gbenson@redhat.com>
7157 * Makefile.in (SFILES): Add common/cleanups.c.
7159 (cleanups.o): New rule.
7161 2014-08-29 Gary Benson <gbenson@redhat.com>
7163 * utils.c (internal_vwarning): New function.
7165 2014-08-28 Gary Benson <gbenson@redhat.com>
7167 * utils.h (fatal): Remove declaration.
7168 * utils.c (fatal): Remove function.
7170 2014-08-28 Gary Benson <gbenson@redhat.com>
7172 * tracepoint.c (gdb_agent_init): Replace fatal with
7174 (initialize_tracepoint): Likewise.
7176 2014-08-28 Gary Benson <gbenson@redhat.com>
7178 * remote-utils.c (remote_prepare): Replace fatal with error.
7180 2014-08-28 Gary Benson <gbenson@redhat.com>
7182 * linux-low.c (linux_async): Replace fatal with warning.
7184 (linux_start_non_stop): Return -1 if linux_async failed.
7186 2014-08-28 Gary Benson <gbenson@redhat.com>
7188 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7190 (i386_dr_low_get_addr): Remove vague comment.
7191 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7194 2014-08-28 Gary Benson <gbenson@redhat.com>
7196 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7197 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7199 (linux_resume_one_lwp): Likewise.
7200 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7202 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7203 with internal_error.
7204 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7205 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7206 (find_register_by_name): Replace fatal with internal_error.
7207 (find_regno): Likewise.
7208 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7209 * thread-db.c (thread_db_create_event): Likewise.
7210 (thread_db_load_search): Likewise.
7211 (try_thread_db_load_1): Likewise.
7212 * tracepoint.c (get_jump_space_head): Replace fatal with
7214 (claim_trampoline_space): Likewise.
7215 (have_fast_tracepoint_trampoline_buffer): Likewise.
7216 (cmd_qtstart): Likewise.
7217 (stop_tracing): Likewise.
7218 (fast_tracepoint_collecting): Likewise.
7219 (target_malloc): Likewise.
7220 (download_tracepoint): Likewise.
7221 (download_trace_state_variables): Replace check with gdb_assert.
7222 (upload_fast_traceframes): Replace fatal with internal_error.
7224 2014-08-19 Tom Tromey <tromey@redhat.com>
7225 Gary Benson <gbenson@redhat.com>
7227 * Makefile.in (SFILES): Add common/common-debug.c.
7228 (OBS): Add common-debug.o.
7229 (common-debug.o): New rule.
7230 * debug.h (debug_printf): Don't declare.
7231 * debug.c (debug_printf): Renamed and rewritten as...
7232 (debug_vprintf): New function.
7234 2014-08-19 Gary Benson <gbenson@redhat.com>
7236 * utils.h: Do not include print-utils.h.
7238 2014-08-19 Tom Tromey <tromey@redhat.com>
7239 Gary Benson <gbenson@redhat.com>
7241 * server.h: Add static assertion.
7242 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7244 2014-08-19 Tom Tromey <tromey@redhat.com>
7245 Gary Benson <gbenson@redhat.com>
7247 * Makefile.in (SFILES): Add common/errors.c.
7248 (OBS): Add errors.o.
7249 (IPA_OBS): Add errors-ipa.o.
7250 (errors.o): New rule.
7251 (errors-ipa.o): Likewise.
7252 * utils.h (perror_with_name, error, warning): Don't declare.
7253 * utils.c (warning): Renamed and rewritten as...
7254 (vwarning): New function.
7255 (error): Renamed and rewritten as...
7256 (verror): New function.
7257 (internal_error): Renamed and rewritten as...
7258 (internal_verror): New function.
7260 2014-08-07 Gary Benson <gbenson@redhat.com>
7262 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7263 * configure: Regenerate.
7264 * config.in: Likewise.
7265 * server.h: Do not include errno.h.
7266 * event-loop.c: Likewise.
7267 * hostio-errno.c: Likewise.
7268 * linux-low.c: Likewise.
7269 * remote-utils.c: Likewise.
7270 * spu-low.c: Likewise.
7271 * utils.c: Likewise.
7272 * gdbreplay.c: Unconditionally include errno.h.
7274 2014-08-07 Gary Benson <gbenson@redhat.com>
7276 * server.h: Do not include string.h.
7277 * event-loop.c: Likewise.
7278 * linux-low.c: Likewise.
7279 * regcache.c: Likewise.
7280 * remote-utils.c: Likewise.
7281 * spu-low.c: Likewise.
7282 * utils.c: Likewise.
7284 2014-08-07 Gary Benson <gbenson@redhat.com>
7286 * server.h: Do not include gdb_assert.h.
7288 2014-08-07 Gary Benson <gbenson@redhat.com>
7290 * server.h: Do not include common-utils.h.
7292 2014-08-07 Gary Benson <gbenson@redhat.com>
7294 * server.h: Do not include ptid.h.
7295 * notif.h: Likewise.
7297 2014-08-07 Gary Benson <gbenson@redhat.com>
7299 * server.h: Do not include gdb_locale.h.
7301 2014-08-07 Gary Benson <gbenson@redhat.com>
7303 * server.h: Do not include gdb/signals.h.
7304 * win32-low.c: Likewise.
7306 2014-08-07 Gary Benson <gbenson@redhat.com>
7308 * server.h: Do not include pathmax.h.
7310 2014-08-07 Gary Benson <gbenson@redhat.com>
7312 * server.h: Do not include libiberty.h.
7313 * linux-bfin-low.c: Likewise.
7315 2014-08-07 Gary Benson <gbenson@redhat.com>
7317 * server.h: Do not include ansidecl.h.
7319 2014-08-07 Gary Benson <gbenson@redhat.com>
7321 * linux-x86-low.c: Do not include stddef.h.
7322 * lynx-ppc-low.c: Likewise.
7323 * tracepoint.c: Likewise.
7325 2014-08-07 Gary Benson <gbenson@redhat.com>
7327 * server.h: Do not include stdarg.h.
7328 * nto-low.c: Likewise.
7330 2014-08-07 Gary Benson <gbenson@redhat.com>
7332 * server.h: Do not include stdlib.h.
7333 * inferiors.c: Likewise.
7334 * linux-low.c: Likewise.
7335 * regcache.c: Likewise.
7336 * spu-low.c: Likewise.
7337 * tracepoint.c: Likewise.
7338 * utils.c: Likewise.
7340 2014-08-07 Gary Benson <gbenson@redhat.com>
7342 * server.h: Do not include stdio.h.
7343 * linux-low.c: Likewise.
7344 * remote-utils.c: Likewise.
7345 * spu-low.c: Likewise.
7346 * utils.c: Likewise.
7347 * wincecompat.c: Likewise.
7349 2014-08-06 Gary Benson <gbenson@redhat.com>
7351 * regcache.c (init_register_cache): Move conditionals inside if.
7353 2014-08-06 Gary Benson <gbenson@redhat.com>
7355 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7357 2014-07-31 Gary Benson <gbenson@redhat.com>
7359 * ax.h: Do not include server.h.
7360 * gdbthread.h: Likewise.
7361 * lynx-low.h: Likewise.
7362 * notif.h: Likewise.
7364 2014-07-30 Gary Benson <gbenson@redhat.com>
7366 * server.h: Include common-defs.h.
7367 Do not include config.h or build-gnulib-gdbserver/config.h.
7369 2014-07-30 Gary Benson <gbenson@redhat.com>
7371 * hostio-errno.c: Move server.h to top of includes list.
7372 * inferiors.c: Likewise.
7373 * linux-x86-low.c: Likewise.
7374 * notif.c: Include server.h.
7376 2014-07-24 Tom Tromey <tromey@redhat.com>
7377 Gary Benson <gbenson@redhat.com>
7379 * server.h (CORE_ADDR): Now unsigned.
7381 2014-07-16 Pedro Alves <palves@redhat.com>
7383 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7385 2014-07-15 Pedro Alves <palves@redhat.com>
7387 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7390 2014-07-11 Pedro Alves <palves@redhat.com>
7392 * linux-low.c (kill_wait_lwp): New function, based on
7393 kill_one_lwp_callback, but use my_waitpid directly.
7394 (kill_one_lwp_callback, linux_kill): Use it.
7396 2014-06-23 Pedro Alves <palves@redhat.com>
7398 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7399 before setting DR0..DR3.
7401 2014-06-20 Gary Benson <gbenson@redhat.com>
7403 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7404 * configure: Regenerated.
7405 * config.in: Likewise.
7407 2014-06-20 Gary Benson <gbenson@redhat.com>
7409 * Makefile.in (SFILES): Update locations for files moved
7411 (object file files): Reordered.
7413 2014-06-20 Gary Benson <gbenson@redhat.com>
7415 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7416 (i386_dr_low_set_addr): Likewise.
7417 (i386_dr_low_get_addr): Likewise.
7418 (i386_dr_low_can_set_control): Likewise.
7419 (i386_dr_low_set_control): Likewise.
7420 (i386_dr_low_get_control): Likewise.
7421 (i386_dr_low_get_status): Likewise.
7422 (i386_get_debug_register_length): Likewise.
7423 * linux-x86-low.c (i386_dr_low_set_addr):
7424 Changed signature. Made static.
7425 (i386_dr_low_get_addr): Likewise.
7426 (i386_dr_low_set_control): Likewise.
7427 (i386_dr_low_get_control): Likewise.
7428 (i386_dr_low_get_status): Likewise.
7429 (i386_dr_low): New global variable.
7430 * win32-i386-low.c (i386_dr_low_set_addr):
7431 Changed signature. Made static.
7432 (i386_dr_low_get_addr): Likewise.
7433 (i386_dr_low_set_control): Likewise.
7434 (i386_dr_low_get_control): Likewise.
7435 (i386_dr_low_get_status): Likewise.
7436 (i386_dr_low): New global variable.
7438 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7440 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7441 * Makefile.in (AR, AR_FLAGS): Define.
7442 * configure: Regenerate.
7444 2014-06-19 Gary Benson <gbenson@redhat.com>
7446 * Makefile.in (i386-dregs.o): New rule.
7447 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7448 * i386-low.c (target.h): Remove include.
7449 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7450 (DR_CONTROL_SHIFT): Likewise.
7451 (DR_CONTROL_SIZE): Likewise.
7452 (DR_RW_EXECUTE): Likewise.
7453 (DR_RW_WRITE): Likewise.
7454 (DR_RW_READ): Likewise.
7455 (DR_RW_IORW): Likewise.
7456 (DR_LEN_1): Likewise.
7457 (DR_LEN_2): Likewise.
7458 (DR_LEN_4): Likewise.
7459 (DR_LEN_8): Likewise.
7460 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7461 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7462 (DR_ENABLE_SIZE): Likewise.
7463 (DR_LOCAL_SLOWDOWN): Likewise.
7464 (DR_GLOBAL_SLOWDOWN): Likewise.
7465 (DR_CONTROL_RESERVED): Likewise.
7466 (I386_DR_CONTROL_MASK): Likewise.
7467 (I386_DR_VACANT): Likewise.
7468 (I386_DR_LOCAL_ENABLE): Likewise.
7469 (I386_DR_GLOBAL_ENABLE): Likewise.
7470 (I386_DR_DISABLE): Likewise.
7471 (I386_DR_SET_RW_LEN): Likewise.
7472 (I386_DR_GET_RW_LEN): Likewise.
7473 (I386_DR_WATCH_HIT): Likewise.
7474 (i386_wp_op_t): Likewise.
7475 (i386_show_dr): Likewise.
7476 (i386_length_and_rw_bits): Likewise.
7477 (i386_insert_aligned_watchpoint): Likewise.
7478 (i386_remove_aligned_watchpoint): Likewise.
7479 (i386_handle_nonaligned_watchpoint): Likewise.
7480 i386_update_inferior_debug_regs(): Likewise.
7481 (i386_dr_insert_watchpoint): Likewise.
7482 (i386_dr_remove_watchpoint): Likewise.
7483 (i386_dr_region_ok_for_watchpoint): Likewise.
7484 (i386_dr_stopped_data_address): Likewise.
7485 (i386_dr_stopped_by_watchpoint): Likewise.
7487 2014-06-19 Gary Benson <gbenson@redhat.com>
7489 * i386-low.c (i386_dr_show): Renamed to
7490 i386_show_dr and made static. All uses updated.
7491 (i386_dr_length_and_rw_bits): Renamed to
7492 i386_length_and_rw_bits and made static.
7494 (i386_dr_insert_aligned_watchpoint): Renamed to
7495 i386_insert_aligned_watchpoint and made static.
7497 (i386_dr_remove_aligned_watchpoint): Renamed to
7498 i386_remove_aligned_watchpoint and made static.
7500 (i386_dr_update_inferior_debug_regs): Renamed to
7501 i386_update_inferior_debug_regs and made static.
7504 2014-06-18 Gary Benson <gbenson@redhat.com>
7506 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7507 (i386_dr_low_can_set_control): Likewise.
7508 (i386_get_debug_register_length): Likewise.
7509 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7510 (i386_dr_low_can_set_control): Likewise.
7511 (i386_get_debug_register_length): Likewise.
7513 2014-06-17 Gary Benson <gbenson@redhat.com>
7515 * i386-low.h (i386-dregs.h): New include.
7516 (DR_FIRSTADDR): Now in i386-dregs.h.
7517 (DR_LASTADDR): Likewise.
7518 (DR_NADDR): Likewise.
7519 (DR_STATUS): Likewise.
7520 (DR_CONTROL): Likewise.
7521 (i386_debug_reg_state): Likewise.
7522 (i386_dr_insert_watchpoint): Likewise.
7523 (i386_dr_remove_watchpoint): Likewise.
7524 (i386_dr_region_ok_for_watchpoint): Likewise.
7525 (i386_dr_stopped_data_address): Likewise.
7526 (i386_dr_stopped_by_watchpoint): Likewise.
7527 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7529 2014-06-18 Gary Benson <gbenson@redhat.com>
7531 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7532 i386_dr_insert_watchpoint.
7533 (i386_low_remove_watchpoint): Renamed to
7534 i386_dr_remove_watchpoint.
7535 (i386_low_region_ok_for_watchpoint): Renamed to
7536 i386_dr_region_ok_for_watchpoint.
7537 (i386_low_stopped_data_address): Renamed to
7538 i386_dr_stopped_data_address.
7539 (i386_low_stopped_by_watchpoint): Renamed to
7540 i386_dr_stopped_by_watchpoint.
7541 * i386-low.c (i386_show_dr): Renamed to
7542 i386_dr_show and made nonstatic. All uses updated.
7543 (i386_length_and_rw_bits): Renamed to
7544 i386_dr_length_and_rw_bits and made nonstatic.
7546 (i386_insert_aligned_watchpoint): Renamed to
7547 i386_dr_insert_aligned_watchpoint and made nonstatic.
7549 (i386_remove_aligned_watchpoint): Renamed to
7550 i386_dr_remove_aligned_watchpoint and made nonstatic.
7552 (i386_update_inferior_debug_regs): Renamed to
7553 i386_dr_update_inferior_debug_regs and made nonstatic.
7555 (i386_low_insert_watchpoint): Renamed to
7556 i386_dr_insert_watchpoint. All uses updated.
7557 (i386_low_remove_watchpoint): Renamed to
7558 i386_dr_remove_watchpoint. All uses updated.
7559 (i386_low_region_ok_for_watchpoint): Renamed to
7560 i386_dr_region_ok_for_watchpoint. All uses updated.
7561 (i386_low_stopped_data_address): Renamed to
7562 i386_dr_stopped_data_address. All uses updated.
7563 (i386_low_stopped_by_watchpoint): Renamed to
7564 i386_dr_stopped_by_watchpoint. All uses updated.
7566 2014-06-18 Gary Benson <gbenson@redhat.com>
7568 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7569 (i386_dr_low_can_set_control): Likewise.
7570 (i386_insert_aligned_watchpoint): New check.
7572 2014-06-18 Gary Benson <gbenson@redhat.com>
7574 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7577 2014-06-18 Gary Benson <gbenson@redhat.com>
7579 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7580 instead of fatal and error.
7581 (i386_handle_nonaligned_watchpoint): Likewise.
7583 2014-06-18 Gary Benson <gbenson@redhat.com>
7585 * i386-low.c (i386_get_debug_register_length): New macro.
7586 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7587 (i386_show_dr): Use debug_printf instead of fprintf. Use
7588 phex to format values.
7590 2014-06-18 Gary Benson <gbenson@redhat.com>
7592 * i386-low.h: Comment changes.
7593 * i386-low.c: Likewise.
7595 2014-06-18 Gary Benson <gbenson@redhat.com>
7597 * i386-low.c: Whitespace changes.
7599 2014-06-12 Tom Tromey <tromey@redhat.com>
7601 * utils.c (freeargv): Remove.
7603 2014-06-12 Tom Tromey <tromey@redhat.com>
7605 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7606 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7607 (parse_debug_format_options): Likewise.
7608 (gdbserver_usage): Likewise.
7609 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7610 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7611 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7613 ($(LIBGNU)): Depend on libiberty.
7614 (all-lib): Recurse into all subdirs.
7615 (install-only): Invoke "install" target in subdirs.
7616 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7618 * configure: Rebuild.
7619 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7620 for vasprintf, vsnprintf, or gettimeofday.
7621 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7624 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7626 * development.sh: Delete.
7627 * Makefile.in (config.status): Adjust dependency on development.sh.
7628 * configure.ac: Adjust development.sh source call.
7629 * configure: Regenerate.
7631 2014-06-02 Pedro Alves <palves@redhat.com>
7633 * ax.c (gdb_free_agent_expr): New function.
7634 * ax.h (gdb_free_agent_expr): New declaration.
7635 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7637 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7639 (clear_breakpoint_conditions_and_commands): New function.
7640 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7641 (clear_breakpoint_conditions_and_commands): New declaration.
7643 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7645 * linux-aarch64-low.c (asm/ptrace.h): Include.
7647 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7649 Fix TLS access for -static -pthread.
7650 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7651 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7652 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7654 2014-05-20 Pedro Alves <palves@redhat.com>
7656 * linux-aarch64-low.c (aarch64_insert_point)
7657 (aarch64_remove_point): No longer check whether the type is
7658 supported here. Adjust to new interface.
7659 (the_low_target): Install aarch64_supports_z_point_type as
7660 supports_z_point_type method.
7661 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7662 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7663 instead of a Z packet char. Adjust.
7664 (arm_supports_z_point_type): New function.
7665 (arm_insert_point, arm_remove_point): Adjust to new interface.
7666 (the_low_target): Install arm_supports_z_point_type.
7667 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7668 (cris_insert_point, cris_remove_point): Adjust to new interface.
7669 Don't check whether the type is supported here.
7670 (the_low_target): Install cris_supports_z_point_type.
7671 * linux-low.c (linux_supports_z_point_type): New function.
7672 (linux_insert_point, linux_remove_point): Adjust to new interface.
7673 * linux-low.h (struct linux_target_ops) <insert_point,
7674 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7675 raw_breakpoint pointer parameter.
7676 <supports_z_point_type>: New method.
7677 * linux-mips-low.c (mips_supports_z_point_type): New function.
7678 (mips_insert_point, mips_remove_point): Adjust to new interface.
7679 Use mips_supports_z_point_type.
7680 (the_low_target): Install mips_supports_z_point_type.
7681 * linux-ppc-low.c (the_low_target): Install NULL as
7682 supports_z_point_type method.
7683 * linux-s390-low.c (the_low_target): Install NULL as
7684 supports_z_point_type method.
7685 * linux-sparc-low.c (the_low_target): Install NULL as
7686 supports_z_point_type method.
7687 * linux-x86-low.c (x86_supports_z_point_type): New function.
7688 (x86_insert_point): Adjust to new insert_point interface. Use
7689 insert_memory_breakpoint. Adjust to new
7690 i386_low_insert_watchpoint interface.
7691 (x86_remove_point): Adjust to remove_point interface. Use
7692 remove_memory_breakpoint. Adjust to new
7693 i386_low_remove_watchpoint interface.
7694 (the_low_target): Install x86_supports_z_point_type.
7695 * lynx-low.c (lynx_target_ops): Install NULL as
7696 supports_z_point_type callback.
7697 * nto-low.c (nto_supports_z_point_type): New.
7698 (nto_insert_point, nto_remove_point): Adjust to new interface.
7699 (nto_target_ops): Install nto_supports_z_point_type.
7700 * mem-break.c: Adjust intro comment.
7701 (struct raw_breakpoint) <raw_type, size>: New fields.
7702 <inserted>: Update comment.
7703 <shlib_disabled>: Delete field.
7704 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7705 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7706 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7707 (raw_bkpt_type_to_target_hw_bp_type): New function.
7708 (find_enabled_raw_code_breakpoint_at): New function.
7709 (find_raw_breakpoint_at): New type and size parameters. Use them.
7710 (insert_memory_breakpoint): New function, based off
7711 set_raw_breakpoint_at.
7712 (remove_memory_breakpoint): New function.
7713 (set_raw_breakpoint_at): Reimplement.
7714 (set_breakpoint): New, based on set_breakpoint_at.
7715 (set_breakpoint_at): Reimplement.
7716 (delete_raw_breakpoint): Go through the_target->remove_point
7717 instead of assuming memory breakpoints.
7718 (find_gdb_breakpoint_at): Delete.
7719 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7720 (find_gdb_breakpoint): New function.
7721 (set_gdb_breakpoint_at): Delete.
7722 (z_type_supported): New function.
7723 (set_gdb_breakpoint_1): New function, loosely based off
7724 set_gdb_breakpoint_at.
7725 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7726 (delete_gdb_breakpoint_at): Delete.
7727 (delete_gdb_breakpoint_1): New function, loosely based off
7728 delete_gdb_breakpoint_at.
7729 (delete_gdb_breakpoint): New function.
7730 (clear_gdb_breakpoint_conditions): Rename to ...
7731 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7733 (add_condition_to_breakpoint): Make static.
7734 (add_breakpoint_condition): Take a struct breakpoint pointer
7735 instead of an address. Adjust.
7736 (gdb_condition_true_at_breakpoint): Rename to ...
7737 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7739 (gdb_condition_true_at_breakpoint): Reimplement.
7740 (add_breakpoint_commands): Take a struct breakpoint pointer
7741 instead of an address. Adjust.
7742 (gdb_no_commands_at_breakpoint): Rename to ...
7743 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7744 parameter. Return true if no breakpoint was found. Change debug
7746 (gdb_no_commands_at_breakpoint): Reimplement.
7747 (run_breakpoint_commands): Rename to ...
7748 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7749 and change return type to boolean.
7750 (run_breakpoint_commands): New function.
7751 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7752 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7753 breakpoint. Go through the_target->remove_point instead of
7754 assuming memory breakpoint.
7755 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7756 software and hardware breakpoints.
7757 (reinsert_raw_breakpoint): Go through the_target->insert_point
7758 instead of assuming memory breakpoint.
7759 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7760 software and hardware breakpoints.
7761 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7762 Check both software and hardware breakpoints.
7763 (validate_inserted_breakpoint): Assert the breakpoint is a
7764 software breakpoint. Set the inserted flag to -1 instead of
7765 setting shlib_disabled.
7766 (delete_disabled_breakpoints): Adjust.
7767 (validate_breakpoints): Only validate software breakpoints.
7768 Adjust to inserted flag change.
7769 (check_mem_read, check_mem_write): Skip breakpoint types other
7770 than software breakpoints. Adjust to inserted flag change.
7771 * mem-break.h (enum raw_bkpt_type): New enum.
7772 (raw_breakpoint, struct process_info): Forward declare.
7773 (Z_packet_to_target_hw_bp_type): Delete declaration.
7774 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7775 (set_gdb_breakpoint, delete_gdb_breakpoint)
7776 (clear_breakpoint_conditions): New declarations.
7777 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7778 (breakpoint_inserted_here): Update comment.
7779 (add_breakpoint_condition, add_breakpoint_commands): Replace
7780 address parameter with a breakpoint pointer parameter.
7781 (gdb_breakpoint_here): Update comment.
7782 (delete_gdb_breakpoint_at): Delete.
7783 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7784 * server.c (process_point_options): Take a struct breakpoint
7785 pointer instead of an address. Adjust.
7786 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7787 delete_gdb_breakpoint.
7788 * spu-low.c (spu_target_ops): Install NULL as
7789 supports_z_point_type method.
7790 * target.h: Include mem-break.h.
7791 (struct target_ops) <prepare_to_access_memory>: Update comment.
7792 <supports_z_point_type>: New field.
7793 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7794 instead of a char. Also take a raw breakpoint pointer.
7795 * win32-arm-low.c (the_low_target): Install NULL as
7796 supports_z_point_type.
7797 * win32-i386-low.c (i386_supports_z_point_type): New function.
7798 (i386_insert_point, i386_remove_point): Adjust to new interface.
7799 (the_low_target): Install i386_supports_z_point_type.
7800 * win32-low.c (win32_supports_z_point_type): New function.
7801 (win32_insert_point, win32_remove_point): Adjust to new interface.
7802 (win32_target_ops): Install win32_supports_z_point_type.
7803 * win32-low.h (struct win32_target_ops):
7804 <supports_z_point_type>: New method.
7805 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7806 instead of a char. Also take a raw breakpoint pointer.
7808 2014-05-20 Pedro Alves <palves@redhat.com>
7810 * mem-break.h: Include break-common.h.
7811 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7812 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7813 (Z_packet_to_target_hw_bp_type): New declaration.
7814 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7815 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7816 (Z_PACKET_ACCESS_WP): Delete macros.
7817 (Z_packet_to_hw_type): Delete function.
7818 * i386-low.h: Don't include break-common.h here.
7819 (Z_packet_to_hw_type): Delete declaration.
7820 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7821 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7822 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7823 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7824 * linux-aarch64-low.c: Don't include break-common.h here.
7825 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7826 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7827 (Z_packet_to_target_hw_bp_type): Delete function.
7828 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7830 (mips_insert_point, mips_remove_point): Use
7831 Z_packet_to_target_hw_bp_type.
7833 2014-05-20 Pedro Alves <palves@redhat.com>
7835 * linux-aarch64-low.c: Include break-common.h.
7836 (enum target_point_type): Delete.
7837 (Z_packet_to_point_type): Rename to ...
7838 (Z_packet_to_target_hw_bp_type): ... this, and return a
7839 target_hw_bp_type instead.
7840 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7841 instead of an enum target_point_type.
7842 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7844 (aarch64_dr_state_insert_one_point)
7845 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7846 (aarch64_handle_aligned_watchpoint)
7847 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7848 Take an enum target_hw_bp_type instead of an enum
7850 (aarch64_supports_z_point_type): New function.
7851 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7852 use Z_packet_to_target_hw_bp_type.
7854 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7856 * configure.ac: Only use -Werror by default when DEVELOPMENT
7858 * configure: Regenerate.
7860 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7862 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7863 * linux-x86-low.c (X86_64_USER_REGS): New.
7864 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7866 2014-04-28 Yao Qi <yao@codesourcery.com>
7868 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7871 2014-04-25 Pedro Alves <palves@redhat.com>
7874 * linux-low.c (linux_attach_fail_reason_string): New function.
7875 (linux_attach_lwp): Delete.
7876 (linux_attach_lwp_1): Rename to ...
7877 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7878 argument. Remove "initial" parameter. Return int instead of
7879 void. Don't error or warn here.
7880 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7881 failure to attach to the tgid. Call warning when failing to
7883 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7884 argument. Remove "initial" parameter. Return int instead of
7885 void. Don't error or warn here.
7886 (linux_attach_fail_reason_string): New declaration.
7887 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7888 interface change. Use linux_attach_fail_reason_string.
7890 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7891 Walfred Tedeschi <walfred.tedeschi@intel.com>
7893 * Makefile.in: Added rules to handle new files
7894 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7895 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7896 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7897 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7898 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7899 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7901 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7902 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7903 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7904 i386/x32-avx512.xml.
7905 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7906 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7907 i386/x32-avx512-linux.xml.
7908 * i387-fp.c (num_avx512_k_registers): New constant for number
7910 (num_avx512_zmmh_low_registers): New constant for number of
7911 lower ZMM registers (0-15).
7912 (num_avx512_zmmh_high_registers): New constant for number of
7913 higher ZMM registers (16-31).
7914 (num_avx512_ymmh_registers): New contant for number of higher
7915 YMM registers (ymm16-31 added by avx521 on x86_64).
7916 (num_avx512_xmm_registers): New constant for number of higher
7917 XMM registers (xmm16-31 added by AVX512 on x86_64).
7918 (struct i387_xsave): Add space for AVX512 registers.
7919 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7920 Add code to handle AVX512 registers.
7921 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7922 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7923 prototypei from generated file.
7924 (tdesc_amd64_avx512_linux): Likewise.
7925 (init_registers_x32_avx512_linux): Likewise.
7926 (tdesc_x32_avx512_linux): Likewise.
7927 (init_registers_i386_avx512_linux): Likewise.
7928 (tdesc_i386_avx512_linux): Likewise.
7929 (x86_64_regmap): Add AVX512 registers.
7930 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7932 (initialize_low_arch): Add code to initialize AVX512 registers.
7934 2014-04-23 Pedro Alves <palves@redhat.com>
7936 * mem-break.c (find_gdb_breakpoint_at): Make static.
7937 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7939 2014-04-23 Pedro Alves <palves@redhat.com>
7941 * i386-low.c: Don't include break-common.h here.
7942 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7943 prototype to take target_hw_bp_type as argument instead of a Z
7945 * i386-low.h: Include break-common.h here.
7946 (Z_packet_to_hw_type): Declare.
7947 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7949 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7950 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7951 (x86_remove_point): Convert the packet number to a
7952 target_hw_bp_type before calling i386_low_remove_watchpoint.
7953 * win32-i386-low.c (i386_insert_point): Convert the packet number
7954 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7955 (i386_remove_point): Convert the packet number to a
7956 target_hw_bp_type before calling i386_low_remove_watchpoint.
7958 2014-04-23 Pedro Alves <palves@redhat.com>
7960 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7962 2014-04-10 Pedro Alves <palves@redhat.com>
7964 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7965 Check if the condition or command is NULL before checking if the
7966 breakpoint is known. On success, return true.
7967 * mem-break.h (add_breakpoint_condition): Document return.
7968 (add_breakpoint_commands): Add describing comment.
7969 * server.c (skip_to_semicolon): New function.
7970 (process_point_options): Use it.
7972 2014-04-09 Pedro Alves <palves@redhat.com>
7974 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7977 2014-02-27 Pedro Alves <palves@redhat.com>
7980 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7982 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7984 (last_thread_of_process_p): Take a PID argument instead of a
7986 (linux_wait_for_lwp): Delete.
7987 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7989 (linux_low_filter_event): New function, party factored out from
7990 linux_wait_for_event.
7991 (linux_wait_for_event): Rename to ...
7992 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7993 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7994 sigsuspend. Check for zombie leaders.
7995 (linux_wait_for_event): Reimplement as wrapper around
7996 linux_wait_for_event_filtered.
7997 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7998 a normal or signal exit is seen, it's the whole process exiting.
7999 (wait_for_sigstop): No longer a for_each_inferior callback.
8000 Rewrite on top of linux_wait_for_event_filtered.
8001 (stop_all_lwps): Call wait_for_sigstop directly.
8002 * server.c (resume, handle_target_event): Handle
8003 TARGET_WAITKIND_NO_RESUMED.
8005 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8007 * win32-low.c (psapi_get_dll_name,
8008 * win32_CreateToolhelp32Snapshot): Delete.
8009 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8010 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8012 (handle_load_dll): Add function description.
8013 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8015 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8017 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8019 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8020 base address when calling win32_add_one_solib.
8021 (handle_load_dll): Delete local variable load_addr.
8022 Remove 0x1000 offset applied to DLL base address when calling
8023 win32_add_one_solib.
8024 (handle_unload_dll): Add comment.
8026 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8028 * win32-low.c (win32_add_all_dlls): Renames
8029 win32_ensure_ntdll_loaded. Rewrite function documentation.
8030 Adjust implementation to always load all DLLs.
8031 Add 0x1000 offset to DLL base address when calling
8032 win32_add_one_solib.
8033 (child_initialization_done): New static global.
8034 (do_initial_child_stuff): Set child_initialization_done to
8035 zero during child initialization, and 1 after. Replace call
8036 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8038 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8039 (handle_unload_dll): Add function documentation.
8040 (get_child_debug_event): Ignore load and unload DLL events
8041 during child initialization.
8043 2014-02-20 Doug Evans <dje@google.com>
8045 Remove global all_lwps.
8046 * inferiors.h (ptid_of): Move here from linux-low.h.
8047 (pid_of, lwpid_of): Ditto.
8048 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8049 parameter is a struct thread_info * now.
8050 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8051 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8052 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8054 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8055 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8056 * linux-arm-low.c (update_registers_callback): Update, "entry"
8057 parameter is a struct thread_info * now.
8058 Fetch lwpid from current_inferior directly.
8059 (arm_insert_point): Pass &all_threads to find_inferior instead of
8061 (arm_remove_point): Ditto.
8062 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8063 (arm_prepare_to_resume): Fetch pid from thread.
8064 (arm_read_description): Fetch lwpid from current_inferior directly.
8065 * linux-low.c (all_lwps): Delete.
8066 (delete_lwp): Delete call to remove_inferior.
8067 (handle_extended_wait): Fetch lwpid from thread.
8068 (add_lwp): Don't set lwp->entry.id. Remove call to
8069 add_inferior_to_list.
8070 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8071 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8072 (kill_one_lwp_callback): Ditto.
8073 (linux_kill): Don't dereference NULL pointer.
8074 Fetch ptid,lwpid from thread.
8075 (get_detach_signal): Fetch ptid from thread.
8076 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8077 Simplify call to regcache_invalidate_thread.
8078 (delete_lwp_callback): Update, "entry" parameter is a
8079 struct thread_info * now. Fetch pid from thread.
8080 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8081 (status_pending_p_callback): Update, "entry" parameter is a
8082 struct thread_info * now. Fetch ptid from thread.
8083 (find_lwp_pid): Update, "entry" parameter is a
8084 struct thread_info * now.
8085 (linux_wait_for_lwp): Fetch pid from thread.
8086 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8087 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8088 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8089 (dequeue_one_deferred_signal): Ditto.
8090 (cancel_breakpoint): Fetch ptid from current_inferior.
8091 (linux_wait_for_event): Pass &all_threads to find_inferior,
8092 not &all_lwps. Fetch ptid, lwpid from thread.
8093 (count_events_callback): Update, "entry" parameter is a
8094 struct thread_info * now.
8095 (select_singlestep_lwp_callback): Ditto.
8096 (select_event_lwp_callback): Ditto.
8097 (cancel_breakpoints_callback): Ditto.
8098 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8100 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8101 (unsuspend_one_lwp): Update, "entry" parameter is a
8102 struct thread_info * now.
8103 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8105 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8106 Fetch lwpid from thread, not lwp.
8107 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8108 Pass &all_threads to find_inferior, not &all_lwps.
8109 (send_sigstop): Fetch lwpid from thread, not lwp.
8110 (send_sigstop_callback): Update, "entry" parameter is a
8111 struct thread_info * now.
8112 (suspend_and_send_sigstop_callback): Ditto.
8113 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8114 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8115 struct thread_info * now.
8116 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8118 (lwp_running): Update, "entry" parameter is a
8119 struct thread_info * now.
8120 (stop_all_lwps): Fetch ptid from thread.
8121 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8122 (linux_resume_one_lwp): Fetch lwpid from thread.
8123 (linux_set_resume_request): Update, "entry" parameter is a
8124 struct thread_info * now. Fetch pid, lwpid from thread.
8125 (resume_status_pending_p): Update, "entry" parameter is a
8126 struct thread_info * now.
8127 (need_step_over_p): Ditto. Fetch lwpid from thread.
8128 (start_step_over): Fetch lwpid from thread.
8129 (linux_resume_one_thread): Update, "entry" parameter is a
8130 struct thread_info * now. Fetch lwpid from thread.
8131 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8132 (proceed_one_lwp): Update, "entry" parameter is a
8133 struct thread_info * now. Fetch lwpid from thread.
8134 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8135 struct thread_info * now.
8136 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8137 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8138 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8140 (regsets_store_inferior_registers): Ditto.
8141 (fetch_register, store_register): Ditto.
8142 (linux_read_memory, linux_write_memory): Ditto.
8143 (linux_request_interrupt): Ditto.
8144 (linux_read_auxv): Ditto.
8145 (linux_xfer_siginfo): Ditto.
8146 (linux_qxfer_spu): Ditto.
8147 (linux_qxfer_libraries_svr4): Ditto.
8148 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8149 moved to inferiors.h.
8151 (get_thread_lwp): Update.
8152 (struct lwp_info): Delete member "entry". Simplify comment for
8155 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8156 current_inferior directly.
8157 (update_watch_registers_callback): Update, "entry" parameter is a
8158 struct thread_info * now. Fetch pid from thread.
8159 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8160 (mips_insert_point): Fetch lwpid from current_inferior.
8161 Pass &all_threads to find_inferior, not &all_lwps.
8162 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8163 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8165 (mips_stopped_data_address): Ditto.
8166 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8168 * linux-tile-low.c (tile_arch_setup): Ditto.
8169 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8170 (update_debug_registers_callback): Update, "entry" parameter is a
8171 struct thread_info * now. Fetch pid from thread.
8172 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8173 Pass &all_threads to find_inferior, not &all_lwps.
8174 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8175 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8176 Pass &all_threads to find_inferior, not &all_lwps.
8177 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8178 (i386_dr_low_get_status): Ditto.
8179 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8180 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8181 (x86_linux_read_description): Ditto.
8182 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8184 2014-02-20 Doug Evans <dje@google.com>
8186 * inferiors.c (get_first_inferior): Fix buglet.
8188 2014-02-19 Doug Evans <dje@google.com>
8190 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8191 * inferiors.c (add_thread): Change result type to struct thread_info *.
8192 All callers updated.
8193 (add_lwp): Call add_thread here instead of in callers.
8194 All callers updated.
8195 * linux-low.h (get_lwp_thread): Rewrite.
8196 (struct lwp_info): New member "thread".
8198 2014-02-19 Doug Evans <dje@google.com>
8200 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8201 All callers updated.
8203 2014-02-19 Doug Evans <dje@google.com>
8205 * inferiors.c (add_thread): Fix whitespace.
8207 2014-02-19 Doug Evans <dje@google.com>
8209 * dll.c (clear_dlls): Replace accessing list implemention details
8211 * gdbthread.h (get_first_thread): Declare.
8212 * inferiors.c (for_each_inferior_with_data): New function.
8213 (get_first_thread): New function.
8214 (find_thread_ptid): Simplify.
8215 (get_first_inferior): New function.
8216 (clear_list): Delete.
8217 (one_inferior_p): New function.
8218 (clear_inferior_list): New function.
8219 (clear_inferiors): Update.
8220 * inferiors.h (for_each_inferior_with_data): Declare.
8221 (clear_inferior_list): Declare.
8222 (one_inferior_p): Declare.
8223 (get_first_inferior): Declare.
8224 * linux-low.c (linux_wait_for_event): Replace accessing list
8225 implemention details with API function.
8226 * server.c (target_running): Ditto.
8227 (accumulate_file_name_length): New function.
8228 (emit_dll_description): New function.
8229 (handle_qxfer_libraries): Replace accessing list implemention
8230 details with API function.
8231 (handle_qxfer_threads_worker): New function.
8232 (handle_qxfer_threads_proper): Replace accessing list implemention
8233 details with API function.
8234 (handle_query): Ditto.
8235 (visit_actioned_threads_callback_ftype): New typedef.
8236 (visit_actioned_threads_data): New struct.
8237 (visit_actioned_threads): Rewrite to be find_inferior callback.
8238 (resume): Call find_inferior.
8239 (handle_status): Replace accessing list implemention
8240 details with API function.
8241 (process_serial_event): Replace accessing list implemention details
8243 * target.c (set_desired_inferior): Replace accessing list implemention
8244 details with API function.
8245 * tracepoint.c (same_process_p): New function.
8246 (gdb_agent_about_to_close): Replace accessing list implemention
8247 details with API function.
8248 * win32-low.c (child_delete_thread): Replace accessing list
8249 implemention details with API function.
8250 (match_dll_by_basename): New function.
8251 (dll_is_loaded_by_basename): New function.
8252 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8253 details call to dll_is_loaded_by_basename.
8255 2014-02-19 Doug Evans <dje@google.com>
8257 * dll.h (struct dll_info): Add comment.
8258 * gdbthread.h (struct thread_info): Add comment.
8259 (current_ptid): Simplify.
8260 * inferiors.c (add_process): Update.
8261 (remove_process): Update.
8262 * inferiors.h (struct process_info): Rename member "head" to "entry".
8263 * linux-low.c (delete_lwp): Update.
8265 (last_thread_of_process_p): Update.
8266 (kill_one_lwp_callback, linux_kill): Update.
8267 (status_pending_p_callback): Update.
8268 (wait_for_sigstop): Update. Simplify read of ptid.
8269 (start_step_over): Update.
8270 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8271 (get_lwp_thread): Update.
8272 (struct lwp_info): Rename member "head" to "entry".
8273 * regcache.h (inferior_list_entry): Delete.
8274 * server.c (kill_inferior_callback): Update.
8275 (detach_or_kill_inferior_callback): Update.
8276 (print_started_pid): Update.
8277 (print_attached_pid): Update.
8278 (process_serial_event): Simplify read of ptid.
8279 * thread-db.c (thread_db_create_event): Update.
8280 (thread_db_get_tls_address): Update.
8281 * win32-low.c (current_inferior_ptid): Simplify.
8283 2014-02-19 Tom Tromey <tromey@redhat.com>
8285 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8287 (target_supports_btrace): Update.
8289 2014-02-14 Yao Qi <yao@codesourcery.com>
8291 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8292 (rsp-low-ipa.o): New target.
8294 2014-02-12 Tom Tromey <tromey@redhat.com>
8296 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8297 convert_ascii_to_int.
8298 * regcache.c (registers_to_string): Likewise.
8299 * remote-utils.c (decode_M_packet): Likewise.
8300 * server.c (process_serial_event): Likewise.
8302 2014-02-12 Tom Tromey <tromey@redhat.com>
8304 * server.c (handle_query, handle_v_run): Use hex2bin, not
8306 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8308 2014-02-12 Tom Tromey <tromey@redhat.com>
8310 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8311 convert_int_to_ascii.
8312 * regcache.c (registers_to_string, collect_register_as_string):
8314 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8316 * server.c (process_serial_event): Likewise.
8317 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8318 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8320 2014-02-12 Tom Tromey <tromey@redhat.com>
8322 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8323 bin2hex, not hexify.
8324 * tracepoint.c (cmd_qtstatus): Likewise.
8326 2014-02-12 Tom Tromey <tromey@redhat.com>
8328 * remote-utils.c (monitor_output): Pass explicit length to
8331 2014-02-12 Tom Tromey <tromey@redhat.com>
8333 * tracepoint.c: Include rsp-low.h.
8334 * server.c: Include rsp-low.h.
8335 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8336 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8338 * remote-utils.c: Include rsp-low.h.
8339 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8340 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8341 (convert_int_to_ascii, convert_ascii_to_int): Move to
8343 * regcache.c: Include rsp-low.h.
8344 * ax.c: Include rsp-low.h.
8345 * Makefile.in (SFILES): Add common/rsp-low.c.
8346 (OBS): Add rsp-low.o.
8347 (rsp-low.o): New target.
8349 2014-02-12 Tom Tromey <tromey@redhat.com>
8351 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8352 Include print-utils.h.
8353 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8354 (plongest, thirty_two, phex_nz): Remove.
8355 * Makefile.in (SFILES): Add common/print-utils.c.
8356 (OBS): Add print-utils.o.
8357 (print-utils-ipa.o): New target.
8358 (print-utils.o): New target.
8359 (IPA_OBJS): Add print-utils-ipa.o.
8361 2014-02-06 Tom Tromey <tromey@redhat.com>
8363 * Makefile.in (SFILES): Fix indentation.
8365 2014-02-05 Doug Evans <dje@google.com>
8367 * linux-low.c (linux_wait_for_event): Improve comment.
8368 (linux_wait_1): Keep current_inferior in sync with event_child.
8370 2014-01-22 Doug Evans <dje@google.com>
8372 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8374 2014-01-22 Doug Evans <dje@google.com>
8376 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8377 * configure: Regenerate.
8378 * config.in: Regenerate.
8379 * Makefile.in (SFILES): Add debug.c.
8381 * debug.c: New file.
8382 * debug.h: New file.
8383 * linux-aarch64-low.c (*): Update all debugging printfs to use
8384 debug_printf instead of fprintf.
8385 * linux-arm-low.c (*): Ditto.
8386 * linux-cris-low.c (*): Ditto.
8387 * linux-crisv32-low.c (*): Ditto.
8388 * linux-m32r-low.c (*): Ditto.
8389 * linux-sparc-low.c (*): Ditto.
8390 * linux-x86.c (*): Ditto.
8391 * linux-low.c (*): Ditto.
8392 (linux_wait_1): Add calls to debug_enter, debug_exit.
8393 (linux_wait): Remove redundant debugging printf.
8394 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8395 (linux_resume, unstop_all_lwps): Ditto.
8396 * mem-break.c (*): Update all debugging printfs to use
8397 debug_printf instead of fprintf.
8398 * remote-utils.c (*): Ditto.
8399 * thread-db.c (*): Ditto.
8400 * server.c #include <ctype.h>, "gdb_vecs.h".
8401 (debug_threads): Moved to debug.c.
8402 (*): Update all debugging printfs to use debug_printf instead of
8404 (start_inferior): Replace call to fflush with call to debug_flush.
8405 (monitor_show_help): Mention set debug-format.
8406 (parse_debug_format_options): New function.
8407 (handle_monitor_command): Handle "monitor set debug-format".
8408 (gdbserver_usage): Mention --debug-format.
8409 (main): Parse --debug-format.
8410 * server.h (debug_threads): Declaration moved to debug.h.
8412 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8413 trace_debug_1 that uses debug_printf.
8414 (tracepoint_look_up_symbols): Update all debugging printfs to use
8415 debug_printf instead of fprintf.
8417 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8419 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8422 2014-01-17 Pedro Alves <palves@redhat.com>
8425 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8426 defined after including gdb_proc_service.h.
8428 2014-01-16 Doug Evans <dje@google.com>
8430 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8431 (match_dll): Use it.
8433 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8435 * target.h (target_ops) <read_btrace>: Change parameters and
8436 return type to allow error reporting.
8437 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8438 trace reading errors on.
8439 * linux-low.c (linux_low_read_btrace): Pass trace reading
8441 (linux_low_disable_btrace): New.
8443 2014-01-15 Doug Evans <dje@google.com>
8445 * inferiors.c (thread_id_to_gdb_id): Delete.
8446 * inferiors.h (thread_id_to_gdb_id): Delete.
8448 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8450 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8451 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8454 2014-01-08 Pedro Alves <palves@redhat.com>
8456 * server.c (handle_status): Don't discard previous queued stop
8457 replies or thread's pending status here.
8458 (main) <disconnection>: Do it here instead.
8460 2014-01-08 Pedro Alves <palves@redhat.com>
8462 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8463 * server.c (visit_actioned_threads, handle_pending_status): New
8465 (handle_v_cont): Factor out parts to ...
8466 (resume): ... this new function. If in all-stop, and a thread
8467 being resumed has a pending status, report it without actually
8469 (myresume): Adjust to use the new 'resume' function.
8470 (clear_pending_status_callback, set_pending_status_callback)
8471 (find_status_pending_thread_callback): New functions.
8472 (handle_status): Handle the case of multiple threads having
8473 interesting statuses to report. Report threads' real last signal
8474 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8475 with an interesting thread to report the status for, instead of
8476 always reporting the status of the first thread.
8478 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8480 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8481 * gdbreplay.c (gdbreplay_version): Likewise.
8483 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8485 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8486 iov.iov_len with the real length in use.
8488 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8490 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8491 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8492 for all targets that use win32-low.c.
8493 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8494 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8496 2013-12-13 Pedro Alves <palves@redhat.com>
8498 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8499 if equal to TARGET_WAITKIND_LOADED.
8500 * win32-low.c (cached_status): New static global.
8501 (win32_wait): Add declaration.
8502 (do_initial_child_stuff): Flush all initial pending debug events
8503 up to the initial breakpoint.
8504 (win32_wait): If CACHED_STATUS was set, return that instead
8505 of doing a real wait. Remove the code resuming the execution
8506 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8507 during the initial phase. Also remove the code changing
8508 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8509 TARGET_WAITKIND_STOPPED.
8511 2013-12-11 Yao Qi <yao@codesourcery.com>
8513 * notif.c (handle_notif_ack): Return 0 if no notification
8516 2013-11-20 Doug Evans <dje@google.com>
8518 * linux-low.c (linux_set_resume_request): Fix comment.
8520 2013-11-20 Doug Evans <dje@google.com>
8522 * linux-low.c (resume_status_pending_p): Tweak comment.
8524 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8526 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8527 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8528 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8529 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8530 (srv_amd64_regobj): Add amd64-mpx.o.
8531 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8532 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8533 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8534 * i387-fp.c (num_pl_bnd_register) Added constant.
8535 (num_pl_bnd_cfg_registers) Added constant.
8536 (struct i387_xsave) Added reserved area and MPX fields.
8537 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8538 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8540 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8541 (init_registers_amd64_mpx_linux): Declare new function.
8542 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8543 (x86_64_regmap): Add MPX registers.
8544 (x86_linux_read_description): Add MPX case.
8545 (initialize_low_arch): Initialize MPX targets.
8547 2013-11-18 Tom Tromey <tromey@redhat.com>
8549 * configure: Rebuild.
8550 * configure.ac: Don't check for stdlib.h.
8551 * gdbreplay.c: Unconditionally include stdlib.h.
8553 2013-11-18 Tom Tromey <tromey@redhat.com>
8555 * config.in: Rebuild.
8556 * configure: Rebuild.
8557 * configure.ac: Don't use AC_HEADER_DIRENT.
8559 2013-11-18 Tom Tromey <tromey@redhat.com>
8561 * server.h: Don't check HAVE_STRING_H.
8562 * gdbreplay.c: Don't check HAVE_STRING_H.
8563 * configure: Rebuild.
8565 2013-11-18 Tom Tromey <tromey@redhat.com>
8567 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8570 2013-11-08 Tom Tromey <tromey@redhat.com>
8572 * configure, config.in: Rebuild.
8573 * configure.ac: Remove unused configury.
8575 2013-11-08 Tom Tromey <tromey@redhat.com>
8577 * acinclude.m4: Include common.m4, codeset.m4.
8578 * configure, config.in: Rebuild.
8579 * configure.ac: Use GDB_AC_COMMON.
8581 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8583 * linux-s390-low.c (HWCAP_S390_TE): New define.
8584 (s390_arch_setup): Consider the TE field in the HWCAP for
8585 determining 'have_regset_tdb'.
8587 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8590 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8593 2013-10-02 Pedro Alves <palves@redhat.com>
8595 * server.c (process_serial_event): Don't output "GDBserver
8596 exiting" if GDB is connected through stdio.
8597 * target.c (mywait): Likewise, be silent if GDB is connected
8600 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8602 * lynx-low.c (lynx_add_threads_after_attach): New function.
8603 (lynx_attach): Remove call to add_thread. Add call to
8604 lynx_add_threads_after_attach instead.
8606 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8608 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8609 * config.in, configure: Regenerated.
8611 2013-09-18 Yao Qi <yao@codesourcery.com>
8614 * server.c (start_inferior): Clear 'resume_info'.
8616 2013-09-16 Jiong Wang <jiwang@tilera.com>
8618 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8621 2013-09-16 Jiong Wang <jiwang@tilera.com>
8623 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8624 linux-tile-low.o to srv_tgtobj.
8626 2013-09-16 Will Newton <will.newton@linaro.org>
8628 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8631 2013-09-06 Pedro Alves <palves@redhat.com>
8633 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8634 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8635 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8636 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8637 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8638 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8640 2013-09-06 Pedro Alves <palves@redhat.com>
8642 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8643 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8645 2013-09-06 Pedro Alves <palves@redhat.com>
8647 * linux-amd64-ipa.c: Include tracepoint.h.
8648 * linux-i386-ipa.c: Include tracepoint.h.
8650 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8652 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8653 (ps_get_thread_area): New function.
8655 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8657 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8658 (initialize_low_arch): Call init_registers_crisv32 rather than
8659 init_register_crisv32.
8661 2013-09-05 Pedro Alves <palves@redhat.com>
8663 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8665 * hostio.h: ... this new file.
8666 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8667 win32-low.c: Include hostio.h.
8669 2013-09-05 Pedro Alves <palves@redhat.com>
8671 * server.h (gdb_client_data, handler_func, callback_handler_func)
8672 (delete_file_handler, add_file_handler, append_callback_event)
8673 (delete_callback_event, start_event_loop, initialize_event_loop):
8674 Move to event-loop.h and include it.
8675 * event-loop.h: New file.
8677 2013-09-05 Pedro Alves <palves@redhat.com>
8679 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8680 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8681 (loaded_dll, unloaded_dll): Move to ...
8682 * dll.h: ... this new file.
8683 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8685 2013-09-05 Pedro Alves <palves@redhat.com>
8687 * server.h (current_process, get_thread_process, all_processes)
8688 (add_inferior_to_list, for_each_inferior, current_inferior)
8689 (remove_inferior, add_process, remove_process, find_process_pid)
8690 (have_started_inferiors_p, have_attached_inferiors_p)
8691 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8692 (clear_inferiors, find_inferior, find_inferior_id)
8693 (inferior_target_data, set_inferior_target_data)
8694 (inferior_regcache_data, set_inferior_regcache_data): Move to
8695 inferiors.h, and include it.
8696 * inferiors.h: New file.
8698 2013-09-05 Pedro Alves <palves@redhat.com>
8700 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8704 2013-09-05 Pedro Alves <palves@redhat.com>
8706 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8708 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8709 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8710 (handle_tracepoint_general_set, handle_tracepoint_query)
8711 (tracepoint_finished_step, tracepoint_was_hit)
8712 (release_while_stepping_state_list, current_traceframe)
8713 (in_readonly_region, traceframe_read_mem)
8714 (fetch_traceframe_registers, traceframe_read_sdata)
8715 (traceframe_read_info, struct fast_tpoint_collect_status)
8716 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8717 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8718 (supply_fast_tracepoint_registers)
8719 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8720 (ipa_tdesc, claim_trampoline_space)
8721 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8722 (agent_mem_read, agent_get_trace_state_variable_value)
8723 (agent_set_trace_state_variable_value, agent_tsv_read)
8724 (agent_mem_read_string, get_raw_reg_func_addr)
8725 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8726 * tracepoint.h: ... this new file.
8728 2013-09-05 Pedro Alves <palves@redhat.com>
8730 * server.h (perror_with_name, error, fatal, warning, paddress)
8731 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8733 * utils.h: New file.
8735 2013-09-05 Pedro Alves <palves@redhat.com>
8737 * server.h (remote_debug, noack_mode, transport_is_reliable)
8738 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8739 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8740 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8741 (write_enn, initialize_async_io, enable_async_io)
8742 (disable_async_io, check_remote_input_interrupt_request)
8743 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8744 (dead_thread_notify, prepare_resume_reply)
8745 (decode_address_to_semicolon, decode_address, decode_m_packet)
8746 (decode_M_packet, decode_X_packet, decode_xfer_write)
8747 (decode_search_memory_packet, unhexify, hexify)
8748 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8749 (look_up_one_symbol, relocate_instruction)
8750 (monitor_output): Move to remote-utils.h, and include it.
8751 * remote-utils.h: New file.
8753 2013-09-05 Pedro Alves <palves@redhat.com>
8755 * server.h (_): Delete.
8757 2013-09-02 Pedro Alves <palves@redhat.com>
8759 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8760 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8762 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8764 2013-09-02 Pierre Muller <muller@sourceware.org>
8766 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8767 or WriteProcessMemory complete successfully and handle
8768 ERROR_PARTIAL_COPY error.
8770 2013-09-02 Pedro Alves <palves@redhat.com>
8772 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8773 error instead of EIO.
8775 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8778 * linux-low.c: Include filestuff.h.
8779 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8780 * lynx-low.c: Include filestuff.h.
8781 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8782 * server.c: Include filestuff.h.
8783 (main): Call notice_open_fds.
8784 * spu-low.c: Include filestuff.h.
8785 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8787 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8789 * Makefile.in: Explain why ../target and ../nat are not
8790 listed as include file search paths.
8791 (linux-waitpid.o): New object file rule.
8792 * configure.srv (srv_native_linux_obj): New variable.
8793 Replace all occurrences of linux native object files with
8794 $srv_native_linux_obj.
8795 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8796 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8797 (linux_enable_event_reporting): Remove declaration.
8798 (my_waitpid): Moved to common/linux-waitpid.c.
8799 (linux_wait_for_event): Pass ptid when calling
8800 linux_enable_event_reporting.
8801 (linux_supports_tracefork_flag): Remove.
8802 (linux_enable_event_reporting): Likewise.
8803 (linux_tracefork_grandchild): Remove.
8804 (STACK_SIZE): Moved to common/linux-ptrace.c.
8805 (linux_tracefork_child): Remove.
8806 (linux_test_for_tracefork): Remove.
8807 (linux_look_up_symbols): Call linux_supports_traceclone.
8808 (initialize_low): Remove call to linux_test_for_tracefork.
8809 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8810 common/linux-ptrace.h.
8811 (PTRACE_TYPE_ARG4): Likewise.
8812 Include linux-ptrace.h.
8814 2013-08-21 Pedro Alves <palves@redhat.com>
8816 * config.in: Renegerate.
8818 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8820 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8821 (SFILES): Remove $(srcdir)/common/target-common.c and
8822 add $(srcdir)/target/waitstatus.c.
8823 (OBS): Remove target-common.o and add waitstatus.o.
8824 (server_h): Remove $(srcdir)/../common/target-common.h and
8825 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8826 and $(srcdir)/../target/waitstatus.h.
8827 (target-common.o): Remove.
8828 (waitstatus.o): New target object file.
8829 * target.h: Do not include target-common.h and
8830 include target/resume.h, target/wait.h and
8831 target/waitstatus.h.
8833 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8835 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8836 to PTRACE_TYPE_ARG3.
8837 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8838 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8840 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8841 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8843 2013-07-27 Jie Zhang <jie@codesourcery.com>
8844 Daniel Jacobowitz <dan@codesourcery.com>
8845 Yao Qi <yao@codesourcery.com>
8847 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8848 (mips-linux-watch.o): New rule.
8849 (mips_linux_watch_h): New variable.
8850 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8852 * linux-mips-low.c: Include mips-linux-watch.h.
8853 (struct arch_process_info, struct arch_lwp_info): New.
8854 (update_watch_registers_callback): New function.
8855 (mips_linux_new_process, mips_linux_new_thread) New functions.
8856 (mips_linux_prepare_to_resume, mips_insert_point): New
8858 (mips_remove_point, mips_stopped_by_watchpoint): New
8860 (rsp_bp_type_to_target_hw_bp_type): New function.
8861 (mips_stopped_data_address): New function.
8862 (the_low_target): Add watchpoint support functions.
8864 2013-07-27 Yao Qi <yao@codesourcery.com>
8866 * i386-low.c: Include break-common.h.
8867 (enum target_hw_bp_type): Remove.
8869 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8871 * Makefile.in (SFILES): /common/target-common.c.
8872 (OBS): Add target-common.o.
8873 (server_h): Add $(srcdir)/../common/target-common.h.
8874 (target-common.o): New target.
8875 * server.c (queue_stop_reply_callback): Free
8876 status string after use.
8877 * target.c (target_waitstatus_to_string): Remove.
8878 * target.h: Include target-common.h.
8879 (resume_kind): Likewise.
8880 (target_waitkind): Likewise.
8881 (target_waitstatus): Likewise.
8882 (TARGET_WNOHANG): Likewise.
8884 2013-07-04 Yao Qi <yao@codesourcery.com>
8886 * Makefile.in (host_alias): Use @host_noncanonical@.
8887 (target_alias): Use @target_noncanonical@.
8888 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8889 ACX_NONCANONICAL_HOST.
8890 * configure: Regenerated.
8893 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8895 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8896 * configure: Rebuild.
8897 * Makefile.in (version_host, version_target): Get from configure.
8898 (version.c): Use $(version_host) and $(version_target).
8900 2013-07-03 Pedro Alves <palves@redhat.com>
8902 * Makefile.in (config.status): Depend on development.sh.
8903 * acinclude.m4: Include libmcheck.m4.
8904 * configure: Regenerate.
8906 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8908 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8909 attribute inside the parentheses.
8910 (winapi_DebugSetProcessKillOnExit): Ditto.
8911 (winapi_DebugBreakProcess): Ditto.
8912 (winapi_GenerateConsoleCtrlEvent): Ditto.
8914 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8916 * notif.h (notif_event): Add a dummy member to avoid compiler
8919 2013-07-01 Pedro Alves <palves@redhat.com>
8921 * hostio.c (HOSTIO_PATH_MAX): Define.
8922 (require_filename, handle_open, handle_unlink, handle_readlink):
8925 2013-07-01 Pedro Alves <palves@redhat.com>
8927 * server.h: Include "pathmax.h".
8928 * linux-low.c: Don't include sys/param.h.
8929 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8931 * win32-low.c: Don't include sys/param.h.
8932 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8934 2013-07-01 Pedro Alves <palves@redhat.com>
8936 * event-loop.c: Don't check HAVE_UNISTD_H before including
8938 * gdbreplay.c: Likewise.
8939 * remote-utils.c: Likewise.
8940 * server.c: Likewise.
8941 * configure.ac: Don't check for unistd.h.
8942 * configure: Regenerate.
8944 2013-06-28 Tom Tromey <tromey@redhat.com>
8946 * Makefile.in (version.c): Use version.in, not
8949 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8951 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8952 * configure: Rebuild.
8953 * Makefile.in (version_host, version_target): Get from configure.
8954 (version.c): Use $(version_host) and $(version_target).
8956 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8958 Fix trace-status to output user name without trailing colon.
8959 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8961 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8963 Fix trace-status to output proper start-time and stop-time.
8964 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8965 output start time and stop time in hex as gdb expects.
8967 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8969 * tracepoint.c (build_traceframe_info_xml): Output trace state
8970 variables present in the trace buffer.
8972 2013-06-24 Tom Tromey <tromey@redhat.com>
8974 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8976 (version.o): Remove.
8977 * gdbreplay.c: Include version.h.
8978 (version, host_name): Don't declare.
8979 * server.h: Include version.h.
8980 (version, host_name): Don't declare.
8982 2013-06-12 Pedro Alves <palves@redhat.com>
8984 * linux-x86-low.c (linux_is_elf64): Delete global.
8985 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8986 with local linux_pid_exe_is_elf_64_file use.
8988 2013-06-11 Pedro Alves <palves@redhat.com>
8990 * linux-low.c (regset_disabled, disable_regset): New functions.
8991 (regsets_fetch_inferior_registers)
8992 (regsets_store_inferior_registers): Use them.
8993 (initialize_regsets_info); Don't allocate the disabled_regsets
8995 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8998 2013-06-11 Pedro Alves <palves@redhat.com>
9000 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9003 2013-06-11 Pedro Alves <palves@redhat.com>
9005 * linux-x86-low.c (initialize_low_arch): Call
9006 init_registers_x32_avx_linux.
9008 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9010 Fix compatibility with Android Bionic.
9011 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9014 2013-06-07 Pedro Alves <palves@redhat.com>
9017 * Makefile.in (OBS): Add tdesc.o.
9018 (IPA_OBJS): Add tdesc-ipa.o.
9019 (tdesc-ipa.o): New rule.
9020 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9022 * linux-low.c (new_inferior): Delete.
9023 (disabled_regsets, num_regsets): Delete.
9024 (linux_add_process): Adjust to set the new per-process
9026 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9027 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9028 was a stop. When calling arch_setup, switch the current inferior
9029 to the thread that got an event.
9030 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9031 (regsets_fetch_inferior_registers)
9032 (regsets_store_inferior_registers): New regsets_info parameter.
9034 (linux_register_in_regsets): New regs_info parameter. Adjust to
9036 (register_addr, fetch_register, store_register): New usrregs_info
9037 parameter. Adjust to use it.
9038 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9039 parameter regs_info. Adjust to use it.
9040 (linux_fetch_registers): Get the current inferior's regs_info, and
9042 (linux_store_registers): Ditto.
9043 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9044 (initialize_low): Don't initialize the target_regsets here. Call
9045 initialize_low_arch.
9046 * linux-low.h (target_regsets): Delete declaration.
9047 (struct regsets_info): New.
9048 (struct usrregs_info): New.
9049 (struct regs_info): New.
9050 (struct process_info_private) <new_inferior>: New field.
9051 (struct linux_target_ops): Delete the num_regs, regmap, and
9052 regset_bitmap fields. New field regs_info.
9053 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9054 * i387-fp.c (num_xmm_registers): Delete.
9055 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9056 calls to new interface.
9057 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9058 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9059 Infer the number of xmm registers from the regcache's target
9061 * i387-fp.h (num_xmm_registers): Delete.
9062 * inferiors.c (add_thread): Don't install the thread's regcache
9064 * proc-service.c (gregset_info): Fetch the current inferior's
9065 regs_info. Adjust to use it.
9066 * regcache.c: Include tdesc.h.
9067 (register_bytes, reg_defs, num_registers)
9068 (gdbserver_expedite_regs): Delete.
9069 (get_thread_regcache): If the thread doesn't have a regcache yet,
9070 create one, instead of aborting gdbserver.
9071 (regcache_invalidate_one): Rename to ...
9072 (regcache_invalidate_thread): ... this.
9073 (regcache_invalidate_one): New.
9074 (regcache_invalidate): Only invalidate registers of the current
9076 (init_register_cache): Add target_desc parameter, and use it.
9077 (new_register_cache): Ditto. Assert the target description has a
9078 non zero registers_size.
9079 (regcache_cpy): Add assertions. Adjust.
9080 (realloc_register_cache, set_register_cache): Delete.
9081 (registers_to_string, registers_from_string): Adjust.
9082 (find_register_by_name, find_regno, find_register_by_number)
9083 (register_cache_size): Add target_desc parameter, and use it.
9084 (free_register_cache_thread, free_register_cache_thread_one)
9085 (regcache_release, register_cache_size): New.
9086 (register_size): Add target_desc parameter, and use it.
9087 (register_data, supply_register, supply_register_zeroed)
9088 (supply_regblock, supply_register_by_name, collect_register)
9089 (collect_register_as_string, collect_register_by_name): Adjust.
9090 * regcache.h (struct target_desc): Forward declare.
9091 (struct regcache) <tdesc>: New field.
9092 (init_register_cache, new_register_cache): Add target_desc
9094 (regcache_invalidate_thread): Declare.
9095 (regcache_invalidate_one): Delete declaration.
9096 (regcache_release): Declare.
9097 (find_register_by_number, register_cache_size, register_size)
9098 (find_regno): Add target_desc parameter.
9099 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9101 * remote-utils.c: Include tdesc.h.
9102 (outreg, prepare_resume_reply): Adjust.
9103 * server.c: Include tdesc.h.
9104 (gdbserver_xmltarget): Delete declaration.
9105 (get_features_xml, process_serial_event): Adjust.
9106 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9108 (struct process_info) <tdesc>: New field.
9109 (ipa_tdesc): Declare.
9110 * tdesc.c: New file.
9111 * tdesc.h: New file.
9112 * tracepoint.c: Include tdesc.h.
9113 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9114 (get_context_regcache): Adjust to pass ipa_tdesc down.
9115 (do_action_at_tracepoint): Adjust to get the register cache size
9116 from the context regcache's description.
9117 (traceframe_walk_blocks): Adjust to get the register cache size
9118 from the current trace frame's description.
9119 (traceframe_get_pc): Adjust to get current trace frame's
9120 description and pass it down.
9121 (gdb_collect): Adjust to get the register cache size from the
9123 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9124 (gdbserver_xmltarget): Delete.
9125 (initialize_low_tracepoint): Set the ipa's target description.
9126 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9127 (initialize_low_tracepoint): Set the ipa's target description.
9128 * linux-x86-low.c: Include tdesc.h.
9129 [__x86_64__] (is_64bit_tdesc): New.
9130 (ps_get_thread_area, x86_get_thread_area): Use it.
9131 (i386_cannot_store_register): Rename to ...
9132 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9133 (i386_cannot_fetch_register): Rename to ...
9134 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9135 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9137 (target_regsets): Rename to ...
9138 (x86_regsets): ... this.
9139 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9141 (x86_siginfo_fixup): Use is_64bit_tdesc.
9142 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9143 (tdesc_x32_avx_linux, tdesc_x32_linux)
9144 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9146 (x86_linux_update_xmltarget): Delete.
9147 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9148 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9149 (AMD64_LINUX_USER64_CS): New.
9150 (x86_linux_read_description): New, based on
9151 x86_linux_update_xmltarget.
9152 (same_process_callback): New.
9153 (x86_arch_setup_process_callback): New.
9154 (x86_linux_update_xmltarget): New.
9155 (x86_regsets_info): New.
9156 (amd64_linux_regs_info): New.
9157 (i386_linux_usrregs_info): New.
9158 (i386_linux_regs_info): New.
9159 (x86_linux_regs_info): New.
9160 (x86_arch_setup): Reimplement.
9161 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9162 (x86_emit_ops): Ditto.
9163 (the_low_target): Adjust. Install x86_linux_regs_info,
9164 x86_cannot_fetch_register, and x86_cannot_store_register.
9165 (initialize_low_arch): New.
9166 * linux-ia64-low.c (tdesc_ia64): Declare.
9167 (ia64_fetch_register): Adjust.
9168 (ia64_usrregs_info, regs_info): New globals.
9169 (ia64_regs_info): New function.
9170 (the_low_target): Adjust.
9171 (initialize_low_arch): New function.
9172 * linux-sparc-low.c (tdesc_sparc64): Declare.
9173 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9175 (sparc_arch_setup): New function.
9176 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9177 (the_low_target): Adjust.
9178 (initialize_low_arch): New function.
9179 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9180 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9181 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9182 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9183 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9184 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9185 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9186 (tdesc_powerpc_isa205_vsx64l): Declare.
9187 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9188 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9189 (ppc_set_pc, ppc_get_hwcap): Adjust.
9190 (ppc_usrregs_info): Forward declare.
9191 (!__powerpc64__) ppc_regmap_adjusted: New global.
9192 (ppc_arch_setup): Adjust to the current process'es target
9194 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9195 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9196 (ppc_store_evrregset): Adjust.
9197 (target_regsets): Rename to ...
9198 (ppc_regsets): ... this, and make static.
9199 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9200 (ppc_regs_info): New function.
9201 (the_low_target): Adjust.
9202 (initialize_low_arch): New function.
9203 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9204 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9205 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9206 (tdesc_s390x_linux64v2): Declare.
9207 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9208 (s390_fill_gregset, s390_store_last_break): Adjust.
9209 (target_regsets): Rename to ...
9210 (s390_regsets): ... this, and make static.
9211 (s390_get_pc, s390_set_pc): Adjust.
9212 (s390_get_hwcap): New target_desc parameter, and use it.
9213 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9214 (s390_arch_setup): Adjust to set the current process'es target
9215 description. Don't adjust the regmap.
9216 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9217 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9218 (regs_info_3264): New globals.
9219 (s390_regs_info): New function.
9220 (the_low_target): Adjust.
9221 (initialize_low_arch): New function.
9222 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9223 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9224 [__mips64] (init_registers_mips_linux)
9225 (init_registers_mips_dsp_linux): Delete defines.
9226 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9227 (have_dsp): New global.
9228 (mips_read_description): New, based on mips_arch_setup.
9229 (mips_arch_setup): Reimplement.
9230 (get_usrregs_info): New function.
9231 (mips_cannot_fetch_register, mips_cannot_store_register)
9232 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9233 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9234 (target_regsets): Rename to ...
9235 (mips_regsets): ... this, and make static.
9236 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9237 (dsp_regs_info, regs_info): New globals.
9238 (mips_regs_info): New function.
9239 (the_low_target): Adjust.
9240 (initialize_low_arch): New function.
9241 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9242 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9244 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9245 (arm_read_description): New, with bits factored from
9247 (arm_arch_setup): Reimplement.
9248 (target_regsets): Rename to ...
9249 (arm_regsets): ... this, and make static.
9250 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9251 (arm_regs_info): New function.
9252 (the_low_target): Adjust.
9253 (initialize_low_arch): New function.
9254 * linux-m68k-low.c (tdesc_m68k): Declare.
9255 (target_regsets): Rename to ...
9256 (m68k_regsets): ... this, and make static.
9257 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9258 (m68k_regs_info): New function.
9259 (m68k_arch_setup): New function.
9260 (the_low_target): Adjust.
9261 (initialize_low_arch): New function.
9262 * linux-sh-low.c (tdesc_sharch): Declare.
9263 (target_regsets): Rename to ...
9264 (sh_regsets): ... this, and make static.
9265 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9266 (sh_regs_info, sh_arch_setup): New functions.
9267 (the_low_target): Adjust.
9268 (initialize_low_arch): New function.
9269 * linux-bfin-low.c (tdesc_bfin): Declare.
9270 (bfin_arch_setup): New function.
9271 (bfin_usrregs_info, regs_info): New globals.
9272 (bfin_regs_info): New function.
9273 (the_low_target): Adjust.
9274 (initialize_low_arch): New function.
9275 * linux-cris-low.c (tdesc_cris): Declare.
9276 (cris_arch_setup): New function.
9277 (cris_usrregs_info, regs_info): New globals.
9278 (cris_regs_info): New function.
9279 (the_low_target): Adjust.
9280 (initialize_low_arch): New function.
9281 * linux-cris-low.c (tdesc_crisv32): Declare.
9282 (cris_arch_setup): New function.
9283 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9284 (cris_regs_info): New function.
9285 (the_low_target): Adjust.
9286 (initialize_low_arch): New function.
9287 * linux-m32r-low.c (tdesc_m32r): Declare.
9288 (m32r_arch_setup): New function.
9289 (m32r_usrregs_info, regs_info): New globals.
9290 (m32r_regs_info): Adjust.
9291 (initialize_low_arch): New function.
9292 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9293 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9294 (tic6x_usrregs_info): Forward declare.
9295 (tic6x_read_description): New function, based on ...
9296 (tic6x_arch_setup): ... this. Reimplement.
9297 (target_regsets): Rename to ...
9298 (tic6x_regsets): ... this, and make static.
9299 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9300 (tic6x_regs_info): New function.
9301 (the_low_target): Adjust.
9302 (initialize_low_arch): New function.
9303 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9304 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9305 (target_regsets): Rename to ...
9306 (xtensa_regsets): ... this, and make static.
9307 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9309 (xtensa_arch_setup, xtensa_regs_info): New functions.
9310 (the_low_target): Adjust.
9311 (initialize_low_arch): New function.
9312 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9313 (nios2_arch_setup): Set the current process'es tdesc.
9314 (target_regsets): Rename to ...
9315 (nios2_regsets): ... this.
9316 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9317 (nios2_regs_info): New function.
9318 (the_low_target): Adjust.
9319 (initialize_low_arch): New function.
9320 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9321 (aarch64_arch_setup): Set the current process'es tdesc.
9322 (target_regsets): Rename to ...
9323 (aarch64_regsets): ... this.
9324 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9325 (aarch64_regs_info): New function.
9326 (the_low_target): Adjust.
9327 (initialize_low_arch): New function.
9328 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9330 (target_regsets): Rename to ...
9331 (tile_regsets): ... this.
9332 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9333 (tile_regs_info): New function.
9334 (tile_arch_setup): Set the current process'es tdesc.
9335 (the_low_target): Adjust.
9336 (initialize_low_arch): New function.
9337 * spu-low.c (tdesc_spu): Declare.
9338 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9339 * win32-arm-low.c (tdesc_arm): Declare.
9340 (arm_arch_setup): New function.
9341 (the_low_target): Install arm_arch_setup instead of
9343 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9344 (init_windows_x86): Rename to ...
9345 (i386_arch_setup): ... this. Set `win32_tdesc'.
9346 (the_low_target): Adjust.
9347 * win32-low.c (win32_tdesc): New global.
9348 (child_add_thread): Don't create the thread cache here.
9349 (do_initial_child_stuff): Set the new process'es tdesc.
9350 * win32-low.h (struct target_desc): Forward declare.
9351 (win32_tdesc): Declare.
9352 * lynx-i386-low.c (tdesc_i386): Declare global.
9353 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9354 * lynx-low.c (lynx_tdesc): New global.
9355 (lynx_add_process): Set the new process'es tdesc.
9356 * lynx-low.h (struct target_desc): Forward declare.
9357 (lynx_tdesc): Declare global.
9358 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9359 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9360 * nto-low.c (nto_tdesc): New global.
9361 (do_attach): Set the new process'es tdesc.
9362 * nto-low.h (struct target_desc): Forward declare.
9363 (nto_tdesc): Declare.
9364 * nto-x86-low.c (tdesc_i386): Declare.
9365 (nto_x86_arch_setup): Set `nto_tdesc'.
9367 2013-06-04 Gary Benson <gbenson@redhat.com>
9369 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9370 to qSupported response when appropriate.
9371 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9372 with nonzero-length annex.
9373 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9374 arguments supplied in annex.
9376 2013-05-31 Doug Evans <dje@google.com>
9379 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9380 64 bits in 64-cross-32 environment.
9382 2013-05-28 Pedro Alves <palves@redhat.com>
9384 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9385 (aarch64-without-fpu.c): Delete rule.
9386 * configure.srv (aarch64*-*-linux*): Remove references to
9387 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9388 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9391 2013-05-24 Pedro Alves <palves@redhat.com>
9393 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9394 instead of strchr/decode_address. Error if the range isn't split
9395 with a ','. Don't assume there's be a ':' in the action.
9397 2013-05-23 Yao Qi <yao@codesourcery.com>
9398 Pedro Alves <palves@redhat.com>
9400 * linux-low.c (lwp_in_step_range): New function.
9401 (linux_wait_1): If the thread was range stepping and stopped
9402 outside the stepping range, report the stop to GDB. Otherwise,
9403 continue stepping. Add range stepping debug output.
9404 (linux_set_resume_request): Copy the step range from the resume
9406 (linux_supports_range_stepping): New.
9407 (linux_target_ops) <supports_range_stepping>: Set to
9408 linux_supports_range_stepping.
9409 * linux-low.h (struct linux_target_ops)
9410 <supports_range_stepping>: New field.
9411 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9412 * linux-x86-low.c (x86_supports_range_stepping): New.
9413 (the_low_target) <supports_range_stepping>: Set to
9414 x86_supports_range_stepping.
9415 * server.c (handle_v_cont): Handle 'r' action.
9416 (handle_v_requests): Append ";r" if the target supports range
9418 * target.h (struct thread_resume) <step_range_start,
9419 step_range_end>: New fields.
9420 (struct target_ops) <supports_range_stepping>:
9422 (target_supports_range_stepping): New macro.
9424 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9426 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9427 confusion in comment.
9429 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9431 * lynx-low.c (struct process_info_private): New type.
9432 (lynx_add_process): New function.
9433 (lynx_create_inferior, lynx_attach): Replace calls to
9434 add_process by calls to lynx_add_process.
9435 (lynx_resume): If PTID is null, then try using
9436 current_process()->private->last_wait_event_ptid.
9438 (lynx_clear_inferiors): Delete. The contents of that function
9439 has been inlined in lynx_mourn;
9440 (lynx_wait_1): Save the ptid in the process's private data.
9441 (lynx_mourn): Free the process' private data. Replace call
9442 to lynx_clear_inferiors by call to clear_inferiors.
9444 2013-05-17 Yao Qi <yao@codesourcery.com>
9446 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9449 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9451 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9452 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9453 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9454 PT_TEXT_END_ADDR guards. Update comments.
9455 (linux_target_op) <read_offsets>: Conditionally define to
9456 linux_read_offsets if the target is UCLIBC and if it defines
9457 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9459 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9460 Andrew Jenner <andrew@codesourcery.com>
9462 * Makefile.in (SFILES): Add linux-nios2-low.c.
9463 (clean): Add action to delete nios2-linux.c.
9464 (nios2-linux.c): New rule.
9465 * configure.srv: Add nios2*-*-linux*.
9466 * linux-nios2-low.c: New.
9468 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9470 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9472 2013-04-25 Hui Zhu <hui@codesourcery.com>
9475 * ax.c (ax_printf): Add fflush.
9477 2013-04-22 Tom Tromey <tromey@redhat.com>
9479 * Makefile.in (SFILES): Add filestuff.c.
9480 (OBS): Add filestuff.o.
9481 (filestuff.o): New target.
9482 * config.in, configure: Rebuild.
9483 * configure.ac: Check for fdwalk, pipe2.
9485 2013-04-17 Pedro Alves <palves@redhat.com>
9487 * configure.ac (USE_THREAD_DB): Delete variable.
9488 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9489 Don't AC_SUBST USE_THREAD_DB.
9490 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9491 * config.in, configure: Regenerate.
9493 2013-04-16 Pedro Alves <palves@redhat.com>
9495 * linux-low.h (struct lwp_info) <thread_known>: Move under
9496 the USE_THREAD_DB #ifdef.
9498 2013-04-16 Pedro Alves <palves@redhat.com>
9500 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9501 (linux-low.o): Delete rule.
9502 * linux-low.h: Always include "gdb_thread_db.h" instead of
9503 conditionally including thread_db.h.
9504 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9507 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9509 * Makefile.in (install-only): Fix make install regression.
9511 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9513 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9514 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9516 * gdbserver.1: Remove.
9518 2013-03-22 Pedro Alves <palves@redhat.com>
9520 * linux-low.c (handle_extended_wait): Don't call
9521 linux_enable_event_reporting.
9523 2013-03-15 Tony Theodore <tonyt@logyst.com>
9526 * Makefile.in (SHELL): Use @SHELL@.
9528 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9530 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9533 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9535 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9536 Remove extraneous NULL element.
9538 2013-03-13 Yao Qi <yao@codesourcery.com>
9540 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9541 'V' block in trace frame.
9543 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9545 * target.h (struct target_ops): Add btrace ops.
9546 (target_supports_btrace): New macro.
9547 (target_enable_btrace): New macro.
9548 (target_disable_btrace): New macro.
9549 (target_read_btrace): New macro.
9550 * gdbthread.h (struct thread_info): Add btrace field.
9551 * server.c: Include btrace-common.h.
9552 (handle_btrace_general_set): New function.
9553 (handle_btrace_enable): New function.
9554 (handle_btrace_disable): New function.
9555 (handle_general_set): Call handle_btrace_general_set.
9556 (handle_qxfer_btrace): New function.
9557 (struct qxfer qxfer_packets[]): Add btrace entry.
9558 * inferiors.c (remove_thread): Disable btrace.
9559 * linux-low: Include linux-btrace.h.
9560 (linux_low_enable_btrace): New function.
9561 (linux_low_read_btrace): New function.
9562 (linux_target_ops): Add btrace ops.
9563 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9564 Add srv_linux_btrace=yes.
9565 (x86_64-*-linux*): Add linux-btrace.o.
9566 Add srv_linux_btrace=yes.
9567 * configure.ac: Define HAVE_LINUX_BTRACE.
9568 * config.in: Regenerated.
9569 * configure: Regenerated.
9571 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9573 * server.c (handle_qxfer): Preserve error message if -3 is
9575 (qxfer): Document the -3 return value.
9577 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9579 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9580 (linux_btrace_h): New variable.
9581 (linux-btrace.o): New rule.
9583 2013-03-08 Stan Shebs <stan@codesourcery.com>
9584 Hafiz Abid Qadeer <abidh@codesourcery.com>
9586 * tracepoint.c (trace_buffer_size): New global.
9587 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9588 (init_trace_buffer): Change to one-argument function. Allocate
9589 trace buffer memory.
9590 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9591 handle QTBuffer:size packet.
9592 (cmd_bigqtbuffer_size): New function.
9593 (initialize_tracepoint): Call init_trace_buffer with
9594 DEFAULT_TRACE_BUFFER_SIZE.
9595 * server.c (handle_query): Add QTBuffer:size in the
9598 2013-03-07 Yao Qi <yao@codesourcery.com>
9600 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9601 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9603 (cmd_qtsp): Adjust condition. Do post increment.
9604 Set cur_action and cur_step_action back to 0.
9606 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9609 * linux-low.c (linux_write_memory): Return early success if LEN is
9612 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9614 * configure.srv: Add x86_64-*-cygwin* as target.
9616 2013-02-28 Tom Tromey <tromey@redhat.com>
9618 * configure.ac: Invoke AC_SYS_LARGEFILE.
9619 * configure, config.in: Rebuild.
9621 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9623 * win32-low.c: Throughout, fix format strings and casts of
9624 printf-like functions to avoid type related warnings on all
9626 (get_child_debug_event): Print dwDebugEventCode as hex since
9627 that's how it's usually documented.
9629 2013-02-28 Yao Qi <yao@codesourcery.com>
9631 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9634 2013-02-27 Jiong Wang <jiwang@tilera.com>
9636 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9637 (reg-tilegx32.c): New rule.
9638 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9639 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9640 different register info initializer according to elf class.
9641 (init_registers_tilgx32): New function. The tilegx32 register info
9643 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9644 (tile_store_gregset): Likewise.
9646 2013-02-27 Yao Qi <yao@codesourcery.com>
9648 * server.c (process_point_options): Print debug message when
9649 debug_threads is true.
9651 2013-02-26 Yao Qi <yao@codesourcery.com>
9653 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9655 2013-02-19 Pedro Alves <palves@redhat.com>
9656 Kai Tietz <ktietz@redhat.com>
9660 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9661 instead of strtoul to extract address from packet.
9662 (process_serial_event) <'z'>: Likewise.
9664 2013-02-18 Yao Qi <yao@codesourcery.com>
9666 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9668 2013-02-14 Pedro Alves <palves@redhat.com>
9672 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9673 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9675 2013-02-14 Pedro Alves <palves@redhat.com>
9677 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9679 2013-02-14 Pedro Alves <palves@redhat.com>
9681 * tracepoint.c (save_string): Delete.
9682 (add_tracepoint_action): Use savestring instead of save_string.
9684 2013-02-12 Pedro Alves <palves@redhat.com>
9686 * linux-xtensa-low.c: Ditto.
9687 * xtensa-xtregs.c: Ditto.
9689 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9691 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9694 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9696 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9697 aarch64_num_wp_regs and aarch64_num_bp_regs to
9698 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9700 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9702 * linux-aarch64-low.c (ps_get_thread_area): Replace
9703 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9705 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9706 Marcus Shawcroft <marcus.shawcroft@arm.com>
9707 Nigel Stephens <nigel.stephens@arm.com>
9708 Yufeng Zhang <yufeng.zhang@arm.com>
9710 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9711 (aarch64.c, aarch64-without-fpu.c): New targets.
9712 * configure.srv (aarch64*-*-linux*): New.
9713 * linux-aarch64-low.c: New file.
9715 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9717 * linux-low.c (handle_extended_wait, linux_create_inferior)
9718 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9719 (dequeue_one_deferred_signal, linux_resume_one_thread)
9720 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9721 (linux_tracefork_grandchild, linux_test_for_tracefork)
9722 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9723 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9724 where the argument is 0.
9726 2013-01-25 Yao Qi <yao@codesourcery.com>
9728 * event-loop.c: Include "queue.h".
9729 (gdb_event_p): New typedef.
9730 (struct gdb_event) <next_event>: Remove.
9731 (event_queue): Change to QUEUE(gdb_event_p).
9732 (async_queue_event): Remove.
9733 (gdb_event_xfree): New.
9734 (initialize_event_loop): New.
9735 (process_event): Use API from QUEUE.
9736 (wait_for_event): Likewise.
9737 * server.c (main): Call initialize_event_loop.
9738 * server.h (initialize_event_loop): Declare.
9740 2013-01-18 Yao Qi <yao@codesourcery.com>
9742 * ax.h (struct eval_agent_expr_context): New.
9743 (gdb_eval_agent_expr): Update declaration.
9744 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9745 TFRAME. Add new argument CTX.
9746 * server.h (struct eval_agent_expr_context): Declare.
9747 (agent_mem_read, agent_tsv_read): Update declaration.
9748 (agent_mem_read_string): Likewise.
9749 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9750 (add_traceframe_block): Add new argument TPOINT.
9751 Increase TPOINT->traceframe_usage.
9752 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9753 eval_tracepoint_agent_expr.
9754 (condition_true_at_tracepoint): Likewise.
9755 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9756 (agent_mem_read_string, agent_tsv_read): Likewise.
9758 2013-01-16 Yao Qi <yao@codesourcery.com>
9760 * linux-low.c (linux_resume_one_lwp): Don't check
9761 'lwp->bp_reinsert != 0'.
9763 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9764 Pedro Alves <palves@redhat.com>
9766 * lynx-low.c (ptrace_request_to_str): Define a temporary
9767 macro and use it to simplify this function's implementation.
9769 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9771 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9774 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9776 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9778 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9780 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9782 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9784 * lynx-low.c (lynx_resume): Use the resume_info parameter
9785 to determine the ptid for the lynx_ptrace call, unless
9786 it is equal to minus_one_ptid, in which case we use the
9787 ptid of the current_inferior.
9788 (lynx_wait_1): After having received a thread create/exit
9789 event, resume the inferior's execution using the signaling
9790 thread's ptid, rather than the old ptid.
9792 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9794 * lynx-low.c (lynx_resume): Delete variable ret.
9796 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9798 * gdbreplay.c (gdbreplay_version): Update copyright year.
9799 * server.c (gdbserver_version): Likewise.
9801 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9803 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9806 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9808 * lynx-low.c (ptrace_request_to_str): Add handling for
9811 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9813 * lynx-low.c (lynx_attach): Delete variable new_process.
9815 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9817 * lynx-low.c (lynx_create_inferior): Delete variable
9820 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9822 * lynx-low.c (ptrace_request_to_str): Do not handle
9823 PTRACE_GETTHREADLIST if this macro does not exist.
9825 2012-12-15 Yao Qi <yao@codesourcery.com>
9827 * Makefile.in (OBS): Add notif.o.
9828 * notif.c, notif.h: New.
9829 * server.c: Include "notif.h".
9830 (struct vstop_notif) <next>: Remove.
9832 (queue_stop_reply): Update.
9833 (push_event, send_next_stop_reply): Remove.
9834 (discard_queued_stop_replies): Update.
9835 (notif_stop): New variable.
9836 (handle_v_stopped): Remove.
9837 (handle_v_requests): Don't call handle_v_stopped. Call
9838 handle_ack_notif instead.
9839 (queue_stop_reply_callback): Call notif_event_enque instead
9840 of queue_stop_reply.
9841 (handle_status): Don't call send_next_stop_reply, call
9842 notif_write_event instead.
9843 (kill_inferior_callback): Likewise.
9844 (detach_or_kill_inferior_callback): Likewise.
9845 (main): Call initialize_notif.
9846 (process_serial_event): Call QUEUE_is_empty.
9847 (handle_target_event): Call notif_push instead of push event.
9848 * server.h (push_event): Remove declaration.
9850 2012-12-10 Tom Tromey <tromey@redhat.com>
9852 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9853 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9856 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9857 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9858 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9859 (amd64-linux-ipa.o, ax.o): Rewrite.
9860 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9861 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9862 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9863 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9864 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9865 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9866 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9867 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9868 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9869 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9870 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9871 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9872 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9873 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9874 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9875 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9876 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9877 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9878 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9879 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9880 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9881 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9882 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9883 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9884 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9885 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9886 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9887 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9888 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9889 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9890 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9891 (reg-tilegx.o): Remove.
9892 (all_object_files): New macro.
9893 Include .deps files.
9894 * aclocal.m4, configure: Rebuild.
9895 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9896 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9897 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9899 2012-12-05 Tom Tromey <tromey@redhat.com>
9902 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9904 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9906 * configure.ac: Check for linux/perf_event.h.
9907 * config.in: Regenerated.
9908 * configure: Regenerated.
9910 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9912 * hostio.c (handle_readlink): Decrease buffer size
9913 parameter passed to readlink by one byte.
9915 2012-11-26 Yao Qi <yao@codesourcery.com>
9917 * configure.ac (build_warnings): Append '-Wempty-body'.
9918 * configure: Regenerated.
9919 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9922 2012-11-15 Pierre Muller <muller@sourceware.org>
9924 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9925 * config.in: Regenerate.
9926 * configure: Regenerate.
9927 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9928 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9929 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9930 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9932 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9933 instead of <sys/wait.h> header.
9934 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9936 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9938 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9939 (various make rules): Remove -DGDBSERVER
9941 2012-11-09 Yao Qi <yao@codesourcery.com>
9943 * spu-low.c (current_ptid): Move it to ..
9944 * gdbthread.h: ... here. New.
9945 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9946 * server.c (myresume, process_serial_event): Likewise.
9947 * thread-db.c (thread_db_find_new_threads): Likewise.
9948 * tracepoint.c (run_inferior_command): Likewise.
9950 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9952 * server.c (handle_search_memory_1): Include access length in
9955 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9957 * linux-crisv32-low.c: Fix compile errors.
9959 2012-09-04 Yao Qi <yao@codesourcery.com>
9961 * tracepoint.c (cmd_qtsv): Adjust debug message.
9962 Don't check CUR_TPOINT.
9964 2012-08-28 Yao Qi <yao@codesourcery.com>
9966 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9967 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9968 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9969 Remove declarations of xmalloc, xreallloc, xstrdup and
9971 * Makefile.in (libiberty_h): New.
9972 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9973 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9975 2012-08-23 Yao Qi <yao@codesourcery.com>
9977 * server.h: Remove declaration of 'xsnprintf'.
9979 2012-08-22 Keith Seitz <keiths@redhat.com>
9981 * server.h: Include build-gnulib-gbserver/config.h.
9982 * gdbreplay.c: Likewise.
9984 2012-08-08 Doug Evans <dje@google.com>
9986 * Makefile.in (SFILES): Add gdb_vecs.c.
9987 (OBS): Add gdb_vecs.o.
9988 (gdb_vecs_h, host_defs_h): New variables.
9989 (thread-db.o): Add $(gdb_vecs_h) dependency.
9990 (gdb_vecs.o): New rule.
9991 * thread-db.c: #include "gdb_vecs.h".
9992 (thread_db_load_search): Use a vector to iterate over path elements.
9993 Handle text appearing after "$pdir".
9995 * configure.ac: Add check for strstr.
9996 * config.in: Regenerate.
9997 * configure: Regenerate.
9999 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10001 * hostio.c (handle_pread): If pread fails, fall back to attempting
10003 (handle_pwrite): Likewise for pwrite.
10005 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10007 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10008 between unsupported TYPE and unimplementable ADDR/LEN combination.
10009 (arm_insert_point): Act on new return value.
10011 2012-07-31 Pedro Alves <palves@redhat.com>
10013 * server.c (process_point_options): Only skip tokens if we find
10014 one that is unrecognized. Don't treat 'X' specially while
10015 skipping unrecognized tokens.
10017 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10019 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10020 to 4-byte-align HW breakpoint addresses for Thumb.
10022 2012-07-27 Yao Qi <yao@codesourcery.com>
10026 * server.h: Declare gdb_agent_about_to_close.
10027 * target.c (kill_inferior): Include "agent.h".
10028 New. Send command 'kill'.
10029 * target.h (kill_inferior): Removed macro.
10030 * tracepoint.c (gdb_agent_about_to_close): New.
10031 (gdb_agent_helper_thread): Handle command 'close'.
10032 Wait endlessly until the inferior stops.
10033 Install gdb_agent_remove_socket to atexit hook.
10034 (agent_socket_name): New static variable.
10035 (gdb_agent_socket_init): Replace local variable 'name' with
10036 'agent_socket_name'.
10037 (gdb_agent_remove_socket): New.
10039 2012-07-27 Yao Qi <yao@codesourcery.com>
10041 * server.c (process_point_options): Stop at 'X' when parsing.
10043 2012-07-19 Michael Eager <eager@eagercon.com>
10045 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10047 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10048 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10049 hardware breakpoint.
10051 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10053 * gdbserver/linux-low.c (initialize_low): Call
10054 linux_ptrace_init_warnings.
10056 2012-07-02 Doug Evans <dje@google.com>
10058 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10061 2012-07-02 Stan Shebs <stan@codesourcery.com>
10063 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10064 (ax.o): Add it to build rule.
10066 (OBS): Add format.o.
10067 (IPA_OBS): Add format.o.
10068 * server.c (handle_query): Claim support for breakpoint commands.
10069 (process_point_options): Add command case.
10070 (process_serial_event): Leave running if there are printfs in
10072 * mem-break.h (any_persistent_commands): Declare.
10073 (add_breakpoint_commands): Declare.
10074 (gdb_no_commands_at_breakpoint): Declare.
10075 (run_breakpoint_commands): Declare.
10076 * mem-break.c (struct point_command_list): New struct.
10077 (struct breakpoint): New field command_list.
10078 (any_persistent_commands): New function.
10079 (add_commands_to_breakpoint): New function.
10080 (add_breakpoint_commands): New function.
10081 (gdb_no_commands_at_breakpoint): New function.
10082 (run_breakpoint_commands): New function.
10083 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10085 * ax.c: Include format.h.
10086 (ax_printf): New function.
10087 (gdb_eval_agent_expr): Add printf opcode.
10089 2012-06-13 Yao Qi <yao@codesourcery.com>
10091 * server.c (start_inferior): Remove duplicated writes to fields
10092 'last_resume_kind' and 'last_status' of 'current_inferior'.
10094 2012-06-12 Yao Qi <yao@codesourcery.com>
10095 Pedro Alves <palves@redhat.com>
10097 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10099 * server.c (handle_v_cont): Extend comment.
10101 2012-06-11 Yao Qi <yao@codesourcery.com>
10103 * linux-low.c (linux_attach): Add 'static'.
10105 2012-06-06 Yao Qi <yao@codesourcery.com>
10107 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10109 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10111 Fix gcc -flto compilation warning.
10112 * server.c (main): Make variable multi_mode and attach volatile.
10114 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10116 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10117 if the platform doesn't know about it.
10119 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10121 * Makefile.in (SFILES): Add linux-tile-low.c.
10122 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10123 * configure.srv: Handle tilegx-*-linux*.
10124 * linux-tile-low.c: New file.
10126 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10128 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10130 2012-05-24 Pedro Alves <palves@redhat.com>
10134 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10136 2012-05-24 Pedro Alves <palves@redhat.com>
10140 Replace target_signal with gdb_signal throughout.
10142 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10144 * linux-low.c (linux_store_registers): Avoid the copying sequence
10145 when no data has been retrieved by ptrace.
10147 2012-05-22 Will Deacon <will.deacon@arm.com>
10149 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10150 Include asm/ptrace.h.
10151 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10154 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10156 * linux-low.c (linux_store_registers): Don't re-retrieve data
10157 with ptrace that has already been obtained from /proc. Always
10158 copy any data retrieved with ptrace to the buffer supplied.
10160 2012-05-11 Yao Qi <yao@codesourcery.com>
10161 Pedro Alves <palves@redhat.com>
10163 * linux-low.c (enum stopping_threads_kind): New.
10164 (stopping_threads): Change type to `enum stopping_threads_kind'.
10165 (handle_extended_wait): If stopping and suspending threads, leave
10166 the new_lwp suspended too.
10167 (linux_wait_for_event): Adjust.
10168 (stop_all_lwps): Set `stopping_threads' to
10169 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10170 whether we're suspending threads or just stopping them. Assert no
10173 2012-04-29 Yao Qi <yao@codesourcery.com>
10175 * server.h: Move some code to ...
10176 * gdbthread.h: ... here. New.
10177 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10178 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10179 (nto-low.o, win32-low.o): Likewise.
10180 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10181 * regcache.c, remote-utils.c, server.c: Likewise.
10182 * target.c, tracepoint.c, win32-low.c: Likewise.
10184 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10186 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10187 (PTRACE_ARG4_TYPE): Likewise.
10188 (PTRACE_XFER_TYPE): Likewise.
10189 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10190 ptrace to PTRACE_ARG3_TYPE.
10191 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10192 (PTRACE_ARG4_TYPE): Likewise.
10193 (PTRACE_XFER_TYPE): Likewise.
10194 (linux_detach_one_lwp): Cast fourth argument of
10195 ptrace to long then PTRACE_ARG4_TYPE.
10196 (regsets_fetch_inferior_registers): Cast third argument of
10197 ptrace to long then PTRACE_ARG3_TYPE.
10198 (regsets_store_inferior_registers): Likewise.
10200 2012-04-20 Pedro Alves <palves@redhat.com>
10202 * configure: Regenerate.
10204 2012-04-19 Pedro Alves <palves@redhat.com>
10206 * Makefile.in (GNULIB_BUILDDIR): New.
10207 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10208 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10209 (all, install-only, uninstall, clean-info, all-lib, clean): No
10210 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10211 (maintainer-clean realclean distclean): Use subdir_do.
10213 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10214 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10215 * acinclude.m4: Include acx_configure_dir.m4.
10216 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10217 calls. Call AC_PROG_RANLIB. Configure gnulib using
10220 (GNULIB_STDINT_H): Adjust.
10221 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10222 * gdbreplay.c: Include build-gnulib/config.h.
10223 * server.h: Likewise.
10224 * aclocal.m4: Regenerate.
10225 * config.in: Regenerate.
10226 * configure: Regenerate.
10228 2012-04-19 Pedro Alves <palves@redhat.com>
10230 * Makefile.in (LIBGNU, INCGNU): Adjust.
10231 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10232 (all, install-only, uninstall, clean-info, all-lib, clean)
10233 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10234 * configure.ac: Adjust AC_OUTPUT output.
10235 * aclocal.m4: Regenerate.
10236 * configure: Regenerate.
10238 2012-04-19 Pedro Alves <palves@redhat.com>
10240 * Makefile.in (generated_files): New.
10241 (server_h): Remove the explicit dependency on config.h, and depend
10242 on $generated_files.
10244 2012-04-19 Pedro Alves <palves@redhat.com>
10246 * Makefile.in (INCGNU): Add -Ignulib.
10248 2012-04-19 Pedro Alves <palves@redhat.com>
10250 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10251 (INCGNU): ... this, and spell out -I here.
10252 (GNULIB_LIB): Rename to ...
10253 (LIBGNU): ... this.
10254 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10256 2012-04-19 Pedro Alves <palves@redhat.com>
10258 * config.in: Regenerate.
10260 2012-04-19 Pedro Alves <palves@redhat.com>
10262 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10263 * server.h (memmem): Remove declaration.
10264 * config.in: Regenerate.
10265 * configure: Regenerate.
10267 2012-04-19 Yao Qi <yao@codesourcery.com>
10269 * Makefile.in (SFILES): Add common/vec.c.
10273 2012-04-19 Yao Qi <yao@codesourcery.com>
10275 * remote-utils.c (prepare_resume_reply): Replace with macro
10276 target_core_of_thread.
10277 * server.c (handle_qxfer_threads_proper): Likewise.
10278 * target.h (traget_core_of_thread): New macro.
10280 2012-04-18 Pedro Alves <palves@redhat.com>
10282 * aclocal.m4: Regenerate.
10283 * configure: Regenerate.
10285 2012-04-16 Yao Qi <yao@codesourcery.com>
10287 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10288 duplicated on address.
10290 2012-04-16 Yao Qi <yao@codesourcery.com>
10292 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10293 (struct tracepoint_action_ops) <send>: New field.
10294 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10295 (agent_expr_send, x_tracepoint_action_send): New.
10296 (l_tracepoint_action_send): New.
10297 (cmd_qtdp): Download and install tracepoint
10298 according to `use_agent'.
10299 (run_inferior_command): Add one more parameter `len'.
10301 (tracepoint_send_agent): New.
10302 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10304 2012-04-16 Yao Qi <yao@codesourcery.com>
10306 * tracepoint.c (download_tracepoints): Moved to ...
10307 (cmd_qtstart): ... here.
10309 2012-04-14 Yao Qi <yao@codesourcery.com>
10311 * tracepoint.c: Include inttypes.h.
10312 (struct collect_memory_action): Use sized types.
10313 (struct tracepoint): Likewise.
10314 (cmd_qtdp, stop_tracing): Update print specifiers.
10315 (cmd_qtp, response_tracepoint): Likewise.
10316 (collect_data_at_tracepoint): Likewise.
10317 (collect_data_at_step): Likewise.
10319 2012-04-14 Yao Qi <yao@codesourcery.com>
10321 Import gnulib module inttypes.
10322 * aclocal.m4, config.in, configure: Regenerated.
10324 2012-04-14 Yao Qi <yao@codesourcery.com>
10326 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10327 Makefile and config.status at last.
10329 2012-04-13 Yao Qi <yao@codesourcery.com>
10331 * tracepoint.c: Include stdint.h unconditionally.
10333 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10335 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10336 on BFD_HAVE_SYS_PROCFS_TYPE.
10337 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10338 * configure: Regenerate.
10339 * config.in: Likewise.
10341 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10343 * Makefile.in (clean): Also remove x32.c x32-linux.c
10344 x32-avx.c x32-avx-linux.c.
10345 (x32.o): New target.
10347 (x32-linux.o): Likewise.
10348 (x32-linux.c): Likewise.
10349 (x32-avx.o): Likewise.
10350 (x32-avx.c): Likewise.
10351 (x32-avx-linux.o): Likewise.
10352 (x32-avx-linux.c): Likewise.
10354 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10355 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10356 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10357 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10358 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10359 i386/x32-avx-linux.xml.
10361 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10362 (init_registers_x32_avx_linux): Likwise.
10363 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10364 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10366 2012-04-13 Pedro Alves <palves@redhat.com>
10368 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10369 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10370 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10371 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10374 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10376 * linux-x86-low.c (compat_x32_clock_t): New.
10377 (compat_x32_siginfo_t): Likewise.
10378 (compat_x32_siginfo_from_siginfo): Likewise.
10379 (siginfo_from_compat_x32_siginfo): Likewise.
10380 (linux_is_elf64): Likewise.
10381 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10382 and siginfo_from_compat_x32_siginfo for x32.
10383 (x86_arch_setup): Set linux_is_elf64.
10385 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10388 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10390 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10391 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10392 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10393 compatible with process.
10395 2012-04-12 Yao Qi <yao@codesourcery.com>
10397 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10398 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10399 (install-only, install-info, clean): Handle sub dir gnulib.
10400 (all-lib, am--refresh): New targets.
10401 (memmem.o): Remove target.
10402 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10403 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10404 (AC_REPLACE_FUNCS): Remove memmem.
10405 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10406 (AC_OUTPUT): Generate Makefile in gnulib/.
10407 * aclocal.m4, config.in, configure: Regenerated.
10409 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10411 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10413 2012-04-05 Pedro Alves <palves@redhat.com>
10415 -Werror=strict-aliasing
10417 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10420 2012-04-04 Pedro Alves <palves@redhat.com>
10422 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10423 (sparc_store_gregset_from_stack, sparc_store_gregset)
10424 (sparc_breakpoint_at): Fix formatting.
10426 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10428 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10430 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10431 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10432 * config.in: Regenerate.
10433 * configure: Likewise.
10435 2012-03-29 Pedro Alves <palves@redhat.com>
10437 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10438 Correct ptrace arguments.
10440 2012-03-28 Pedro Alves <palves@redhat.com>
10442 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10443 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10444 (IA64_FR1_REGNUM): New defines.
10445 (ia64_fetch_register): New.
10446 (the_low_target): Install it.
10447 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10449 * linux-low.c (linux_fetch_registers): Try the
10450 the_low_target.fetch_register hook first.
10452 * linux-arm-low.c (the_low_target): Adjust.
10453 * linux-bfin-low.c (the_low_target): Adjust.
10454 * linux-cris-low.c (the_low_target): Adjust.
10455 * linux-crisv32-low.c (the_low_target): Adjust.
10456 * linux-m32r-low.c (the_low_target): Adjust.
10457 * linux-m68k-low.c (the_low_target): Adjust.
10458 * linux-mips-low.c (the_low_target): Adjust.
10459 * linux-ppc-low.c (the_low_target): Adjust.
10460 * linux-s390-low.c (the_low_target): Adjust.
10461 * linux-sh-low.c (the_low_target): Adjust.
10462 * linux-sparc-low.c (the_low_target): Adjust.
10463 * linux-tic6x-low.c (the_low_target): Adjust.
10464 * linux-x86-low.c (the_low_target): Adjust.
10465 * linux-xtensa-low.c (the_low_target): Adjust.
10467 2012-03-26 Pedro Alves <palves@redhat.com>
10469 * server.c (handle_qxfer_libraries): Don't bail early if
10470 the_target->qxfer_libraries_svr4 is not NULL.
10472 2012-03-26 Pedro Alves <palves@redhat.com>
10474 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10476 2012-03-23 Pedro Alves <palves@redhat.com>
10478 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10479 "library-list-svr4" element's start tag when the the DSO list is
10482 2012-03-23 Pedro Alves <palves@redhat.com>
10484 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10485 a variable whose type size is the same as the inferior's pointer
10488 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10490 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10492 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10493 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10494 * linux-low.h: Include <signal.h>.
10495 (struct siginfo): Remove forward declaration.
10496 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10499 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10501 * .gitignore: Ignore more files.
10503 2012-03-19 Pedro Alves <palves@redhat.com>
10504 Jan Kratochvil <jan.kratochvil@redhat.com>
10506 * server.c (cont_thread, general_thread): Add describing comments.
10507 (start_inferior): Clear `cont_thread'.
10508 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10511 2012-03-15 Yao Qi <yao@codesourcery.com>
10513 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10515 (cmd_qtdp): ... here.
10517 2012-03-15 Yao Qi <yao@codesourcery.com>
10519 * tracepoint.c (struct tracepoint_action_ops): New.
10520 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10521 (m_tracepoint_action_download): New.
10522 (r_tracepoint_action_download): New.
10523 (x_tracepoint_action_download): New.
10524 (l_tracepoint_action_download): New.
10525 (add_tracepoint_action): Install `action->ops' according type.
10526 (download_tracepoint_1): Move code `download' function pointer
10527 of various tracepoint_action_ops.
10529 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10531 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10532 linux_ptrace_attach_warnings.
10534 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10536 * Makefile.in (linux-ptrace.o): New.
10537 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10538 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10539 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10540 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10541 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10543 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10545 2012-03-08 Yao Qi <yao@codesourcery.com>
10546 Pedro Alves <palves@redhat.com>
10548 Fix PR server/13392.
10549 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10550 offset of JMP insn.
10551 * tracepoint.c (remove_tracepoint): New.
10552 (cmd_qtdp): Call remove_tracepoint when failed to install.
10554 2012-03-07 Pedro Alves <palves@redhat.com>
10556 * linux-low.c (get_detach_signal): New.
10557 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10558 Pass on pending signals to PTRACE_DETACH. Check the result of the
10560 * server.c (program_signals, program_signals_p): New.
10561 (handle_general_set): Handle QProgramSignals.
10562 * server.h (program_signals, program_signals_p): Declare.
10564 2012-03-05 Pedro Alves <palves@redhat.com>
10565 Jan Kratochvil <jan.kratochvil@redhat.com>
10567 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10570 2012-03-03 Yao Qi <yao@codesourcery.com>
10572 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10573 agent_look_up_symbols.
10575 2012-03-03 Yao Qi <yao@codesourcery.com>
10577 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10578 (linux-x86-low.o): Likewise.
10579 * server.h: Remove in_process_agent_loaded.
10580 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10584 2012-03-03 Yao Qi <yao@codesourcery.com>
10586 * tracepoint.c (gdb_agent_capability): New global.
10587 (in_process_agent_loaded_ust): Renamed to
10588 `in_process_agent_supports_ust'.
10590 (in_process_agent_supports_ust): Call agent_capability_check.
10591 (clear_installed_tracepoints): Assert that agent supports
10594 2012-03-03 Yao Qi <yao@codesourcery.com>
10596 * linux-low.c (linux_supports_agent): New.
10597 (linux_target_ops): Initialize field `supports_agent' with
10598 linux_supports_agent.
10599 * target.h (struct target_ops) <supports_agent>: New.
10600 (target_supports_agent): New macro.
10601 * server.c (handle_general_set): Handle packet 'QAgent'.
10602 (handle_query): Send `QAgent+'.
10603 * Makefile.in (server.o): Depends on agent.h.
10605 2012-03-03 Yao Qi <yao@codesourcery.com>
10607 * Makefile.in (OBS): Add agent.o.
10608 Add new rule for agent.o.
10609 Track dependence of tracepoint.c on agent.h.
10610 * tracepoint.c (run_inferior_command_1):
10611 (run_inferior_command): Call agent_run_command.
10612 (gdb_ust_connect_sync_socket): Deleted. Move it to
10614 (resume_thread, stop_thread): Likewise.
10615 (gdb_ust_socket_init): Renamed to ...
10616 (gdb_agent_socket_init): ... New.
10617 (gdb_ust_thread): Renamed to ...
10618 (gdb_agent_helper_thread): ... New.
10619 (gdb_ust_init): Move some code to ...
10620 (gdb_agent_init): ... here. New.
10621 [HAVE_UST]: Call gdb_ust_init.
10622 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10623 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10624 * config.in, configure: Regenerated.
10626 2012-03-02 Pedro Alves <palves@redhat.com>
10628 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10629 * linux-low.c (struct simple_pid_list): New.
10630 (stopped_pids): New a struct simple_pid_list pointer.
10631 (add_to_pid_list, pull_pid_from_list): New.
10632 (handle_extended_wait): Don't assume the first signal new children
10633 report is SIGSTOP. Adjust call to pull_pid_from_list.
10634 (linux_wait_for_lwp): Adjust.
10636 2012-03-02 Yao Qi <yao@codesourcery.com>
10638 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10641 2012-03-02 Yao Qi <yao@codesourcery.com>
10643 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10644 `stop_pc' and `tpoint'. Update caller.
10646 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10648 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10649 * linux-low.c (use_linux_regsets): New macro.
10650 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10651 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10652 (linux_register_in_regsets): New function.
10653 (usr_fetch_inferior_registers): Skip registers covered by
10655 (usr_store_inferior_registers): Likewise.
10656 (usr_fetch_inferior_registers): New macro.
10657 (usr_store_inferior_registers): Likewise.
10658 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10659 (linux_store_registers): Likewise.
10660 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10662 (init_registers_mips64_dsp_linux): Likewise.
10663 (init_registers_mips_linux): New macro.
10664 (init_registers_mips_dsp_linux): Likewise.
10665 (mips_dsp_num_regs): Likewise.
10666 (DSP_BASE, DSP_CONTROL): New fallback macros.
10667 (mips_base_regs): New macro.
10668 (mips_regmap): Use it. Fix the size.
10669 (mips_dsp_regmap): New variable.
10670 (mips_dsp_regset_bitmap): Likewise.
10671 (mips_arch_setup): New function.
10672 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10674 (mips_cannot_store_register): Likewise.
10675 (the_low_target): Update .arch_setup, .num_regs and .regmap
10676 initializers. Add .regset_bitmap initializer.
10677 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10679 * linux-bfin-low.c (the_low_target): Likewise.
10680 * linux-cris-low.c (the_low_target): Likewise.
10681 * linux-crisv32-low.c (the_low_target): Likewise.
10682 * linux-ia64-low.c (the_low_target): Likewise.
10683 * linux-m32r-low.c (the_low_target): Likewise.
10684 * linux-m68k-low.c (the_low_target): Likewise.
10685 * linux-ppc-low.c (the_low_target): Likewise.
10686 * linux-s390-low.c (the_low_target): Likewise.
10687 * linux-sh-low.c (the_low_target): Likewise.
10688 * linux-sparc-low.c (the_low_target): Likewise.
10689 * linux-tic6x-low.c (the_low_target): Likewise.
10690 * linux-x86-low.c (the_low_target): Likewise.
10691 * linux-xtensa-low.c (the_low_target): Likewise.
10692 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10693 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10694 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10696 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10697 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10699 2012-02-29 Yao Qi <yao@codesourcery.com>
10700 Pedro Alves <palves@redhat.com>
10702 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10703 `step_over_finished' is true.
10705 2012-02-27 Pedro Alves <palves@redhat.com>
10707 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10708 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10710 2012-02-27 Pedro Alves <palves@redhat.com>
10713 * linux-low.c (pid_is_stopped): New.
10714 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10716 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10718 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10721 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10723 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10725 2012-02-24 Luis Machado <lgustavo@codesourcery>
10727 * server.c (handle_query): Advertise support for target-side
10728 breakpoint condition evaluation.
10729 (process_point_options): New function.
10730 (process_serial_event): When inserting a breakpoint, check for
10731 a target-side condition that should be evaluated.
10733 * mem-break.c: Include regcache.h and ax.h.
10734 (point_cond_list_t): New data structure.
10735 (breakpoint) <cond_list>: New field.
10736 (find_gdb_breakpoint_at): Make non-static.
10737 (delete_gdb_breakpoint_at): Clear any target-side
10739 (clear_gdb_breakpoint_conditions): New function.
10740 (add_condition_to_breakpoint): Likewise.
10741 (add_breakpoint_condition): Likewise.
10742 (gdb_condition_true_at_breakpoint): Likewise.
10743 (gdb_breakpoint_here): Return result directly instead
10744 of going through a local variable.
10746 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10747 (clear_gdb_breakpoint_conditions): Likewise.
10748 (add_breakpoint_condition): Likewise.
10749 (gdb_condition_true_at_breakpoint): Likewise.
10751 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10752 (need_step_over_p): Take target-side breakpoint condition into
10755 2012-02-24 Luis Machado <lgustavo@codesourcery>
10757 * server.h: Include tracepoint.h.
10758 (agent_mem_read, agent_get_trace_state_variable_value,
10759 agent_set_trace_state_variable_value,
10760 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10761 get_set_tsv_func_addr): New prototypes.
10763 * ax.h: New include file.
10764 * ax.c: New source file.
10766 * tracepoint.c: Include ax.h.
10767 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10768 agent_expr, eval_result_type): Move to ax.h.
10769 (parse_agent_expr): Rename to ...
10770 (gdb_parse_agent_expr): ... this, make it non-static and move
10772 (unparse_agent_expr) Rename to ...
10773 (gdb_unparse_agent_expr): ... this, make it non-static and move
10775 (eval_agent_expr): Rename to ...
10776 (eval_tracepoint_agent_expr): ... this.
10777 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10778 forward declarations.
10779 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10780 (agent_get_trace_state_variable_value): New function.
10781 (agent_set_trace_state_variable_value): New function.
10782 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10783 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10784 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10785 (condition_true_at_tracepoint): Likewise.
10786 (parse_agent_expr): Rename to ...
10787 (gdb_parse_agent_expr): ... this and move to ax.c.
10788 (unparse_agent_expr): Rename to ...
10789 (gdb_unparse_agent_expr): ... this and move to ax.c.
10790 (gdb_agent_op_name): Move to ax.c.
10791 (eval_agent_expr): Rename to ...
10792 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10794 (eval_tracepoint_agent_expr): New function.
10795 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10797 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10799 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10800 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10801 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10802 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10803 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10804 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10805 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10806 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10807 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10808 (compile_bytecodes): Remove forward declaration.
10809 (is_goto_target): Move to ax.c.
10810 (compile_bytecodes): Move to ax.c and call
10811 agent_get_trace_state_variable_value (...) and
10812 agent_set_trace_state_variable_value (...).
10814 * Makefile.in: Update ax.c and IPA dependencies.
10816 2012-02-24 Pedro Alves <palves@redhat.com>
10818 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10819 (cmd_bigqtbuffer_circular): ... this. Only handle
10820 'QTBuffer:circular:'.
10821 (handle_tracepoint_general_set): Adjust.
10823 2012-02-16 Yao Qi <yao@codesourcery.com>
10825 * inferiors.c: Move code to ...
10826 * dll.c: .... here. New.
10827 * server.h: Declare clear_dlls.
10828 * Makefile.in (SFILES): Add dll.c.
10832 2012-02-11 Yao Qi <yao@codesourcery.com>
10834 * server.c: (handle_monitor_command): Add a new parameter
10836 (handle_query): Update caller.
10838 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10840 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10841 * configure, config.in: Regenerate.
10842 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10845 2012-02-02 Pedro Alves <palves@redhat.com>
10847 Try SIGKILL first, then PTRACE_KILL.
10848 * linux-low.c (linux_kill_one_lwp): New.
10849 (linux_kill_one_lwp): Rename to ...
10850 (kill_one_lwp_callback): ... this. Use the new
10851 linux_kill_one_lwp.
10853 2012-02-02 Pedro Alves <palves@redhat.com>
10855 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10858 2012-01-27 Pedro Alves <palves@redhat.com>
10860 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10861 (elf_64_file_p): Make static.
10862 (linux_pid_exe_is_elf_64_file): New.
10863 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10864 Delete declarations.
10865 (linux_pid_exe_is_elf_64_file): Declare.
10866 * linux-x86-low.c (x86_arch_setup): Use
10867 linux_pid_exe_is_elf_64_file.
10869 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10871 * linux-low.c (linux_wait_for_event_1): Rename to ...
10872 (linux_wait_for_event): ... here and merge it with former
10873 linux_wait_for_event - new variable wait_ptid, use it.
10874 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10876 2012-01-23 Pedro Alves <palves@redhat.com>
10878 * server.c (main): Avoid yet another case of infinite loop while
10879 detaching/killing after a longjmp.
10881 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10884 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10886 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10888 * hostio.c (handle_readlink): New function.
10889 (handle_vFile): Call it to handle "vFile:readlink" packets.
10891 2012-01-20 Pedro Alves <palves@redhat.com>
10892 Ulrich Weigand <ulrich.weigand@linaro.org>
10894 * server.c (handle_v_requests): Only support vAttach and vRun to
10895 start multiple processes when in extended protocol mode.
10897 2012-01-17 Pedro Alves <palves@redhat.com>
10899 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10900 memalign plus mprotect to allocate the scratch buffer.
10902 2012-01-13 Pedro Alves <palves@redhat.com>
10904 * server.c (attach_inferior): Clear `cont_thread'.
10906 2012-01-13 Pedro Alves <palves@redhat.com>
10908 * server.c (main): Avoid infinite loop while detaching/killing
10911 2012-01-09 Doug Evans <dje@google.com>
10913 * server.c (start_inferior): Set last_ptid in --wrapper case.
10915 2012-01-06 Yao Qi <yao@codesourcery.com>
10917 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10919 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10921 2012-01-04 Yao Qi <yao@codesourcery.com>
10923 * tracepoint.c (cmd_qtdp): Print debug message
10924 for static tracepoint.
10926 2012-01-04 Yao Qi <yao@codesourcery.com>
10928 * tracepoint.c (trace_vdebug): Differentiate debug message
10929 between gdbserver and IPA.
10931 2012-01-03 Yao Qi <yao@codesourcery.com>
10933 * tracepoint.c (tracepoint_was_hit): Don't collect for
10936 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10938 * terminal.h: Reformat copyright header.
10940 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10942 * server.c (gdbserver_version): Update copyright year.
10943 * gdbreplay.c (gdbreplay_version): Likewise.
10945 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10947 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10950 2011-12-18 Hui Zhu <teawater@gmail.com>
10951 * linux-low.c (linux_create_inferior): Save return value to ret.
10953 2011-12-18 Hui Zhu <teawater@gmail.com>
10955 * linux-low.c (linux_create_inferior): Save return value to ret.
10957 2011-12-16 Doug Evans <dje@google.com>
10959 * linux-low.c (linux_create_inferior): If stdio connection,
10960 redirect stdin from /dev/null, stdout to stderr.
10961 * remote-utils.c (remote_is_stdio): New static global.
10962 (remote_connection_is_stdio): New function.
10963 (remote_prepare): Handle stdio connection.
10964 (remote_open): Ditto.
10965 (remote_close): Don't close stdin for stdio connections.
10966 (read_prim,write_prim): New functions. Replace all calls to
10967 read/write to these.
10968 * server.c (main): Watch for "-" argument. Move call to
10969 remote_prepare before start_inferior.
10970 * server.h (STDIO_CONNECTION_NAME): New macro.
10971 (remote_connection_is_stdio): Declare.
10973 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10974 in debugging output.
10976 2011-12-15 Yao Qi <yao@codesourcery.com>
10978 * tracepoint.c: Include sys/syscall.h.
10979 (gdb_ust_thread): Remove preprocessor conditional.
10981 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10983 * linux-low.c (linux_detach_one_lwp): Call
10984 the_low_target.prepare_to_resume before detaching.
10986 2011-12-14 Yao Qi <yao@codesourcery.com>
10988 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10991 2011-12-14 Yao Qi <yao@codesourcery.com>
10993 * i386-low.c (i386_low_stopped_data_address): Initialize local
10994 variable `control'.
10996 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11000 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11001 DR_CONTROL unless necessary. Extend comments.
11002 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11003 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11005 2011-12-13 Yao Qi <yao@codesourcery.com>
11007 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11009 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11011 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11013 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11014 Print new debug message for such case.
11016 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11018 Fix overlapping memcpy.
11019 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11020 the read_inferior_memory transfer.
11021 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11022 write_inferior_memory transfer.
11023 (set_fast_tracepoint_jump): New variable buf. Use it for the
11024 read_inferior_memory and write_inferior_memory transfers.
11025 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11026 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11027 Use it for the write_inferior_memory transfer.
11028 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11031 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11033 * linux-low.c (fetch_register, store_register): Make code
11034 consistent, fix formatting.
11036 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11038 * linux-low.c (usr_store_inferior_registers): Factor out code
11039 to handle individual registers into...
11040 (store_register): ... this new function.
11042 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11044 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11045 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11046 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11047 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11048 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11049 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11050 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11051 (srv_xmlfiles): Add new XML files.
11053 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11055 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11056 (init_registers_s390_linux32v1): Add prototype.
11057 (init_registers_s390_linux32v2): Likewise.
11058 (init_registers_s390_linux64v1): Likewise.
11059 (init_registers_s390_linux64v2): Likewise.
11060 (init_registers_s390x_linux64v1): Likewise.
11061 (init_registers_s390x_linux64v2): Likewise.
11062 (s390_num_regs): Increment to 52.
11063 (s390_regmap): Add orig_r2 register.
11064 (s390_num_regs_3264): Increment to 68.
11065 (s390_regmap_3264): Add orig_r2 register.
11066 (s390_collect_ptrace_register): Handle orig_r2 register.
11067 (s390_supply_ptrace_register): Likewise.
11068 (s390_fill_last_break): New function.
11069 (s390_store_last_break): Likewise.
11070 (s390_fill_system_call): New function.
11071 (s390_store_system_call): Likewise.
11072 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11074 (s390_check_regset): New function.
11075 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11076 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11077 Update target_regsets for available register sets.
11079 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11080 Jan Kratochvil <jan.kratochvil@redhat.com>
11082 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11083 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11085 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11086 * linux-low.h (struct process_info_private): New member r_debug.
11087 * server.c (handle_qxfer_libraries): Call
11088 the_target->qxfer_libraries_svr4.
11089 (handle_qxfer_libraries_svr4): New function.
11090 (qxfer_packets): New entry "libraries-svr4".
11091 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11092 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11093 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11094 PACKET_qXfer_libraries_svr4.
11096 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11098 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11099 PSW address/mask between 8-byte and 16-byte formats.
11100 (s390_supply_ptrace_register): Likewise.
11101 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11102 basic addressing mode bit.
11104 2011-11-24 Stan Shebs <stan@codesourcery.com>
11106 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11108 2011-11-17 Stan Shebs <stan@codesourcery.com>
11110 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11111 (tracing_start_time): New global.
11112 (tracing_stop_time): New global.
11113 (tracing_user_name): New global.
11114 (tracing_notes): New global.
11115 (tracing_stop_note): New global.
11116 (cmd_qtstart): Set traceframe_usage, start_time.
11117 (stop_tracing): Set stop_time.
11118 (cmd_qtstatus): Report additional status.
11119 (cmd_qtp): New function.
11120 (handle_tracepoint_query): Call it.
11121 (cmd_qtnotes): New function.
11122 (handle_tracepoint_general_set): Call it.
11123 (get_timestamp): Rename from tsv_get_timestamp.
11125 2011-11-14 Stan Shebs <stan@codesourcery.com>
11126 Kwok Cheung Yeung <kcy@codesourcery.com>
11128 * linux-x86-low.c (small_jump_insn): New.
11129 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11130 trampoline and error message, build a trampoline and issue a small
11131 jump instruction to it.
11132 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11133 trampoline and error message.
11134 (x86_get_min_fast_tracepoint_insn_len): New.
11135 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11136 * linux-low.h (struct linux_target_ops): Add arguments to
11137 install_fast_tracepoint_jump_pad operation, add new operation.
11138 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11140 (linux_get_min_fast_tracepoint_insn_len): New function.
11141 (linux_target_op): Add new operation.
11142 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11143 (gdb_trampoline_buffer_end): Ditto.
11144 (gdb_trampoline_buffer_error): Ditto.
11145 (struct ipa_sym_addresses): Add fields for new IPA variables.
11146 (symbol_list): Add entries for new IPA variables.
11147 (struct tracepoint): Add fields to hold the address range of the
11148 trampoline used by the tracepoint.
11149 (trampoline_buffer_head): New static variable.
11150 (trampoline_buffer_tail): Ditto.
11151 (claim_trampoline_space): New function.
11152 (have_fast_tracepoint_trampoline_buffer): New function.
11153 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11155 (install_fast_tracepoint): Ditto, also add error buffer argument.
11156 (cmd_qtminftpilen): New function.
11157 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11158 (fast_tracepoint_from_trampoline_address): New function.
11159 (fast_tracepoint_collecting): Handle trampoline as part of jump
11161 (set_trampoline_buffer_space): New function.
11162 (initialize_tracepoint): Initialize new IPA variables.
11163 * target.h (struct target_ops): Add arguments to
11164 install_fast_tracepoint_jump_pad operation, add new
11165 get_min_fast_tracepoint_insn_len operation.
11166 (target_get_min_fast_tracepoint_insn_len): New.
11167 (install_fast_tracepoint_jump_pad): Add arguments.
11168 * server.h (IPA_BUFSIZ): Define.
11169 * linux-i386-ipa.c: Include extra header files.
11170 (initialize_fast_tracepoint_trampoline_buffer): New function.
11171 (initialize_low_tracepoint): Call it.
11172 * server.h (set_trampoline_buffer_space): Declare.
11173 (claim_trampoline_space): Ditto.
11174 (have_fast_tracepoint_trampoline_buffer): Ditto.
11176 2011-11-14 Yao Qi <yao@codesourcery.com>
11178 * server.c (handle_query): Handle InstallInTrace for qSupported.
11179 * tracepoint.c (add_tracepoint): Sort list.
11180 (install_tracepoint, download_tracepoint): New.
11181 (cmd_qtdp): Call them to install and download tracepoints.
11182 (sort_tracepoints): Removed.
11183 (cmd_qtstart): Update.
11185 2011-11-14 Yao Qi <yao@codesourcery.com>
11187 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11188 * mem-break.h: Declare.
11189 * tracepoint.c (cmd_qtstart): Move some code to ...
11190 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11192 (download_tracepoints): Move some code to ...
11193 (download_tracepoint_1): ... here. New.
11195 2011-11-08 Yao Qi <yao@codesourcery.com>
11197 * remote-utils.c (relocate_instruction): A comment fix.
11199 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11201 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11202 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11203 dr_status_mirror and dr_control_mirror from debug_reg_state.
11204 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11205 (i386_initial_stuff): Remove use of deleted globals.
11206 (i386_get_thread_context, i386_set_thread_context,
11207 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11208 from debug_reg_state.
11210 2011-11-05 Yao Qi <yao@codesourcery.com>
11212 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11213 address as TPOINT's.
11215 2011-11-02 Stan Shebs <stan@codesourcery.com>
11217 * tracepoint.c (agent_mem_read_string): New function.
11218 (eval_agent_expr): Call it for tracenz.
11219 * server.c (handle_query): Report support for tracenz.
11221 2011-11-02 Yao Qi <yao@codesourcery.com>
11223 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11225 2011-11-02 Yao Qi <yao@codesourcery.com>
11227 * target.h: Fix a typo in comment.
11229 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11231 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11232 clobber the breakpoints' shadows with fast tracepoint jumps.
11233 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11234 * target.c (write_inferior_memory): Also pass MYADDR down to
11237 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11239 * configure.ac: Check support for personality routine.
11240 * configure: Regenerate.
11241 * config.in: Likewise.
11242 * linux-low.c: Include <sys/personality.h>.
11243 Define ADDR_NO_RANDOMIZE if necessary.
11244 (linux_create_inferior): Disable address space randomization when
11245 forking inferior, if requested.
11246 (linux_supports_disable_randomization): New function.
11247 (linux_target_ops): Install it.
11248 * server.h (disable_randomization): Declare.
11249 * server.c (disable_randomization): New global variable.
11250 (handle_general_set): Handle QDisableRandomization.
11251 (handle_query): Likewise for qSupported.
11252 (main): Support --disable-randomization and --no-disable-randomization
11253 command line arguments.
11254 * target.h (struct target_ops): Add supports_disable_randomization.
11255 (target_supports_disable_randomization): New macro.
11257 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11259 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11261 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11262 [!PT_GETDSBT] (target_loadmap): New definition.
11263 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11264 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11265 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11266 and PT_GETDSBT to LINUX_LOADMAP.
11267 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11268 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11270 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11272 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11273 (arm_linux_hwbp_cap): New static variable.
11274 (arm_linux_get_hwbp_cap): Replace by ...
11275 (arm_linux_init_hwbp_cap): ... this new function.
11276 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11277 (arm_linux_get_hw_watchpoint_count): Likewise.
11278 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11279 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11280 (arm_prepare_to_resume): Use perror_with_name instead of error.
11282 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11284 * linux-arm-low.c: Include <signal.h>.
11285 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11286 (struct arm_linux_hwbp_cap): New data type.
11287 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11288 (struct arm_linux_hw_breakpoint): New data type.
11289 (MAX_BPTS, MAX_WPTS): Define.
11290 (struct arch_process_info, struct arch_lwp_info): New data types.
11291 (arm_linux_get_hwbp_cap): New function.
11292 (arm_linux_get_hw_breakpoint_count): Likewise.
11293 (arm_linux_get_hw_watchpoint_count): Likewise.
11294 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11295 (arm_hwbp_control_initialize): Likewise.
11296 (arm_hwbp_control_is_enabled): Likewise.
11297 (arm_hwbp_control_is_initialized): Likewise.
11298 (arm_hwbp_control_disable): Likewise.
11299 (arm_linux_hw_breakpoint_equal): Likewise.
11300 (arm_linux_hw_point_initialize): Likewise.
11301 (struct update_registers_data): New data structure.
11302 (update_registers_callback: New function.
11303 (arm_insert_point): Likewise.
11304 (arm_remove_point): Likewise.
11305 (arm_stopped_by_watchpoint): Likewise.
11306 (arm_stopped_data_address): Likewise.
11307 (arm_new_process): Likewise.
11308 (arm_new_thread): Likewise.
11309 (arm_prepare_to_resume): Likewise.
11310 (the_low_target): Register arm_insert_point, arm_remove_point,
11311 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11312 arm_new_thread, and arm_prepare_to_resume.
11314 2011-09-15 Stan Shebs <stan@codesourcery.com>
11316 * server.h (struct emit_ops): Add compare-goto fields.
11317 * tracepoint.c (gdb_agent_op_sizes): New table.
11318 (emit_eq_goto): New function.
11319 (emit_ne_goto): New function.
11320 (emit_lt_goto): New function.
11321 (emit_le_goto): New function.
11322 (emit_gt_goto): New function.
11323 (emit_ge_goto): New function.
11324 (is_goto_target): New function.
11325 (compile_bytecodes): Recognize special cases of compare-goto
11326 combinations and call specialized emitters for them.
11327 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11328 (amd64_emit_ne_goto): New function.
11329 (amd64_emit_lt_goto): New function.
11330 (amd64_emit_le_goto): New function.
11331 (amd64_emit_gt_goto): New function.
11332 (amd64_emit_ge_goto): New function.
11333 (amd64_emit_ops): Add the new functions.
11334 (i386_emit_eq_goto): New function.
11335 (i386_emit_ne_goto): New function.
11336 (i386_emit_lt_goto): New function.
11337 (i386_emit_le_goto): New function.
11338 (i386_emit_gt_goto): New function.
11339 (i386_emit_ge_goto): New function.
11340 (i386_emit_ops): Add the new functions.
11342 2011-09-08 Stan Shebs <stan@codesourcery.com>
11344 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11345 (i386_emit_epilogue): Restore %ebx.
11347 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11349 * server.c (step_thread): Remove definition.
11350 (process_serial_event): Don't handle Hs.
11351 * server.h (step_thread): Remove declaration.
11352 * target.c (set_desired_inferior): Remove use of step_thread.
11354 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11356 * linux-low.c: Include linux-procfs.h.
11357 (linux_attach_lwp_1): Update comments.
11358 (linux_attach): Scan for existing threads when attaching to a
11359 process that is the tgid.
11360 * Makefile.in: Update dependencies.
11362 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11364 * configure.srv: Add linux-procfs.o dependencies.
11366 2011-08-14 Yao Qi <yao@codesourcery.com>
11368 * target.h (struct target_ops): Fix indent.
11369 * win32-low.c (win32_target_ops): Fix comment.
11371 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11372 Yao Qi <yao@codesourcery.com>
11374 * Makefile.in (clean): Remove tic6x-*.c files.
11375 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11376 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11377 (tic6x-c64xp-linux.c): Likewise.
11378 * configure.srv: Add support for tic6x-*-uclinux.
11379 * linux-tic6x-low.c: New.
11380 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11382 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11383 Yao Qi <yao@codesourcery.com>
11385 * target.h (struct target_ops): Add read_loadmap.
11386 * linux-low.c (struct target_loadseg): New type.
11387 (struct target_loadmap): New type.
11388 (linux_read_loadmap): New function.
11389 (linux_target_ops): Add linux_read_loadmap.
11390 * server.c (handle_query): Support qXfer:fdpic:read packet.
11391 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11394 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11396 * win32-low.c: Include <stdint.h>.
11398 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11400 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11401 to the inferior here.
11402 (i386_remove_aligned_watchpoint): Ditto.
11403 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11404 fit part of the watchpoint in the debug registers.
11405 (i386_update_inferior_debug_regs): New.
11406 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11407 registers, and only update the inferior on success.
11408 (i386_low_remove_watchpoint): Ditto.
11410 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11412 * linux-low.c (compare_ints, unique, list_threads, show_process,
11413 linux_core_of_thread): Delete.
11414 (linux_target_ops): Change linux_core_of_thread to
11415 linux_common_core_of_thread.
11416 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11417 * utils.c (malloc_failure): Change type of argument.
11418 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11419 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11420 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11421 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11422 (IPA_OBJS): Add common-utils-ipa.o.
11423 (ptid_h, linux_osdata_h): New macros.
11424 (server_h): Add common/common-utils.h, common/xml-utils.h,
11425 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11427 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11428 ptid.o, buffer.o): New rules.
11429 (linux-low.o): Add common/linux-osdata.h as a dependency.
11430 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11431 * configure.ac: Add AC_HEADER_DIRENT check.
11432 * config.in: Regenerate.
11433 * configure: Regenerate.
11434 * remote-utils.c (xml_escape_text): Delete.
11435 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11436 buffer_xml_printf): Move to common/buffer.c.
11437 * server.c (main): Remove call to initialize_inferiors.
11438 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11439 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11440 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11441 internal_error, gdb_assert, gdb_assert_fail): Delete.
11442 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11443 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11445 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11446 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11447 initialize_inferiors): Delete.
11449 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11451 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11454 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11456 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11458 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11460 2011-05-26 Yao Qi <yao@codesourcery.com>
11462 * Makefile.in (thread-db.o): Track dependence to
11463 common/gdb_thread_db.h.
11464 * thread-db.c: include gdb_thread_db.h from right place.
11466 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11468 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11469 __FILE__ and __LINE__ to internal_error.
11471 2011-05-13 Doug Evans <dje@google.com>
11473 * thread-db.c (try_thread_db_load_from_sdir): New function.
11474 (try_thread_db_load_from_dir): New function.
11475 (thread_db_load_search): Handle $sdir, ignore $pdir.
11476 Remove trying of system directories if search of
11477 libthread-db-search-path fails, that is now done via $sdir.
11479 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11481 * server.c (handle_query): Add EnableDisableTracepoints to the list
11482 of supported features.
11483 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11485 (cmd_qtenable_disable): New.
11486 (cmd_qtstart): Install tracepoints even if disabled.
11487 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11488 receiving a QTEnable or QTDisable packet.
11489 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11490 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11492 (gdb_probe): Skip data collection if static tracepoint is disabled.
11494 2011-05-10 Doug Evans <dje@google.com>
11496 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11498 2011-05-04 Doug Evans <dje@google.com>
11500 * linux-low.c (linux_join): Skip process lookup.
11501 * spu-low.c (spu_join): Ditto.
11502 * server.c (join_inferiors_callback): Delete.
11503 (process_serial_event): For 'D' packet (detach) call join_inferior
11506 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11508 * README: Don't mention xscale*-*-linux*.
11509 * configure.srv (xscale*-*-linux*): Don't handle target.
11511 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11513 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11515 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11516 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11517 (i386_emit_void_call_2): Likewise.
11519 2011-04-26 Yao Qi <yao@codesourcery.com>
11521 * linux-low.c: Move common macros to linux-ptrace.h.
11522 Include linux-ptrace.h.
11523 * Makefile.in (linux_ptrace_h): New.
11524 (linux-low.o): Depends on linux-ptrace.h.
11526 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11528 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11529 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11530 (remote_prepare): New function with most of the TCP code from ...
11531 (remote_open): ... here. Detect PORT here unconditionally. Move also
11532 setting transport_is_reliable.
11533 * server.c (run_once): New variable.
11534 (gdbserver_usage): Document it.
11535 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11536 the first run if RUN_ONCE.
11537 * server.h (run_once, remote_prepare): New declarations.
11539 2011-04-19 Tom Tromey <tromey@redhat.com>
11541 * win32-low.c (handle_load_dll): Remove duplicate "the".
11543 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11545 Remove support for old Cygwin 1.5 versions.
11546 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11547 function to avoid warning.
11548 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11551 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11553 * gdbserver/server.h (Macro _): Define it if not available.
11555 2011-03-14 Michael Snyder <msnyder@vmware.com>
11557 * hostio.c (handle_close): Remove unnecessary null test.
11559 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11561 * Makefile.in (maintainer-clean realclean distclean): Remove
11562 "make ... subdir_do" command.
11564 2011-03-10 Michael Snyder <msnyder@vmware.com>
11566 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11568 * server.c (handle_v_run): Free alloced buffer on early return.
11570 2011-03-09 Yao Qi <yao@codesourcery.com>
11573 2011-03-04 Yao Qi <yao@codesourcery.com>
11575 * Makefile.in: Remove GNU make feature --directory.
11577 2011-03-05 Yao Qi <yao@codesourcery.com>
11579 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11580 (subdir_do): New make target. Copied from gdb/Makefile.
11581 (maintainer-clean, realclean, distclean, clean): Call corresponding
11582 make targets in common/Makefile.
11584 2011-02-11 Yao Qi <yao@codesourcery.com>
11586 * configure.ac: Call AC_PROG_RANLIB.
11587 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11588 * configure: Regenerate.
11590 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11592 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11594 2011-03-06 Yao Qi <yao@codesourcery.com>
11596 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11598 2011-03-05 Yao Qi <yao@codesourcery.com>
11600 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11601 (subdir_do): New make target. Copied from gdb/Makefile.
11602 (maintainer-clean, realclean, distclean, clean): Call corresponding
11603 make targets in common/Makefile.
11605 2011-03-04 Yao Qi <yao@codesourcery.com>
11607 * Makefile.in: Remove GNU make feature --directory.
11609 2011-03-04 Michael Snyder <msnyder@vmware.com>
11611 * server.c (queue_stop_reply): Call xmalloc not malloc.
11613 2011-03-02 Michael Snyder <msnyder@vmware.com>
11615 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11617 2011-02-28 Michael Snyder <msnyder@vmware.com>
11619 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11620 (cmd_qtframe): Ditto.
11621 (cmd_qtbuffer): Ditto.
11622 (cmd_bigqtbuffer): Ditto.
11624 * utils.c (decimal2str): Initialize 'width' to nine, then
11625 don't mess with it.
11627 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11629 * hostio.c (require_data): Free *data, not data.
11631 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11633 * hostio.c (require_data): Use free, not xfree.
11635 2011-02-27 Michael Snyder <msnyder@vmware.com>
11637 * server.c (handle_query): Discard unused value.
11639 * hostio.c (require_data): Free malloc memory before returning
11642 2011-02-26 Michael Snyder <msnyder@vmware.com>
11644 * linux-low.c (list_threads): Call closedir for dirent.
11646 2011-02-27 Michael Snyder <msnyder@vmware.com>
11648 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11649 a case statement falls through.
11651 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11653 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11656 2011-02-26 Michael Snyder <msnyder@vmware.com>
11658 * utils.c (decimal2str): Eliminate dead code and dead param.
11659 (pulongest): Drop dead param from call to decimal2str.
11662 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11664 Revert the following patch (not approved yet):
11665 2011-02-21 Hui Zhu <teawater@gmail.com>
11666 * tracepoint.c (tp_printf): New function.
11667 (eval_agent_expr): Handle gdb_agent_op_printf.
11669 2011-02-21 Hui Zhu <teawater@gmail.com>
11671 * tracepoint.c (tp_printf): New function.
11672 (eval_agent_expr): Handle gdb_agent_op_printf.
11674 2011-02-18 Tom Tromey <tromey@redhat.com>
11676 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11677 (tracepoint.o): Likewise.
11678 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11679 (gdb_agent_op_names): Likewise.
11681 2011-02-18 Tom Tromey <tromey@redhat.com>
11683 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11684 gdb_agent_op_rot>: New constants.
11685 (gdb_agent_op_names): Add pick and roll.
11686 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11689 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11691 * aclocal.m4: Regenerated with aclocal-1.11.1.
11693 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11695 * server.c (handle_qxfer_traceframe_info): New.
11696 (qxfer_packets): Register "traceframe-info".
11697 (handle_query): Report support for qXfer:traceframe-info:read+.
11698 * tracepoint.c (match_blocktype): New.
11699 (traceframe_find_block_type): Rename to ...
11700 (traceframe_walk_blocks): ... this. Add callback filter argument,
11702 (traceframe_find_block_type): New, reimplemented on top of
11703 traceframe_walk_blocks.
11704 (build_traceframe_info_xml): New.
11705 (traceframe_read_info): New.
11706 * server.h (traceframe_read_info): Declare.
11708 2011-02-11 Yao Qi <yao@codesourcery.com>
11710 * configure.ac: Call AC_PROG_RANLIB.
11711 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11712 * configure: Regenerate.
11714 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11716 * server.c (gdb_read_memory): Change return semantics to allow
11718 (handle_search_memory_1): Adjust.
11719 (process_serial_event) <'m' packet>: Handle partial transfers.
11720 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11722 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11724 * regcache.c (init_register_cache): Initialize
11725 regcache->register_status.
11726 (free_register_cache): Release regcache->register_status.
11727 (regcache_cpy): Copy register_status.
11728 (registers_to_string): Print 'x's for unavailable registers.
11729 (supply_register): Mark the register's status valid or
11730 unavailable, depending on whether a buffer was passed in or not.
11731 (supply_register_zeroed): New.
11732 (supply_regblock): Mark the registers' status valid or
11733 unavailable, depending on whether a buffer was passed in or not.
11734 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11735 (struct regcache): New `register_status' field.
11736 (supply_register_zeroed): Declare.
11737 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11738 supply_register_zeroed, rather than passing a NULL buffer to
11740 * tracepoint.c (fetch_traceframe_registers): Update comment.
11742 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11744 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11747 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11749 * server.h (decode_xfer_write): Change prototype.
11750 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11751 and don't extract the annex here.
11752 * server.c (decode_xfer_read): Remove `annex' parameter,
11753 and don't extract the annex here.
11754 (decode_xfer): New.
11755 (struct qxfer): New.
11756 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11757 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11758 (handle_qxfer_statictrace): New functions, abstracted out from
11759 handle_query, and made to use the struct qxfer interface.
11760 (handle_threads_qxfer_proper): Rename to ...
11761 (handle_qxfer_threads_proper): ... this.
11762 (handle_threads_qxfer): Rename to ...
11763 (handle_qxfer_threads): ... this. Adjust.
11764 (qxfer_packets): New array.
11765 (handle_qxfer): New function.
11766 (handle_query): Use handle_qxfer.
11768 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11770 * gdbreplay.c: Shorten lines of >= 80 columns.
11771 * linux-low.c: Ditto.
11772 * linux-ppc-low.c: Ditto.
11773 * linux-s390-low.c: Ditto.
11774 * linux-sparc-low.c: Ditto.
11775 * linux-x86-low.c: Ditto.
11776 * linux-xtensa-low.c: Ditto.
11777 * mem-break.c: Ditto.
11778 * nto-low.c: Ditto.
11779 * regcache.h: Ditto.
11780 * remote-utils.c: Ditto.
11783 * thread-db.c: Ditto.
11784 * tracepoint.c: Ditto.
11786 * win32-low.h: Ditto.
11788 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11790 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11793 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11795 * server.c (gdbserver_version): Update copyright year in version
11797 * gdbreplay.c (gdbreplay_version): Ditto.
11799 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11801 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11802 * linux-bfin-low.c: New file.
11803 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11804 PT_DATA_ADDR for BFIN targets.
11805 * Makefile.in (SFILES): Add linux-bfin-low.c.
11806 (clean): Remove reg-bfin.c.
11807 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11808 * README: Mention supported Blackfin targets.
11810 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11812 * .gitignore: New file.
11814 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11816 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11818 2010-10-22 Jie Zhang <jie@codesourcery.com>
11820 * Makefile.in: Add FLAGS_TO_PASS variable.
11821 (install): Remove dependency of install-only and recursively
11822 invoke make for install-only.
11824 2010-10-04 Doug Evans <dje@google.com>
11826 * Makefile.in (uninstall): Use $(DESTDIR).
11828 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11832 * linux-x86-low.c (compat_siginfo_from_siginfo)
11833 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11834 si_code is < 0. Check for si_code == SI_TIMER before checking for
11837 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11839 * lynx-i386-low.c: New file.
11840 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11842 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11844 * lynx-low.c (ptrace_request_to_str): Remove handling for
11845 request values that have been removed in LynxOS 5.x.
11847 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11849 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11852 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11854 * configure.ac: Add --enable-inprocess-agent option.
11855 * configure: Rebuilt.
11857 2010-09-06 Yao Qi <yao@codesourcery.com>
11859 * linux-low.c (linux_kill): Remove unused variable.
11860 (linux_stabilize_threads): Likewise.
11861 * server.c (start_inferior): Likewise.
11862 (queue_stop_reply_callback): Likewise.
11863 * tracepoint.c (do_action_at_tracepoint): Likewise.
11865 2010-09-06 Yao Qi <yao@codesourcery.com>
11867 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11870 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11872 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11874 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11876 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11879 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11881 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11882 gdbserver/lynx-ppc-low.c: New files.
11883 * Makefile.in (lynx_low_h): New variable.
11884 (lynx-low.o, lynx-ppc-low.o): New rules.
11885 * configure.ac: On LynxOS, link with -lnetinet.
11886 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11887 * configure: regenerate.
11889 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11891 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11892 * configure.ac: Add check for vasprintf and vsnprintf.
11893 * configure, config.in: Regenerate.
11894 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11896 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11898 * gdbreplay.c: Move include of alloca.h up, next to include of
11900 * server.h: Add include of malloc.h.
11901 * mem-break.c: Remove include of malloc.h.
11902 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11904 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11906 * Makefile.in (memmem.o): Build with -Wno-error.
11908 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11910 * utils.c (xsnprintf): Make non-static.
11911 * server.h: Add xsnprintf declaration.
11912 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11913 replace calls to snprintf by calls to xsnprintf throughout.
11915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11917 * configure.ac: Add configure check for alloca.
11918 * configure, config.in: Regenerate.
11919 * server.h: Include alloca.h if it exists.
11920 * gdbreplay.c: Include alloca.h if it exists.
11922 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11924 * linux-low.c (__SIGRTMIN): Define if not already defined.
11925 (linux_create_inferior): Check for __ANDROID__ rather than
11927 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11928 are already deferred.
11929 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11930 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11931 stopped and already has a pending signal to report.
11932 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11933 a pending signal to report or is moving out of a jump pad.
11934 (linux_init_signals): Check for __ANDROID__ rather than
11937 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11939 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11940 debug_threads check. Avoid a linear search when not doing debug
11943 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11945 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11946 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11947 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11948 (process_event): Change local fd's type to gdb_fildes_t.
11949 (create_file_handler): Adjust prototype.
11950 (delete_file_handler): Adjust prototype.
11951 (handle_file_event): Adjust prototype. Use pfildes.
11952 (create_file_event): Adjsut prototype.
11953 * remote-utils.c (remote_desc, listen_desc): Change type to
11955 * server.h: New gdb_fildes_t typedef.
11956 [USE_WIN32API]: Include winsock2.h.
11957 (delete_file_handler, add_file_handler): Adjust prototypes.
11958 (pfildes): Declare.
11959 * utils.c (pfildes): New.
11961 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11963 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11964 * configure: Regenerate.
11966 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11968 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11969 (linux_done_accessing_memory): ... this.
11970 (linux_target_ops): Adjust.
11971 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11972 * nto-low.c (nto_target_ops): Adjust comment.
11973 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11974 * spu-low.c (spu_target_ops): Adjust comment.
11975 * target.h (target_ops): Rename unprepare_to_access_memory field
11976 to done_accessing_memory.
11977 (unprepare_to_access_memory): Rename to ...
11978 (done_accessing_memory): ... this.
11980 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11982 * linux-low.c (linux_prepare_to_access_memory): New.
11983 (linux_unprepare_to_access_memory): New.
11984 (linux_target_ops): Install them.
11985 * server.c (read_memory): Rename to ...
11986 (gdb_read_memory): ... this. Use
11987 prepare_to_access_memory/prepare_to_access_memory.
11988 (write_memory): Rename to ...
11989 (gdb_write_memory): ... this. Use
11990 prepare_to_access_memory/prepare_to_access_memory.
11991 (handle_search_memory_1): Adjust.
11992 (process_serial_event): Adjust.
11993 * target.h (struct target_ops): New fields
11994 prepare_to_access_memory and unprepare_to_access_memory.
11995 (prepare_to_access_memory, unprepare_to_access_memory): New.
11996 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11997 prepare_to_access_memory/prepare_to_access_memory.
11998 * nto-low.c (nto_target_ops): Adjust.
11999 * spu-low.c (spu_target_ops): Adjust.
12000 * win32-low.c (win32_target_ops): Adjust.
12002 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12004 * Makefile.in (WARN_CFLAGS): Get it from configure.
12005 (WERROR_CFLAGS): New.
12006 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12007 * configure.ac: Introduce --enable-werror, which adds -Werror to
12008 the compiler command line. Enabled by default. Disable with
12009 --disable-werror. Add -Wdeclaration-after-statement
12010 Wpointer-arith and -Wformat-nonliteral to warning flags.
12011 * configure: Regenerate.
12013 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12015 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12017 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12019 * gdbreplay.c (remote_error): New.
12021 (expect): Use gdbchar. Check for error reading from GDB.
12022 Clarify sync error output.
12023 (play): Check for errors writing to GDB.
12024 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12025 * remote-utils.c (getpkt): Check for errors writing to the remote
12028 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12030 * linux-low.c (linux_wait_1): Move non-debugging code out of
12031 `debug_threads' control.
12033 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12035 * linux-low.c (linux_wait_1): Don't set last_status here.
12036 * server.c (push_event, queue_stop_reply_callback): Assert we're
12037 not pushing a TARGET_WAITKIND_IGNORE event.
12038 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12039 (myresume, handle_target_event): Set the thread's last_resume_kind
12040 and last_status from the target returned status.
12042 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12046 * linux-x86-low.c (update_debug_registers_callback): New.
12047 (i386_dr_low_set_addr): Use it.
12048 (i386_dr_low_get_addr): New.
12049 (i386_dr_low_set_control): Use update_debug_registers_callback.
12050 (i386_dr_low_get_control): New.
12051 (i386_dr_low_get_status): Adjust.
12052 * linux-low.c (linux_stop_lwp): New.
12053 * linux-low.h (linux_stop_lwp): Declare.
12055 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12056 argument instead of a i386_debug_reg_state.
12057 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12058 a i386_debug_reg_state.
12059 (i386_insert_aligned_watchpoint): Adjust.
12060 (i386_remove_aligned_watchpoint): Adjust.
12061 (i386_low_stopped_data_address): Read the debug registers from the
12062 inferior instead of from the mirrors.
12063 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12064 (i386_dr_low_get_addr): Declare.
12065 (i386_dr_low_get_control): Declare.
12066 (i386_dr_low_get_status): Change prototype.
12068 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12069 (i386_dr_low_get_addr): New.
12070 (i386_dr_low_get_control): New.
12071 (i386_dr_low_get_status): Adjust prototype. Return
12073 (i386_initial_stuff): Clear dr_status_mirror and
12075 (i386_get_thread_context): Adjust.
12076 (i386_set_thread_context): Adjust.
12077 (i386_thread_added): Adjust.
12079 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12081 * linux-low.h (linux_thread_area): Delete declaration.
12083 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12085 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12086 after its termination.
12088 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12090 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12091 (gdb_wants_all_stopped): Delete.
12092 (linux_wait_1): Don't call them.
12093 * server.c (handle_v_cont): Tag all threads as want-stopped.
12094 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12095 stopped as "client-wants-stopped".
12097 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12099 * Makefile.in (signals_h): New.
12100 (server_h): Depend on it.
12101 (server.o): Don't depend on $(signals_def).
12102 (signals.o): Depend on $(signals_def).
12104 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12106 * Makefile.in (signals_def): New.
12107 (server_h): Append include/gdb/signals.h and signals_def.
12108 (server.o): Append signals_def.
12110 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12112 * server.c (handle_target_event): Use target_signal_to_host for
12113 resume_info.sig initialization.
12114 * target.h (struct thread_resume) <sig>: New comment.
12116 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12118 * server.c (handle_query): strcpy() the returned string from paddress()
12119 instead of sprintf().
12120 * utils.c (paddress): Return phex_nz().
12122 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12124 * server.c (handle_v_cont): Call mourn_inferior if process
12126 (myresume): Likewise.
12128 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12130 Static tracepoints, and integration with UST.
12132 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12133 * mem-break.c (uninsert_all_breakpoints)
12134 (reinsert_all_breakpoints): New.
12135 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12136 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12137 (gdb_agent_ust_loaded, helper_thread_id)
12138 (gdb_agent_helper_thread_id): New macros.
12139 (struct ipa_sym_addresses): Add addr_ust_loaded,
12140 addr_helper_thread_id, addr_cmd_buf.
12141 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12142 (in_process_agent_loaded_ust): New.
12143 (write_e_ust_not_loaded): New.
12144 (maybe_write_ipa_ust_not_loaded): New.
12145 (struct collect_static_trace_data_action): New.
12146 (enum tracepoint_type) <static_tracepoint>: New.
12147 (struct tracepoint) <handle>: Mention static tracepoints.
12148 (struct static_tracepoint_ctx): New.
12149 (CMD_BUF_SIZE): New.
12150 (add_tracepoint_action): Handle static tracepoint actions.
12151 (unprobe_marker_at): New.
12152 (clear_installed_tracepoints): Handle static tracepoints.
12153 (cmd_qtdp): Handle static tracepoints.
12154 (probe_marker_at): New.
12155 (cmd_qtstart): Handle static tracepoints.
12156 (response_tracepoint): Handle static tracepoints.
12157 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12158 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12159 (get_context_regcache): Handle static tracepoints.
12160 (do_action_at_tracepoint): Handle static tracepoint actions.
12161 (traceframe_find_block_type): Handle static trace data blocks.
12162 (traceframe_read_sdata): New.
12163 (download_tracepoints): Download static tracepoint actions.
12164 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12165 (GDB_PROBE_NAME): New.
12167 (GET_UST_SYM): New.
12170 (ust_marker_to_static_tracepoint): New.
12172 (collect_ust_data_at_tracepoint): New.
12173 (gdb_ust_probe): New.
12174 (UNIX_PATH_MAX, SOCK_DIR): New.
12175 (gdb_ust_connect_sync_socket): New.
12176 (resume_thread, stop_thread): New.
12177 (run_inferior_command): New.
12178 (init_named_socket): New.
12179 (gdb_ust_socket_init): New.
12180 (cstr_to_hexstr): New.
12182 (first_marker, next_marker): New.
12183 (response_ust_marker): New.
12184 (cmd_qtfstm, cmd_qtsstm): New.
12185 (unprobe_marker_at, probe_marker_at): New.
12186 (cmd_qtstmat, gdb_ust_thread): New.
12187 (gdb_ust_init): New.
12188 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12189 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12190 (ST_REGENTRY): New.
12191 (x86_64_st_collect_regmap): New.
12192 (X86_64_NUM_ST_COLLECT_GREGS): New.
12193 (AMD64_RIP_REGNUM): New.
12194 (supply_static_tracepoint_registers): New.
12195 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12196 (ST_REGENTRY): New.
12197 (i386_st_collect_regmap): New.
12198 (i386_NUM_ST_COLLECT_GREGS): New.
12199 (supply_static_tracepoint_registers): New.
12200 * server.c (handle_query): Handle qXfer:statictrace:read.
12201 <qSupported>: Report support for StaticTracepoints, and
12202 qXfer:statictrace:read features.
12203 * server.h (traceframe_read_sdata)
12204 (supply_static_tracepoint_registers): Declare.
12205 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12206 (unpack_varlen_hex): Include in IPA build.
12207 * Makefile.in (ustlibs, ustinc): New.
12208 (IPA_OBJS): Add remote-utils-ipa.o.
12209 ($(IPA_LIB)): Link -ldl and -lpthread.
12211 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12212 * config.in, configure: Regenerate.
12214 2010-06-20 Ian Lance Taylor <iant@google.com>
12215 Pedro Alves <pedro@codesourcery.com>
12217 * linux-x86-low.c (always_true): Delete.
12218 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12219 trying to fool the compiler with always_true.
12221 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12223 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12224 conditions in gdbserver.
12226 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12228 * spu-low.c (spu_read_memory): Wrap around local store limit.
12229 (spu_write_memory): Likewise.
12231 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12233 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12234 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12236 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12238 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12239 uses with LONGEST uses.
12241 2010-06-14 Stan Shebs <stan@codesourcery.com>
12242 Pedro Alves <pedro@codesourcery.com>
12246 * linux-x86-low.c: Include limits.h.
12248 (always_true): New.
12251 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12252 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12253 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12254 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12255 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12256 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12257 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12258 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12259 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12260 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12261 (amd64_emit_void_call_2): New.
12262 (amd64_emit_ops): New.
12263 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12264 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12265 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12266 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12267 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12268 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12269 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12270 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12271 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12272 (i386_emit_stack_adjust, i386_emit_int_call_1)
12273 (i386_emit_void_call_2): New.
12274 (i386_emit_ops): New.
12275 (x86_emit_ops): New.
12276 (the_low_target): Install x86_emit_ops.
12277 * server.h (struct emit_ops): New.
12278 (get_raw_reg_func_addr): Declare.
12279 (current_insn_ptr, emit_error): Declare.
12280 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12281 (set_trace_state_variable_value): New defines.
12282 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12283 addr_get_trace_state_variable_value and
12284 addr_set_trace_state_variable_value.
12285 (symbol_list): New fields for get_raw_reg,
12286 get_trace_state_variable_value and set_trace_state_variable_value.
12287 (condfn): New typedef.
12288 (struct tracepoint): New field `compiled_cond'.
12289 (do_action_at_tracepoint): Clear compiled_cond.
12290 (get_trace_state_variable_value, set_trace_state_variable_value):
12292 (condition_true_at_tracepoint): If there's a compiled condition,
12294 (current_insn_ptr, emit_error): New globals.
12295 (struct bytecode_address): New.
12296 (get_raw_reg_func_addr): New.
12297 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12298 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12299 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12300 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12301 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12302 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12303 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12304 (compile_tracepoint_condition, compile_bytecodes): New.
12305 * target.h (emit_ops): Forward declare.
12306 (struct target_ops): New field emit_ops.
12307 (target_emit_ops): New.
12308 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12309 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12310 * linux-low.c (linux_emit_ops): New.
12311 (linux_target_ops): Install it.
12312 * linux-low.h (struct linux_target_ops): New field emit_ops.
12314 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12316 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12317 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12319 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12320 Stan Shebs <stan@codesourcery.com>
12322 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12323 (all): Depend on $(extra_libraries).
12324 (install-only): Install the IPA.
12325 (IPA_OBJS, IPA_LIB): New.
12326 (clean): Remove the IPA lib.
12327 (IPAGENT_CFLAGS): New.
12328 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12329 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12330 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12331 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12332 * configure.ac: Check for atomic builtins support in the compiler.
12333 (IPA_DEPFILES, extra_libraries): Define.
12334 * configure.srv (ipa_obj): Add description.
12335 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12336 (i[34567]86-*-linux*): Set ipa_obj.
12337 (x86_64-*-linux*): Set ipa_obj.
12338 * linux-low.c (stabilizing_threads): New.
12339 (supports_fast_tracepoints): New.
12340 (linux_detach): Stabilize threads before detaching.
12341 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12342 the lwp is either not stabilizing, or is moving out of a jump pad.
12343 (linux_fast_tracepoint_collecting): New.
12344 (maybe_move_out_of_jump_pad): New.
12345 (enqueue_one_deferred_signal): New.
12346 (dequeue_one_deferred_signal): New.
12347 (linux_wait_for_event_1): If moving out of a jump pad, defer
12348 pending signals to later.
12349 (linux_stabilize_threads): New.
12350 (linux_wait_1): Check if threads need moving out of jump pads, and
12352 (stuck_in_jump_pad_callback): New.
12353 (move_out_of_jump_pad_callback): New.
12354 (lwp_running): New.
12355 (linux_resume_one_lwp): Handle moving out of jump pads.
12356 (linux_set_resume_request): Dequeue deferred signals.
12357 (need_step_over_p): Also step over fast tracepoint jumps.
12358 (start_step_over): Also uninsert fast tracepoint jumps.
12359 (finish_step_over): Also reinsert fast tracepoint jumps.
12360 (linux_install_fast_tracepoint_jump): New.
12361 (linux_target_ops): Install linux_stabilize_threads and
12362 linux_install_fast_tracepoint_jump_pad.
12363 * linux-low.h (linux_target_ops) <get_thread_area,
12364 install_fast_tracepoint_jump_pad>: New fields.
12365 (struct lwp_info) <collecting_fast_tracepoint,
12366 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12367 (linux_get_thread_area): Declare.
12368 * linux-x86-low.c (jump_insn): New.
12369 (x86_get_thread_area): New.
12370 (append_insns): New.
12371 (push_opcode): New.
12372 (amd64_install_fast_tracepoint_jump_pad): New.
12373 (i386_install_fast_tracepoint_jump_pad): New.
12374 (x86_install_fast_tracepoint_jump_pad): New.
12375 (the_low_target): Install x86_get_thread_area and
12376 x86_install_fast_tracepoint_jump_pad.
12377 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12378 (struct fast_tracepoint_jump): New.
12379 (fast_tracepoint_jump_insn): New.
12380 (fast_tracepoint_jump_shadow): New.
12381 (find_fast_tracepoint_jump_at): New.
12382 (fast_tracepoint_jump_here): New.
12383 (delete_fast_tracepoint_jump): New.
12384 (set_fast_tracepoint_jump): New.
12385 (uninsert_fast_tracepoint_jumps_at): New.
12386 (reinsert_fast_tracepoint_jumps_at): New.
12387 (set_breakpoint_at): Use write_inferior_memory.
12388 (uninsert_raw_breakpoint): Use write_inferior_memory.
12389 (check_mem_read): Mask out fast tracepoint jumps.
12390 (check_mem_write): Mask out fast tracepoint jumps.
12391 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12392 (set_fast_tracepoint_jump): Declare.
12393 (delete_fast_tracepoint_jump)
12394 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12395 (reinsert_fast_tracepoint_jumps_at): Declare.
12396 * regcache.c: Don't compile many functions when building the
12397 in-process agent library.
12398 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12399 the register buffer in the heap.
12400 (free_register_cache): If the register buffer isn't owned by the
12401 regcache, don't free it.
12402 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12403 pre-existing register caches.
12404 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12406 (convert_ascii_to_int): : Constify `from' parameter type.
12407 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12408 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12409 the needed buffer in-place.
12410 (relocate_instruction): New.
12411 * server.c (handle_query) <qSymbols>: If the target supports
12412 tracepoints, give it a chance of looking up symbols. Report
12413 support for fast tracepoints.
12414 (handle_status): Stabilize threads.
12415 (process_serial_event): Adjust.
12416 * server.h (struct fast_tracepoint_jump): Forward declare.
12417 (struct process_info) <fast_tracepoint_jumps>: New field.
12418 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12419 (decode_X_packet, decode_M_packet): Adjust.
12420 (relocate_instruction): Declare.
12421 (in_process_agent_loaded): Declare.
12422 (tracepoint_look_up_symbols): Declare.
12423 (struct fast_tpoint_collect_status): Declare.
12424 (fast_tracepoint_collecting): Declare.
12425 (force_unlock_trace_buffer): Declare.
12426 (handle_tracepoint_bkpts): Declare.
12427 (initialize_low_tracepoint)
12428 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12429 * target.h (struct target_ops) <stabilize_threads,
12430 install_fast_tracepoint_jump_pad>: New fields.
12431 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12432 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12433 [HAVE_STDINT_H]: Include stdint.h.
12434 (trace_debug_1): Rename to ...
12435 (trace_vdebug): ... this.
12436 (trace_debug): Rename to ...
12437 (trace_debug_1): ... this. Add `level' parameter.
12438 (trace_debug): New.
12439 (ATTR_USED, ATTR_NOINLINE): New.
12440 (IP_AGENT_EXPORT): New.
12441 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12442 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12443 (about_to_request_buffer_space, trace_buffer_is_full)
12444 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12445 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12446 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12447 (traceframe_write_count, traceframes_created)
12448 (trace_state_variables)
12449 New renaming defines.
12450 (struct ipa_sym_addresses): New.
12451 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12452 (symbol_list): New.
12453 (ipa_sym_addrs): New.
12454 (all_tracepoint_symbols_looked_up): New.
12455 (in_process_agent_loaded): New.
12456 (write_e_ipa_not_loaded): New.
12457 (maybe_write_ipa_not_loaded): New.
12458 (tracepoint_look_up_symbols): New.
12459 (debug_threads) [IN_PROCESS_AGENT]: New.
12460 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12461 (UNKNOWN_SIDE_EFFECTS): New.
12462 (stop_tracing): New.
12463 (flush_trace_buffer): New.
12464 (stop_tracing_bkpt): New.
12465 (flush_trace_buffer_bkpt): New.
12466 (read_inferior_integer): New.
12467 (read_inferior_uinteger): New.
12468 (read_inferior_data_pointer): New.
12469 (write_inferior_data_pointer): New.
12470 (write_inferior_integer): New.
12471 (write_inferior_uinteger): New.
12472 (struct collect_static_trace_data_action): Delete.
12473 (enum tracepoint_type): New.
12474 (struct tracepoint) <type>: New field `type'.
12475 <actions_str, step_actions, step_actions_str>: Only include in
12477 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12478 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12479 (tracepoints): Use IP_AGENT_EXPORT.
12480 (last_tracepoint): Don't include in the IPA.
12481 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12482 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12483 (alloced_trace_state_variables): New.
12484 (trace_state_variables): Use IP_AGENT_EXPORT.
12485 (traceframe_t): Delete unused variable.
12486 (circular_trace_buffer): Don't include in the IPA.
12487 (trace_buffer_start): Delete.
12488 (struct trace_buffer_control): New.
12489 (trace_buffer_free): Delete.
12490 (struct ipa_trace_buffer_control): New.
12491 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12492 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12494 (trace_buffer_ctrl): New.
12495 (TRACE_BUFFER_CTRL_CURR): New.
12496 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12497 Reimplement as macros.
12498 (trace_buffer_wrap): Delete.
12499 (traceframe_write_count, traceframe_read_count)
12500 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12501 (struct tracepoint_hit_ctx) <type>: New field.
12502 (struct fast_tracepoint_ctx): New.
12503 (memory_barrier): New.
12505 (record_tracepoint_error): Update atomically in the IPA.
12506 (clear_inferior_trace_buffer): New.
12507 (about_to_request_buffer_space): New.
12508 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12509 updating the same buffer.
12510 (add_tracepoint): Default the tracepoint's type to trap
12511 tracepoint, and orig_size to -1.
12512 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12513 internal variables.
12514 (create_trace_state_variable): New parameter `gdb'. Handle it.
12515 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12516 (cmd_qtdp): Handle fast tracepoints.
12517 (cmd_qtdv): Adjust.
12518 (max_jump_pad_size): New.
12519 (gdb_jump_pad_head): New.
12520 (get_jump_space_head): New.
12521 (claim_jump_space): New.
12522 (sort_tracepoints): New.
12523 (MAX_JUMP_SIZE): New.
12524 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12526 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12527 support. Upload fast traceframes, and delete internal IPA
12529 (stop_tracing_handler): New.
12530 (flush_trace_buffer_handler): New.
12531 (cmd_qtstop): Upload fast tracepoints.
12532 (response_tracepoint): Handle fast tracepoints.
12533 (tracepoint_finished_step): Upload fast traceframes. Set the
12534 tracepoint hit context's tracepoint type.
12535 (handle_tracepoint_bkpts): New.
12536 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12537 type. Add comment about fast tracepoints.
12538 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12539 non-existing action_str field.
12540 (get_context_regcache): Handle fast tracepoints.
12541 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12543 (fast_tracepoint_from_jump_pad_address): New.
12544 (fast_tracepoint_from_ipa_tpoint_address): New.
12545 (collecting_t): New.
12546 (force_unlock_trace_buffer): New.
12547 (fast_tracepoint_collecting): New.
12549 (gdb_collect): New.
12550 (write_inferior_data_ptr): New.
12551 (target_tp_heap): New.
12552 (target_malloc): New.
12553 (download_agent_expr): New.
12555 (download_tracepoints): New.
12556 (download_trace_state_variables): New.
12557 (upload_fast_traceframes): New.
12558 (IPA_FIRST_TRACEFRAME): New.
12559 (IPA_NEXT_TRACEFRAME_1): New.
12560 (IPA_NEXT_TRACEFRAME): New.
12561 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12562 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12563 (gdb_jump_pad_buffer_end): New.
12564 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12565 (initialize_tracepoint): Adjust.
12566 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12567 buffer. Initialize the low module.
12568 * utils.c (PREFIX, TOOLNAME): New.
12569 (malloc_failure): Use PREFIX.
12570 (error): In the IPA, an error causes an exit.
12571 (fatal, warning): Use PREFIX.
12572 (internal_error): Use TOOLNAME.
12573 (NUMCELLS): Increase to 10.
12574 * configure, config.in: Regenerate.
12576 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12578 * server.c (handle_query) <qSupported>: Do two passes over the
12579 qSupported string to avoid nesting strtok.
12581 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12583 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12585 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12586 -Wl,--dynamic-list.
12587 * configure: Regenerate.
12588 * proc-service.list: New.
12590 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12592 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12595 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12597 * gdbreplay.c (remote_open): Check error return from socket() call by
12598 its equality to -1 not by it being negative.
12599 * remote-utils.c (remote_open): Likewise.
12601 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12603 * config.h: Regenerate.
12605 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12607 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12608 doesn't provide PTRACE_GET_THREAD_AREA.
12610 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12612 * linux-m68k-low.c: Include <asm/ptrace.h>
12613 (ps_get_thread_area): Implement.
12615 2010-05-03 Doug Evans <dje@google.com>
12617 * event-loop.c (struct callback_event): New struct.
12618 (callback_list): New global.
12619 (append_callback_event, delete_callback_event): New functions.
12620 (process_callback): New function.
12621 (start_event_loop): Call it.
12622 * remote-utils.c (NOT_SCHEDULED): Define.
12623 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12624 moved out of readchar.
12625 (readchar): Rewrite. Call reschedule before returning.
12626 (reset_readchar): New function.
12627 (remote_close): Call it.
12628 (process_remaining, reschedule): New functions.
12629 * server.h (callback_handler_func): New typedef.
12630 (append_callback_event, delete_callback_event): Declare.
12632 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12634 * proc-service.c (ps_pglobal_lookup): Use
12635 thread_db_look_up_one_symbol.
12636 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12637 parameter. Use it instead of all_symbols_looked_up.
12638 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12640 (all_symbols_looked_up): Don't declare.
12641 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12642 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12644 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12645 Set all_symbols_looked_up here.
12646 (thread_db_look_up_one_symbol): New.
12647 (thread_db_get_tls_address): Adjust.
12648 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12649 thread_db object on the heap, and tentatively set it in the
12651 (thread_db_init): Don't set all_symbols_looked_up here.
12652 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12654 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12656 * linux-low.c (linux_kill, linux_detach): Adjust.
12657 (status_pending_p_callback): Remove redundant statement. Check
12658 for !TARGET_WAITIKIND_IGNORE, instead of
12659 TARGET_WAITKIND_STOPPED.
12660 (handle_tracepoints): Make sure LWP is locked. Adjust.
12661 (linux_wait_for_event_1): Adjust.
12662 (linux_cancel_breakpoints): New.
12663 (unsuspend_one_lwp): New.
12664 (unsuspend_all_lwps): New.
12665 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12666 (send_sigstop_callback): Change return type to int, add new
12667 `except' parameter and handle it.
12668 (suspend_and_send_sigstop_callback): New.
12669 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12670 pass them down. If SUSPEND, also increment the lwp's suspend
12672 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12673 (need_step_over_p): Don't consider suspended LWPs.
12674 (start_step_over): Adjust.
12675 (proceed_one_lwp): Change return type to int, add new `except'
12676 parameter and handle it.
12677 (unsuspend_and_proceed_one_lwp): New.
12678 (proceed_all_lwps): Use find_inferior instead of
12680 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12681 also decrement the suspend count of LWPs. Pass `except' down,
12682 instead of hacking its suspend count.
12683 (linux_pause_all): Add `freeze' parameter. Adjust.
12684 (linux_unpause_all): New.
12685 (linux_target_ops): Install linux_unpause_all.
12686 * server.c (handle_status): Adjust.
12687 * target.h (struct target_ops): New fields `unpause_all' and
12688 `cancel_breakpoints'. Add new parameter to `pause_all'.
12689 (pause_all): Add new `freeze' parameter.
12690 (unpause_all): New.
12691 (cancel_breakpoints): New.
12692 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12693 cancel breakpoints.
12694 (cmd_qtstart): Pause threads.
12695 (stop_tracing): Pause threads, and cancel breakpoints.
12696 * win32-low.c (win32_target_ops): Adjust.
12698 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12700 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12701 the inferior right away from here...
12702 (linux_wait_1): ... to here, and adjust to check the thread's
12703 last_resume_kind instead of the lwp's step or stop_expected flags.
12705 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12707 * README: Use consistent `GDB' and `GDBserver' spellings.
12709 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12711 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12712 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12713 (linux_detach_one_lwp): Assume the lwp is stopped.
12714 (any_thread_of): Delete.
12715 (linux_detach): Stop all lwps here. Don't blindly delete all
12717 (delete_lwp_callback): New.
12718 (linux_mourn): Delete all lwps of the process that is gone.
12719 (linux_wait_1): Don't delete the last lwp of the process here.
12720 * mem-break.h (mark_breakpoints_out): Declare.
12721 * mem-break.c (mark_breakpoints_out): New.
12722 (free_all_breakpoints): Use it.
12723 * server.c (handle_target_event): If the process is gone, mark
12725 * thread-db.c (struct thread_db) <create_bp>: New field.
12726 (thread_db_enable_reporting): Fix prototype. Store a thread event
12727 breakpoint reference in the thread_db struct.
12728 (thread_db_load_search): Clear the thread_db object.
12729 (try_thread_db_load_1): Ditto.
12730 (switch_to_process): New.
12731 (disable_thread_event_reporting): Use it.
12732 (remove_thread_event_breakpoints): New.
12733 (thread_db_detach, thread_db_mourn): Use it.
12735 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12737 * linux-low.c (linux_enable_event_reporting): New.
12738 (linux_wait_for_event_1, handle_extended_wait): Use it.
12740 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12742 * linux-low.c (linux_kill_one_lwp, linux_kill)
12743 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12744 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12745 SIGSTOP even if the LWP is stopped.
12746 (send_sigstop_callback): New.
12747 (stop_all_lwps): Use send_sigstop_callback instead.
12748 (linux_resume_one_thread): Adjust.
12749 (proceed_one_lwp): Still proceed an LWP that the client has
12750 requested to stop, if we haven't reported it as stopped yet. Make
12751 sure that LWPs the client want stopped, have a pending SIGSTOP.
12753 2010-04-26 Doug Evans <dje@google.com>
12755 * server.c (handle_general_set): Make static.
12757 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12758 Print received char after testing for error/eof instead of before.
12759 (input_interrupt): Tweak comment.
12761 2010-04-23 Doug Evans <dje@google.com>
12763 * server.c (start_inferior): Print inferior argv if --debug.
12765 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12767 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12768 * nto-x86-low.c: Include server.h
12770 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12772 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12773 be consistent with other sources of this directory.
12774 (init_registers_amd64): Correct name of source file of this function
12777 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12779 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12780 64-bit executables.
12782 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12784 * win32-i386-low.c: Add 64-bit support.
12785 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12786 (init_registers_amd64): Declare.
12787 (mappings): Add 64-bit version of array.
12788 (init_windows_x86): New function.
12789 (the_low_target): Change init_arch field to init_windows_x86.
12791 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12793 * win32-low.c: Adapt to support also 64-bit architecture.
12794 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12795 (get_image_name): Use SIZE_T type for local variable `done'.
12796 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12797 (toolhelp_get_dll_name): Idem.
12798 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12799 Use uintptr_t typecast to avoid warning.
12800 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12801 (handle_exception): Use phex_nz to avoid warning.
12802 (win32_wait): Remove unused local variable `process'.
12804 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12806 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12809 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12811 * configure.ac: Use `ws2_32' library for srv_mingw.
12812 * configure: Regenerate.
12813 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12814 * remote-utils.c: Likewise.
12816 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12818 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12819 if __x86_64__ is defined.
12821 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12823 * configure: Regenerate.
12825 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12827 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12828 * target.h (target_ops): New get_tib_address field.
12829 * win32-low.h (win32_thread_info): Add thread_local_base field.
12830 * win32-low.c (child_add_thread): Add tlb argument.
12831 Set thread_local_base field to TLB.
12832 (get_child_debug_event): Adapt to child_add_thread change.
12833 (win32_get_tib_address): New function.
12834 (win32_target_ops): Set get_tib_address field to
12835 win32_get_tib_address.
12836 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12838 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12840 * linux-low.c (linux_mourn): Also remove the process.
12841 * server.c (handle_target_event): Don't remove the process here.
12842 * nto-low.c (nto_mourn): New.
12843 (nto_target_ops): Install it.
12844 * spu-low.c (spu_mourn): New.
12845 (spu_target_ops): Install it.
12846 * win32-low.c (win32_mourn): New.
12847 (win32_target_ops): Install it.
12849 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12851 * server.h (buffer_xml_printf): Remove redundant `;'.
12853 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12855 * regcache.c (set_register_cache): Invalidate regcaches before
12856 changing the register cache layout.
12857 (regcache_invalidate_one): Allow a NULL regcache.
12858 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12859 regcaches before changing the register cache layout or the target
12862 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12864 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12865 variable warning on Linux/x86-64.
12867 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12869 GDBserver disconnected tracing support.
12871 * linux-low.c (linux_remove_process): Delete.
12872 (add_lwp): Don't set last_resume_kind here.
12873 (linux_kill): Use `mourn'.
12874 (linux_detach): Use `thread_db_detach', and `mourn'.
12875 (linux_mourn): New.
12876 (linux_attach_lwp_1): Adjust comment.
12877 (linux_attach): last_resume_kind moved the thread_info; adjust.
12878 (status_pending_p_callback): Adjust.
12879 (linux_wait_for_event_1): Adjust.
12880 (count_events_callback, select_singlestep_lwp_callback)
12881 (select_event_lwp_callback, cancel_breakpoints_callback)
12882 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12883 (proceed_one_lwp): Adjust.
12884 (linux_async): Add debug output.
12885 (linux_thread_stopped): New.
12886 (linux_pause_all): New.
12887 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12889 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12890 (thread_db_free): Delete declaration.
12891 (thread_db_detach, thread_db_mourn): Declare.
12892 * thread-db.c (thread_db_init): Use thread_db_mourn.
12893 (thread_db_free): Delete, split in two.
12894 (disable_thread_event_reporting): New.
12895 (thread_db_detach): New.
12896 (thread_db_mourn): New.
12898 * server.h (struct thread_info) <last_resume_kind>: New field.
12899 <attached>: Add comment.
12900 <gdb_detached>: New field.
12901 (handler_func): Change return type to int.
12902 (handle_serial_event, handle_target_event): Ditto.
12903 (gdb_connected): Declare.
12905 (disconnected_tracing): Declare.
12906 (stop_tracing): Declare.
12908 * server.c (handle_query) <qSupported>: Report support for
12909 disconnected tracing.
12910 (queue_stop_reply_callback): Account for running threads.
12911 (gdb_wants_thread_stopped): New.
12912 (gdb_wants_all_threads_stopped): New.
12913 (gdb_reattached_process): New.
12914 (handle_status): Clear the `gdb_detached' flag of all processes.
12915 In all-stop, stop all threads.
12916 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12917 (process_serial_event): If the remote connection breaks, or if an
12918 exit was forced with "monitor exit", force an event loop exit.
12919 Handle disconnected tracing on detach.
12920 (handle_serial_event): Adjust.
12921 (handle_target_event): If GDB isn't connected, forward events back
12922 to the inferior, unless the last process exited, in which case,
12923 exit gdbserver. Adjust interface.
12925 * remote-utils.c (remote_open): Don't block in accept. Instead
12926 register an event loop source on the listen socket file
12927 descriptor. Refactor bits into ...
12928 (listen_desc): ... this new global.
12929 (gdb_connected): ... this new function.
12930 (enable_async_notification): ... this new function.
12931 (handle_accept_event): ... this new function.
12932 (remote_close): Clear remote_desc.
12934 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12936 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12938 (mourn_inferior): Define.
12939 (target_process_qsupported): Avoid the dangling else problem.
12940 (thread_stopped): Define.
12941 (pause_all): Define.
12942 (target_waitstatus_to_string): Declare.
12943 * target.c (target_waitstatus_to_string): New.
12945 * tracepoint.c (tracing): Make extern.
12946 (disconnected_tracing): New.
12947 (stop_tracing): Make extern. Handle tracing stops due to GDB
12949 (cmd_qtdisconnected): New.
12950 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12951 (handle_tracepoint_general_set): Handle QTDisconnected.
12953 * event-loop.c (event_handler_func): Change return type to int.
12954 (process_event): Bail out if the event handler wants the event
12956 (handle_file_event): Ditto.
12957 (start_event_loop): Bail out if the event handler wants the event
12960 * nto-low.c (nto_target_ops): Adjust.
12961 * spu-low.c (spu_wait): Don't remove the process here.
12962 (spu_target_ops): Adjust.
12963 * win32-low.c (win32_wait): Don't remove the process here.
12964 (win32_target_ops): Adjust.
12966 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12968 * regcache.c (realloc_register_cache): Invalidate inferior's
12969 regcache before recreating it.
12971 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12973 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12975 2010-04-09 Stan Shebs <stan@codesourcery.com>
12976 Pedro Alves <pedro@codesourcery.com>
12978 * server.h (LONGEST): New.
12979 (struct thread_info) <while_stepping>: New field.
12980 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12982 (initialize_tracepoint, handle_tracepoint_general_set)
12983 (handle_tracepoint_query, tracepoint_finished_step)
12984 (tracepoint_was_hit, release_while_stepping_state_list):
12985 (current_traceframe): Declare.
12986 * server.c (handle_general_set): Handle tracepoint packets.
12987 (read_memory): New.
12988 (write_memory): New.
12989 (handle_search_memory_1): Use read_memory.
12990 (handle_query): Report support for conditional tracepoints, trace
12991 state variables, and tracepoint sources. Handle tracepoint
12993 (main): Initialize the tracepoints module.
12994 (process_serial_event): Handle traceframe reads/writes.
12996 * linux-low.c (handle_tracepoints): New.
12997 (linux_wait_1): Call it.
12998 (linux_resume_one_lwp): Handle while-stepping.
12999 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13000 (linux_target_ops): Install them.
13001 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13003 * linux-x86-low.c (x86_supports_tracepoints): New.
13004 (the_low_target). Install it.
13006 * mem-break.h (delete_breakpoint): Declare.
13007 * mem-break.c (delete_breakpoint): Make external.
13009 * target.h (struct target_ops): Add `supports_tracepoints',
13010 `read_pc', and `write_pc' fields.
13011 (target_supports_tracepoints): Define.
13012 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13015 * regcache.h (struct regcache) <registers_owned>: New field.
13016 (init_register_cache, regcache_cpy): Declare.
13017 (regcache_read_pc, regcache_write_pc): Declare.
13018 (register_cache_size): Declare.
13019 (supply_regblock): Declare.
13020 * regcache.c (init_register_cache): New.
13021 (new_register_cache): Use it.
13022 (regcache_cpy): New.
13023 (register_cache_size): New.
13024 (supply_regblock): New.
13025 (regcache_read_pc, regcache_write_pc): New.
13027 * tracepoint.c: New.
13029 * Makefile.in (OBS): Add tracepoint.o.
13030 (tracepoint.o): New rule.
13032 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13034 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13036 (i386-mmx.c): Likewise.
13037 (i386-mmx-linux.o): Likewise.
13038 (i386-mmx-linux.c): Likewise.
13040 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13041 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13042 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13043 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13045 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13046 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13047 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13049 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13051 * Makefile.in (clean): Updated.
13053 (i386-avx.c): Likewise.
13054 (i386-avx-linux.o): Likewise.
13055 (i386-avx-linux.c): Likewise.
13056 (amd64-avx.o): Likewise.
13057 (amd64-avx.c): Likewise.
13058 (amd64-avx-linux.o): Likewise.
13059 (amd64-avx-linux.c): Likewise.
13061 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13062 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13063 (srv_amd64_regobj): Add amd64-avx.o.
13064 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13065 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13066 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13067 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13068 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13069 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13070 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13072 * i387-fp.c: Include "i386-xstate.h".
13074 (i387_cache_to_xsave): Likewise.
13075 (i387_xsave_to_cache): Likewise.
13076 (x86_xcr0): Likewise.
13078 * i387-fp.h (i387_cache_to_xsave): Likewise.
13079 (i387_xsave_to_cache): Likewise.
13080 (x86_xcr0): Likewise.
13082 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13083 * linux-crisv32-low.c (target_regsets): Likewise.
13084 * linux-m68k-low.c (target_regsets): Likewise.
13085 * linux-mips-low.c (target_regsets): Likewise.
13086 * linux-ppc-low.c (target_regsets): Likewise.
13087 * linux-s390-low.c (target_regsets): Likewise.
13088 * linux-sh-low.c (target_regsets): Likewise.
13089 * linux-sparc-low.c (target_regsets): Likewise.
13090 * linux-xtensa-low.c (target_regsets): Likewise.
13092 * linux-low.c: Include <sys/uio.h>.
13093 (regsets_fetch_inferior_registers): Support nt_type.
13094 (regsets_store_inferior_registers): Likewise.
13095 (linux_process_qsupported): New.
13096 (linux_target_ops): Add linux_process_qsupported.
13098 * linux-low.h (regset_info): Add nt_type.
13099 (linux_target_ops): Add process_qsupported.
13101 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13103 (init_registers_i386_avx_linux): New.
13104 (init_registers_amd64_avx_linux): Likewise.
13105 (xmltarget_i386_linux_no_xml): Likewise.
13106 (xmltarget_amd64_linux_no_xml): Likewise.
13107 (PTRACE_GETREGSET): Likewise.
13108 (PTRACE_SETREGSET): Likewise.
13109 (x86_fill_xstateregset): Likewise.
13110 (x86_store_xstateregset): Likewise.
13111 (use_xml): Likewise.
13112 (x86_linux_update_xmltarget): Likewise.
13113 (x86_linux_process_qsupported): Likewise.
13114 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13115 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13116 init_registers_i386_linux here. Call
13117 x86_linux_update_xmltarget.
13118 (the_low_target): Add x86_linux_process_qsupported.
13120 * server.c (handle_query): Call target_process_qsupported.
13122 * target.h (target_ops): Add process_qsupported.
13123 (target_process_qsupported): New.
13125 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13127 * inferiors.c (add_thread): Set last_status kind to
13128 TARGET_WAITKIND_IGNORE.
13129 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13130 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13131 (linux_wait_1): Move `thread' local definition to block that uses
13132 it. Don't NULL initialize `event_child'.
13133 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13134 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13135 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13137 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13139 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13140 an extended waitstatus, or by a watchpoint.
13141 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13142 thread was stepping or has been stopped by a watchpoint.
13144 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13146 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13147 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13148 of another, then delete the previous, and validate all
13150 (validate_inserted_breakpoint): New.
13151 (delete_disabled_breakpoints): New.
13152 (validate_breakpoints): New.
13153 (check_mem_read): Validate breakpoints before trusting their
13154 shadow. Delete disabled breakpoints.
13155 (check_mem_write): Validate breakpoints before trusting they
13156 should be inserted. Delete disabled breakpoints.
13157 * mem-break.h (validate_breakpoints):
13158 * server.c (handle_query): Validate breakpoints when we see a
13161 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13163 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13164 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13165 if we could tell there's a GDB breakpoint at stop_pc.
13166 (need_step_over_p): Don't do a step over if we find a GDB
13167 breakpoint at the resume PC.
13169 * mem-break.c (struct raw_breakpoint): New.
13170 (enum bkpt_type): New type `gdb_breakpoint'.
13171 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13172 fields. New field `raw'.
13173 (find_raw_breakpoint_at): New.
13174 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13175 breakpoint instead.
13176 (set_breakpoint_at): Adjust.
13177 (delete_raw_breakpoint): New.
13178 (release_breakpoint): New.
13179 (delete_breakpoint): Rename to...
13180 (delete_breakpoint_1): ... this. Add proc parameter. Use
13181 release_breakpoint. Return ENOENT.
13182 (delete_breakpoint): Reimplement.
13183 (find_breakpoint_at): Delete.
13184 (find_gdb_breakpoint_at): New.
13185 (delete_breakpoint_at): Delete.
13186 (set_gdb_breakpoint_at): New.
13187 (delete_gdb_breakpoint_at): New.
13188 (gdb_breakpoint_here): New.
13189 (set_reinsert_breakpoint): Use release_breakpoint.
13190 (uninsert_breakpoint): Rename to ...
13191 (uninsert_raw_breakpoint): ... this.
13192 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13193 (reinsert_raw_breakpoint): Change parameter type to
13195 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13197 (check_breakpoints): Adjust. Use release_breakpoint.
13198 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13199 (breakpoint_inserted_here): Ditto.
13200 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13201 Don't trust the breakpoint's shadow if it is not inserted.
13202 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13203 (delete_all_breakpoints): Adjust.
13204 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13205 use delete_breakpoint_1.
13207 * mem-break.h (breakpoints_supported): Delete declaration.
13208 (set_gdb_breakpoint_at): Declare.
13209 (gdb_breakpoint_here): Declare.
13210 (delete_breakpoint_at): Delete.
13211 (delete_gdb_breakpoint_at): Declare.
13213 * server.h (struct raw_breakpoint): Forward declare.
13214 (struct process_info): New field `raw_breakpoints'.
13216 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13219 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13221 * linux-low.c (status_pending_p_callback): Fix comment.
13222 (linux_wait_for_event_1): Move most of the internal breakpoint
13223 handling from here...
13224 (linux_wait_1): ... to here.
13225 (count_events_callback): New.
13226 (select_singlestep_lwp_callback): New.
13227 (select_event_lwp_callback): New.
13228 (cancel_breakpoints_callback): New.
13229 (select_event_lwp): New.
13230 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13231 priority to all LWPs that have had events that should be reported
13232 to the client. Cancel breakpoints when about to reporting the
13233 event to the client, not while stopping lwps. No longer cancel
13234 finished single-steps here.
13235 (cancel_finished_single_step): Delete.
13236 (cancel_finished_single_steps): Delete.
13238 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13240 * mem-break.c (enum bkpt_type): New.
13241 (struct breakpoint): New field `type'.
13242 (set_breakpoint_at): Change return type to struct breakpoint
13243 pointer. Set type to `other_breakpoint' by default.
13244 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13245 in the breakpoint list.
13246 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13247 (reinsert_breakpoint): Rename to ...
13248 (reinsert_raw_breakpoint): ... this.
13249 (reinsert_breakpoints_at): Adjust.
13250 * mem-break.h (struct breakpoint): Declare.
13251 (set_breakpoint_at): Change return type to struct breakpoint
13254 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13256 * server.c (handle_query): Assign, not compare.
13258 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13260 Teach linux gdbserver to step-over-breakpoints.
13262 * linux-low.c (can_hardware_single_step): New.
13263 (supports_breakpoints): New.
13264 (handle_extended_wait): If stopping threads, read the stop pc of
13265 the new cloned LWP.
13267 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13268 low target doesn't support retrieving the PC.
13269 (add_lwp): Set last_resume_kind to resume_continue.
13270 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13271 (linux_attach): Don't clear stop_expected. Set the lwp's
13272 last_resume_kind to resume_stop.
13273 (linux_detach_one_lwp): Don't check for removed breakpoints.
13274 (check_removed_breakpoint): Delete.
13275 (status_pending_p): Rename to ...
13276 (status_pending_p_callback): ... this. Don't check for removed
13277 breakpoints. Don't consider threads that are stopped from GDB's
13279 (linux_wait_for_lwp): Always read the stop_pc here.
13280 (cancel_breakpoint): New.
13281 (step_over_bkpt): New global.
13282 (linux_wait_for_event_1): Implement stepping over breakpoints.
13283 (gdb_wants_lwp_stopped): New.
13284 (gdb_wants_all_stopped): New.
13285 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13286 single-step traps here. Store the thread's last reported target
13288 (send_sigstop): Don't clear stop_expected. Always set it,
13290 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13291 (cancel_finished_single_step): New.
13292 (cancel_finished_single_steps): New.
13293 (wait_for_sigstop): Don't cancel finished single-step traps here.
13294 (linux_resume_one_lwp): Don't check for removed breakpoints.
13295 Don't set `step' on non-hardware step archs.
13296 (linux_set_resume_request): Ignore resume_stop requests if already
13297 stopping or stopped. Set the lwp's last_resume_kind.
13298 (resume_status_pending_p): Don't check for removed breakpoints.
13299 (need_step_over_p): New.
13300 (start_step_over): New.
13301 (finish_step_over): New.
13302 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13303 requests. Clear the thread's last reported target waitstatus.
13304 Don't use the `suspended' flag. Don't consider pending breakpoints.
13305 (linux_resume): Start a step-over if necessary.
13306 (proceed_one_lwp): New.
13307 (proceed_all_lwps): New.
13308 (unstop_all_lwps): New.
13309 * linux-low.h (struct lwp_info): Rewrite comment for the
13310 `suspended' flag. Add the `stop_pc' field. Delete the
13311 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13312 Add `'last_resume_kind' and `need_step_over' fields.
13313 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13314 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13315 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13316 (set_raw_breakpoint_at): New.
13317 (set_breakpoint_at): Rewrite to use it.
13318 (reinsert_breakpoint_handler): Delete.
13319 (set_reinsert_breakpoint): New.
13320 (reinsert_breakpoint_by_bp): Delete.
13321 (delete_reinsert_breakpoints): New.
13322 (uninsert_breakpoint): Rewrite.
13323 (uninsert_breakpoints_at): New.
13324 (reinsert_breakpoint): Rewrite.
13325 (reinsert_breakpoints_at): New.
13326 (check_breakpoints): Rewrite.
13327 (breakpoint_here): New.
13328 (breakpoint_inserted_here): New.
13329 (check_mem_read): Adjust.
13330 * mem-break.h (breakpoints_supported, breakpoint_here)
13331 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13332 (reinsert_breakpoint_by_bp): Delete declaration.
13333 (delete_reinsert_breakpoints): Declare.
13334 (reinsert_breakpoint): Delete declaration.
13335 (reinsert_breakpoints_at): Declare.
13336 (uninsert_breakpoint): Delete declaration.
13337 (uninsert_breakpoints_at): Declare.
13338 (check_breakpoints): Adjust prototype.
13339 * server.h: Adjust include order.
13340 (struct thread_info): Declare here. Add a `last_status' field.
13342 2010-03-23 Michael Snyder <msnyder@vmware.com>
13344 * server.c (crc32): New function.
13345 (handle_query): Add handling for 'qCRC:' request.
13347 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13349 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13350 lwp had been stopped by a watchpoint.
13352 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13354 * server.h (internal_error): Declare.
13355 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13356 * utils.c (internal_error): New function.
13358 2010-03-15 Andreas Schwab <schwab@redhat.com>
13360 * configure.srv: Fix typo setting srv_regobj.
13362 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13364 * linux-low.c (fetch_register): Avoid passing a non string literal
13366 (usr_store_inferior_registers): Ditto.
13368 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13370 * linux-low.c (linux_write_memory): Bail out early if peeking
13373 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13375 * linux-low.h (struct lwp_info): New fields
13376 `stopped_by_watchpoint' and `stopped_data_address'.
13377 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13378 here, and cache them in the lwp object.
13379 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13381 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13383 (linux_stopped_by_watchpoint): Rewrite.
13384 (linux_stopped_data_address): Rewrite.
13386 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13388 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13389 switching the current inferior, not before.
13391 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13393 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13394 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13395 i386-linux.c and amd64-linux.c.
13396 (reg-i386.o): Removed.
13397 (reg-i386.c): Likewise.
13398 (reg-i386-linux.o): Likewise.
13399 (reg-i386-linux.c): Likewise.
13400 (reg-x86-64.o): Likewise.
13401 (reg-x86-64.c): Likewise.
13402 (reg-x86-64-linux.o): Likewise.
13403 (reg-x86-64-linux.c): Likewise.
13405 (i386.c): Likewise.
13406 (i386-linux.o): Likewise.
13407 (i386-linux.c): Likewise.
13408 (amd64.o): Likewise.
13409 (amd64.c): Likewise.
13410 (amd64-linux.o): Likewise.
13411 (amd64-linux.c): Likewise.
13413 * configure.srv (srv_i386_regobj): New.
13414 (srv_i386_linux_regobj): Likewise.
13415 (srv_amd64_regobj): Likewise.
13416 (srv_amd64_linux_regobj): Likewise.
13417 (srv_i386_32bit_xmlfiles): Likewise.
13418 (srv_i386_64bit_xmlfiles): Likewise.
13419 (srv_i386_xmlfiles): Likewise.
13420 (srv_amd64_xmlfiles): Likewise.
13421 (srv_i386_linux_xmlfiles): Likewise.
13422 (srv_amd64_linux_xmlfiles): Likewise.
13423 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13424 srv_xmlfiles to $srv_i386_xmlfiles.
13425 (i[34567]86-*-mingw32ce*): Likewise.
13426 (i[34567]86-*-mingw*): Likewise.
13427 (i[34567]86-*-nto*): Likewise.
13428 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13429 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13430 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13431 (x86_64-*-linux*): Likewise.
13433 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13434 (init_registers_amd64_linux): New.
13435 (x86_arch_setup): Replace init_registers_x86_64_linux with
13436 init_registers_amd64_linux.
13438 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13440 * configure.ac: Check for libdl. If it is not available link against
13441 static libthread_db.
13442 * configure: Regenerate.
13444 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13448 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13449 handing a read watchpoint.
13450 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13452 2010-02-12 Doug Evans <dje@google.com>
13454 * linux-low.c (linux_supports_tracefork_flag): Document.
13455 (linux_look_up_symbols): Add comment.
13457 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13459 * regcache.c (supply_register): Clear regcache if buf is NULL.
13461 2010-02-02 Nicolas Roche <roche@sourceware.org>
13462 Joel Brobecker <brobecker@adacore.com>
13464 * inferiors.c (find_inferior): Add function documentation.
13465 (unloaded_dll): Handle the case where the unloaded dll has not
13466 been previously registered in the dll list.
13468 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13470 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13471 (thumb2_breakpoint): New.
13472 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13474 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13476 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13477 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13480 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13482 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13484 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13486 * linux-s390-low.c (s390_collect_ptrace_register)
13487 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13489 2010-01-21 Doug Evans <dje@google.com>
13491 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13492 (PTRACE_ARG4_TYPE): New macro.
13493 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13494 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13495 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13496 (usr_store_inferior_registers): Ditto.
13497 (linux_read_memory, linux_write_memory): Ditto.
13498 (linux_test_for_tracefork): Ditto.
13500 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13501 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13503 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13505 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13508 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13510 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13511 prototype to take a regcache. Adjust.
13513 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13515 * regcache.h (struct thread_info): Forward declare.
13516 (struct regcache): New.
13517 (new_register_cache): Adjust prototype.
13518 (get_thread_regcache): Declare.
13519 (free_register_cache): Adjust prototype.
13520 (registers_to_string, registers_from_string): Ditto.
13521 (supply_register, supply_register_by_name, collect_register)
13522 (collect_register_as_string, collect_register_by_name): Ditto.
13523 * regcache.c (struct inferior_regcache_data): Delete.
13524 (get_regcache): Rename to ...
13525 (get_thread_regcache): ... this. Adjust. Switch inferior before
13526 fetching registers.
13527 (regcache_invalidate_one): Adjust.
13528 (regcache_invalidate): Fix prototype.
13529 (new_register_cache): Return the new register cache.
13530 (free_register_cache): Change prototype.
13531 (realloc_register_cache): Adjust.
13532 (registers_to_string): Change prototype to take a regcache. Adjust.
13533 (registers_from_string): Ditto.
13534 (register_data): Ditto.
13535 (supply_register): Ditto.
13536 (supply_register_by_name): Ditto.
13537 (collect_register): Ditto.
13538 (collect_register_as_string): Ditto.
13539 (collect_register_by_name): Ditto.
13540 * server.c (process_serial_event): Adjust.
13541 * linux-low.h (regset_fill_func, regset_store_func): Change
13543 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13545 * linux-low.c (get_stop_pc): Adjust.
13546 (check_removed_breakpoint): Adjust.
13547 (linux_wait_for_event): Adjust.
13548 (linux_resume_one_lwp): Adjust.
13549 (fetch_register): Add regcache parameter. Adjust.
13550 (usr_store_inferior_registers): Ditto.
13551 (regsets_fetch_inferior_registers): Ditto.
13552 (regsets_store_inferior_registers): Ditto.
13553 (linux_fetch_registers, linux_store_registers): Ditto.
13554 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13556 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13558 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13559 prototype to take a regcache.
13560 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13561 * remote-utils.c (convert_ascii_to_int, outreg)
13562 (prepare_resume_reply): Change prototype to take a regcache.
13564 * target.h (struct target_ops) <fetch_registers, store_registers>:
13565 Change prototype to take a regcache.
13566 (fetch_inferior_registers, store_inferior_registers): Change
13567 prototype to take a regcache. Adjust.
13568 * proc-service.c (ps_lgetregs): Adjust.
13569 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13570 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13571 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13572 take a regcache. Adjust.
13573 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13574 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13575 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13576 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13577 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13578 (cris_cannot_fetch_register):
13579 (cris_breakpoint_at): Change prototype to take a regcache.
13581 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13582 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13583 to take a regcache. Adjust.
13584 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13586 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13587 take a regcache. Adjust.
13588 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13589 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13590 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13591 * linux-mips-low.c (mips_get_pc):
13592 (mips_set_pc): Change prototype to take a regcache. Adjust.
13593 (mips_reinsert_addr): Adjust.
13594 (mips_collect_register): Change prototype to take a regcache.
13596 (mips_supply_register):
13597 (mips_collect_register_32bit, mips_supply_register_32bit)
13598 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13599 (mips_store_fpregset): Ditto.
13600 * linux-ppc-low.c (ppc_supply_ptrace_register)
13601 (ppc_supply_ptrace_register): Ditto.
13602 (parse_spufs_run): Adjust.
13603 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13604 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13605 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13606 take a regcache. Adjust.
13607 * linux-s390-low.c (s390_collect_ptrace_register)
13608 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13609 (s390_set_pc): Change prototype to take a regcache. Adjust.
13610 (s390_arch_setup): Adjust.
13611 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13612 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13613 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13614 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13615 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13617 (sparc_breakpoint_at): Adjust.
13618 * linux-xtensa-low.c (xtensa_fill_gregset):
13619 (xtensa_store_gregset):
13620 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13621 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13622 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13623 prototype to take a regcache. Adjust.
13624 * win32-arm-low.c (arm_fetch_inferior_register)
13625 (arm_store_inferior_register): Change prototype to take a
13627 * win32-i386-low.c (i386_fetch_inferior_register)
13628 (i386_store_inferior_register): Change prototype to take a
13630 * win32-low.c (child_fetch_inferior_registers)
13631 (child_store_inferior_registers): Change prototype to take a
13633 (win32_wait): Adjust.
13634 (win32_fetch_inferior_registers): Change prototype to take a
13636 (win32_store_inferior_registers): Adjust.
13637 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13638 store_inferior_register>: Change prototype to take a regcache.
13640 2010-01-20 Doug Evans <dje@google.com>
13642 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13644 (linux_wait_for_event1, linux_init_signals): Ditto.
13645 (W_STOPCODE): Provide definition if missing.
13647 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13649 * linux-low.c (linux_core_of_thread): New.
13650 (compare_ints, show_process, list_threads): New.
13651 (linux_qxfer_osdata): Report threads and cores.
13652 (linux_target_op): Register linux_core_of_thread.
13653 * remote-utils.c (prepare_resume_reply): Report the core.
13654 (buffer_xml_printf): Support %d specifier.
13655 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13657 (handle_query): Handle qXfer:threads. Announce availability
13659 * target.h (struct target_ops): New field core_of_thread.
13661 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13663 * Makefile.in (clean): Remove new generated files.
13664 (reg-s390.o, reg-s390.c): Remove rules.
13665 (reg-s390x.o, reg-s390x.c): Likewise.
13666 (s390-linux32.o, s390-linux32.c): Add rules.
13667 (s390-linux64.o, s390-linux64.c): Likewise.
13668 (s390x-linux64.o, s390x-linux64.c): Likewise.
13669 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13670 * linux-s390-low.c: Include <elf.h>.
13671 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13672 (init_registers_s390): Remove prototype.
13673 (init_registers_s390x): Likewise.
13674 (init_registers_s390_linux32): Add prototype.
13675 (init_registers_s390_linux64): Likewise.
13676 (init_registers_s390x_linux64): Likewise.
13677 (s390_num_regs_3264): New define.
13678 (s390_regmap_3264): New global variable.
13679 (s390_cannot_fetch_register): Remove obsolete check.
13680 (s390_cannot_store_register): Likewise.
13681 (s390_collect_ptrace_register): Handle upper/lower register halves.
13682 (s390_supply_ptrace_register): Likewise.
13683 (s390_fill_gregset): Update to register number changes.
13684 (s390_get_hwcap): New routine.
13685 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13686 Install appropriate regmap and register set.
13688 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13690 * server.c (gdbserver_version): Update copyright year to 2010.
13691 * gdbreplay.c (gdbreplay_version): Likewise.
13693 2009-12-28 Doug Evans <dje@google.com>
13695 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13696 elf/external.h. Include <elf.h> instead but only if necessary.
13698 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13700 * linux-low.c (linux_remove_process): Remove `detaching'
13701 parameter. Don't release/detach from thread_db here.
13702 (linux_kill): Release/detach from thread_db here, ...
13703 (linux_detach): ... and here, before actually detaching.
13704 (linux_wait_1): ... and here, when a process exits.
13705 * thread-db.c (any_thread_of): New.
13706 (thread_db_free): Switch the current inferior to a thread of the
13709 2009-12-21 Doug Evans <dje@google.com>
13711 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13713 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13714 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13715 warning ifndef __NR_tkill. Move setting of errno there too.
13716 Delete unnecessary resetting of errno after syscall.
13717 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13719 * configure.ac: Check for dladdr.
13720 * config.in: Regenerate.
13721 * configure: Regenerate.
13722 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13723 (try_thread_db_load): Update.
13725 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13727 2009-12-18 Doug Evans <dje@google.com>
13729 * event-loop.c: Include unistd.h if it exists.
13731 * linux-low.c (my_waitpid): Move definition away from being in
13732 between linux_tracefork_child/linux_test_for_tracefork.
13734 * gdb_proc_service.h (psaddr_t): Fix type.
13735 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13736 signature to match glibc.
13738 2009-12-16 Doug Evans <dje@google.com>
13740 * linux-low.c (linux_read_memory): Fix argument to read.
13742 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13744 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13745 events, don't leave current_inferior pointing at null.
13747 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13749 * win32-low.c (LOG): Delete.
13750 (OUTMSG): Output to stderr.
13751 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13752 on compile time LOG macro.
13753 (win32_wait): Fix debug output.
13755 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13757 * win32-low.c (win32_add_one_solib): If the dll name is
13758 "ntdll.dll", prepend the system directory to the dll path.
13760 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13762 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13764 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13765 Vladimir Prus <vladimir@codesourcery.com>
13767 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13768 * configure.ac: Check for __mcoldfire__ and set
13769 gdb_cv_m68k_is_coldfire.
13770 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13771 reg-cf.o and reg-m68k.o.
13772 * configure: Regenerated.
13774 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13776 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13777 Pass it to thread_db_free.
13778 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13779 proper `detaching' argument to linux_remove_process.
13780 * linux-low.h (thread_db_free): Add `detaching' parameter.
13781 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13783 (thread_db_free): Add `detaching' parameter. Only
13784 call td_ta_clear_event if detaching from process.
13786 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13788 * thread-db.c (thread_db_free): Fix typo.
13790 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13793 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13795 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13797 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13798 with an i686 compiler.
13799 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13801 * configure: Rebuilt.
13803 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13807 * server.c (handle_search_memory_1): Correct read_addr initialization
13808 in loop for searching subsequent chunks.
13810 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13812 * configure.ac: New --with-libthread-db option.
13813 * thread-db.c: Allow direct dependence on libthread_db.
13814 (thread_db_free): Adjust.
13815 * config.in: Regenerate.
13816 * configure: Likewise.
13818 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13821 * thread-db.c (attach_thread): New function.
13822 (maybe_attach_thread): Return success/failure.
13823 (find_new_threads_callback): Adjust.
13824 (thread_db_find_new_threads): Loop until no new threads.
13826 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13828 * proc-service.c (ps_lgetregs): Formatting.
13830 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13832 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13833 * configure.ac: Adjust.
13834 * linux-low.h (struct process_info_private): Move members to struct
13836 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13837 * linux-low.c (linux_remove_process): Adjust.
13838 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13839 * server.c (handle_query): Move code ...
13840 (handle_monitor_command): ... here. New function.
13841 * target.h (struct target_ops): New member.
13842 * thread-db.c (struct thread_db): New.
13843 (libthread_db_search_path): New variable.
13844 (thread_db_create_event, thread_db_enable_reporting)
13845 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13846 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13847 (try_thread_db_load_1, dladdr_to_soname): New functions.
13848 (try_thread_db_load, thread_db_load_search): New functions.
13849 (thread_db_init): Search for libthread_db.
13850 (thread_db_free): New function.
13851 (thread_db_handle_monitor_command): Likewise.
13852 * config.in: Regenerate.
13853 * configure: Regenerate.
13855 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13857 * spu-low.c (spu_kill): Wait for inferior to terminate.
13858 Call clear_inferiors.
13859 (spu_detach): Call clear_inferiors.
13861 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13863 * aclocal.m4: Regenerate.
13864 * config.in: Likewise.
13865 * configure: Likewise.
13867 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13869 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13870 (parse_spufs_run): New function.
13871 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13872 (ppc_breakpoint_at): Handle SPU breakpoints.
13874 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13876 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13877 (SPUFS_MAGIC): Define.
13878 (spu_enumerate_spu_ids): New function.
13879 (linux_qxfer_spu): New function.
13880 (linux_target_ops): Install linux_qxfer_spu.
13882 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13884 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13885 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13886 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13887 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13888 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13889 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13890 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13891 (init_registers_powerpc_cell32l): Add prototype.
13892 (init_registers_powerpc_cell64l): Likewise.
13893 (ppc_arch_setup): Detect Cell/B.E. architecture.
13895 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13897 * Makefile.in (datarootdir): New variable.
13899 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13901 * linux-low.c (linux_write_memory): Update debugging output.
13902 * Makefile.in (clean): Add new descriptions.
13903 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13904 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13905 * configure.srv: Add new files for arm*-*-linux*.
13906 * linux-arm-low.c: Add new declarations.
13907 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13908 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13909 (HWCAP_VFPv3D16): New.
13910 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13911 instead of __IWMMXT__.
13912 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13913 (arm_arch_setup): New.
13914 (target_regsets): Remove #ifdef. Add VFP regset.
13915 (the_low_target): Use arm_arch_setup.
13917 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13919 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13920 the main thread again.
13922 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13924 Adding Neutrino gdbserver.
13925 * configure: Regenerated.
13926 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13927 * configure.srv (i[34567]86-*-nto*): New target.
13928 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13929 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13930 (nto_comctrl) [__QNX__]: New function.
13931 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13933 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13935 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13938 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13939 Pedro Alves <pedro@codesourcery.com>
13941 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13942 don't support CONTEXT_EXTENDED_REGISTERS.
13943 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13944 (the_low_target): Install them.
13945 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13946 failing with ERROR_PIPE_NOT_CONNECTED.
13948 2009-06-30 Doug Evans <dje@google.com>
13949 Pierre Muller <muller@ics.u-strasbg.fr>
13951 Add h/w watchpoint support to x86-linux, win32-i386.
13952 * Makefile.in (SFILES): Add i386-low.c
13953 (i386_low_h): Define.
13954 (i386-low.o): Add dependencies.
13955 (linux-x86-low.o): Add i386-low.h dependency.
13956 (win32-i386-low.o): Ditto.
13957 * i386-low.c: New file.
13958 * i386-low.h: New file.
13959 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13960 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13961 * linux-low.c (linux_add_process): Initialize arch_private.
13962 (linux_remove_process): Free arch_private.
13963 (add_lwp): Initialize arch_private.
13964 (delete_lwp): Free arch_private.
13965 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13967 * linux-low.h (process_info_private): New member arch_private.
13968 (lwp_info): New member arch_private.
13969 (linux_target_ops): New members new_process, new_thread,
13971 (ptid_of): New macro.
13972 * linux-x86-low.c: Include stddef.h, i386-low.h.
13973 (arch_process_info): New struct.
13974 (arch_lwp_info): New struct.
13975 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13976 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13977 (i386_dr_low_get_status): New function.
13978 (x86_insert_point, x86_remove_point): New functions.
13979 (x86_stopped_by_watchpoint): New function.
13980 (x86_stopped_data_address): New function.
13981 (x86_linux_new_process, x86_linux_new_thread): New functions.
13982 (x86_linux_prepare_to_resume): New function.
13983 (the_low_target): Add entries for insert_point, remove_point,
13984 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13986 * server.c (debug_hw_points): New global.
13987 (monitor_show_help): Document set debug-hw-points.
13988 (handle_query): Process "set debug-hw-points".
13989 * server.h (debug_hw_points): Declare.
13990 (paddress): Declare.
13991 * utils.c (NUMCELLS, CELLSIZE): New macros.
13992 (get_sell, xsnprintf, paddress): New functions.
13993 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13994 remove_point, stopped_by_watchpoint, stopped_data_address.
13995 * win32-i386-low.c: Include i386-low.h.
13996 (debug_reg_state): Replaces dr.
13997 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13998 (i386_dr_low_get_status): New function.
13999 (i386_insert_point, i386_remove_point): New functions.
14000 (i386_stopped_by_watchpoint): New function.
14001 (i386_stopped_data_address): New function.
14002 (i386_initial_stuff): Update.
14003 (get_thread_context,set_thread_context,i386_thread_added): Update.
14004 (the_low_target): Add entries for insert_point,
14005 remove_point, stopped_by_watchpoint, stopped_data_address.
14006 * win32-low.c (win32_insert_watchpoint): New function.
14007 (win32_remove_watchpoint): New function.
14008 (win32_stopped_by_watchpoint): New function.
14009 (win32_stopped_data_address): New function.
14010 (win32_target_ops): Add entries for insert_watchpoint,
14011 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14012 * win32-low.h (win32_target_ops): New members insert_point,
14013 remove_point, stopped_by_watchpoint, stopped_data_address.
14015 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14017 * server.c (process_serial_event): Re-return unsupported, not
14018 error, if the type isn't recognized. Re-allow supporting only
14019 insert or remove packets. Also call require_running for
14020 breakpoints. Add missing break statement to default case. Tidy.
14021 * target.h (struct target_ops): Rename insert_watchpoint to
14022 insert_point, and remove_watchpoint to remove_point.
14024 * linux-low.h (struct linux_target_ops): Likewise.
14025 * linux-low.c (linux_insert_watchpoint): Rename to ...
14026 (linux_insert_point): ... this. Adjust.
14027 (linux_remove_watchpoint): Rename to ...
14028 (linux_remove_point): ... this. Adjust.
14029 (linux_target_ops): Adjust.
14030 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14031 (cris_insert_point): ... this.
14032 (cris_remove_watchpoint): Rename to ...
14033 (cris_remove_point): ... this.
14034 (the_low_target): Adjust.
14036 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14038 * server.c (handle_v_kill): Pass signal_pid to
14039 kill_inferior if multi_process is zero.
14041 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14043 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14044 * target.h (target_ops): Comment for *_watchpoint to make it clear
14045 the functions can get types '0' and '1'.
14047 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14049 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14050 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14051 * regcache.c (get_regcache): Likewise.
14052 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14053 * win32-low.c (child_fetch_inferior_registers): Remove check for
14056 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14057 Pedro Alves <pedro@codesourcery.com>
14059 * target.h (struct target_ops) <supports_multi_process>: New
14061 (target_supports_multi_process): New.
14062 * server.c (handle_query): Even if GDB reports support, only
14063 enable multi-process if the target also supports it. Report
14064 multi-process support only if the target backend supports it.
14065 * linux-low.c (linux_supports_multi_process): New function.
14066 (linux_target_ops): Install it as target_supports_multi_process
14069 2009-05-24 Doug Evans <dje@google.com>
14071 Global renaming of find_thread_pid to find_thread_ptid.
14072 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14073 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14074 All callers updated.
14076 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14077 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14080 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14081 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14082 (linux_resume_one_lwp): Ditto.
14084 2009-05-23 Doug Evans <dje@google.com>
14086 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14087 from struct inferior_list_entry * to struct lwp_info *.
14088 All callers updated.
14090 2009-05-13 Doug Evans <dje@google.com>
14092 * linux-x86-low.c: Don't include assert.h.
14093 (x86_siginfo_fixup): Use fatal, not assert.
14094 (x86_arch_setup): Fix comment.
14096 2009-05-12 Doug Evans <dje@google.com>
14098 Biarch support for i386/amd64 gdbserver.
14099 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14100 Add linux-x86-low.c.
14101 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14102 (linux-x86-low.o): Add.
14103 * linux-x86-64-low.c: Delete.
14104 * linux-i386-low.c: Delete.
14105 * linux-x86-low.c: New file.
14106 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14108 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14110 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14111 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14112 (linux_child_pid_to_exec_file): New function.
14113 (elf_64_header_p, elf_64_file_p): New functions.
14114 (siginfo_fixup): New function.
14115 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14116 give target a chance to convert layout.
14117 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14118 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14120 2009-05-07 Doug Evans <dje@google.com>
14122 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14123 (regsets_store_inferior_registers): Ditto.
14125 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14129 * linux-low.c (must_set_ptrace_flags): Delete.
14130 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14132 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14133 `lwp->must_set_ptrace_flags' instead.
14134 (linux_wait_for_event_1): Set ptrace options here.
14135 (linux_wait_1): ... not here.
14137 2009-04-30 Doug Evans <dje@google.com>
14139 * inferiors.c (started_inferior_callback): New function.
14140 (attached_inferior_callback): New function.
14141 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14142 * server.c (print_started_pid, print_attached_pid): New functions.
14143 (detach_or_kill_for_exit): New function.
14144 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14145 * server.h (have_started_inferiors_p): Declare.
14146 (have_attached_inferiors_p): Declare.
14148 * inferiors.c (remove_process): Fix memory leak, free process.
14149 * linux-low.c (linux_remove_process): New function.
14150 (linux_kill): Call it instead of remove_process.
14151 (linux_detach, linux_wait_1): Ditto.
14153 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14155 * configure.srv: Add x86 Windows CE target.
14157 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14159 * inferiors.c (get_thread_process): Make global.
14160 * server.h (get_thread_process): Add prototype.
14161 * thread-db.c (find_one_thread): Use get_thread_process
14162 instead of current_process.
14163 (thread_db_get_tls_address): Do not crash if called when
14164 thread layer is not yet initialized.
14166 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14168 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14169 * spu-low.c (current_tid): Rename to ...
14170 (current_ptid): ... this.
14171 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14172 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14173 ptid_get_lwp (current_ptid) instead of current_tid.
14174 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14175 instead of current_tid. Use find_process_pid to verify pid
14176 argument is valid. Pass proper argument to remove_process.
14177 (spu_thread_alive): Compare current_ptid instead of current_tid.
14178 (spu_resume): Likewise.
14180 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14182 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14185 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14187 Implement the multiprocess extensions, and add linux multiprocess
14190 * server.h (ULONGEST): Declare.
14191 (struct ptid, ptid_t): New.
14192 (minus_one_ptid, null_ptid): Declare.
14193 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14194 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14195 (struct inferior_list_entry): Change `id' type from unsigned from
14197 (struct sym_cache, struct breakpoint, struct
14198 process_info_private): Forward declare.
14199 (struct process_info): Declare.
14200 (current_process): Declare.
14201 (all_processes): Declare.
14202 (initialize_inferiors): Declare.
14203 (add_thread): Adjust to use ptid_t.
14204 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14205 (add_process, remove_process, find_thread_pid): Declare.
14206 (find_inferior_id): Adjust to use ptid_t.
14207 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14208 (multi_process): Declare.
14209 (push_event): Adjust to use ptid_t.
14210 (read_ptid, write_ptid): Declare.
14211 (prepare_resume_reply): Adjust to use ptid_t.
14212 (clear_symbol_cache): Declare.
14213 * inferiors.c (all_processes): New.
14214 (null_ptid, minus_one_ptid): New.
14215 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14216 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14217 (add_thread): Change unsigned long to ptid. Remove gdb_id
14219 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14220 (gdb_id_to_thread): Rename to ...
14221 (find_thread_pid): ... this. Change unsigned long to ptid.
14222 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14223 (loaded_dll, pull_pid_from_list): Adjust.
14224 (add_process, remove_process, find_process_pid)
14225 (get_thread_process, current_process, initialize_inferiors): New.
14226 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14227 (struct target_waitstatus) <related_pid>: Ditto.
14228 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14229 return type to int.
14230 (struct target_ops) <join>: Add `pid' argument.
14231 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14232 (struct target_ops) <wait>: Add `ptid' field. Change return type
14234 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14235 (mywait): Add `ptid' argument. Change return type to ptid_t.
14236 (target_pid_to_str): Declare.
14237 * target.c (set_desired_inferior): Adjust to use ptids.
14238 (mywait): Add new `ptid' argument. Adjust.
14239 (target_pid_to_str): New.
14240 * mem-break.h (free_all_breakpoints): Declare.
14241 * mem-break.c (breakpoints): Delelete.
14242 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14243 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14244 to use per-process breakpoint list.
14245 (free_all_breakpoints): New.
14246 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14247 (symbol_cache, all_symbols_looked_up): Delete.
14249 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14251 (prepare_resume_reply): Change ptid argument's type from unsigned
14252 long to ptid_t. Adjust. Implement W;process and X;process.
14253 (free_sym_cache, clear_symbol_cache): New.
14254 (look_up_one_symbol): Adjust to per-process symbol cache. *
14255 * server.c (cont_thread, general_thread, step_thread): Change type
14257 (attached): Delete.
14258 (multi_process): New.
14259 (last_ptid): Change type to ptid_t.
14260 (struct vstop_notif) <ptid>: Change type to ptid_t.
14261 (queue_stop_reply, push_event): Change `ptid' argument's type to
14263 (discard_queued_stop_replies): Add `pid' argument.
14264 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14265 changes. Don't reference the `attached' global.
14266 (attach_inferior): Adjust to mywait interface changes.
14267 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14268 features. Handle and report "multiprocess+". Handle
14270 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14272 (handle_v_kill): New.
14273 (handle_v_stopped): Adjust to use target_pid_to_str.
14274 (handle_v_requests): Allow multiple attaches and runs when
14275 multiprocess extensions are in effect. Handle "vKill".
14276 (myresume): Adjust to use ptids.
14277 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14278 (handle_status): Adjust to discard_queued_stop_replies interface
14280 (first_thread_of, kill_inferior_callback)
14281 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14282 (main): Call initialize_inferiors. Adjust to use ptids, killing
14283 and detaching from all inferiors. Handle multiprocess packet
14285 * linux-low.h: Include gdb_proc_service.h.
14286 (struct process_info_private): New.
14287 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14288 <lwpid_of>: Use ptid_get_lwp.
14289 (get_lwp_thread): Adjust.
14290 (struct lwp_info): Add `dead' member.
14291 (find_lwp_pid): Declare.
14292 * linux-low.c (thread_db_active): Delete.
14293 (new_inferior): Adjust comment.
14294 (inferior_pid): Delete.
14295 (linux_add_process): New.
14296 (handle_extended_wait): Adjust.
14297 (add_lwp): Change unsigned long to ptid.
14298 (linux_create_inferior): Add process to processes table. Adjust
14299 to use ptids. Don't set new_inferior here.
14300 (linux_attach_lwp): Rename to ...
14301 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14302 it. Adjust to use ptids.
14303 (linux_attach_lwp): New.
14304 (linux_attach): Add process to processes table. Don't set
14306 (struct counter): New.
14307 (second_thread_of_pid_p, last_thread_of_process_p): New.
14308 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14309 multiple processes.
14310 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14311 processes. Remove process from process table.
14312 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14313 to multiple processes.
14314 (any_thread_of): New.
14315 (linux_detach): Add `pid' argument, and handle it. Remove process
14316 from processes table.
14317 (linux_join): Add `pid' argument. Handle it.
14318 (linux_thread_alive): Change unsighed long argument to ptid_t.
14319 Consider dead lwps as not being alive.
14320 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14321 threads we're not interested in.
14322 (same_lwp, find_lwp_pid): New.
14323 (linux_wait_for_lwp): Change `pid' argument's type from int to
14325 (linux_wait_for_event): Rename to ...
14326 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14327 from int to ptid_t. Adjust.
14328 (linux_wait_for_event): New.
14329 (linux_wait_1): Add `ptid' argument. Change return type to
14330 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14331 that exit from the process table.
14332 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14334 (mark_lwp_dead): New.
14335 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14336 stopping all threads, mark its main lwp as dead.
14337 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14339 (fetch_register, usr_store_inferior_registers)
14340 (regsets_fetch_inferior_registers)
14341 (regsets_store_inferior_registers, linux_read_memory)
14342 (linux_write_memory): Inline `inferior_pid'.
14343 (linux_look_up_symbols): Adjust to use per-process
14344 `thread_db_active'.
14345 (linux_request_interrupt): Adjust to use ptids.
14346 (linux_read_auxv): Inline `inferior_pid'.
14347 (initialize_low): Don't reference thread_db_active.
14348 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14349 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14350 (ps_getpid): Return the pid of the current inferior.
14351 * thread-db.c (proc_handle, thread_agent): Delete.
14352 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14354 (find_one_thread): Change argument type to ptid_t. Adjust to
14356 (maybe_attach_thread): Adjust to per-process data and ptids.
14357 (thread_db_find_new_threads): Ditto.
14358 (thread_db_init): Ditto.
14359 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14360 processes table. Adjust to use ptids.
14361 (spu_kill, spu_detach): Adjust interface. Remove process from
14363 (spu_join, spu_thread_alive): Adjust interface.
14364 (spu_wait): Adjust interface. Remove process from processes
14365 table. Adjust to use ptids.
14366 * win32-low.c (current_inferior_tid): Delete.
14367 (current_inferior_ptid): New.
14368 (debug_event_ptid): New.
14369 (thread_rec): Take a ptid. Adjust.
14370 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14371 (child_delete_thread): Ditto.
14372 (do_initial_child_stuff): Add `attached' argument. Add process to
14374 (child_fetch_inferior_registers, child_store_inferior_registers):
14376 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14377 (win32_attach): Pass 1 to do_initial_child_stuff.
14378 (win32_kill): Adjust interface. Remove process from processes
14380 (win32_detach): Ditto.
14381 (win32_join): Adjust interface.
14382 (win32_thread_alive): Take a ptid.
14383 (win32_resume): Adjust to use ptids.
14384 (get_child_debug_event): Ditto.
14385 (win32_wait): Adjust interface. Remove exiting process from
14388 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14390 Non-stop mode support.
14392 * server.h (non_stop): Declare.
14393 (gdb_client_data, handler_func): Declare.
14394 (delete_file_handler, add_file_handler, start_event_loop):
14396 (handle_serial_event, handle_target_event, push_event)
14397 (putpkt_notif): Declare.
14398 * target.h (enum resume_kind): New.
14399 (struct thread_resume): Replace `step' field by `kind' field.
14400 (TARGET_WNOHANG): Define.
14401 (struct target_ops) <wait>: Add `options' argument.
14402 <supports_non_stop, async, start_non_stop>: New fields.
14403 (target_supports_non_stop, target_async): New.
14404 (start_non_stop): Declare.
14405 (mywait): Add `options' argument.
14406 * target.c (mywait): Add `options' argument. Print child exit
14407 notifications here.
14408 (start_non_stop): New.
14409 * server.c (non_stop, own_buf, mem_buf): New globals.
14410 (struct vstop_notif): New.
14411 (notif_queue): New global.
14412 (queue_stop_reply, push_event, discard_queued_stop_replies)
14413 (send_next_stop_reply): New.
14414 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14416 (attach_inferior): In non-stop mode, don't wait for the target
14418 (handle_general_set): Handle QNonStop.
14419 (handle_query): When handling qC, return the current general
14420 thread, instead of the first thread of the list.
14421 (handle_query): If the backend supports non-stop mode, include
14422 QNonStop+ in the qSupported query response.
14423 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14425 (handle_v_attach, handle_v_run): Handle non-stop mode.
14426 (handle_v_stopped): New.
14427 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14428 (myresume): Adjust to use resume_kind. Handle non-stop.
14429 (queue_stop_reply_callback): New.
14430 (handle_status): Handle non-stop mode.
14431 (main): Clear non_stop flag on reconnection. Use the event-loop.
14432 Refactor serial protocol handling from here ...
14433 (process_serial_event): ... to this new function. When GDB
14434 selects any thread, select one here. In non-stop mode, wait until
14435 GDB acks all pending events before exiting.
14436 (handle_serial_event, handle_target_event): New.
14437 * remote-utils.c (remote_open): Install remote_desc in the event
14439 (remote_close): Remove remote_desc from the event loop.
14440 (putpkt_binary): Rename to...
14441 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14442 (putpkt_binary): New as wrapper around putpkt_binary_1.
14443 (putpkt_notif): New.
14444 (prepare_resume_reply): In non-stop mode, don't change the
14446 * event-loop.c: New.
14447 * Makefile.in (OBJ): Add event-loop.o.
14448 (event-loop.o): New rule.
14450 * linux-low.h (pid_of): Moved here.
14452 (get_lwp_thread): Use lwpid_of.
14453 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14454 * linux-low.c (pid_of): Delete.
14455 (inferior_pid): Use lwpid_of.
14456 (linux_event_pipe): New.
14457 (target_is_async_p): New.
14459 (handle_extended_wait): Use lwpid_of.
14460 (add_lwp): Don't set lwpid field.
14461 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14462 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14463 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14464 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14465 first. Adjust to linux_wait_for_event interface changes. Use
14467 (linux_detach): Don't delete the main lwp here.
14468 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14469 (status_pending_p): Don't consider explicitly suspended lwps.
14470 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14471 pointer. Add OPTIONS argument. Change return type to int. Use
14472 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14473 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14474 pointer. Add status pointer argument. Return a pid instead of a
14475 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14476 changes. In non-stop mode, don't switch to a random thread.
14477 (linux_wait): Rename to...
14478 (linux_wait_1): ... this. Add target_options argument, and handle
14479 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14480 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14481 clean exit and signal exit code. Don't stop all threads in
14482 non-stop mode. In all-stop mode, only stop all threads when
14483 reporting a stop to GDB. Handle explicit thread stop requests.
14484 (async_file_flush, async_file_mark): New.
14486 (send_sigstop): Use lwpid_of.
14487 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14488 interface changes. In non-stop mode, don't switch to a random
14490 (linux_resume_one_lwp): Use lwpid_of.
14491 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14492 (linux_resume_one_thread): ... this. Handle resume_stop. In
14493 non-stop mode, don't look for pending flag in all threads.
14494 (resume_status_pending_p): Don't consider explicitly suspended
14496 (my_waitpid): Reimplement. Emulate __WALL.
14497 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14499 (sigchld_handler, linux_supports_non_stop, linux_async)
14500 (linux_start_non_stop): New.
14501 (linux_target_ops): Register linux_supports_non_stop, linux_async
14502 and linux_start_non_stop.
14503 (initialize_low): Install SIGCHLD handler.
14504 * thread-db.c (thread_db_create_event, find_one_thread)
14505 (thread_db_get_tls_address): Use lwpid_of.
14506 * win32-low.c (win32_detach): Adjust to use resume_kind.
14507 (win32_wait): Add `options' argument.
14508 * spu-low.c (spu_resume): Adjust to use resume_kind.
14509 (spu_wait): Add `options' argument.
14511 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14513 Decouple target code from remote protocol.
14515 * target.h (enum target_waitkind): New.
14516 (struct target_waitstatus): New.
14517 (struct target_ops) <wait>: Return an unsigned long. Take a
14518 target_waitstatus pointer instead of a char pointer.
14519 (mywait): Likewise.
14520 * target.c (mywait): Change prototype to return an unsigned long.
14521 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14522 * server.h (thread_from_wait, old_thread_from_wait): Delete
14524 (prepare_resume_reply): Change prototype to take a
14526 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14527 (last_status, last_ptid): New.
14528 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14529 pid instead of a signal.
14530 (attach_inferior): Remove "status" and "signal" parameters.
14532 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14534 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14535 (handle_v_requests, myresume): Remove "status" and "signal"
14536 parameters. Adjust.
14537 (handle_status): New.
14538 (main): Delete local `status'. Adjust.
14539 * remote-utils.c: Include target.h.
14540 (prepare_resume_reply): Change prototype to take a
14541 target_waitstatus. Adjust.
14543 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14545 * spu-low.c (spu_wait): Adjust.
14546 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14548 (win32_wait): Adjust.
14550 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14552 * target.h (struct thread_resume): Delete leave_stopped member.
14553 (struct target_ops): Add a `n' argument to the `resume' callback.
14554 * server.c (start_inferior): Adjust.
14555 (handle_v_cont, myresume): Adjust.
14556 * linux-low.c (check_removed_breakpoint): Adjust to resume
14557 interface change, and to removed leave_stopped field.
14558 (resume_ptr): Delete.
14559 (struct thread_resume_array): New.
14560 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14561 resume interface change.
14562 (linux_continue_one_thread, linux_queue_one_thread)
14563 (resume_status_pending_p): Check if the resume field is NULL
14564 instead of checking the leave_stopped member.
14565 (linux_resume): Adjust to the target resume interface change.
14566 * spu-low.c (spu_resume): Adjust to the target resume interface
14568 * win32-low.c (win32_detach, win32_resume): Ditto.
14570 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14572 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14574 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14576 (linux_continue_one_thread): Only preserve the stepping flag if
14577 there's a pending breakpoint.
14579 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14581 * server.c (main): After the inferior having exited, call
14582 remote_close before exiting gdbserver.
14584 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14586 Fix size of FPSCR in Power 7 processors.
14587 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14588 (PPC_FEATURE_HAS_DFP): New #define.
14589 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14592 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14594 * server.c (handle_query) Whitespace and formatting.
14596 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14598 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14599 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14600 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14601 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14602 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14603 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14604 Makefile.in, configure.ac: Fix whitespace throughout.
14605 * configure: Regenerate.
14607 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14609 * inferiors.c (find_inferior): Make it safe for the callback
14610 function to delete the currently iterated inferior.
14612 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14614 * Makefile.in (linuw_low_h): Move higher.
14615 (thread-db.o): Depend on $(linux_low_h).
14617 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14619 Rename "process" to "lwp" throughout.
14621 * linux-low.c (all_processes): Rename to...
14622 (all_lwps): ... this.
14623 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14624 (add_process): Rename to ...
14625 (add_lwp): ... this. Adjust.
14626 (linux_create_inferior): Adjust.
14627 (linux_attach_lwp): Adjust.
14628 (linux_attach): Adjust.
14629 (linux_kill_one_process): Rename to ...
14630 (linux_kill_one_lwp): ... this. Adjust.
14631 (linux_kill): Adjust.
14632 (linux_detach_one_process): Rename to ...
14633 (linux_detach_one_lwp): ... this. Adjust.
14634 (linux_detach): Adjust.
14635 (check_removed_breakpoint): Adjust.
14636 (status_pending_p): Adjust.
14637 (linux_wait_for_process): Rename to ...
14638 (linux_wait_for_lwp): ... this. Adjust.
14639 (linux_wait_for_event): Adjust.
14640 (send_sigstop): Adjust.
14641 (wait_for_sigstop): Adjust.
14642 (stop_all_processes): Rename to ...
14643 (stop_all_lwps): ... this.
14644 (linux_resume_one_process): Rename to ...
14645 (linux_resume_one_lwp): ... this. Adjust.
14646 (linux_set_resume_request, linux_continue_one_thread)
14647 (linux_queue_one_thread, resume_status_pending_p)
14648 (usr_store_inferior_registers, regsets_store_inferior_registers)
14649 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14651 * linux-low.h (get_process): Rename to ...
14652 (get_lwp): ... this. Adjust.
14653 (get_thread_process): Rename to ...
14654 (get_thread_lwp): ... this. Adjust.
14655 (get_process_thread): Rename to ...
14656 (get_lwp_thread): ... this. Adjust.
14657 (struct process_info): Rename to ...
14658 (struct lwp_info): ... this.
14659 (all_processes): Rename to ...
14660 (all_lwps): ... this.
14661 * proc-service.c (ps_lgetregs): Adjust.
14662 * thread-db.c (thread_db_create_event, find_one_thread)
14663 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14665 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14667 * server.c (handle_query): Handle "qAttached".
14669 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14671 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14672 GPLv3, update license URL.
14674 2009-03-01 Doug Evans <dje@google.com>
14676 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14677 (server_h): Add gdb_signals.h.
14678 (signals.o): Update.
14679 * server.h (target_signal_from_host,target_signal_to_host_p)
14680 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14682 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14684 * remote-utils.c (getpkt): Also generate remote-debug
14685 information if noack_mode is set.
14687 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14689 * server.c (handle_query): Report qXfer:siginfo:read and
14690 qXfer:siginfo:write as supported and handle them.
14691 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14692 * linux-low.c (linux_xfer_siginfo): New.
14693 (linux_target_ops): Set it.
14695 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14697 * server.c (gdbserver_usage): Mention --remote-debug.
14698 (main): Accept '--remote-debug' switch.
14700 2009-01-18 Doug Evans <dje@google.com>
14702 * regcache.c (new_register_cache): No need to check result of xcalloc.
14703 * server.c (handle_search_memory): Back out calls to xmalloc,
14704 result is checked and error is returned to user upon failure.
14705 (handle_query): Ditto. Add more checks for result of malloc.
14706 (handle_v_cont): Check result of malloc, report error back to
14708 (handle_v_run): Ditto. Call freeargv.
14709 * server.h (freeargv): Declare.
14710 * utils.c (freeargv): New fn.
14712 2009-01-15 Doug Evans <dje@google.com>
14714 * gdbreplay.c (perror_with_name): Make arg const char *.
14715 * server.h (target_signal_to_name): Make return type const char *.
14716 * thread-db.c (thread_db_err_str): Make return type const char *.
14717 * utils.c (perror_with_name): Make arg const char *.
14719 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14721 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14722 when handling a EXIT_PROCESS_DEBUG_EVENT.
14724 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14726 * gdbreplay.c (gdbreplay_version): Update copyright year.
14727 * server.c (gdbserver_version): Likewise.
14729 2009-01-05 Doug Evans <dje@google.com>
14731 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14732 (handle_extended_wait): Improve comment.
14734 2008-12-13 Doug Evans <dje@google.com>
14736 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14737 * server.h (ATTR_MALLOC): New macro.
14738 (xmalloc,xcalloc,xstrdup): Declare.
14739 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14740 * inferiors.c: Ditto.
14741 * linux-low.c: Ditto.
14742 * mem-break.c: Ditto.
14743 * regcache.c: Ditto.
14744 * remote-utils.c: Ditto.
14747 * win32-low.c: Ditto.
14749 2008-12-12 Doug Evans <dje@google.com>
14751 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14752 in debugging printf.
14754 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14756 2008-12-09 Doug Evans <dje@google.com>
14758 * linux-low.h (struct process_info): Delete member tid, unused.
14759 * thread-db.c (find_one_thread): Update.
14760 (maybe_attach_thread): Update.
14762 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14764 * target.h (struct target_ops): Add qxfer_osdata member.
14765 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14767 (linux_qxfer_osdata): New functions.
14768 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14770 * server.c (handle_query): Handle "qXfer:osdata:read:".
14771 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14772 (buffer_xml_printf): New functions.
14773 * server.h (struct buffer): New.
14774 (buffer_grow_str, buffer_grow_str0): New macros.
14775 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14776 (buffer_xml_printf): Declare.
14778 2008-11-24 Doug Evans <dje@google.com>
14780 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14782 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14784 * server.c (handle_v_run): Always use the supplied argument list.
14786 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14788 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14789 (xtensa_regmap_table): Add entry for scompare1.
14791 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14793 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14794 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14795 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14796 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14797 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14798 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14799 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14800 XML target descriptions.
14801 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14802 when inferior is running on an ISA 2.05 or later processor. Add
14803 special case to return offset for full 64-bit slot of FPSCR when
14806 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14808 * Makefile.in (SFILES, clean): Added sparc64 files.
14809 (reg-sparc64.o, reg-sparc64.c): New.
14810 * configure.srv (sparc*-*-linux*): New configuration.
14811 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14812 syscall arguments for SPARC.
14813 (regsets_store_inferior_registers): Likewise.
14814 * linux-sparc-low.c: New file.
14816 2008-10-21 Doug Evans <dje@google.com>
14818 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14819 (READLINE_DIR,READLINE_DEP): Delete.
14820 (INTERNAL_CFLAGS): Update.
14821 (LINTFLAGS): Update.
14823 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14825 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14826 whole argv from the last run, not just argv[0].
14828 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14830 * regcache.c (new_register_cache): Return NULL if the register
14831 cache size isn't known yet.
14832 (free_register_cache): Avoid dereferencing a NULL regcache.
14834 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14836 * configure.srv: Merge MIPS and MIPS64.
14838 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14840 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14842 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14844 * Makefile.in: Add required vsx dependencies.
14846 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14847 Declare init_registers_powerpc_vsx32l.
14848 Declare init_registers_powerpc_vsx64l.
14849 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14850 (ppc_arch_setup): Check for VSX in hwcap.
14851 (ppc_fill_vsxregset): New function.
14852 (ppc_store_vsxregset): New function.
14853 Add new VSX entry in regset_info target_regsets.
14855 * configure.srv: Add new VSX dependencies.
14857 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14859 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14860 (remote_open): Set or clear transport_is_reliable.
14861 (putpkt_binary): Don't expect acks in noack mode.
14862 (getpkt): Don't send ack/nac in noack mode.
14863 * server.c (handle_general_set): Handle QStartNoAckMode.
14864 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14866 (main): Reset noack_mode on every connection.
14867 * server.h (noack_mode): Declare.
14869 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14871 * Makefile.in (GDBREPLAY_OBS): New variable.
14872 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14874 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14875 Daniel Jacobowitz <dan@codesourcery.com>
14877 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14878 (usr_store_inferior_registers): Likewise.
14879 (regsets_store_inferior_registers): Likewise.
14881 2008-07-31 Rolf Jansen <rj@surtec.com>
14882 Pedro Alves <pedro@codesourcery.com>
14884 * configure.ac: Check for memmem declaration.
14885 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14886 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14887 (disable_packet_qfThreadInfo): Unconditionally compile.
14888 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14889 * configure, config.in: Regenerate.
14891 2008-07-28 Doug Kwan <dougkwan@google.com>
14893 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14894 (linux_write_memory): Remove declaration of errno.
14896 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14898 * linux-low.c (handle_extended_wait): Do not use "status"
14899 variable uninitialized.
14901 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14903 * server.c (handle_v_attach): Inhibit reporting dll changes.
14905 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14907 * remote-utils.c (prepare_resume_reply): If requested, don't
14908 output "thread:TID" in the T stop reply.
14910 * server.c (disable_packet_vCont, disable_packet_Tthread)
14911 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14912 (handle_query): If requested, disable support for qC, qfThreadInfo
14914 (handle_v_requests): If requested, disable support for vCont.
14915 (gdbserver_show_disableable): New.
14916 (main): Handle --disable-packet and --disable-packet=LIST.
14918 * server.h (disable_packet_vCont, disable_packet_Tthread)
14919 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14921 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14923 * server.c (gdbserver_usage): Mention --version.
14925 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14927 * Makefile.in (gdbreplay.o): New rule.
14929 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14931 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14932 message, not gdbserver.
14934 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14935 Nathan Sidwell <nathan@codesourcery.com>
14936 Joseph Myers <joseph@codesourcery.com>
14938 * acinclude.m4: Include ../../config/acx.m4.
14939 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14940 * configure, config.in: Regenerate.
14941 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14942 * server.c (gdbserver_version): Print PKGVERSION.
14943 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14944 (main): Adjust gdbserver_usage calls.
14945 * gdbreplay.c (version, host_name): Add declarations.
14946 (gdbreplay_version, gdbreplay_usage): New.
14947 (main): Accept --version and --help options.
14949 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14951 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14952 (arm_breakpoint_at): Handle Thumb.
14953 (the_low_target): Add comment.
14955 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14957 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14959 2008-05-09 Doug Evans <dje@google.com>
14961 * server.h (decode_search_memory_packet): Declare.
14962 * remote-utils.c (decode_search_memory_packet): New fn.
14963 * server.c (handle_search_memory_1): New fn.
14964 (handle_search_memory): New fn.
14965 (handle_query): Process qSearch:memory packets.
14967 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14969 * regcache.c (registers_length): Remove.
14970 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14971 full register packet.
14972 * regcache.h (registers_length): Remove prototype.
14973 * server.h (PBUFSIZ): Define to 16384.
14975 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14977 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14978 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14979 powerpc-64l.o, and powerpc-altivec64l.o.
14980 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14981 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14982 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14983 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14984 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14987 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14988 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14989 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14990 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14991 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14992 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14993 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14994 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14995 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14996 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14999 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15000 (init_registers_powerpc_32l): ... this new prototype.
15001 (init_registers_powerpc_32): Remove, replace by ...
15002 (init_registers_powerpc_altivec32l): ... this new prototype.
15003 (init_registers_powerpc_e500): Remove, replace by ...
15004 (init_registers_powerpc_e500l): ... this new prototype.
15005 (init_registers_ppc64): Remove, replace by ...
15006 (init_registers_powerpc_64l): ... this new prototype.
15007 (init_registers_powerpc_64): Remove, replace by ...
15008 (init_registers_powerpc_altivec64l): ... this new prototype.
15009 (ppc_num_regs): Set to 73.
15010 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15011 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15012 (ppc_cannot_store_register): Handle orig_r3 and trap.
15013 (ppc_arch_setup): Update init_registers_... calls.
15014 (ppc_fill_gregset): Handle orig_r3 and trap.
15016 * inferiors.c (clear_inferiors): Reset current_inferior.
15018 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15020 * acinclude.m4: Add override.m4.
15021 * configure: Regenerate.
15023 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15025 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15026 initial call to init_register_ppc64.
15028 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15030 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15031 single powerpc*-*-linux* case.
15032 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15034 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15036 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15037 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15039 * linux-ppc-low.c: Include <elf.h>.
15040 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15041 (ppc_hwcap): New global variable.
15042 (ppc_regmap): Remove __SPE__ #ifdef sections.
15043 (ppc_regmap_e500): New global variable.
15044 (ppc_cannot_store_register): Update __SPE__ special case.
15045 (ppc_get_hwcap): New function.
15046 (ppc_arch_setup): Use it to determine whether inferior supports
15047 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15048 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15049 Do not access registers if target does not support AltiVec.
15050 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15051 Do not access registers if target does not support SPE.
15052 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15054 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15056 * linux-low.c (disabled_regsets, num_regsets): New.
15057 (use_regsets_p): Delete.
15058 (linux_wait_for_process): Clear disabled_regsets.
15059 (regsets_fetch_inferior_registers): Check and set it.
15060 (regsets_store_inferior_registers): Likewise.
15061 (linux_fetch_registers, linux_store_registers): Do not use
15063 (initialize_low): Allocate disabled_regsets.
15065 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15067 * Makefile.in (LIBOBJS): New.
15068 (OBS): Use LIBOBJS.
15069 (memmem.o): New rule.
15070 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15071 * configure: Regenerated.
15073 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15075 * server.c (handle_query): Never return "unsupported" for
15076 qXfer:features:read queries.
15078 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15080 * server.c (get_features_xml): Fix inverted condition.
15081 (handle_query): Always support qXfer:feature:read.
15083 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15085 * server.c (wrapper_argv): New.
15086 (start_inferior): Handle wrapper_argv. If set, expect an extra
15088 (gdbserver_usage): Document --wrapper.
15089 (main): Parse --wrapper.
15091 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15093 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15094 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15095 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15096 (ppc_set_pc): Likewise.
15097 (ppc_arch_setup): New function.
15098 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15099 of collect_register.
15100 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15102 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15104 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15105 instead of linux-ppc64-low.o.
15106 * linux-ppc64-low.c: Remove file.
15107 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15108 (linux-ppc64-low.o): Remove rule.
15110 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15111 (init_registers_powerpc_64): Likewise.
15112 (ppc_regmap): Conditionally define depending on __powerpc64__.
15113 (ppc_cannot_store_register): Do not special-case "fpscr" when
15114 compiled on __powerpc64__.
15115 (ppc_collect_ptrace_register): New function.
15116 (ppc_supply_ptrace_register): New function.
15117 (ppc_breakpoint): Change type to "unsigned int".
15118 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15119 (the_low_target): Conditionally provide initializers for the
15120 arch_setup member depending on __powerpc64__. Install
15121 collect_ptrace_register and supply_ptrace_register members.
15123 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15125 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15126 * server.c (gdbserver_xmltarget): Define.
15127 (get_features_xml): Use it to replace "target.xml" and arch_string.
15129 * configure.srv: Remove srv_xmltarget. Add XML files that were
15130 mentioned there to srv_xmlfiles instead. Remove conditional tests
15131 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15132 srv_xmlfiles and srv_regobj to include all possible choices.
15133 * configure.ac (srv_xmltarget): Remove.
15134 (srv_xmlfiles): Do not add "target.xml".
15135 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15136 checks for supplementary target information.
15137 * configure: Regenerate.
15138 * Makefile.in (XML_TARGET): Remove.
15139 (target.xml): Remove rule.
15140 (clean): Do not clean up target.xml.
15141 (.PRECIOUS): Do not mention target.xml.
15143 * target.h (struct target_ops): Remove arch_string member.
15144 * linux-low.c (linux_arch_string): Remove.
15145 (linux_target_ops): Remove arch_string initializer.
15146 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15147 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15148 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15149 * spu-low.c (spu_arch_string): Remove.
15150 (spu_target_ops): Remove arch_string initializer.
15151 * win32-low.c (win32_arch_string): Remove.
15152 (win32_target_ops): Remove arch_string initializer.
15153 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15154 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15155 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15157 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15159 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15160 by collect_ptrace_register and supply_ptrace_register hooks.
15161 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15162 instead of checking for the_low_target.left_pad_xfer.
15163 (usr_store_inferior_registers): Use collect_ptrace_register callback
15164 instead of checking for the_low_target.left_pad_xfer.
15166 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15167 (s390_supply_ptrace_register): Likewise.
15168 (s390_fill_gregset): Call s390_collect_ptrace_register.
15169 (the_low_target): Update.
15171 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15172 (ppc_supply_ptrace_register): Likewise.
15173 (the_low_target): Update.
15175 * linux-i386-low.c (the_low_target): Update.
15176 * linux-x86-64-low.c (the_low_target): Update.
15178 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15180 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15181 reg-s390.o and reg-s390x.o.
15183 * linux-low.c (new_inferior): New global variable.
15184 (linux_create_inferior, linux_attach): Set it.
15185 (linux_wait_for_process): Call the_low_target.arch_setup after the
15186 target has stopped for the first time.
15187 (initialize_low): Do not call the_low_target.arch_setup.
15189 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15190 (s390_set_pc): Likewise.
15191 (s390_arch_setup): New function.
15192 (the_low_target): Use s390_arch_setup as arch_setup routine.
15194 * regcache.c (realloc_register_cache): New function.
15195 (set_register_cache): Call it for each existing regcache.
15197 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15199 * server.h (init_registers): Remove prototype.
15201 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15202 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15203 instead of init_registers ().
15204 * linux-arm-low.c (init_registers_arm): Add prototype.
15205 (init_registers_arm_with_iwmmxt): Likewise.
15206 (the_low_target): Add initializer for arch_setup field.
15207 * linux-cris-low.c (init_registers_cris): Add prototype.
15208 (the_low_target): Add initializer for arch_setup field.
15209 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15210 (the_low_target): Add initializer for arch_setup field.
15211 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15212 (the_low_target): Add initializer for arch_setup field.
15213 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15214 (the_low_target): Add initializer for arch_setup field.
15215 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15216 (the_low_target): Add initializer for arch_setup field.
15217 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15218 (the_low_target): Add initializer for arch_setup field.
15219 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15220 (init_registers_mips64_linux): Likewise.
15221 (the_low_target): Add initializer for arch_setup field.
15222 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15223 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15224 (the_low_target): Add initializer for arch_setup field.
15225 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15226 (init_registers_powerpc_64): Likewise.
15227 (the_low_target): Add initializer for arch_setup field.
15228 * linux-s390-low.c (init_registers_s390): Add prototype.
15229 (init_registers_s390x): Likewise.
15230 (the_low_target): Add initializer for arch_setup field.
15231 * linux-sh-low.c (init_registers_sh): Add prototype.
15232 (the_low_target): Add initializer for arch_setup field.
15233 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15234 (the_low_target): Add initializer for arch_setup field.
15235 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15236 (the_low_target): Add initializer for arch_setup field.
15238 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15239 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15240 instead of init_registers ().
15241 * win32-arm-low.c (init_registers_arm): Add prototype.
15242 (the_low_target): Add initializer for arch_setup field.
15243 * win32-i386-low.c (init_registers_i386): Add prototype.
15244 (the_low_target): Add initializer for arch_setup field.
15246 * spu-low.c (init_registers_spu): Add prototype.
15247 (initialize_low): Call initialie_registers_spu () instead of
15248 initialize_registers ().
15250 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15252 * server.c (handle_v_requests): When handling the vRun and vAttach
15253 packets, if already debugging a process, don't kill it. Return an
15256 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15258 * server.c (handle_query): Correct length check.
15260 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15262 * win32-low.c (do_initial_child_stuff): Add process handle
15263 parameter. Set current_process_handle and current_process_id from the
15264 parameters. Clear globals.
15265 (win32_create_inferior): Don't set current_process_handle and
15266 current_process_id here. Instead pass them on the call to
15267 do_initial_child_stuff.
15268 (win32_attach): Likewise.
15269 (win32_clear_inferiors): New.
15270 (win32_kill): Don't close the current process handle or the
15271 current thread handle here. Instead call win32_clear_inferiors.
15272 (win32_detach): Don't open a new handle to the process. Call
15273 win32_clear_inferiors.
15274 (win32_join): Don't rely on current_process_handle; open a new
15275 handle using the process id.
15276 (win32_wait): Call win32_clear_inferiors when the inferior process
15279 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15281 * server.c (monitor_show_help): Add "exit".
15283 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15285 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15286 (clean): Add reg-xtensa.c.
15287 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15288 * configure.srv (xtensa*-*-linux*) New target.
15289 * linux-xtensa-low.c: New.
15290 * xtensa-xtregs.c: New.
15292 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15294 * hostio.c: Don't include errno.h.
15295 (errno_to_fileio_errno): Move to hostio-errno.
15296 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15297 error number outputting to the target->hostio_last_error callback.
15298 (hostio_packet_error): Use FILEIO_EINVAL directly.
15299 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15300 calls to hostio_error.
15301 * hostio-errno.c: New.
15302 * server.h (hostio_last_error_from_errno): Declare.
15303 * target.h (target_ops): Add hostio_last_error member.
15304 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15305 as hostio_last_error handler.
15306 * spu-low.c (spu_target_ops): Likewise.
15307 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15308 (wince_hostio_last_error): New functions.
15309 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15310 as hostio_last_error handler.
15311 (win32_target_ops) [!_WIN32_WCE]: Register
15312 hostio_last_error_from_errno as hostio_last_error handler.
15313 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15314 (hostio-errno.o): New rule.
15315 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15316 * configure.srv (srv_hostio_err_objs): New variable. Default to
15318 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15319 * configure: Regenerate.
15321 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15323 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15324 (linux_kill, linux_detach): Clean up the process list.
15325 * remote-utils.c (remote_open): Improve port number parsing.
15326 (putpkt_binary, input_interrupt): Only send interrupts if the target
15328 * server.c (extended_protocol): Make static.
15329 (attached): Define earlier.
15330 (exit_requested, response_needed, program_argv): New variables.
15331 (target_running): New.
15332 (start_inferior): Clear attached here.
15333 (attach_inferior): Set attached here.
15334 (require_running): Define.
15335 (handle_query): Use require_running and target_running. Implement
15337 (handle_v_attach, handle_v_run): New.
15338 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15339 (gdbserver_usage): Update.
15340 (main): Redo argument parsing. Handle --debug and --multi. Handle
15341 --attach along with other options or after the port. Save
15342 program_argv. Support no initial program. Resynchronize
15343 communication with GDB after an error. Handle "monitor exit".
15344 Use require_running and target_running. Always allow the extended
15345 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15346 restart in extended mode.
15347 * README: Refer to the GDB manual. Update --attach usage.
15349 2007-12-20 Andreas Schwab <schwab@suse.de>
15351 * linux-low.c (STACK_SIZE): Define.
15352 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15353 (linux_test_for_tracefork): Likewise.
15355 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15357 * linux-low.c (linux_wait_for_event): Update messages. Do not
15358 reinsert auto-delete breakpoints.
15359 * mem-break.c (struct breakpoint): Change return type of handler to
15361 (set_breakpoint_at): Update handler type.
15362 (reinsert_breakpoint_handler): Return 1 instead of calling
15364 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15366 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15367 * mem-break.h (set_breakpoint_at): Update handler type.
15368 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15369 * win32-low.c (auto_delete_breakpoint): New.
15370 (get_child_debug_event): Use it.
15372 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15374 * configure.ac: Check for pread and pwrite.
15375 * hostio.c (handle_pread): Fall back to lseek and read.
15376 (handle_pwrite): Fall back to lseek and write.
15377 * config.in, configure: Regenerated.
15379 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15381 * server.c (myresume): Add own_buf argument.
15382 (main): Update calls.
15384 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15386 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15387 * remote-utils.c (remote_open): Do not call disable_async_io.
15388 (block_async_io): Delete.
15389 (unblock_async_io): Make static.
15390 (initialize_async_io): New.
15391 * server.c (handle_v_cont): Handle async I/O here.
15392 (myresume): Likewise. Move other common resume tasks here...
15393 (main): ... from here. Call initialize_async_io. Disable async
15394 I/O before the main loop.
15395 * server.h (initialize_async_io): Declare.
15396 (block_async_io, unblock_async_io): Delete prototypes.
15397 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15399 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15401 * remote-utils.c (readchar): Allow binary data in received messages.
15403 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15405 * win32-low.c (attaching): New global.
15406 (win32_create_inferior): Clear the `attaching' global.
15407 (win32_attach): Set the `attaching' global.
15408 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15409 attaching. Only set a breakpoint at the entry point if not
15412 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15414 * server.c (main): Don't report dll events on the initial
15415 connection on attaches.
15417 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15419 * server.c (main): Relax numerical bases supported for the pid of
15420 the --attach command line argument.
15422 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15424 * win32-low.c (win32_attach): Call OpenProcess before
15425 DebugActiveProcess, not after. Add last error output to error
15428 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15430 * win32-low.c (win32_get_thread_context)
15431 (win32_set_thread_context): New functions.
15432 (thread_rec): Use win32_get_thread_context.
15433 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15434 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15437 2007-12-03 Leo Zayas
15438 Pedro Alves <pedro_alves@portugalmail.pt>
15440 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15442 (child_add_thread): Minor cleanup.
15443 (child_continue): Resume artificially suspended threads before
15444 calling ContinueDebugEvent.
15445 (suspend_one_thread): New.
15446 (fake_breakpoint_event): New.
15447 (get_child_debug_event): Change return type to int. Check here if
15448 gdb sent an interrupt request. If a soft interrupt was requested,
15449 fake a breakpoint event. Return 0 if there is no event to handle,
15451 (win32_wait): Don't check here if gdb sent an interrupt request.
15452 Ensure there is a valid event to handle.
15453 (win32_request_interrupt): Add soft interruption method as last
15456 2007-12-03 Leo Zayas
15457 Pedro Alves <pedro_alves@portugalmail.pt>
15459 * win32-low.h (win32_thread_info): Add descriptions to the
15460 structure members. Replace `suspend_count' counter by a
15462 * win32-low.c (thread_rec): Update condition of when to get the
15463 context from the inferior. Rely on ContextFlags being set if it
15464 has already been retrieved. Only suspend the inferior thread if
15465 we haven't already. Warn if that fails.
15466 (continue_one_thread): s/suspend_count/suspended/. Only call
15467 ResumeThread once. Warn if that fails.
15469 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15471 * win32-low.c (win32_wait): Don't read from the inferior when it
15472 has already exited.
15474 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15476 * Makefile.in (win32_low_h): New variable.
15477 (win32-low.o): Add dependency on $(win32_low_h).
15478 (win32-arm-low.o, win32-i386-low.o): New rules.
15480 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15482 * hostio.c: Correct copyright year.
15484 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15486 * Makefile.in (OBS): Add hostio.o.
15487 (hostio.o): New rule.
15488 * server.h (handle_vFile): Declare.
15489 * hostio.c: New file.
15490 * server.c (handle_v_requests): Take packet_len and new_packet_len
15491 for binary packets. Call handle_vFile.
15492 (main): Update call to handle_v_requests.
15494 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15496 * linux-low.c: Include <sched.h>.
15498 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15500 * linux-low.c (linux_tracefork_grandchild): New.
15501 (linux_tracefork_child): Use clone.
15502 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15504 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15506 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15508 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15510 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15512 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15514 * inferiors.c (change_inferior_id): Delete.
15515 (add_pid_to_list, pull_pid_from_list): New.
15516 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15517 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15518 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15519 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15520 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15521 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15522 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15523 (using_threads): Always set to 1.
15524 (handle_extended_wait): New.
15525 (add_process): Do not set TID.
15526 (linux_create_inferior): Set must_set_ptrace_flags.
15527 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15528 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15529 (linux_thread_alive): Rename TID argument to LWPID.
15530 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15531 (linux_wait_for_event): Do not use TID or check using_threads. Update
15532 call to dead_thread_notify. Call handle_extended_wait.
15533 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15534 (send_sigstop): Delete sigstop_sent.
15535 (wait_for_sigstop): Avoid TID.
15536 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15537 (linux_test_for_tracefork): New.
15538 (linux_lookup_signals): Use thread_db_active and
15539 linux_supports_tracefork_flag.
15540 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15541 * linux-low.h (get_process_thread): Avoid TID.
15542 (struct process_ifo): Move thread_known and tid to the end. Remove
15544 (linux_attach_lwp, thread_db_init): Update prototypes.
15545 * server.h (change_inferior_id): Delete prototype.
15546 (add_pid_to_list, pull_pid_from_list): New prototypes.
15547 * thread-db.c (thread_db_use_events): New.
15548 (find_first_thread): Rename to...
15549 (find_one_thread): ...this. Update callers and messages. Do not
15550 call fatal. Check thread_db_use_events. Do not call
15551 change_inferior_id or new_thread_notify.
15552 (maybe_attach_thread): Update. Do not call new_thread_notify.
15553 (thread_db_init): Set thread_db_use_events. Check use_events.
15554 * utils.c (fatal, warning): Correct message prefix.
15556 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15558 * Makefile.in (clean): Remove new files.
15559 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15560 (powerpc-64.o, powerpc-64.c): New rules.
15561 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15562 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15564 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15566 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15567 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15568 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15569 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15570 (target_regsets): Add AltiVec and SPE register sets.
15571 * configure.ac: Check for AltiVec and SPE.
15572 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15573 (ppc_fill_vrregset, ppc_store_vrregset): New.
15574 (target_regsets): Add AltiVec register set.
15575 * configure: Regenerated.
15577 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15579 * linux-low.c (O_LARGEFILE): Define.
15580 (linux_read_memory): Use /proc/PID/mem.
15581 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15582 * configure, config.in: Regenerated.
15584 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15586 * linux-low.c (linux_wait_for_event): Do not pass signals while
15589 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15591 * win32-low.c (create_process): New.
15592 (win32_create_inferior): Use create_process instead of
15593 CreateProcess. If create_process failed retry appending an ".exe"
15594 suffix. Store the GetLastError result immediatelly after
15595 create_process calls and use it on the call to error.
15597 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15599 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15601 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15603 * configure.ac: Switch license to GPLv3.
15605 2007-08-01 Michael Snyder <msnyder@access-company.com>
15607 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15609 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15611 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15613 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15614 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15615 CloseToolhelp32Snapshot.
15616 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15617 CloseToolhelp32Snapshot.
15619 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15621 * server.c (main): Check for inferior exit before main loop.
15623 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15625 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15626 instead of on tmp_desc.
15628 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15629 Daniel Jacobowitz <dan@codesourcery.com>
15631 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15632 (add_thread): Minor cleanups.
15633 (clear_inferiors): Move lower in the file. Clear the DLL
15635 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15636 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15637 (xml_escape_text): New.
15638 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15640 (handle_v_cont): Report errors.
15641 (gdbserver_version): Update.
15642 (main): Correct size of own_buf. Do not report initial DLL events.
15643 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15644 (unloaded_dll, xml_escape_text): New.
15645 * win32-low.c (enum target_waitkind): Update comments.
15646 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15647 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15648 (win32_EnumProcessModules, win32_GetModuleInformation)
15649 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15650 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15651 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15652 (win32_Module32First, win32_Module32Next, load_toolhelp)
15653 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15654 (get_child_debug_event): Handle DLL events.
15655 (win32_wait): Likewise.
15657 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15659 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15660 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15662 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15664 * win32-low.c (handle_output_debug_string): Ignore event if not
15667 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15669 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15671 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15673 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15675 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15677 * inferiors.c (change_inferior_id): Add comment.
15678 * linux-low.c (check_removed_breakpoint): Add an early
15679 prototype. Improve debug output.
15680 (linux_attach): Doc update.
15681 (linux_detach_one_process, linux_detach): Clean up before releasing
15683 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15684 * linux-low.h (struct process_info): Doc improvement.
15685 * mem-break.c (delete_all_breakpoints): New.
15686 * mem-break.h (delete_all_breakpoints): New prototype.
15687 * thread-db.c (find_first_thread): New.
15688 (thread_db_create_event): Call it instead of
15689 thread_db_find_new_threads. Clean up unused variables.
15690 (maybe_attach_thread): Remove first thread handling.
15691 (thread_db_find_new_threads): Use find_first_thread.
15692 (thread_db_get_tls_address): Likewise.
15694 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15696 * thread-db.c (thread_db_find_new_threads): Add prototype.
15697 (thread_db_create_event): Check for the main thread before adding
15699 (maybe_attach_thread): Only enable event reporting if TID == 0.
15700 (thread_db_get_tls_address): Check for new threads.
15702 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15704 * linux-low.c (linux_create_inferior): Try execv before execvp.
15705 * spu-low.c (spu_create_inferior): Likewise.
15707 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15709 * linux-low.c (linux_create_inferior): Change execv to execvp.
15710 * spu-low.c (spu_create_inferior): Likewies.
15712 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15714 * Makefile.in (clean): Clean new files instead of deleted ones.
15715 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15716 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15718 * configure.srv: Specify XML files and new regformats for MIPS and
15720 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15721 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15722 an entry for the restart register.
15723 (mips_cannot_fetch_register, mips_cannot_store_register)
15724 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15725 register names to match the XML descriptions.
15726 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15727 restart register instead of $0.
15729 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15730 Markus Deuling <deuling@de.ibm.com>
15732 * remote-utils.c (decode_xfer_write): New function.
15733 * server.h (decode_xfer_write): Add prototype.
15734 * server.c (handle_query): Add PACKET_LEN argument. Support
15735 qXfer:spu:read and qXfer:spu:write packets.
15736 (main): Pass packet_len to handle_query.
15737 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15738 * target.h (target_ops): Add qxfer_spu.
15740 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15742 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15743 accessing non-seekable spufs files.
15745 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15747 * server.c (handle_query): Add reply for qC packet.
15749 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15750 Leo Zayas <lerele@champenstudios@com>
15752 * server.h (check_remote_input_interrupt_request): New function.
15753 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15754 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15755 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15756 (check_remote_input_interrupt_request): New function.
15757 * server.h (check_remote_input_interrupt_request): Declare.
15758 * win32-low.c (winapi_DebugBreakProcess,
15759 winapi_GenerateConsoleCtrlEvent): New typedefs.
15760 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15762 (win32_wait): Check for remote interrupt request
15763 with check_remote_input_interrupt_request.
15764 (win32_request_interrupt): New function.
15765 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15767 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15769 * win32-low.c (debug_registers_changed,
15770 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15771 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15772 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15773 (thread_rec): Get context using the low target.
15774 (child_add_thread): Call thread_added on the low target,
15775 which does the same thing.
15777 (do_initial_child_stuff): Remove debug registers references.
15778 Set context using the low target. Resume threads after
15779 setting the contexts.
15780 (child_continue): Remove dead variable. Remove debug
15781 registers references.
15782 (child_fetch_inferior_registers): Go through the low target.
15783 (do_child_store_inferior_registers): Remove.
15784 (child_store_inferior_registers): Go through the low target.
15785 (win32_resume): Remove debug registers references.
15786 Set context using the low target.
15787 (handle_exception): Change return type to void. Don't record
15788 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15789 first chance exception.
15790 (get_child_debug_event): Change return type to void. Remove
15791 goto loop. Always return after waiting for debug event.
15792 (win32_wait): Convert to switch statement. Handle spurious
15795 * win32-i386-low.c (debug_registers_changed,
15796 debug_registers_used): New.
15797 (initial_stuff): Rename to ...
15798 (i386_initial_stuff): ... this. Clear debug registers
15800 (store_debug_registers): Delete.
15801 (i386_get_thread_context): New.
15802 (load_debug_registers): Delete.
15803 (i386_set_thread_context): New.
15804 (i386_thread_added): New.
15805 (single_step): Rename to ...
15806 (i386_single_step): ... this.
15807 (do_fetch_inferior_registers): Rename to ...
15808 (i386_fetch_inferior_register): ... this.
15809 (i386_store_inferior_register): New.
15810 (the_low_target): Adapt to new interface.
15812 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15813 (arm_get_thread_context): New.
15814 (arm_set_thread_context): New.
15816 (do_fetch_inferior_registers): Rename to ...
15817 (arm_fetch_inferior_register): ... this.
15818 (arm_store_inferior_register): New.
15819 (arm_wince_breakpoint): Reimplement as unsigned long.
15820 (arm_wince_breakpoint_len): Define.
15821 (the_low_target): Adapt to new interface.
15823 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15824 load_debug_registers. Add get_thread_context, set_thread_context,
15825 thread_added and store_inferior_register. Rename
15826 fetch_inferior_registers to fetch_inferior_register.
15827 (regptr): Remove declaration.
15829 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15831 * linux-low.c (linux_detach): Change return type to int. Return 0.
15832 * spu-low.c (spu_detach): Likewise.
15834 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15836 * target.h (target_ops): Change return type of detach to int.
15838 (join_inferior): New.
15839 * server.c (main): Don't skip detach support on mingw32.
15840 If the inferior doesn't support detaching return error.
15841 Call join_inferior instead of using waitpid.
15842 * linux-low.c (linux_join): New.
15843 (linux_target_op): Add linux_join.
15844 * spu-low.c (spu_join): New.
15845 (spu_target_ops): Add spu_join.
15846 * win32-low.c (win32_detach): Adapt to new interface.
15847 Reopen current_process_handle before detaching. Issue a child
15848 resume before detaching.
15850 (win32_target_op): Add win32_join.
15852 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15854 * win32-low.c (win32-attach): Fix return value.
15855 * target.h (target_ops): Describe ATTACH return values.
15857 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15859 * win32-low.c (GETPROCADDRESS): Define.
15860 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15861 (winapi_DebugSetProcessKillOnExit): Likewise.
15862 (win32_create_inferior): Force usage of ansi CreateProcessA.
15863 (win32_attach): Use GETPROCADDRESS.
15864 (win32_detach): Likewise.
15866 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15868 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15870 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15872 * win32-low.c: Commit leftover changes from 2007-03-29.
15874 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15876 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15877 fields short instead of int. Add explicit padding.
15878 (i387_cache_to_fsave): Remove unnecessary casts.
15879 (i387_fsave_to_cache): Doc fix.
15880 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15882 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15884 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15885 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15887 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15889 * configure.srv (arm*-*-mingw32ce*): Move near the other
15892 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15894 * configure.ac: Add errno checking.
15895 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15896 sys/file.h and malloc.h.
15897 (AC_CHECK_DECLS): Add perror.
15898 (srv_mingwce): Handle.
15899 * configure.srv (i[34567]86-*-cygwin*): Add
15900 win32-i386-low.o to srv_tgtobj.
15901 (i[34567]86-*-mingw*): Likewise.
15902 (arm*-*-mingw32ce*): Add case.
15903 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15904 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15905 [__MINGW32CE__] (strerror): New function.
15906 [__MINGW32CE__] (errno): Define to GetLastError.
15907 [__MINGW32CE__] (COUNTOF): New macro.
15908 (remote_open): Remove extra close call.
15909 * mem-break.c (delete_breakpoint_at): New function.
15910 * mem-break.h (delete_breakpoint_at): Declare.
15911 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15912 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15913 [USE_WIN32API] (read, write): Add char* casts.
15914 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15915 * server.h: Include wincecompat.h on Windows CE.
15916 [HAVE_ERRNO_H]: Check.
15917 (perror): Declare if not declared.
15918 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15919 (perror_with_name): Remove errno declaration.
15920 * wincecompat.h: New.
15921 * wincecompat.c: New.
15922 * win32-low.h: New.
15923 * win32-arm-low.c: New.
15924 * win32-i386-low.c: New.
15925 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15926 (OUTMSG2): Make it safe.
15928 (COUNTOF): New macro.
15929 (NUM_REGS): Get it from the low target.
15930 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15931 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15932 (thread_rec): Let low target handle debug registers.
15933 (child_add_thread): Likewise.
15934 (child_init_thread_list): Likewise.
15935 (continue_one_thread): Likewise.
15937 (do_child_fetch_inferior_registers): Move to ...
15938 * win32-i386-low.c: ... here, and rename to ...
15939 (do_fetch_inferior_registers): ... this.
15940 * win32-low.c (child_fetch_inferior_registers):
15941 Go through the low target.
15942 (do_child_store_inferior_registers): Use regptr.
15943 (strwinerror): New function.
15944 (win32_create_inferior): Handle Windows CE.
15945 Use strwinerror instead of strerror on Windows error
15946 codes. Add program to the error output.
15947 Don't close the main thread handle on Windows CE.
15948 (win32_attach): Use coredll.dll on Windows CE.
15949 (win32_kill): Close current process and current
15951 (win32_detach): Use coredll.dll on Windows CE.
15952 (win32_resume): Let low target handle debug registers, and
15954 (handle_exception): Add/Remove initial breakpoint. Avoid
15955 non-existant WSTOPSIG on Windows CE.
15956 (win32_read_inferior_memory): Cast to remove warning.
15957 (win32_arch_string): Go through the low target.
15958 (initialize_low): Call set_breakpoint_data with the low
15959 target's breakpoint.
15960 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15961 FOP_REGNUM, mappings): Move to ...
15962 * win32-i386-low.c: ... here.
15963 * win32-low.c (win32_thread_info): Move to ...
15964 * win32-low.h: ... here.
15965 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15966 win32-arm-low.c and wincecompat.c.
15967 (all:): Add $EXEEXT.
15968 (install-only:): Likewise.
15969 (gdbserver:): Likewise.
15970 (gdbreplay:): Likewise.
15971 * config.in: Regenerate.
15972 * configure: Regenerate.
15974 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15976 * win32-low.c: Rename typedef thread_info to
15977 win32_thread_info throughout.
15979 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15981 * win32-i386-low.c: Rename to ...
15982 * win32-low.c: ... this.
15983 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15984 * Makefile.in: Likewise.
15986 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15988 * remote-utils.c (monitor_output): Constify msg parameter.
15989 * server.h (monitor_output): Likewise.
15990 * win32-i386-low.c (handle_output_debug_string): New.
15991 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15992 handle_output_debug_string.
15993 (get_child_debug_event): Likewise.
15995 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15997 * server.c (main): Correct strtoul check.
15999 2007-03-27 Jon Ringle <jon@ringle.org>
16001 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16003 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16005 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16007 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16009 * terminal.h: Check HAVE_SGTTY_H.
16011 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16013 * remote-utils.c (remote_open): Print out the assigned port number.
16015 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16017 * remote-utils.c (monitor_output): New function.
16018 * server.c (debug_threads): Define here.
16019 (monitor_show_help): New function.
16020 (handle_query): Handle qRcmd.
16021 (main): Do not handle 'd' packet.
16022 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16023 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16026 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16028 * Makefile.in (EXEEXT): New.
16029 (clean): Use $(EXEEXT).
16031 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16033 * target.h (target_ops): Rename send_signal to request_interrupt,
16034 and remove enum target_signal parameter.
16035 * linux-low.c (linux_request_interrupt): Rename from
16036 linux_send_signal, and always send SIGINT.
16037 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16038 and always send SIGINT.
16039 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16041 (input_interrupt): Likewise.
16043 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16045 * server.c (get_features_xml): Check if target implemented
16047 * win32-i386-low.c (win32_arch_string): New.
16048 (win32_target_ops): Add win32_arch_string as arch_string member.
16050 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16052 * spu-low.c (spu_arch_string): New.
16053 (spu_target_ops): Add spu_arch_string.
16055 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16057 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16058 * configure.ac: Do not check for terminal.h.
16059 * configure, config.in: Regenerated.
16061 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16063 * Makefile.in (OBS): Add $(XML_BUILTIN).
16064 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16066 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16067 (arm-with-iwmmxt.c): New.
16068 * config.in, configure: Regenerate.
16069 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16070 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16071 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16072 (arm*-*-linux*): Add iWMMXt and regset support.
16073 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16074 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16075 (arm_store_wmmxregset, target_regsets): New.
16076 * server.c (get_features_xml): Take annex argument. Check builtin
16078 (handle_query): Handle multiple annexes.
16080 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16082 * remote-utils.c [USE_WIN32API] (read, write): Define.
16083 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16086 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16088 * linux-i386-low.c (the_low_target): Set arch_string.
16089 * linux-x86-64-low.c (the_low_target): Likewise.
16090 * linux-low.c (linux_arch_string): New.
16091 (linux_target_ops): Add it.
16092 * linux-low.h (struct linux_target_ops): Add arch_string.
16093 * server.c (write_qxfer_response): Use const void * for DATA.
16094 (get_features_xml): New.
16095 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16096 * target.h (struct target_ops): Add arch_string method.
16098 2007-01-03 Denis Pilat <denis.pilat@st.com>
16099 Daniel Jacobowitz <dan@codesourcery.com>
16101 * linux-low.c (linux_kill): Handle being called with no threads.
16102 * win32-i386-low.c (win32_kill): Likewise.
16103 (get_child_debug_event): Clear current_process_handle.
16105 2006-12-30 Denis PILAT <denis.pilat@st.com>
16106 Daniel Jacobowitz <dan@codesourcery.com>
16108 * remote-utils.c (remote_open): Check the type of specified
16109 serial port devices before opening them.
16110 * server.c (main): Kill the inferior if an error occurs during
16111 the first remote_open.
16113 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16115 * README: Update supported targets.
16117 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16119 * Makefile.in (clean): Remove reg-mips64.c.
16120 (reg-mips64.c, reg-mips64.o): New rules.
16121 * configure.srv: Handle mips64. Include regset support for mips.
16122 * linux-mips-low.c (union mips_register): New.
16123 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16124 (mips_breakpoint, mips_breakpoint_at): Use int.
16125 (mips_collect_register, mips_supply_register)
16126 (mips_collect_register_32bit, mips_supply_register_32bit)
16127 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16128 (mips_store_fpregset, target_regsets): New.
16129 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16131 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16133 * configure.srv: Add target "spu*-*-*".
16134 * Makefile.in (clean): Remove reg-spu.c.
16135 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16136 * spu-low.c: New file.
16138 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16140 * configure.ac: Correct td_thr_tls_get_addr test.
16141 * configure: Regenerated.
16143 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16145 * linux-low.c (linux_wait_for_event): Reformat. Use the
16146 pass_signals array.
16147 * remote-utils.c (decode_address_to_semicolon): New.
16148 * server.c (pass_signals, handle_general_set): New.
16149 (handle_query): Mention QPassSignals for qSupported.
16150 (main): Call handle_general_set.
16151 * server.h (pass_signals, decode_address_to_semicolon): New.
16153 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16155 * server.c (handle_query): Correct error handling for read_auxv.
16157 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16159 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16160 and srv_linux_thread_db to yes.
16161 * linux-s390-low.c (s390_fill_gregset): New function.
16162 (target_regsets): Define data structure.
16164 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16166 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16167 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16168 * config.in, configure: Regenerated.
16169 * inferiors.c (gdb_id_to_thread): New function.
16170 (gdb_id_to_thread_id): Use it.
16171 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16172 * linux-low.h (struct process_info): Add th member.
16173 (thread_db_get_tls_address): New prototype.
16174 * remote-utils.c (decode_address): Make non-static.
16175 * server.c (handle_query): Handle qGetTLSAddr.
16176 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16177 * target.h (struct target_ops): Add get_tls_address.
16178 * thread-db.c (maybe_attach_thread): Save the thread handle.
16179 (thread_db_get_tls_address): New.
16181 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16183 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16184 (linux_resume_one_process): Take a siginfo_t *. Update all
16185 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16186 (struct pending_signals): Add a siginfo_t.
16187 (linux_wait_for_process): Always set last_status.
16188 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16189 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16190 * linux-low.h (struct process_info): Add last_status.
16192 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16194 * remote-utils.c (try_rle): New function.
16195 (putpkt_binary): Use it.
16197 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16199 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16200 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16201 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16202 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16203 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16206 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16208 * server.c (terminal_fd): New variable.
16209 (old_foreground_pgrp): Likewise.
16210 (restore_old_foreground_pgrp): New function.
16211 (start_inferior): Record the terminal file descriptor in terminal_fd
16212 and its original foreground group in old_foreground_pgrp. Register
16213 restore_old_foreground_pgrp with atexit().
16215 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16217 * server.c (handle_query): Correct qPart to qXfer.
16219 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16221 * configure.ac: Check for more headers which are missing on
16222 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16223 * configure.srv: Add Cygwin and mingw32.
16224 * remote-utils.c: Don't include headers unconditionally which
16225 are missing on mingw32. Include <winsock.h> for mingw32.
16226 (remote_open): Adjust for mingw32 support. Flush
16227 standard error after writing to it.
16228 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16229 (unblock_async_io, enable_async_io, disable_async_io)
16230 (readchar, getpkt): Update for Winsock support.
16231 (prepare_resume_reply): Expect a protocol signal number.
16232 * server.c: Disable <sys/wait.h> on mingw32.
16233 (start_inferior): Adjust for mingw32 support. Flush
16234 standard error after writing to it.
16235 (attach_inferior): Likewise. Use protocol signal
16237 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16239 * win32-i386-low.c: New file.
16240 * Makefile.in (XM_CLIBS): Set.
16241 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16242 (win32-i386-low.o): New dependency rule.
16243 * linux-low.c (linux_wait): Use target signal numbers.
16244 * target.h (struct target_ops): Doc fix.
16245 * server.h (target_signal_to_name): New prototype.
16246 * gdbreplay.c: Don't include headers unconditionally which
16247 are missing on mingw32. Include <winsock.h> for mingw32.
16248 (remote_close, remote_open): Adjust for Winsock support.
16249 * configure, config.in: Regenerated.
16251 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16253 * server.c (decode_xfer_read, write_qxfer_response): New.
16254 (handle_query): Take a packet length argument. Handle
16255 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16256 the qSupported response.
16257 (main): Update call to handle_query.
16259 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16261 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16262 (putpkt_binary): Renamed from putpkt and adjusted for binary
16264 (putpkt): New wrapper for putpkt_binary.
16265 (readchar): Don't mask off the high bit.
16266 (decode_X_packet): New function.
16267 * server.c (main): Call putpkt_binary if a handler sets the packet
16268 length. Save the length of the incoming packet. Handle 'X'.
16269 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16271 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16273 * server.c (handle_query): Handle qSupported.
16275 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16277 * remote-utils.c (all_symbols_looked_up): New variable.
16278 (look_up_one_symbol): Check it.
16279 * server.h (look_up_one_symbol): New declaration.
16280 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16282 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16284 * Makefile.in (linux-arm-low.o): Update dependencies.
16285 * linux-arm-low.c: Include "gdb_proc_service.h".
16286 (PTRACE_GET_THREAD_AREA): Define.
16287 (ps_get_thread_area): New function.
16289 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16291 * configure.srv (m68k*-*-uclinux*): New target.
16292 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16293 (linux_resume_one_process): Remove extraneous cast.
16294 (linux_read_offsets): New.
16295 (linux_target_op): Add linux_read_offsets on mmuless systems.
16296 * server.c (handle_query): Add qOffsets logic.
16297 * target.h (struct target_ops): Add read_offsets.
16299 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16301 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16302 (PTRACE_GET_THREAD_AREA): Define.
16303 (ps_get_thread_area): New function.
16304 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16305 (linux-x86-64-low.o): Update.
16307 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16309 * configure.ac: Remove checks for prfpregset_t.
16310 * gdb_proc_service.h: New file.
16311 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16312 new "gdb_proc_service.h".
16313 * proc-service.c: Likewise.
16314 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16315 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16316 * Makefile.in (gdb_proc_service_h): Updated.
16317 * configure, config.in: Regenerated.
16319 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16321 * remote-utils.c (prepare_resume_reply): Move declaration
16322 of gdb_id_from_wait to the top of the block.
16324 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16326 * linux-low.c (regsets_store_inferior_registers): Read the regset
16327 from the target before filling it.
16329 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16331 * server.c (attach_inferior): Return SIGTRAP for a successful
16334 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16336 * Makefile.in (OBS): Add version.o.
16337 (STAGESTUFF): Delete.
16338 (version.o): Add dependencies.
16339 (version.c): Replace rule.
16340 (clean): Remove version.c.
16341 * server.c (gdbserver_version): New.
16342 (gdbserver_usage): Use printf.
16343 (main): Handle --version and --help.
16344 * server.h (version, host_name): Add declarations.
16346 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16358 * linux-x86-64-low.c:
16360 * linux-s390-low.c:
16361 * linux-ppc64-low.c:
16363 * linux-mips-low.c:
16364 * linux-m68k-low.c:
16365 * linux-m32r-low.c:
16368 * linux-ia64-low.c:
16369 * linux-i386-low.c:
16370 * linux-crisv32-low.c:
16382 * gdbserver.1: Add (C) after Copyright. Update the FSF
16385 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16387 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16388 (arm_breakpoint_at): Recognize both breakpoints.
16389 (the_low_target): Use the correct breakpoint instruction.
16391 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16393 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16394 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16395 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16396 (the_low_target): Update.
16398 2005-10-25 Andreas Schwab <schwab@suse.de>
16400 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16402 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16403 (ia64_num_regs): Reduce to 462.
16405 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16407 * acinclude.m4: Correct quoting.
16408 * aclocal.m4: Regenerated.
16410 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16411 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16412 (thread_db_init): Call thread_db_err_str.
16413 * configure.ac: Check for TD_VERSION.
16414 * config.in, configure: Regenerated.
16416 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16418 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16420 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16422 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16423 is not available. Define HAVE_PTRACE_GETREGS if it is.
16424 * config.in, configure: Regenerated.
16425 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16426 * linux-i386-low.c, linux-m68k-low.c: Update to use
16427 HAVE_PTRACE_GETREGS.
16428 * linux-low.c (regsets_fetch_inferior_registers)
16429 (regsets_store_inferior_registers): Only return 0 if we processed
16431 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16432 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16434 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16436 * inferiors.c (struct thread_info): Add gdb_id.
16437 (add_thread): Add gdb_id argument.
16438 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16439 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16440 calls to add_thread.
16441 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16442 * server.c (handle_query): Use thread_to_gdb_id.
16443 (handle_v_cont, main): Use gdb_id_to_thread_id.
16444 * server.h (add_thread): Update prototype.
16445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16448 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16450 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16451 left-padded registers.
16452 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16453 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16455 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16457 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16458 * configure: Regenerate.
16459 * config.in: Regenerate.
16460 * server.h (NEED_DECLARATION_STRERROR):
16461 Replace with !HAVE_DECL_STRERROR.
16463 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16465 * linux-low.c (linux_wait, linux_send_signal): Don't test
16466 an unsigned long variable for > 0 if it could be MAX_ULONG.
16467 * server.c (myresume): Likewise.
16468 * target.c (set_desired_inferior): Likewise.
16470 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16472 * configure.ac: Simplify and improve check for socklen_t.
16473 * configure, config.in: Regenerate.
16475 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16477 * acconfig.h: Remove.
16478 * configure.ac: Add a test for socklen_t. Use three-argument
16479 AC_DEFINE throughout.
16480 * config.in: Regenerated using autoheader 2.59.
16481 * configure: Regenerated.
16483 * gdbreplay.c (socklen_t): Provide a default.
16484 (remote_open): Use socklen_t.
16485 * remote-utils.c (socklen_t): Provide a default.
16486 (remote_open): Use socklen_t.
16487 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16490 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16492 * linux-low.c (linux_read_memory, linux_write_memory)
16493 (linux_read_auxv): Likewise.
16494 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16495 (check_mem_write): Likewise.
16496 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16498 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16499 (registers_from_string, register_data): Likewise.
16500 * server.c (handle_query, main): Likewise.
16501 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16502 (decode_M_packet): Likewise.
16503 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16504 * target.h (struct target_ops): Update read_memory, write_memory,
16506 (read_inferior_memory, write_inferior_memory): Update.
16507 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16508 to unsigned char *.
16509 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16510 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16511 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16512 linux-s390-low.c, linux-sh-low.c: Update for changes in
16513 read_inferior_memory and the_low_target->breakpoint.
16515 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16517 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16518 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16519 * configure.srv: Add powerpc64-*-linux*.
16520 * linux-ppc64-low.c: New file.
16522 2005-05-23 Orjan Friberg <orjanf@axis.com>
16524 * linux-cris-low.c: New file with support for CRIS.
16525 * linux-crisv32-low.c: Ditto for CRISv32.
16526 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16527 (clean): Add reg-cris.c and reg-crisv32.c.
16528 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16529 reg-crisv32.o, and reg-crisv32.c to make rules.
16530 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16531 recognized targets.
16533 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16535 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16536 of sizeof (PTRACE_XFER_TYPE).
16537 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16539 2005-05-12 Orjan Friberg <orjanf@axis.com>
16541 * target.h (struct target_ops): Add insert_watchpoint,
16542 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16543 pointers for hardware watchpoint support.
16544 * linux-low.h (struct linux_target_ops): Ditto.
16545 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16546 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16547 to linux_target_ops.
16548 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16550 * server.c (main): Recognize 'Z' and 'z' packets.
16552 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16554 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16555 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16556 (the_low_target): Add new members.
16558 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16560 * proc-service.c (ps_lgetregs): Search all_processes instead of
16563 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16565 * server.c (start_inferior): Change return type to int.
16566 (attach_inferior): Change sigptr to int *.
16567 (handle_v_cont, handle_v_requests): Change signal to int *.
16568 (main): Change signal to int.
16570 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16572 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16573 * configure.srv: Add m32r*-*-linux*.
16574 * linux-m32r-low.c: New file.
16576 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16578 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16580 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16582 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16583 Take unsigned long arguments for PIDs.
16584 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16585 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16586 (wait_for_sigstop, linux_resume_one_process)
16587 (regsets_fetch_inferior_registers, linux_send_signal)
16588 (linux_read_auxv): Likewise. Update the types of variables holding
16589 PIDs. Update format string specifiers.
16590 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16591 * remote-utils.c (prepare_resume_reply): Likewise.
16592 * server.c (cont_thread, general_thread, step_thread)
16593 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16595 (handle_query): Update format specifiers.
16596 (handle_v_cont, main): Use strtoul for thread IDs.
16597 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16598 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16599 (general_thread, step_thread, thread_from_wait)
16600 (old_thread_from_wait): Update.
16601 * target.h (struct thread_resume): Use unsigned long for THREAD.
16602 (struct target_ops): Use unsigned long for arguments to attach and
16605 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16607 * acinclude.m4: Include bfd/bfd.m4 directly.
16608 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16609 <agriffis@toolchain.org>.
16610 * aclocal.m4, configure: Regenerated.
16612 2005-01-07 Andrew Cagney <cagney@gnu.org>
16614 * configure.ac: Rename configure.in, require autoconf 2.59.
16615 * configure: Re-generate.
16617 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16619 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16620 LIBS when finished.
16621 * aclocal.m4: Regenerated.
16622 * configure: Regenerated.
16624 2004-11-21 Andreas Schwab <schwab@suse.de>
16626 * linux-m68k-low.c (m68k_num_gregs): Define.
16627 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16628 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16629 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16630 (m68k_breakpoint_at): New. Add to the_low_target.
16632 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16633 srv_linux_thread_db to yes.
16635 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16637 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16638 (ARCH_SET_FS): Likewise.
16639 (ARCH_GET_FS): Likewise.
16640 (ARCH_GET_GS): Likewise.
16642 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16644 * linux-i386-low.c (ps_get_thread_area): New.
16645 * linux-x86-64-low.c (ps_get_thread_area): New.
16646 * linux-low.c: Include <sys/syscall.h>.
16647 (linux_kill_one_process): Don't kill the first thread here.
16648 (linux_kill): Kill the first thread here.
16649 (kill_lwp): New function.
16650 (send_sigstop, linux_send_signal): Use it.
16651 * proc-service.c: Clean up #ifdefs.
16652 (fpregset_info): Delete.
16653 (ps_lgetregs): Update and enable implementation.
16654 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16656 * remote-utils.c (struct sym_cache, symbol_cache): New.
16657 (input_interrupt): Print a clearer message.
16658 (async_io_enabled): New variable.
16659 (enable_async_io, disable_async_io): Use it. Update comments.
16660 (look_up_one_symbol): Use the symbol cache.
16661 * thread-db.c (thread_db_look_up_symbols): New function.
16662 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16664 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16666 * configure.in: Test for -rdynamic.
16667 * configure: Regenerated.
16668 * Makefile (INTERNAL_LDFLAGS): New.
16669 (gdbserver, gdbreplay): Use it.
16671 2004-09-02 Andrew Cagney <cagney@gnu.org>
16673 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16675 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16677 * linux-low.c (linux_wait): Clear all_processes list also.
16679 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16681 * linux-low.c: Include <errno.h>. Remove extern declaration of
16684 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16686 * gdbreplay.c, server.h, utils.c: Update copyright years.
16688 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16690 * server.c (main): Print child status or termination signal from
16691 variable 'signal', not 'sig'.
16693 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16695 * linux-low.c (linux_read_memory): Change return type to
16696 int. Check for and return error from ptrace().
16697 * target.c (read_inferior_memory): Change return type to int. Pass
16698 back return status from the_target->read_memory().
16699 * target.h (struct target_ops): Adapt *read_memory() prototype.
16701 (read_inferior_memory): Adapt prototype.
16702 * server.c (main): Return an error packet if
16703 read_inferior_memory() returns an error.
16705 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16707 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16708 Unify with other clean targets.
16710 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16712 * server.c (handle_v_cont): Call set_desired_inferior.
16714 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16716 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16718 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16720 * linux-low.c (linux_wait): Unblock async I/O.
16721 (linux_resume): Block and enable async I/O.
16722 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16723 * server.h (block_async_io, unblock_async_io): Add prototypes.
16725 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16727 * remote-utils.c (remote_open): Print a status notice after
16728 opening a TCP port.
16729 * server.c (attach_inferior): Print a status notice after
16732 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16734 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16736 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16738 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16740 * server.c, target.h: Update copyright years.
16742 2004-02-25 Roland McGrath <roland@redhat.com>
16744 * target.h (struct target_ops): New member `read_auxv'.
16745 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16746 * linux-low.c (linux_read_auxv): New function.
16747 (linux_target_ops): Initialize `read_auxv' member to that.
16749 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16751 Committed by Jim Blandy <jimb@redhat.com>.
16753 * linux-s390-low.c (s390_num_regs): Update.
16754 (s390_regmap): Remove control registers. Use __s390x__ predefine
16755 instead of GPR_SIZE to distiguish s390 and s390x targets.
16757 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16759 * linux-low.c: Update copyright year.
16760 (check_removed_breakpoint): Clear pending_is_breakpoint.
16761 (linux_set_resume_request, linux_queue_one_thread)
16762 (resume_status_pending_p): New functions.
16763 (linux_continue_one_thread): Use process->resume.
16764 (linux_resume): Only resume threads if there are no pending events.
16765 * linux-low.h (struct process_info): Add resume request
16768 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16770 * regcache.c (new_register_cache): Clear the allocated register
16771 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16773 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16775 * linux-low.c (linux_resume): Take a struct thread_resume *
16777 (linux_wait): Update call.
16778 (resume_ptr): New static variable.
16779 (linux_continue_one_thread): Renamed from
16780 linux_continue_one_process. Use resume_ptr.
16781 (linux_resume): Use linux_continue_one_thread.
16782 * server.c (handle_v_cont, handle_v_requests): New functions.
16783 (myresume): New function.
16784 (main): Handle 'v' case.
16785 * target.h (struct thread_resume): New type.
16786 (struct target_ops): Change argument of "resume" to struct
16788 (myresume): Delete macro.
16790 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16792 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16793 (uninstall): Support DESTDIR.
16795 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16797 * configure.srv: Add xscale*linux copy of arm*linux entry.
16799 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16801 * linux-arm-low.c (arm_reinsert_addr): New function.
16802 (the_low_target): Add arm_reinsert_addr.
16804 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16806 * mem-break.c: Remove whitespace at end of file.
16808 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16810 * configure.in: Check whether we need to prototype strerror.
16811 * server.h: Optionally prototype strerror.
16812 * gdbreplay.c (perror_with_name): Use strerror.
16813 * linux-low.c (linux_attach_lwp): Use strerror.
16814 * utils.c (perror_with_name): Use strerror.
16815 * config.in, configure: Regenerated.
16817 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16819 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16820 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16822 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16824 * Makefile.in (SFILES): Update.
16825 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16826 low-sun3.c: Remove files.
16828 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16830 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16831 (linux_detach_one_process, linux_detach): New functions.
16832 (linux_target_ops): Add linux_detach.
16833 * server.c (main): Handle 'D' packet.
16834 * target.h (struct target_ops): Add "detach" member.
16835 (detach_inferior): Define.
16837 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16839 From Kelley Cook <kelleycook@wideopenwest.com>:
16840 * configure.srv: Accept i[34567]86 variants.
16842 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16844 * linux-low.c (linux_wait_for_event): Correct comment typos.
16845 (linux_resume_one_process): Call check_removed_breakpoint.
16846 (linux_send_signal): New function.
16847 (linux_target_ops): Add linux_send_signal.
16848 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16850 * target.h (struct target_ops): Add send_signal.
16852 2003-05-29 Jim Blandy <jimb@redhat.com>
16854 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16855 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16856 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16857 away part of the register's value.
16859 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16861 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16862 (linux_wait_for_event, linux_init_signals): Likewise.
16864 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16866 * configure.in: Check for stdlib.h.
16867 * configure: Regenerated.
16868 * config.in: Regenerated.
16870 2003-01-04 Andreas Schwab <schwab@suse.de>
16872 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16874 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16876 * Makefile.in: Remove obsolete code.
16878 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16880 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16881 defined(PT_FPR0_HI).
16883 2002-11-17 Stuart Hughes <seh@zee2.com>
16885 * linux-arm-low.c (arm_num_regs): Increase.
16886 (arm_regmap): Include status register.
16888 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16890 * linux-low.c (register_addr): Remove incorrect -1 check.
16892 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16894 * linux-low.c (linux_create_inferior): Call setpgid. Return
16896 (unstopped_p, linux_signal_pid): Remove.
16897 (linux_target_ops): Remove linux_signal_pid.
16898 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16899 global instead of target method.
16900 * target.h (struct target_ops): Remove signal_pid. Update comment
16901 for create_inferior.
16902 * server.c (signal_pid): New variable.
16903 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16904 gdbserver. Set the child to be the foreground process group.
16905 (attach_inferior): Set signal_pid.
16907 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16909 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16911 2002-08-20 Jim Blandy <jimb@redhat.com>
16913 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16916 2002-08-01 Andrew Cagney <cagney@redhat.com>
16918 * Makefile.in: Make chill references obsolete.
16920 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16922 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16923 * configure: Regenerate.
16924 * config.in: Regenerate.
16926 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16928 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16929 (perror_with_name, remote_close, remote_open, expect, play): Static.
16931 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16933 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16934 byte offsets instead of an array of indexes.
16935 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16937 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16939 * regcache.c: Add comment.
16941 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16943 * thread-db.c: New file.
16944 * proc-service.c: New file.
16945 * acinclude.m4: New file.
16946 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16947 proc-service.o, and thread-db.o.
16948 (linux-low.o): Add USE_THREAD_DB.
16949 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16950 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16951 * aclocal.m4: Regenerated.
16952 * config.in: Regenerated.
16953 * configure: Regenerated.
16954 * configure.in: Check for proc_service.h, sys/procfs.h,
16955 thread_db.h, and linux/elf.h headrs.
16956 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16957 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16958 Check for -lthread_db and thread support.
16959 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16960 PowerPC, and SuperH.
16961 * i387-fp.c: Constify arguments.
16962 * i387-fp.h: Likewise.
16963 * inferiors.c: (struct thread_info): Renamed from
16964 `struct inferior_info'. Remove PID member. Use generic inferior
16965 list header. All uses updated.
16966 (inferiors, signal_pid): Removed.
16967 (all_threads): New variable.
16968 (get_thread): Define.
16969 (add_inferior_to_list): New function.
16970 (for_each_inferior): New function.
16971 (change_inferior_id): New function.
16972 (add_inferior): Removed.
16973 (remove_inferior): New function.
16974 (add_thread): New function.
16975 (free_one_thread): New function.
16976 (remove_thread): New function.
16977 (clear_inferiors): Use for_each_inferior and free_one_thread.
16978 (find_inferior): New function.
16979 (find_inferior_id): New function.
16980 (inferior_target_data): Update argument type.
16981 (set_inferior_target_data): Likewise.
16982 (inferior_regcache_data): Likewise.
16983 (set_inferior_regcache_data): Likewise.
16984 * linux-low.c (linux_bp_reinsert): Remove.
16985 (all_processes, stopping_threads, using_thrads)
16986 (struct pending_signals, debug_threads, pid_of): New.
16987 (inferior_pid): Replace with macro.
16988 (struct inferior_linux_data): Remove.
16989 (get_stop_pc, add_process): New functions.
16990 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16991 Use add_process and add_thread.
16992 (linux_attach_lwp): New function, based on old linux_attach. Use
16993 add_process and add_thread. Set stop_expected for new threads.
16994 (linux_attach): New function.
16995 (linux_kill_one_process): New function.
16996 (linux_kill): Kill all LWPs.
16997 (linux_thread_alive): Use find_inferior_id.
16998 (check_removed_breakpoints, status_pending_p): New functions.
16999 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17000 Update. Use WNOHANG. Wait for cloned processes also. Update process
17001 struct for the found process.
17002 (linux_wait_for_event): New function.
17003 (linux_wait): Use it. Support LWPs.
17004 (send_sigstop, wait_for_sigstop, stop_all_processes)
17005 (linux_resume_one_process, linux_continue_one_process): New functions.
17006 (linux_resume): Support LWPs.
17007 (REGISTER_RAW_SIZE): Remove.
17008 (fetch_register): Use register_size instead. Call supply_register.
17009 (usr_store_inferior_registers): Likewise. Call collect_register.
17010 Fix recursive case.
17011 (regsets_fetch_inferior_registers): Improve error message.
17012 (regsets_store_inferior_registers): Add debugging.
17013 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17014 (unstopped_p, linux_signal_pid): New functions.
17015 (linux_target_ops): Add linux_signal_pid.
17016 (linux_init_signals): New function.
17017 (initialize_low): Call it. Initialize using_threads.
17018 * regcache.c (inferior_regcache_data): Add valid
17020 (get_regcache): Fetch registers lazily. Add fetch argument
17021 and update all callers.
17022 (regcache_invalidate_one, regcache_invalidate): New
17024 (new_register_cache): Renamed from create_register_cache.
17025 Return the new regcache.
17026 (free_register_cache): Change argument to a void *.
17027 (registers_to_string, registers_from_string): Call get_regcache
17028 with fetch flag set.
17029 (register_data): Make static. Pass fetch flag to get_regcache.
17030 (supply_register): Call get_regcache with fetch flag clear.
17031 (collect_register): Call get_regcache with fetch flag set.
17032 (collect_register_as_string): New function.
17033 * regcache.h: Update.
17034 * remote-utils.c (putpkt): Flush after debug output and use
17036 Handle input interrupts while waiting for an ACK.
17037 (input_interrupt): Use signal_pid method.
17038 (getpkt): Flush after debug output and use stderr.
17039 (outreg): Use collect_register_as_string.
17040 (new_thread_notify, dead_thread_notify): New functions.
17041 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17042 and general_thread.
17043 (look_up_one_symbol): Flush after debug output.
17044 * server.c (step_thread, server_waiting): New variables.
17045 (start_inferior): Don't use signal_pid. Update call to mywait.
17046 (attach_inferior): Update call to mywait.
17047 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17048 (main): Don't fetch/store registers explicitly. Use
17049 set_desired_inferior. Support proposed ``Hs'' packet. Update
17051 * server.h: Update.
17052 (struct inferior_list, struct_inferior_list_entry): New.
17053 * target.c (set_desired_inferior): New.
17054 (write_inferior_memory): Constify.
17055 (mywait): New function.
17056 * target.h: Update.
17057 (struct target_ops): New signal_pid method.
17058 (mywait): Removed macro, added prototype.
17060 * linux-low.h (regset_func): Removed.
17061 (regset_fill_func, regset_store_func): New.
17062 (enum regset_type): New.
17063 (struct regset_info): Add type field. Use new operation types.
17064 (struct linux_target_ops): stop_pc renamed to get_pc.
17065 Add decr_pc_after_break and breakpoint_at.
17066 (get_process, get_thread_proess, get_process_thread)
17067 (strut process_info, all_processes, linux_attach_lwp)
17068 (thread_db_init): New.
17070 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17071 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17072 (the_low_target): Add new members.
17073 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17074 (i386_store_fpxregset): Constify.
17075 (target_regsets): Add new kind identifier.
17076 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17077 (i386_set_pc): Add debugging.
17078 (i386_breakpoint_at): New function.
17079 (the_low_target): Add new members.
17080 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17081 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17082 (mips_breakpoint_at): New.
17083 (the_low_target): Add new members.
17084 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17085 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17086 (the_low_target): Add new members.
17087 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17088 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17089 (the_low_target): Add new members.
17090 * linux-x86-64-low.c (target_regsets): Add new kind
17093 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17095 From Martin Pool <mbp@samba.org>:
17096 * server.c (gdbserver_usage): New function.
17099 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17101 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17102 stop_at -> stop_pc.
17104 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17106 * Makefile.in: Remove obsolete code.
17108 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17110 * linux-low.c (regsets_fetch_inferior_registers),
17111 (regsets_store_inferior_registers): Removed cast to int from
17113 * regcache.h: Added declaration of struct inferior_info.
17115 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17117 * inferiors.c (struct inferior_info): Add regcache_data.
17118 (add_inferior): Call create_register_cache.
17119 (clear_inferiors): Call free_register_cache.
17120 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17121 * regcache.c (struct inferior_regcache_data): New.
17122 (registers): Remove.
17123 (get_regcache): New function.
17124 (create_register_cache, free_register_cache): New functions.
17125 (set_register_cache): Don't initialize the register cache here.
17126 (registers_to_string, registers_from_string, register_data): Call
17128 * regcache.h: Add prototypes.
17129 * server.h: Likewise.
17131 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17133 * mem-break.c: New file.
17134 * mem-break.h: New file.
17135 * Makefile.in: Add mem-break.o rule; update server.h
17137 * inferiors.c (struct inferior_info): Add target_data
17139 (clear_inferiors): Free target_data member if set.
17140 (inferior_target_data, set_inferior_target_data): New functions.
17141 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17142 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17143 * linux-low.c (linux_bp_reinsert): New variable.
17144 (struct inferior_linux_data): New.
17145 (linux_create_inferior): Use set_inferior_target_data.
17146 (linux_attach): Likewise. Call add_inferior.
17147 (linux_wait_for_one_inferior): New function.
17148 (linux_wait): Call it.
17149 (linux_write_memory): Add const.
17150 (initialize_low): Call set_breakpoint_data.
17151 * linux-low.h (struct linux_target_ops): Add breakpoint
17153 * server.c (attach_inferior): Remove extra add_inferior
17155 * server.h: Include mem-break.h. Update inferior.c
17157 * target.c (read_inferior_memory)
17158 (write_inferior_memory): New functions.
17159 * target.h (read_inferior_memory)
17160 (write_inferior_memory): Change macros to prototypes.
17161 (struct target_ops): Update comments. Add const to write_memory
17164 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17166 * linux-low.c (usr_store_inferior_registers): Support
17167 registers which are allowed to fail to store.
17168 * linux-low.h (linux_target_ops): Likewise.
17169 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17170 (ppc_cannot_store_register): FPSCR may not be storable.
17172 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17174 * server.h: Include <string.h> if HAVE_STRING_H.
17175 * ChangeLog: Correct paths in last ChangeLog entry.
17177 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17179 * linux-low.h: Remove obsolete prototypes.
17180 (struct linux_target_ops): New.
17181 (extern the_low_target): New.
17182 * linux-low.c (num_regs, regmap): Remove declarations.
17183 (register_addr): Use the_low_target explicitly.
17184 (fetch_register): Likewise.
17185 (usr_fetch_inferior_registers): Likewise.
17186 (usr_store_inferior_registers): Likewise.
17187 * linux-arm-low.c (num_regs): Remove.
17188 (arm_num_regs): Define.
17189 (arm_regmap): Renamed from regmap, made static.
17190 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17192 (arm_cannot_store_register): Renamed from cannot_store_register,
17194 (the_low_target): New.
17195 * linux-i386-low.c (num_regs): Remove.
17196 (i386_num_regs): Define.
17197 (i386_regmap): Renamed from regmap, made static.
17198 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17200 (i386_cannot_store_register): Renamed from cannot_store_register,
17202 (the_low_target): New.
17203 * linux-ia64-low.c (num_regs): Remove.
17204 (ia64_num_regs): Define.
17205 (ia64_regmap): Renamed from regmap, made static.
17206 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17208 (ia64_cannot_store_register): Renamed from cannot_store_register,
17210 (the_low_target): New.
17211 * linux-m68k-low.c (num_regs): Remove.
17212 (m68k_num_regs): Define.
17213 (m68k_regmap): Renamed from regmap, made static.
17214 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17216 (m68k_cannot_store_register): Renamed from cannot_store_register,
17218 (the_low_target): New.
17219 * linux-mips-low.c (num_regs): Remove.
17220 (mips_num_regs): Define.
17221 (mips_regmap): Renamed from regmap, made static.
17222 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17224 (mips_cannot_store_register): Renamed from cannot_store_register,
17226 (the_low_target): New.
17227 * linux-ppc-low.c (num_regs): Remove.
17228 (ppc_num_regs): Define.
17229 (ppc_regmap): Renamed from regmap, made static.
17230 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17232 (ppc_cannot_store_register): Renamed from cannot_store_register,
17234 (the_low_target): New.
17235 * linux-s390-low.c (num_regs): Remove.
17236 (s390_num_regs): Define.
17237 (s390_regmap): Renamed from regmap, made static.
17238 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17240 (s390_cannot_store_register): Renamed from cannot_store_register,
17242 (the_low_target): New.
17243 * linux-sh-low.c (num_regs): Remove.
17244 (sh_num_regs): Define.
17245 (sh_regmap): Renamed from regmap, made static.
17246 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17248 (sh_cannot_store_register): Renamed from cannot_store_register,
17250 (the_low_target): New.
17251 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17252 (the_low_target): New.
17254 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17256 * Makefile.in: Add stamp-h target.
17257 * configure.in: Create stamp-h.
17258 * configure: Regenerated.
17260 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17262 * inferiors.c: New file.
17263 * target.c: New file.
17264 * target.h: New file.
17265 * Makefile.in: Add target.o and inferiors.o. Update
17267 * linux-low.c (inferior_pid): New static variable,
17268 moved from server.c.
17269 (linux_create_inferior): Renamed from create_inferior.
17270 Call add_inferior. Return 0 on success instead of a PID.
17271 (linux_attach): Renamed from myattach.
17272 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17273 (linux_thread_alive): Renamed from mythread_alive.
17274 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17276 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17277 (regsets_store_inferior_registers): Correct error message.
17278 Add missing ``return 0''.
17279 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17280 (linux_store_registers): Renamed from store_inferior_registers.
17281 (linux_read_memory): Renamed from read_inferior_memory.
17282 (linux_write_memory): Renamed from write_inferior_memory.
17283 (linux_target_ops): New structure.
17284 (initialize_low): Call set_target_ops ().
17285 * remote-utils.c (unhexify): New function.
17286 (hexify): New function.
17287 (input_interrupt): Send signals to ``signal_pid''.
17288 * server.c (inferior_pid): Remove.
17289 (start_inferior): Update create_inferior call.
17290 (attach_inferior): Call add_inferior.
17291 (handle_query): New function.
17292 (main): Call handle_query for `q' packets.
17293 * server.h: Include "target.h". Remove obsolete prototypes.
17294 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17296 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17298 * Makefile.in: Add WARN_CFLAGS. Update configury
17300 * configure.in: Check for <string.h>
17301 * configure: Regenerate.
17302 * config.in: Regenerate.
17303 * gdbreplay.c: Include needed system headers.
17304 (remote_open): Remove strchr prototype.
17305 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17306 * regcache.c (supply_register): Change buf argument to const void *.
17307 (supply_register_by_name): Likewise.
17308 (collect_register): Change buf argument to void *.
17309 (collect_register_by_name): Likewise.
17310 * regcache.h: Add missing prototypes.
17311 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17312 * server.c (handle_query): New function.
17313 (attached): New static variable, moved out of main.
17314 (main): Quiet longjmp clobber warnings.
17315 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17316 * utils.c (error): Remove NORETURN.