Fix lookup of separate debug file on MS-Windows.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
b494cdff
TT
12019-04-19 Tom Tromey <tom@tromey.com>
2
3 * server.c (struct vstop_notif): Derive from notif_event.
4 <base>: Remove.
5 (queue_stop_reply): Update.
6 (remove_all_on_match_ptid): Change type. Rewrite.
7 (discard_queued_stop_replies): Rewrite.
8 (in_queued_stop_replies_ptid): Change type.
9 (in_queued_stop_replies): Rewrite.
10 (notif_stop): Update.
11 (queue_stop_reply_callback): Update.
12 (captured_main): Don't call initialize_notif.
13 (push_stop_notification): Update.
14 * notif.c (notif_write_event, handle_notif_ack)
15 (notif_event_enque, notif_push): Update.
16 (notif_event_xfree, initialize_notif): Remove.
17 * notif.h (struct notif_event): Include <list>, not
18 "common/queue.h".
19 (struct notif_server) <queue>: Now a std::list.
20 (notif_event_p): Remove typedef.
21 (initialize_notif): Don't declare.
22 (struct notif_event): Add virtual destructor.
23
a7e559cc
AH
242019-04-17 Alan Hayward <alan.hayward@arm.com>
25
26 * ax.c (ax_vdebug): Call debug_printf.
27 * debug.c (debug_write): New function.
28 * debug.h (debug_write): New declaration.
29 * linux-low.c (sigchld_handler): Call debug_write.
30
aeb2e706
AH
312019-04-17 Alan Hayward <alan.hayward@arm.com>
32
33 * debug.c (debug_set_output): New function.
34 (debug_vprintf): Send output to debug_file.
35 (debug_flush): Likewise.
36 * debug.h (debug_set_output): New declaration.
37 * server.c (handle_monitor_command): Add debug-file option.
38 (captured_main): Likewise.
39
c1bc0935
AH
402019-04-17 Alan Hayward <alan.hayward@arm.com>
41
42 * debug.c (remote_debug): Add definition.
43 * debug.h (remote_debug): Add declaration.
44 * hostio.c (remote_debug): Remove declaration.
45 * remote-utils.c (struct ui_file): Likewise.
46 (remote_debug): Likewise.
47 * remote-utils.h (remote_debug): Likewise,
48 * server.c (remote_debug): Remove definition.
49
3f52fdbc
KB
502019-04-10 Kevin Buettner <kevinb@redhat.com>
51
52 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
53 when using a 64-bit gdbserver.
54
b0319eaa
TT
552019-04-09 Tom Tromey <tromey@adacore.com>
56
57 * linux-low.c (select_event_lwp): Use find_thread_in_random.
58
eedc3f4f
TT
592019-04-08 Tom Tromey <tom@tromey.com>
60
61 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
62 throw.
63 (linux_resume_one_lwp): Likewise.
64
230d2906
TT
652019-04-08 Tom Tromey <tom@tromey.com>
66
67 * gdbreplay.c: Update.
68 * linux-low.c: Update.
69 * server.c: Update.
70
a70b8144
TT
712019-04-08 Tom Tromey <tom@tromey.com>
72
73 * server.c: Use C++ exception handling.
74 * linux-low.c: Use C++ exception handling.
75 * gdbreplay.c: Use C++ exception handling.
76
3d6e9d23
TT
772019-04-08 Tom Tromey <tom@tromey.com>
78
79 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
80 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
81 (captured_main, main): Update.
82 * gdbreplay.c (main): Update.
83
0570503d
PFC
842019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
85
86 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
87 value in argument pointer, return 1 if the entry is found and 0
88 otherwise. Move comment.
89 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
90 * linux-low.h (linux_get_auxv): Declare.
91 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
92
227a9e65
TT
932019-04-05 Tom Tromey <tromey@adacore.com>
94
95 * server.c (gdbserver_usage): Use upper-case for metasyntactic
96 variables.
97
69f4c9cc
AH
982019-03-28 Alan Hayward <alan.hayward@arm.com>
99
100 * linux-low.c (AT_HWCAP2): Add define if not already included.
101
974c89e0
AH
1022019-03-26 Alan Hayward <alan.hayward@arm.com>
103
104 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
105 (aarch64_arch_setup): Call linux_get_hwcap.
106 * linux-arm-low.c (arm_get_hwcap): Remove function.
107 (arm_read_description): Call linux_get_hwcap.
108 * linux-low.c (linux_get_auxv): New function.
109 (linux_get_hwcap): Likewise.
110 (linux_get_hwcap2): Likewise.
111 * linux-low.h (linux_get_hwcap): New declaration.
112 (linux_get_hwcap2): Likewise.
113 * linux-ppc-low.c (ppc_get_auxv): Remove function.
114 (ppc_arch_setup): Call linux_get_hwcap.
115 * linux-s390-low.c (s390_get_hwcap): Remove function.
116 (s390_arch_setup): Call linux_get_hwcap.
117
1ef53e6b
AH
1182019-03-22 Alan Hayward <alan.hayward@arm.com>
119 Jiong Wang <jiong.wang@arm.com>
120
121 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
122 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
123 to fail.
124 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
125
ee4fbcfa
AH
1262019-03-22 Alan Hayward <alan.hayward@arm.com>
127 Jiong Wang <jiong.wang@arm.com>
128
129 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
130 (aarch64_get_hwcap): New function.
131 (aarch64_arch_setup): Read APIA hwcap.
132
6dc0ebde
AH
1332019-03-22 Alan Hayward <alan.hayward@arm.com>
134 Jiong Wang <jiong.wang@arm.com>
135
136 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
137 (initialize_low_tracepoint): Likewise.
138 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
139 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
140 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
141 (aarch64_linux_read_description): Likewise.
142 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
143
1163a4b7
JB
1442019-03-12 John Baldwin <jhb@FreeBSD.org>
145
146 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
147 i386_create_target_description for 'segments' parameter.
148 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
149 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
150 * win32-i386-low.c (i386_arch_setup): Likewise.
151
d3a70e03
TT
1522019-03-12 Tom Tromey <tromey@adacore.com>
153
154 * linux-low.c (iterate_over_lwps): Update.
155
37991b4f
TT
1562019-03-06 Tom Tromey <tom@tromey.com>
157
158 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
159 (captured_main): Use SCOPE_EXIT.
160
45950eb6
SDJ
1612019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
162
163 * configure.srv: Use '$enable_unittest' instead of '$development'
164 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
165 case.
166
43ac54fc
TT
1672019-02-27 Tom Tromey <tromey@adacore.com>
168
169 * gdbreplay.c (logchar): Handle \r\n.
170
df0da8a2
AH
1712019-02-07 Alan Hayward <alan.hayward@arm.com>
172
173 * linux-low.c (linux_attach): Add process before lwp.
174 * server.c (attach_inferior): Check if already attached.
175
1a5c2598
TT
1762019-02-07 Tom Tromey <tom@tromey.com>
177
178 * x86-tdesc.h: Rename include guard.
179 * x86-low.h: Add include guard.
180 * wincecompat.h: Rename include guard.
181 * win32-low.h: Add include guard.
182 * utils.h: Rename include guard.
183 * tracepoint.h: Rename include guard.
184 * tdesc.h: Rename include guard.
185 * target.h: Rename include guard.
186 * server.h: Rename include guard.
187 * remote-utils.h: Rename include guard.
188 * regcache.h: Rename include guard.
189 * nto-low.h: Rename include guard.
190 * notif.h: Add include guard.
191 * mem-break.h: Rename include guard.
192 * lynx-low.h: Add include guard.
193 * linux-x86-tdesc.h: Add include guard.
194 * linux-s390-tdesc.h: Add include guard.
195 * linux-ppc-tdesc-init.h: Add include guard.
196 * linux-low.h: Add include guard.
197 * linux-aarch64-tdesc.h: Add include guard.
198 * linux-aarch32-low.h: Add include guard.
199 * inferiors.h: Rename include guard.
200 * i387-fp.h: Rename include guard.
201 * hostio.h: Rename include guard.
202 * gdbthread.h: Rename include guard.
203 * gdb_proc_service.h: Rename include guard.
204 * event-loop.h: Rename include guard.
205 * dll.h: Rename include guard.
206 * debug.h: Rename include guard.
207 * ax.h: Rename include guard.
208
956cc47c
SN
2092018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
210
211 PR gdb/23985
212 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
213 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
214
a0707f3c
TT
2152019-01-25 Tom Tromey <tom@tromey.com>
216
217 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
218
0747795c
TT
2192019-01-25 Tom Tromey <tom@tromey.com>
220
221 * win32-low.c: Fix common/ includes.
222 * win32-i386-low.c: Fix common/ includes.
223 * tracepoint.c: Fix common/ includes.
224 * thread-db.c: Fix common/ includes.
225 * target.h: Fix common/ includes.
226 * symbol.c: Fix common/ includes.
227 * spu-low.c: Fix common/ includes.
228 * server.h: Fix common/ includes.
229 * server.c: Fix common/ includes.
230 * remote-utils.c: Fix common/ includes.
231 * regcache.h: Fix common/ includes.
232 * regcache.c: Fix common/ includes.
233 * nto-x86-low.c: Fix common/ includes.
234 * notif.h: Fix common/ includes.
235 * mem-break.h: Fix common/ includes.
236 * lynx-low.c: Fix common/ includes.
237 * lynx-i386-low.c: Fix common/ includes.
238 * linux-x86-tdesc-selftest.c: Fix common/ includes.
239 * linux-x86-low.c: Fix common/ includes.
240 * linux-low.c: Fix common/ includes.
241 * inferiors.h: Fix common/ includes.
242 * i387-fp.c: Fix common/ includes.
243 * hostio.c: Fix common/ includes.
244 * hostio-errno.c: Fix common/ includes.
245 * gdbthread.h: Fix common/ includes.
246 * gdbreplay.c: Fix common/ includes.
247 * fork-child.c: Fix common/ includes.
248 * event-loop.c: Fix common/ includes.
249 * ax.c:
250 (enum gdb_agent_op): Fix common/ includes.
251
be6d4f74
TT
2522019-01-21 Tom Tromey <tom@tromey.com>
253
254 * tracepoint.c: Fix includes.
255 * remote-utils.c: Fix includes.
256 * linux-x86-low.c: Fix includes.
257
66d91b39
JB
2582019-01-01 Joel Brobecker <brobecker@adacore.com>
259
260 * gdbreplay.c (gdbreplay_version): Update copyright year in
261 version message.
262 * server.c (gdbserver_version): Likewise.
263
754e3168
AH
2642018-12-05 Alan Hayward <alan.hayward@arm.com>
265
266 * linux-low.c (add_lwp): Switch ordering.
267
d105de22
TT
2682018-11-29 Tom Tromey <tom@tromey.com>
269
270 * win32-low.c (win32_join): Take pid, not process.
271 * target.h (struct target_ops) <join>: Change argument type.
272 (join_inferior): Change argument name.
273 * spu-low.c (spu_join): Take pid, not process.
274 * server.c (handle_detach): Preserve pid before destroying
275 process.
276 * lynx-low.c (lynx_join): Take pid, not process.
277 * linux-low.c (linux_join): Take pid, not process.
278
50138245
AH
2792018-11-23 Alan Hayward <alan.hayward@arm.com>
280
281 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
282 (aarch64_cannot_fetch_register): Likewise.
283 (struct linux_target_ops): Update references.
284
64f57f3d
PFC
2852018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
286
287 * linux-ppc-low.c: Include nat/linux-ptrace.h.
288
8d619c01
EBM
2892018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
290
291 * configure.srv (ipa_ppc_linux_regobj): Add
292 powerpc-isa207-htm-vsx32l-ipa.o and
293 powerpc-isa207-htm-vsx64l-ipa.o.
294 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
295 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
296 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
297 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
298 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
299 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
300 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
301 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
302 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
303 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
304 (init_registers_powerpc_isa207_htm_vsx32l)
305 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
306 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
307 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
308 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
309 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
310 (ppc_store_tm_ctarregset): New functions.
311 (ppc_regsets): Add entries for HTM regsets.
312 (ppc_arch_setup): Set htm in features struct when needed. Set
313 sizes for the HTM regsets.
314 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
315 (initialize_low_arch): Call
316 init_registers_powerpc_isa207_htm_vsx32l and
317 init_registers_powerpc_isa207_htm_vsx64l.
318 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
319 PPC_TDESC_ISA207_HTM_VSX.
320 (initialize_low_tracepoint): Call
321 init_registers_powerpc_isa207_htm_vsx32l and
322 init_registers_powerpc_isa207_htm_vsx64l.
323
232bfb86
EBM
3242018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
325
326 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
327 rs6000/power-linux-pmu.xml to srv_xmlfiles.
328 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
329 (ppc_store_pmuregset): New functions.
330 (ppc_regsets): Add entries for ebb and pmu regsets.
331 (ppc_arch_setup): Set isa207 in features struct if the ebb and
332 pmu regsets are available. Set sizes for these regsets.
333
f2cf6173
EBM
3342018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
335
336 * configure.srv (ipa_ppc_linux_regobj): Add
337 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
338 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
339 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
340 rs6000/powerpc-isa207-vsx32l.xml, and
341 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
342 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
343 <PPC_TDESC_ISA207_VSX>: New enum value.
344 (init_registers_powerpc_isa207_vsx32l): Declare.
345 (init_registers_powerpc_isa207_vsx64l): Declare.
346 * linux-ppc-low.c (ppc_fill_tarregset): New function.
347 (ppc_store_tarregset): New function.
348 (ppc_regsets): Add entry for the TAR regset.
349 (ppc_arch_setup): Set isa207 in features struct when needed. Set
350 size for the TAR regsets.
351 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
352 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
353 and init_registers_powerpc_isa207_vsx64l.
354 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
355 (initialize_low_tracepoint): Call
356 init_registers_powerpc_isa207_vsx32l and
357 init_registers_powerpc_isa207_vsx64l.
358
7ca18ed6
EBM
3592018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
360 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
361
362 * configure.srv (ipa_ppc_linux_regobj): Add
363 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
364 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
365 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
366 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
367 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
368 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
369 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
370 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
371 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
372 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
373 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
374 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
375 (ppc_hwcap): Add comment.
376 (ppc_hwcap2): New global.
377 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
378 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
379 (ppc_regsets): Add entries for the DSCR and PPR regsets.
380 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
381 when needed. Set sizes for the the DSCR and PPR regsets.
382 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
383 (initialize_low_arch): Call
384 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
385 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
386 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
387 PPC_TDESC_ISA205_PPR_DSCR_VSX.
388 (initialize_low_tracepoint): Call
389 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
390 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
391
5c849b22
PFC
3922018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
393
394 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
395
8ecfd7bd
SDJ
3962018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
397 Simon Marchi <simark@simark.ca>
398
399 * acinclude.m4: Include "../selftest.m4".
400 * configure: Regenerate.
401 * configure.ac: Use "GDB_AC_SELFTEST".
402 * configure.srv: Use "$enable_unittests" instead of
403 "$development" when checking whether unit tests have been
404 enabled.
405 * server.c (captured_main): Update message informing that
406 selftests have been disabled.
407
96643e35
TT
4082018-10-04 Tom Tromey <tom@tromey.com>
409
410 * configure: Rebuild.
411
da4ae14a
TT
4122018-10-04 Tom Tromey <tom@tromey.com>
413
414 * server.c (handle_status): Rename inner "thread".
415 (process_serial_event): Declare "res" in 'm' case.
416 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
417 (iterate_over_lwps): Rename inner "thread".
418 (linux_qxfer_libraries_svr4): Rename inner "len".
419 * gdbthread.h (find_thread_in_random): Rename inner "thread".
420
7c619dbd
GB
4212018-10-01 Gary Benson <gbenson@redhat.com>
422
423 * gdb_proc_service.h: Moved common code to
424 common/gdb_proc_service.h.
425
3795e814
GB
4262018-10-01 Gary Benson <gbenson@redhat.com>
427
428 * gdb_proc_service.h: Synchronize comments and whitespace with
429 GDB's version of this file.
430
49b036f1
TT
4312018-09-25 Tom Tromey <tom@tromey.com>
432
433 * configure: Rebuild.
434 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
435
8ff03f0b
SM
4362018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
437
438 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
439 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
440 ($(IPA_LIB)): Sort IPA_OBJS.
441
a1cd91dc
SM
4422018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
443
444 * Makefile.in: Remove references to $(ADD_DEPS).
445
752312ba
TT
4462018-09-16 Tom Tromey <tom@tromey.com>
447
448 * remote-utils.c (remote_open): Use GNU style for metasyntactic
449 variables.
450 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
451 variables.
452
f1628857
TT
4532018-09-05 Tom Tromey <tom@tromey.com>
454
455 * configure: Rebuild.
456
ad202fcc
SM
4572018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
458
459 PR build/23399
460 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
461
d3d8724a
TT
4622018-08-27 Tom Tromey <tom@tromey.com>
463
464 PR build/23087:
465 * configure: Rebuild.
466
b4f183d2
TT
4672018-08-27 Tom Tromey <tom@tromey.com>
468
469 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
470 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
471 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
472 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
473 (s390x_emit_stack_adjust): Add casts to unsigned char.
474
4e2aa472
SM
4752018-08-22 Simon Marchi <simon.marchi@ericsson.com>
476
477 PR gdb/23374
478 PR gdb/23375
479 * server.h (struct client_state) <disable_randomization>:
480 Initialize to 1.
481
cf4088a9
SM
4822018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
483
484 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
485 variable.
486 (mips_supply_ptrace_register): Likewise.
487
a0de763e
TT
4882018-07-22 Tom Tromey <tom@tromey.com>
489
490 * configure: Rebuild.
491
b0a7723d
TT
4922018-07-22 Tom Tromey <tom@tromey.com>
493
494 * win32-low.c (win32_create_inferior): Remove unused variables.
495 * gdbreplay.c (remote_open): Remove unused variable.
496 * remote-utils.c (remote_prepare): Remove unused variable.
497 * x86-tdesc.h (X86_TDESC_H): Define.
498 (amd64_expedite_regs): Define conditionally.
499 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
500 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
501 * remote-utils.c (readchar): Remove unused variable.
502
a780ef4f
PA
5032018-07-13 Pedro Alves <palves@redhat.com>
504
505 * linux-low.c (linux_kill): Change parameter to process_info
506 pointer instead of pid. Adjust.
507 * lynx-low.c (lynx_kill): Likewise.
508 * nto-low.c (nto_kill): Likewise.
509 * spu-low.c (spu_kill): Likewise.
510 * win32-low.c (win32_kill): Likewise.
511 * server.c (handle_v_kill, kill_inferior_callback)
512 (detach_or_kill_for_exit): Adjust.
513 * target.c (kill_inferior): Change parameter to process_info
514 pointer instead of pid. Adjust.
515 * target.h (struct target_ops) <kill>: Change parameter to
516 process_info pointer instead of pid. Adjust all implementations
517 and callers.
518 (kill_inferior): Likewise.
519
ef2ddb33
PA
5202018-07-13 Pedro Alves <palves@redhat.com>
521
522 * linux-low.c (linux_detach, linux_join): Change parameter to
523 process_info pointer instead of pid. Adjust.
524 * lynx-low.c (lynx_detach, lynx_join): Likewise.
525 * nto-low.c (nto_detach): Likewise.
526 * spu-low.c (spu_detach, spu_join): Likewise.
527 * win32-low.c (win32_detach, win32_join): Likewise.
528 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
529 * target.h (struct target_ops) <detach, join>: Change parameter to
530 process_info pointer instead of pid. Adjust all implementations
531 and callers.
532 (detach_inferior, join_inferior): Rename 'pid' parameter to
533 'proc'.
534
c7ab0aef
SDJ
5352018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
536 Jan Kratochvil <jan.kratochvil@redhat.com>
537 Paul Fertser <fercerpav@gmail.com>
538 Tsutomu Seki <sekiriki@gmail.com>
539
540 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
541 (OBS): Add 'common/netstuff.o'.
542 (GDBREPLAY_OBS): Likewise.
543 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
544 (remote_open): Implement support for IPv6
545 connections.
546 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
547 and 'wspiapi.h'.
548 (handle_accept_event): Accept connections from IPv6 sources.
549 (remote_prepare): Handle IPv6-style hostnames; implement
550 support for IPv6 connections.
551 (remote_open): Implement support for printing connections from
552 IPv6 sources.
553
31445d10
PA
5542018-07-11 Pedro Alves <palves@redhat.com>
555
556 PR gdb/23377
557 * mem-break.c (any_persistent_commands): Add process_info
558 parameter and use it instead of relying on the current process.
559 Change return type to bool.
560 * mem-break.h (any_persistent_commands): Add process_info
561 parameter and change return type to bool.
562 * server.c (handle_detach): Remove require_running_or_return call.
563 Look up the process_info for the process we're about to detach.
564 If not found, return back error to GDB. Adjust
565 any_persistent_commands call to pass down a process pointer.
566
cb197132
PA
5672018-07-11 Pedro Alves <palves@redhat.com>
568
569 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
570 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
571 instead of collect_register_by_name.
572 * regcache.c (regcache_raw_get_unsigned_by_name): New.
573 * regcache.h (regcache_raw_get_unsigned_by_name): New.
574
1b919490
VB
5752018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
576 Pedro Alves <palves@redhat.com>
577
578 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
579
d7e15655
TT
5802018-07-03 Tom Tromey <tom@tromey.com>
581
582 * linux-low.c: Update.
583 * lynx-low.c: Update.
584 * mem-break.c: Update.
585 * nto-low.c: Update.
586 * remote-utils.c: Update.
587 * server.c: Update.
588 * spu-low.c: Update.
589 * target.c: Update.
590 * win32-low.c: Update.
591
26a57c92
TT
5922018-07-03 Tom Tromey <tom@tromey.com>
593
594 * server.c: Update.
595
0e998d96
TT
5962018-07-03 Tom Tromey <tom@tromey.com>
597
598 * linux-low.c: Update.
599
cc6bcb54
TT
6002018-07-03 Tom Tromey <tom@tromey.com>
601
602 * target.c: Update.
603
e38504b3
TT
6042018-07-03 Tom Tromey <tom@tromey.com>
605
606 * linux-low.c: Update.
607 * linux-mips-low.c: Update.
608 * lynx-low.c: Update.
609 * nto-low.c: Update.
610 * remote-utils.c: Update.
611 * server.c: Update.
612 * spu-low.c: Update.
613 * target.c: Update.
614 * thread-db.c: Update.
615
e99b03dc
TT
6162018-07-03 Tom Tromey <tom@tromey.com>
617
618 * linux-low.c: Update.
619 * linux-mips-low.c: Update.
620 * lynx-low.c: Update.
621 * mem-break.c: Update.
622 * nto-low.c: Update.
623 * remote-utils.c: Update.
624 * server.c: Update.
625 * spu-low.c: Update.
626 * target.c: Update.
627 * tracepoint.c: Update.
628
f2907e49
TT
6292018-07-03 Tom Tromey <tom@tromey.com>
630
631 * linux-low.c: Update.
632 * linux-ppc-low.c: Update.
633 * linux-x86-low.c: Update.
634 * proc-service.c: Update.
635 * server.c: Update.
636 * spu-low.c: Update.
637 * thread-db.c: Update.
638 * win32-low.c: Update.
639
fd79271b
TT
6402018-07-03 Tom Tromey <tom@tromey.com>
641
642 * linux-low.c: Update.
643 * lynx-low.c: Update.
644 * nto-low.c: Update.
645 * remote-utils.c: Update.
646 * spu-low.c: Update.
647 * thread-db.c: Update.
648 * win32-low.c: Update.
649
c0867626
SDJ
6502018-06-29 Joel Brobecker <brobecker@adacore.com>
651
652 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
653 parameter in call to 'amd64_create_target_description'.
654
2512d7ef
JK
6552018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
656
657 * x86-tdesc.h: Remove executable permission flag.
658
d0ac1c44
SM
6592018-06-19 Simon Marchi <simon.marchi@ericsson.com>
660
661 * configure.ac: Remove AC_PREREQ, add missing quoting.
662 * configure: Re-generate.
663 * config.in: Re-generate.
664 * aclocal.m4: Re-generate.
665
c4eb05ff
SM
6662018-06-18 Simon Marchi <simon.marchi@ericsson.com>
667
668 * tracepoint.h (current_traceframe): Remove declaration.
669
02895270
AH
6702018-06-18 Alan Hayward <alan.hayward@arm.com>
671
672 * linux-aarch64-low.c (is_sve_tdesc): New function.
673 (aarch64_sve_regs_copy_to_regcache): Likewise.
674 (aarch64_sve_regs_copy_from_regcache): Likewise.
675 (aarch64_regs_info): Add SVE checks.
676 (initialize_low_arch): Initialize SVE.
677
e9902bfc
AH
6782018-06-18 Alan Hayward <alan.hayward@arm.com>
679
680 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
681
fefa175e
AH
6822018-06-11 Alan Hayward <alan.hayward@arm.com>
683
684 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
685 (initialize_low_tracepoint): Likewise
686 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
687 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
688 param.
689 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
690 checks.
691 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
692
b91ad3ff
AH
6932018-06-11 Alan Hayward <alan.hayward@arm.com>
694
695 * server.h (PBUFSIZ): Increase size
696
f868386e
AH
6972018-06-11 Alan Hayward <alan.hayward@arm.com>
698
699 * regcache.c (regcache::raw_compare): New function.
700 * regcache.h (regcache::raw_compare): New declaration.
701
9c861883
AH
7022018-06-11 Alan Hayward <alan.hayward@arm.com>
703
704 * regcache.c (new_register_cache): Use new.
705 (free_register_cache): Use delete.
706 (register_data): Use const.
707 (supply_register): Move body inside regcache.
708 (regcache::raw_supply): New override function.
709 (collect_register): Move body inside regcache.
710 (regcache::raw_collect): New override function.
711 (regcache::get_register_status): New override function.
712 * regcache.h (struct regcache): Inherit from reg_buffer_common.
713
40591844
TT
7142018-06-09 Tom Tromey <tom@tromey.com>
715
716 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
717 declare queue.
718 (event_queue): Use std::queue.
719 (gdb_event_xfree): Remove.
720 (initialize_event_loop, process_event, wait_for_event): Update.
721
6341380d
SC
7222018-06-08 Stan Cox <scox@redhat.com>
723
724 * win32-low.c (win32_create_inferior): last_ptid and last_status
725 moved to client_state.
726
03349c93
PA
7272018-06-08 Pedro Alves <palves@redhat.com>
728
729 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
730 common/common-exceptions.o, common/common-utils.o,
731 common/errors.o, common/print-utils.o and utils.o.
732 * gdbreplay.c: Include "common-defs.h" instead of the two
733 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
734 string.h or alloca.h.
735 (perror_with_name): Delete.
736 (remote_open): Use xstrdup instead of strdup.
737 (main): Rename to ...
738 (captured_main): ... this.
739 (main): New.
740
8dcc53b3
TT
7412018-06-08 Tom Tromey <tom@tromey.com>
742
743 * linux-low.c (linux_low_read_btrace): Update.
744
c12a5089
SC
7452018-06-04 Stan Cox <scox@redhat.com>
746
747 * server.h (struct client_state): New.
748 * server.c (cont_thread, general_thread, multi_process)
749 (report_fork_events, report_vfork_events, report_exec_events)
750 (report_thread_events, swbreak_feature, hwbreak_feature)
751 (vCont_supported, disable_randomization, pass_signals)
752 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
753 Moved to client_state.
754 * remote-utils.c (remote_debug, noack_mode)
755 (transport_is_reliable): Moved to client_state.
756 * tracepoint.c (current_traceframe): Moved to client_state.
757
758 Update all callers.
759 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
760 linux-low.c, remote-utils.h, target.c: Use client_state.
761
122394f1
AH
7622018-05-31 Alan Hayward <alan.hayward@arm.com>
763
764 * configure.srv: Add new c/h file.
765
95228a0d
AH
7662018-05-31 Alan Hayward <alan.hayward@arm.com>
767
768 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
769 null VQ.
770
d8dab6c3
MR
7712018-05-25 Maciej W. Rozycki <macro@mips.com>
772
773 * gdb.arch/mips-fpregset-core.exp: New test.
774 * gdb.arch/mips-fpregset-core.c: New test source.
775
81e25b7c
EK
7762018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
777
778 PR server/23198
779 * hostio.c (require_int): Do not report overflow for integers
780 between 0xfffffff and 0x7fffffff.
781
7e947ad3
MR
7822018-05-22 Maciej W. Rozycki <macro@mips.com>
783
784 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
785 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
786 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
787 functions.
788 (the_low_target): Wire them.
789
1d75a658
PFC
7902018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
791
792 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
793 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
794 mode. Call collect_register_by_name with vscr using
795 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
796 (ppc_store_vrregset): Add and set vscr_offset variable as in
797 ppc_fill_vrregset. Call supply_register_by_name with vscr using
798 vscr_offset.
799
d078308a
PFC
8002018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
801
802 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
803 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
804 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
805
7273b5fc
PFC
8062018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
807
808 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
809 (ppc_store_vsxregset): Likewise.
810 (ppc_fill_vrregset): Likewise.
811 (ppc_store_vrregset): Likewise.
812 (ppc_fill_evrregset): Likewise.
813 (ppc_store_evrregset): Likewise.
814 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
815 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
816 needed.
817
2e077f5e
PFC
8182018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
819
820 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
821 wordsize of the inferior. Call ppc_linux_target_wordsize.
822
bd64614e
PFC
8232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
824
825 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
826 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
827 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
828 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
829 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
830 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
831 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
832 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
833 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
834 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
835 (tdesc_powerpc_e500l): Remove.
836 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
837 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
838 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
839 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
840 linux-ppc-tdesc.h.
841 (ppc_arch_setup): Remove target description matching code. Fill a
842 ppc_linux_features struct and call ppc_linux_match_description
843 with it.
844
75d74cca
MR
8452018-05-22 Maciej W. Rozycki <macro@mips.com>
846
847 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
848 width of the requested register exceeds the width of the
849 `ptrace' data type.
850 (mips_cannot_store_register): Likewise.
851
e4439e43
MR
8522018-05-21 Maciej W. Rozycki <macro@mips.com>
853
854 * linux-mips-low.c (mips_fetch_register): New function. Update
855 preceding comment.
856 (mips_store_gregset): Supply 0 rather than $restart for $zero.
857 (the_low_target): Wire `mips_fetch_register'.
858
55271bf9
JB
8592018-05-10 Joel Brobecker <brobecker@adacore.com>
860
861 * lynx-i386-low.c (LYNXOS_178): New macro.
862 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
863 the layout on LynxOS-178.
864 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
865 handle floating point registers that are not supported by
866 LynxOS-178.
867
1a34f210
TT
8682018-05-10 Tom Tromey <tom@tromey.com>
869
870 * configure: Rebuild.
871
190852c8
JB
8722018-05-10 Joel Brobecker <brobecker@adacore.com>
873
874 PR server/23158:
875 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
876 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
877 Use it to set the expedite_regs field in the given tdesc.
878 * x86-tdesc.h: New file.
879 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
880 Adjust following the addition of the new expedite_regs parameter
881 to init_target_desc.
882 * linux-tic6x-low.c (tic6x_read_description): Likewise.
883 * linux-x86-tdesc.c: #include "x86-tdesc.h".
884 (i386_linux_read_description, amd64_linux_read_description):
885 Adjust following the addition of the new expedite_regs parameter
886 to init_target_desc.
887 * lynx-i386-low.c: #include "x86-tdesc.h".
888 (lynx_i386_arch_setup): Adjust following the addition of the new
889 expedite_regs parameter to init_target_desc.
890 * nto-x86-low.c: #include "x86-tdesc.h".
891 (nto_x86_arch_setup): Adjust following the addition of the new
892 expedite_regs parameter to init_target_desc.
893 * win32-i386-low.c: #include "x86-tdesc.h".
894 (i386_arch_setup): Adjust following the addition of the new
895 expedite_regs parameter to init_target_desc.
896
7dbac825
JB
8972018-05-10 Joel Brobecker <brobecker@adacore.com>
898
899 PR server/23158:
900 * win32-low.c (win32_create_inferior): Add call to my_wait
901 setting last_status global.
902
906994d9
JB
9032018-05-10 Joel Brobecker <brobecker@adacore.com>
904
905 PR server/23158:
906 * win32-low.c (create_process): Only call gdb_tilde_expand if
907 inferior_cwd is not NULL.
908
8ee22052
AB
9092018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
910
911 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
912 registers to the cache if their values have changed.
913 (i387_xsave_to_cache): Provide default values for x87 control
914 registers when these features are available, but disabled.
915 * regcache.c (supply_register_by_name_zeroed): New function.
916 * regcache.h (supply_register_by_name_zeroed): Declare new
917 function.
918
aff689d3
TT
9192018-05-07 Tom Tromey <tom@tromey.com>
920
921 * configure: Rebuild.
922
85e26832
TT
9232018-05-04 Tom Tromey <tom@tromey.com>
924
925 * configure: Rebuild.
926
a3b60e45
JK
9272018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
928 Pedro Alves <palves@redhat.com>
929
930 * linux-aarch64-low.c (aarch64_stopped_data_address):
931 Likewise.
932
632e107b
TT
9332018-04-27 Tom Tromey <tom@tromey.com>
934
935 * configure: Rebuild.
936
458412c3
TT
9372018-04-23 Tom Tromey <tom@tromey.com>
938
939 * configure: Rebuild.
940
f31c089e
SM
9412018-04-19 Simon Marchi <simon.marchi@ericsson.com>
942
943 * Makefile.in (depcomp): Add "..".
944 (all_deps_files): New and use it.
945
b319b098
AH
9462018-04-18 Alan Hayward <alan.hayward@arm.com>
947
948 * configure.srv (aarch64*-*-linux*): Don't include xml.
949 (i[34567]86-*-cygwin*): Likewise.
950 (i[34567]86-*-linux*): Likewise.
951 (i[34567]86-*-lynxos*): Likewise.
952 (i[34567]86-*-mingw32ce*): Likewise.
953 (i[34567]86-*-mingw*): Likewise.
954 (i[34567]86-*-nto*): Likewise.
955 (tic6x-*-uclinux): Likewise.
956 (x86_64-*-linux*): Likewise.
957 (x86_64-*-mingw*): Likewise.
958 (x86_64-*-cygwin*): Likewise.
959
3b74854b
AH
9602018-04-18 Alan Hayward <alan.hayward@arm.com>
961
962 * tdesc.c: Remove xml parameter.
963
e98577a9
AH
9642018-04-18 Alan Hayward <alan.hayward@arm.com>
965
966 * server.c (get_features_xml): Remove cast.
967 * tdesc.c (void target_desc::accept): Fill in function.
968 (tdesc_get_features_xml): Remove old xml creation.
969 (print_xml_feature::visit_pre): Add xml vistor.
970 * tdesc.h (struct target_desc): Make xmltarget mutable.
971 (tdesc_get_features_xml): Remove declaration.
972
d278f585
AH
9732018-04-18 Alan Hayward <alan.hayward@arm.com>
974
975 * tdesc.c (tdesc_architecture_name): Add new function.
976 (tdesc_osabi_name): Likewise.
977 (tdesc_get_features_xml): Use new functions.
978
eee8a18d
AH
9792018-04-18 Alan Hayward <alan.hayward@arm.com>
980
981 * tdesc.c (tdesc_create_flags): Remove.
982 (tdesc_add_flag): Likewise.
983 (tdesc_named_type): Likewise.
984 (tdesc_create_union): Likewise.
985 (tdesc_create_struct): Likewise.
986 (tdesc_create_vector): Likewise.
987 (tdesc_add_bitfield): Likewise.
988 (tdesc_add_field): Likewise.
989 (tdesc_set_struct_size): Likewise.
990
82ec9bc7
AH
9912018-04-18 Alan Hayward <alan.hayward@arm.com>
992
993 * tdesc.c (~target_desc): Remove implictly deleted items.
994 (init_target_desc): Iterate all features.
995 (tdesc_get_features_xml): Use vector.
996 (tdesc_create_feature): Create feature.
997 * tdesc.h (tdesc_feature) Remove
998 (target_desc): Add features.
999
ea3e7d71
AH
10002018-04-18 Alan Hayward <alan.hayward@arm.com>
1001
1002 * Makefile.in: Add common/tdesc.c
1003 * tdesc.c (init_target_desc): init all reg_defs from register
1004 vector.
1005 (tdesc_create_reg): Create tdesc_reg.
1006 * tdesc.h (tdesc_feature): Add register vector.
1007
17d08cd4
SM
10082018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1009
1010 * tdesc.h (struct target_desc) <features>: Change type to
1011 std::vector<std::string>.
1012 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1013 changes.
1014 (tdesc_get_features_xml): Likewise.
1015 (tdesc_create_feature): Likewise.
1016
5cd3e386
AH
10172018-03-26 Alan Hayward <alan.hayward@arm.com>
1018
1019 * regcache.c (find_register_by_number): Return a ref.
1020 (find_regno): Use references.
1021 (register_size): Likewise.
1022 (register_data): Likewise.
1023 * tdesc.c (target_desc::~target_desc): Remove free calls.
1024 (target_desc::operator==): Use std::vector compare.
1025 (init_target_desc): Use reference.
1026 (tdesc_create_reg): Use reg constructors.
1027 * tdesc.h (struct target_desc): Replace pointer with object.
1028
dff7492c
AH
10292018-03-23 Alan Hayward <alan.hayward@arm.com>
1030
1031 * regcache.c (find_register_by_number): Make static.
1032 (find_regno): Use find_register_by_number
1033 * regcache.h (struct reg): Remove declaration.
1034
d80e5242
AH
10352018-03-23 Alan Hayward <alan.hayward@arm.com>
1036
1037 * tdesc.c (target_desc::~target_desc): Move to here.
1038 (target_desc::operator==): Likewise.
1039 * tdesc.h (target_desc::~target_desc): Move from here.
1040 (target_desc::operator==): Likewise.
1041
f69c5afb
AA
10422018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1043
1044 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1045
ce29f843
AA
10462018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1047
1048 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1049 S390_TDESC_GS.
1050 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1051 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1052 and init_registers_s390_gs_linux64.
1053
c49bd90b
AA
10542018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1055
1056 * linux-s390-low.c (s390_fill_gs): Remove function.
1057 (s390_fill_gsbc): Remove function.
1058 (s390_regsets): Set fill functions for the guarded storage regsets
1059 to NULL.
1060
7edb9bd3
AA
10612018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1062
1063 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1064 the word size. Add comment.
1065 (s390_get_wordsize): New function.
1066 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1067 pswm with it. Instead, use s390_get_wordsize to determine the
1068 word size first and derive the correct tdesc from that directly.
1069
39be3c7e
SM
10702018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1071
1072 * Makefile.in: Include silent-rules.mk.
1073 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1074 (COMPILE): Add ECHO_CXX.
1075 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1076 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1077 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1078 (version-generated.c): Add ECHO_GEN.
1079 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1080 (IPAGENT_COMPILE): Add ECHO_CXX.
1081 (%-generated.c): Add ECHO_REGDAT.
1082
3ae9ce5d
TT
10832018-03-14 Tom Tromey <tom@tromey.com>
1084
1085 PR cli/14977:
1086 * ax.c (ax_printf): Special case for NULL.
1087
e6a58aa8
SM
10882018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1089
1090 * linux-low.c (linux_qxfer_libraries_svr4): Use
1091 xml_escape_text_append.
1092
f6e8a41e
SM
10932018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1094
1095 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1096
b9671caf
SM
10972018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1098
1099 * server.c (handle_general_set): Remove unnecessary xstrdup.
1100
e80aaf61
SM
11012018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1102
1103 * server.c (parse_debug_format_options): Adjust to
1104 delim_string_to_char_ptr_vec changes.
1105 * thread-db.c (thread_db_load_search): Adjust to
1106 dirnames_to_char_ptr_vec changes.
1107
b1223e78
MM
11082018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1109
1110 * target.h (target_enable_btrace, target_disable_btrace)
1111 (target_read_btrace, target_read_btrace_conf): Turn macro into
1112 inline function. Throw error if target method is not defined.
1113 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1114 check for btrace target method. Be prepared to handle exceptions
1115 from btrace target methods.
1116
81561546
SDJ
11172018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1118
1119 * server.c (captured_main): Change order of error message printed
1120 when the current working directory cannot be found.
1121
25e3c82c
SDJ
11222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1123
1124 * server.c: Include "filenames.h" and "pathstuff.h".
1125 (program_name): Delete variable.
1126 (program_path): New anonymous class.
1127 (get_exec_wrapper): Use "program_path" instead of
1128 "program_name".
1129 (handle_v_run): Likewise.
1130 (captured_main): Likewise.
1131 (process_serial_event): Likewise.
1132
b4987c95
SDJ
11332018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1134
1135 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1136 (OBJS): Add "pathstuff.o".
1137 * server.c (current_directory): New global variable.
1138 (captured_main): Initialize "current_directory".
1139
f46cd62a
AH
11402018-02-26 Alan Hayward <alan.hayward@arm.com>
1141
1142 * tdesc.c: Use common/tdesc.h.
1143 * tdesc.h: Likewise.
1144
a543c5ca
AH
11452018-02-20 Alan Hayward <alan.hayward@arm.com>
1146 Simon Marchi <simon.marchi@ericsson.com>
1147
1148 * Makefile.in: Switch order of make rules.
1149
b5884fa7
AH
11502018-02-19 Alan Hayward <alan.hayward@arm.com>
1151
1152 * Makefile.in: Add common directory in build.
1153 * configure.ac: Add common reference.
1154 * configure: Regenerate.
1155
de6242d3
MM
11562018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1157
1158 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1159 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1160 * spu-low.c (spu_target_ops): Likewise.
1161 * win32-low.c (win32_target_ops): Likewise.
1162 * server.c (supported_btrace_packets): Report packets unconditionally.
1163 * target.h (target_ops) <supports_btrace>: Remove.
1164 (target_supports_btrace): Remove.
1165
9ee23a85
MM
11662018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1167
1168 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1169 (handle_btrace_disable): Change return type to void. Use exceptions
1170 to report errors.
1171 (handle_btrace_general_set): Catch exception and copy message to
1172 return message.
1173
8ce47547
TT
11742018-02-08 Tom Tromey <tom@tromey.com>
1175
1176 * linux-low.c (install_software_single_step_breakpoints): Use
1177 make_scoped_restore.
1178 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1179 (do_restore_current_thread_cleanup): Remove.
1180 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1181 declare.
1182
45dd3607
TT
11832018-02-08 Tom Tromey <tom@tromey.com>
1184
1185 * mem-break.c (set_raw_breakpoint_at): Use
1186 gdb::unique_xmalloc_ptr.
1187
e671cd59
PA
11882018-01-30 Pedro Alves <palves@redhat.com>
1189
1190 PR gdb/13211
1191 * target.c (target_terminal::terminal_state): Rename to ...
1192 (target_terminal::m_terminal_state): ... this.
1193
a0aad537
JC
11942018-01-19 James Clarke <jrtc27@jrtc27.com>
1195
1196 * linux-low.c (handle_extended_wait): Surround call to
1197 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1198
4d9b86e1
SM
11992018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1202 linux_ptrace_attach_fail_reason_string now returning an
1203 std::string.
1204 (linux_attach): Likewise.
1205 * thread-db.c (attach_thread): Likewise.
1206
f517c180
EA
12072018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1208
1209 PR gdb/21559
1210 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1211 checking for fs_base/gs_base fields in struct user_regs_struct.
1212 * configure: Regenerate.
1213
9a70f35c
YQ
12142018-01-16 Yao Qi <yao.qi@linaro.org>
1215
1216 PR gdb/18749
1217 * linux-low.c (fetch_register): Call supply_register instead of
1218 error.
1219
605fd3c6
YQ
12202018-01-08 Yao Qi <yao.qi@linaro.org>
1221 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * Makefile.in (OBS): Remove selftest.o.
1224 * configure.ac: Set srv_selftest_objs if $development is true.
1225 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1226 * configure: Re-generated.
1227 * server.c (captured_main): Wrap variable selftest_filter with
1228 GDB_SELF_TEST.
1229
2cc05030
SM
12302018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1231
1232 * server.c (parse_debug_format_options): Return std::string.
1233 (handle_monitor_command, captured_main): Adjust.
1234
e379cee6
PA
12352018-01-05 Pedro Alves <palves@redhat.com>
1236
1237 PR gdb/18653
1238 * server.c (captured_main): Pass quiet=false to
1239 save_original_signals_state.
1240
82e1e79a
JB
12412018-01-01 Joel Brobecker <brobecker@adacore.com>
1242
1243 * gdbreplay.c (gdbreplay_version): Update copyright year in
1244 version message.
1245 * server.c (gdbserver_version): Likewise.
1246
8e481c3b
TT
12472017-12-08 Tom Tromey <tom@tromey.com>
1248
1249 * ax.c (ax_printf): Update.
1250
a8806230
YQ
12512017-12-07 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1254 aarch64_linux_read_description.
1255 * linux-amd64-ipa.c (idx2mask): New array.
1256 (get_ipa_tdesc): Move idx2mask out.
1257 (initialize_low_tracepoint): Initialize target descriptions.
1258 * linux-i386-ipa.c (idx2mask): New array.
1259 (get_ipa_tdesc): Move idx2mask out.
1260 (initialize_low_tracepoint): Initialize target descriptions.
1261
d4a0e8b5
SM
12622017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1263
1264 * tdesc.c (struct tdesc_type): Change return type.
1265 (tdesc_add_flag): Change parameter type.
1266 (tdesc_add_bitfield): Likewise.
1267 (tdesc_add_field): Likewise.
1268 (tdesc_set_struct_size): Likewise.
1269
798a7429
SM
12702017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1271
1272 * regcache.c (registers_to_string): Remove unused variable.
1273
c0e15c9b
SM
12742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * inferiors.c (for_each_inferior_with_data): Remove.
1277 * inferiors.h (for_each_inferior_with_data): Remove.
1278 * server.c (handle_qxfer_threads_worker): Change parameter type.
1279 (handle_qxfer_threads_proper): Use for_each_thread.
1280
f0045347
SM
12812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1282
1283 * inferiors.c (for_each_inferior): Remove.
1284 (clear_inferiors): Use for_each_thread.
1285 * inferiors.h (for_each_inferior): Remove.
1286 * linux-low.c (linux_wait_for_event_filtered): Use
1287 for_each_thread.
1288 (linux_stabilize_threads): Likewise.
1289 * regcache.c (regcache_release): Likewise.
1290 * server.c (gdb_wants_all_threads_stopped): Likewise.
1291 (clear_pending_status_callback): Remove.
1292 (handle_status): Use for_each_thread.
1293 (captured_main): Likewise.
1294 * win32-low.c (child_init_thread_list): Likewise.
1295 (win32_clear_inferiors): Likewise.
1296 (fake_breakpoint_event): Likewise.
1297
9521758b
SM
12982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1299
1300 * inferiors.h (find_inferior): Remove.
1301 * inferiors.c (find_inferior): Remove.
1302
8f86d7aa
SM
13032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1304
1305 * linux-low.c (resume_status_pending_p): Update comment.
1306 (need_step_over_p): Update comment.
1307
e2b44075
SM
13082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1309
1310 * linux-low.c (proceed_one_lwp): Return void, change parameter
1311 type.
1312 (unsuspend_and_proceed_one_lwp): Likewise.
1313 (proceed_all_lwps): Use for_each_thread.
1314 (unstop_all_lwps): Likewise.
1315
c80825ff
SM
13162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1317
1318 * linux-low.c (linux_resume_one_thread): Return void, take
1319 parameter directly.
1320 (linux_resume): Use for_each_thread.
1321
df3e4dbe
SM
13222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * linux-low.c (send_sigstop_callback): Return void, change
1325 parameter type. Rename to...
1326 (send_sigstop): ... this.
1327 (suspend_and_send_sigstop_callback): Return void, change parameter
1328 type. Rename to...
1329 (suspend_and_send_sigstop): ... this.
1330 (stop_all_lwps): Use for_each_thread.
1331
5a6b0a41
SM
13322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1333
1334 * linux-low.c (lwp_running): Return bool, remove unused
1335 argument.
1336 (linux_stabilize_threads): Use find_thread.
1337
39a64da5
SM
13382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1339
1340 * linux-low.c (select_singlestep_lwp_callback): Remove.
1341 (count_events_callback): Remove.
1342 (select_event_lwp_callback): Remove.
1343 (select_event_lwp): Use find_thread/for_each_thread.
1344
a1385b7b
SM
13452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1346
1347 * linux-low.c (not_stopped_callback): Return bool, take filter
1348 argument directly.
1349 (linux_wait_for_event_filtered): Use find_thread.
1350 (linux_wait_1): Likewise.
1351
454296a2
SM
13522017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1353
1354 * linux-low.c (same_lwp): Remove.
1355 (find_lwp_pid): Use find_thread.
1356
6b2a85da
SM
13572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1358
1359 * linux-low.c (delete_lwp_callback): Remove.
1360 (linux_mourn): Use for_each_thread.
1361
798a38e8
SM
13622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1363
1364 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1365 args parameter, don't check for pid.
1366 (linux_detach): Use for_each_thread.
1367
e4eb0dec
SM
13682017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1369
1370 * linux-low.c (struct counter): Remove.
1371 (second_thread_of_pid_p): Remove.
1372 (last_thread_of_process_p): Use find_thread.
1373
83e1b6c1
SM
13742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1375
1376 * inferiors.c (find_inferior_in_random): Remove.
1377 * inferiors.h (find_inferior_in_random): Remove.
1378 * linux-low.c (status_pending_p_callback): Return bool, accept
1379 parameter ptid directly.
1380 (linux_wait_for_event_filtered): Use find_thread_in_random.
1381 (linux_wait_1): Likewise.
1382
8dc7b443
SM
13832017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1384
1385 * inferiors.c (find_inferior_id): Remove.
1386 (find_thread_ptid): Move implemention from find_inferior_id to
1387 here.
1388 * inferiors.h (find_inferior_id): Remove.
1389 * server.c (handle_status): Use find_thread_ptid.
1390 (process_serial_event): Likewise.
1391 * thread-db.c (find_one_thread): Likewise.
1392 (thread_db_thread_handle): Likewise.
1393 * win32-low.c (thread_rec): Likewise.
1394 (child_delete_thread): Likewise.
1395 (win32_thread_alive): Likewise.
1396 (get_child_debug_event): Likewise.
1397
da25033c
SM
13982017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1399
1400 * linux-mips-low.c (update_watch_registers_callback): Return
1401 void, remove pid_p parameter, don't check for pid.
1402 (mips_insert_point, mips_remove_point): Use for_each_thread.
1403
c91bb56b
SM
14042017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1405
1406 * lynx.low (lynx_delete_thread_callback): Remove.
1407 (lynx_mourn): Use for_each_thread.
1408
634a3254
SM
14092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1410
1411 * regcache.c (regcache_invalidate_one): Remove.
1412 (regcache_invalidate_pid): use for_each_thread.
1413
41272101
TT
14142017-11-26 Tom Tromey <tom@tromey.com>
1415
1416 * linux-low.c (linux_create_inferior): Update.
1417
f5291a6f
UW
14182017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1419
1420 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1421
6654d750
AH
14222017-11-24 Alan Hayward <alan.hayward@arm.com>
1423
1424 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1425 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1426 * linux-aarch64-tdesc-selftest.c: New file.
1427 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1428
14292017-11-24 Alan Hayward <alan.hayward@arm.com>
1430
1431 * configure.srv: Add new file.
1432 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1433 * linux-aarch64-tdesc-selftest.c: New file.
1434 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1435
49bdb7ee
AH
14362017-11-24 Alan Hayward <alan.hayward@arm.com>
1437
1438 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1439 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1440 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1441
d6d7ce56
AH
14422017-11-24 Alan Hayward <alan.hayward@arm.com>
1443
1444 * configure.srv: Add new files.
1445 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1446 aarch64_linux_read_description.
1447 * linux-aarch64-low.c (aarch64_linux_read_description):
1448 Merge with aarch64_arch_setup.
1449 (aarch64_arch_setup): Call aarch64_linux_read_description.
1450 * linux-aarch64-tdesc.c: New file.
1451 * linux-aarch64-tdesc.h: New file.
1452
506fe5f4
YQ
14532017-11-24 Yao Qi <yao.qi@linaro.org>
1454
1455 * configure.srv: Set $srv_regobj for tic6x-linux.
1456 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1457 (tic6x_read_description): Move some code to tic6x_arch_setup.
1458 (tic6x_tdesc_test): New function.
1459 (initialize_low_arch): Call selftests::register_test.
1460
29f9a567
YQ
14612017-11-22 Yao Qi <yao.qi@linaro.org>
1462
1463 * remote-utils.c (prepare_resume_reply): Use memcpy.
1464
578290ec
SM
14652017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1466
1467 * linux-low.c (kill_one_lwp_callback): Return void, take
1468 argument directly, don't filter on pid.
1469 (linux_kill): Use for_each_thread.
1470
eca55aec
SM
14712017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1472
1473 * linux-low.c (need_step_over_p): Return bool, remove dummy
1474 argument.
1475 (linux_resume, proceed_all_lwps): Use find_thread.
1476
25c28b4d
SM
14772017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1478
1479 * linux-low.c (resume_status_pending_p): Return bool, remove
1480 flag_p argument.
1481 (linux_resume): Use find_thread.
1482
5fdda392
SM
14832017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1484
1485 * linux-low.c (struct thread_resume_array): Remove.
1486 (linux_set_resume_request): Return void, take arguments
1487 directly.
1488 (linux_resume): Use for_each_thread.
1489
fcb056a5
SM
14902017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1491
1492 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1493 return bool, remove data argument.
1494 (linux_stabilize_threads): Use find_thread.
1495
139720c5
SM
14962017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1497
1498 * linux-low.c (unsuspend_one_lwp): Remove.
1499 (unsuspend_all_lwps): Use for_each_thread, inline code from
1500 unsuspend_one_lwp.
1501
6d1e5673
SM
15022017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1503
1504 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1505 * linux-low.c (struct iterate_over_lwps_args): Remove.
1506 (iterate_over_lwps_filter): Remove.
1507 (iterate_over_lwps): Use find_thread.
1508
bbf550d5
SM
15092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1510
1511 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1512 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1513 code from reset_lwp_ptrace_options_callback.
1514
00192f77
SM
15152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1516
1517 * linux-arm-low.c (struct update_registers_data): Remove.
1518 (update_registers_callback): Return void, take arguments
1519 directly, don't check thread's pid.
1520 (arm_insert_point, arm_remove_point): Use for_each_thread.
1521
2bee2b6c
SM
15222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1523
1524 * win32-low.c (continue_one_thread): Return void, take argument
1525 directly.
1526 (child_continue): Use for_each_thread.
1527
0b360f19
SM
15282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1529
1530 * win32-i386-low.c (update_debug_registers_callback): Rename
1531 to ...
1532 (update_debug_registers): ... this, return void, remove pid_p arg.
1533 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1534
f27866ba
SM
15352017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1536
1537 * inferiors.h (struct process_info): Add constructor, initialize
1538 fields..
1539 <syscalls_to_catch>: Change type to std::vector<int>.
1540 * inferiors.c (add_process): Allocate process_info with new.
1541 (remove_process): Free process_info with delete.
1542 * linux-low.c (handle_extended_wait): Adjust.
1543 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1544 * server.c (handle_general_set): Adjust.
1545
e849ea89
PA
15462017-11-16 Pedro Alves <palves@redhat.com>
1547
1548 * remote-utils.c (remote_close): Block SIGIO signals instead of
1549 uninstalling the SIGIO handler.
1550
1d0aa65c
AH
15512017-11-16 Alan Hayward <alan.hayward@arm.com>
1552
1553 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1554
3491a34c
YQ
15552017-11-16 Yao Qi <yao.qi@linaro.org>
1556
1557 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1558 (tic6x_store_gregset): Likewise.
1559 (tic6x_usrregs_info): Move it up.
1560
a602f924
AH
15612017-11-15 Alan Hayward <alan.hayward@arm.com>
1562
1563 * Makefile.in: Update arch rules.
1564 * configure.srv: Explicitly mark arch/ files.
1565
5616b6c3
AS
15662017-11-13 Andreas Schwab <schwab@suse.de>
1567
1568 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1569 function.
1570 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1571
d1928160
PA
15722017-11-06 Pedro Alves <palves@redhat.com>
1573
1574 * config.in, configure: Regenerate.
1575
bac608e7
SM
15762017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * target.c (struct thread_search): Remove.
1579 (thread_search_callback): Remove.
1580 (prepare_to_access_memory): Use for_each_thread instead of
1581 find_inferior. Inline code from thread_search_callback.
1582
eaddb425
SM
15832017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1584
1585 * server.c (struct visit_actioned_threads_data): Remove.
1586 (visit_actioned_threads): Change prototype to take arguments
1587 directly.
1588 (resume): Use find_thread instead of find_inferior.
1589
99078d34
SM
15902017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1591
1592 * server.c (queue_stop_reply_callback): Change prototype, return
1593 void.
1594 (find_status_pending_thread_callback): Remove.
1595 (handle_status): Replace find_inferior with find_thread and
1596 for_each_thread.
1597
cc628f3d
AH
15982017-10-25 Alan Hayward <alan.hayward@arm.com>
1599
1600 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1601 with REGNO.
1602 (aarch64_store_gregset): Likewise.
1603 (aarch64_fill_fpregset): Likewise.
1604 (aarch64_store_fpregset): Likewise.
1605
4d3bb80e
SM
16062017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1607
1608 * gdbthread.h (find_thread, for_each_thread): New functions.
1609 * inferiors.c (thread_of_pid): Remove.
1610 (find_any_thread_of_pid): Use find_thread.
1611 * linux-low.c (num_lwps): Use for_each_thread.
1612
7a7cdfa0
YQ
16132017-10-17 Yao Qi <yao.qi@linaro.org>
1614
1615 * Makefile.in: Remove one rule.
1616 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1617
e675d170
YQ
16182017-10-17 Yao Qi <yao.qi@linaro.org>
1619
1620 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1621 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1622
7eb4e0f9
YQ
16232017-10-17 Yao Qi <yao.qi@linaro.org>
1624
1625 * configure.srv: Rename arm.o with arch/arm.o.
1626
60d6cfc9
YQ
16272017-10-17 Yao Qi <yao.qi@linaro.org>
1628
1629 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1630 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1631 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1632 (arch-i386.o, arch-amd64.o): Remove rules.
1633 (arch/%.o): New rule.
1634 Update POSTCOMPILE and COMPILE.pre.
1635 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1636 * configure: Re-generated.
1637 * configure.srv: Replace arch-i386.o with arch/i386.o.
1638 Replace arch-amd64.o with arch/amd64.o.
1639
5bfda255
YQ
16402017-10-16 Yao Qi <yao.qi@linaro.org>
1641
1642 * configure: Regenerated.
1643
9c80ecd6
SM
16442017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * inferiors.h: (struct inferior_list): Remove.
1647 (struct inferior_list_entry); Remove.
1648 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1649 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1650 get_first_inferior): Remove.
1651 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1652 find_inferior_id, find_inferior_in_random): Change signature.
1653 * inferiors.c (all_threads): Change type to
1654 std::list<thread_info *>.
1655 (get_thread): Remove macro.
1656 (find_inferior, find_inferior_id): Change signature, implement
1657 using find_thread.
1658 (find_inferior_in_random): Change signature, implement using
1659 find_thread_in_random.
1660 (for_each_inferior, for_each_inferior_with_data): Change
1661 signature, implement using for_each_thread.
1662 (add_inferior_to_list, remove_inferior): Remove.
1663 (add_thread, get_first_thread, thread_of_pid,
1664 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1665 (get_first_inferior, one_inferior_p, clear_inferior_list):
1666 Remove.
1667 (clear_inferiors, get_thread_process): Update.
1668 * gdbthread.h: Include <list>.
1669 (struct thread_info) <entry>: Remove field.
1670 <id>: New field.
1671 (all_threads): Change type to std::list<thread_info *>.
1672 (get_first_inferior): Add doc.
1673 (find_thread, for_each_thread, find_thread_in_random): New
1674 functions.
1675 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1676 * linux-arm-low.c (update_registers_callback): Update.
1677 * linux-low.c (second_thread_of_pid_p): Update.
1678 (kill_one_lwp_callback, linux_detach_lwp_callback,
1679 delete_lwp_callback, status_pending_p_callback, same_lwp,
1680 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1681 iterate_over_lwps, not_stopped_callback,
1682 resume_stopped_resumed_lwps, count_events_callback,
1683 select_singlestep_lwp_callback, select_event_lwp_callback,
1684 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1685 suspend_and_send_sigstop_callback, wait_for_sigstop,
1686 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1687 lwp_running, linux_set_resume_request, resume_status_pending_p,
1688 need_step_over_p, start_step_over, linux_resume_one_thread,
1689 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1690 reset_lwp_ptrace_options_callback): Update.
1691 * linux-mips-low.c (update_watch_registers_callback): Update.
1692 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1693 Update.
1694 (free_register_cache_thread_one): Remove.
1695 (regcache_release): Update.
1696 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1697 handle_qxfer_threads_worker): Update.
1698 (handle_query): Update, use list iterator.
1699 (visit_actioned_threads, handle_pending_status,
1700 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1701 clear_pending_status_callback, set_pending_status_callback,
1702 find_status_pending_thread_callback, handle_status,
1703 process_serial_event): Update.
1704 * target.c (thread_search_callback): Update.
1705 * thread-db.c (thread_db_get_tls_address): Update.
1706 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1707 Update.
1708 * win32-i386-low.c (update_debug_registers_callback): Update.
1709 * win32-low.c (delete_thread_info, child_delete_thread,
1710 continue_one_thread, suspend_one_thread,
1711 get_child_debug_event): Adjust.
1712
9179355e
SM
17132017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1714
1715 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1716 * inferiors.h: Include <list>.
1717 (struct process_info) <entry>: Remove field.
1718 <pid>: New field.
1719 (pid_of): Change macro to function.
1720 (ptid_of, lwpid_of): Remove macro.
1721 (all_processes): Change type to std::list<process_info *>.
1722 (ALL_PROCESSES): Remove macro.
1723 (for_each_process, find_process): New function.
1724 * inferiors.c (all_processes): Change type to
1725 std::list<process_info *>.
1726 (find_thread_process): Adjust.
1727 (add_process): Likewise.
1728 (remove_process): Likewise.
1729 (find_process_pid): Likewise.
1730 (get_first_process): Likewise.
1731 (started_inferior_callback): Remove.
1732 (have_started_inferiors_p): Adjust.
1733 (attached_inferior_callback): Remove.
1734 (have_attached_inferiors_p): Adjust.
1735 * linux-low.c (check_zombie_leaders): Likewise.
1736 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1737 (x86_linux_update_xmltarget): Adjust.
1738 * server.c (handle_query): Likewise.
1739 (gdb_reattached_process): Remove.
1740 (handle_status): Adjust.
1741 (kill_inferior_callback): Likewise.
1742 (detach_or_kill_inferior): Remove.
1743 (print_started_pid): Likewise.
1744 (print_attached_pid): Likewise.
1745 (detach_or_kill_for_exit): Update.
1746 (process_serial_event): Likewise.
1747 * linux-arm-low.c (arm_new_fork): Likewise.
1748
c9cb8905
SM
17492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * dll.h: Include <list>.
1752 (struct dll_info): Add constructor.
1753 <entry>: Remove field.
1754 (all_dlls): Change type to std::list<dll_info>.
1755 * dll.c: Include <algorithm>.
1756 (get_dll): Remove macro.
1757 (all_dlls): Change type to std::list<dll_info *>.
1758 (free_one_dll): Remove.
1759 (match_dll): Likewise.
1760 (loaded_dll): Adjust.
1761 (unloaded_dll): Adjust to all_dlls type change, use
1762 std::find_if. Inline code from match_dll.
1763 (clear_dlls): Adjust to all_dlls type change.
1764 * server.c (emit_dll_description): Remove.
1765 (handle_qxfer_libraries): Adjust to all_dlls type change,
1766 integrate emit_dll_description's functionality.
1767
04ec7890
SM
17682017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1769
1770 * linux-low.h (struct linux_target_ops) <delete_process>: New
1771 field.
1772 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1773 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1774 (struct linux_target_ops): Add delete_process callback.
1775 * linux-arm-low.c (arm_delete_process): New.
1776 (struct linux_target_ops): Add delete_process callback.
1777 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1778 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1779 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1780 * linux-mips-low.c (mips_linux_delete_process): New.
1781 (struct linux_target_ops): Add delete_process callback.
1782 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1783 * linux-s390-low.c (struct linux_target_ops): Likewise.
1784 * linux-sh-low.c (struct linux_target_ops): Likewise.
1785 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1786 * linux-tile-low.c (struct linux_target_ops): Likewise.
1787 * linux-x86-low.c (x86_linux_delete_process): New.
1788 (struct linux_target_ops): Add delete_process callback.
1789 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1790
466eecee
SM
17912017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1792
1793 * linux-aarch64-low.c (the_low_target): Add thread delete
1794 callback.
1795 * linux-arm-low.c (arm_delete_thread): New function.
1796 (the_low_target): Add thread delete callback.
1797 * linux-bfin-low.c (the_low_target): Likewise.
1798 * linux-crisv32-low.c (the_low_target): Likewise.
1799 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1800 set.
1801 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1802 field.
1803 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1804 * linux-mips-low.c (mips_linux_delete_thread): New function.
1805 (the_low_target): Add thread delete callback.
1806 * linux-ppc-low.c (the_low_target): Likewise.
1807 * linux-s390-low.c (the_low_target): Likewise.
1808 * linux-sh-low.c (the_low_target): Likewise.
1809 * linux-tic6x-low.c (the_low_target): Likewise.
1810 * linux-tile-low.c (the_low_target): Likewise.
1811 * linux-x86-low.c (the_low_target): Likewise.
1812 * linux-xtensa-low.c (the_low_target): Likewise.
1813
b79f7801
YZ
18142017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1815
1816 * win32-low.c: Include "common-inferior.h".
1817
bc3b087d
SDJ
18182017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1819
1820 * inferiors.c (set_inferior_cwd): New function.
1821 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1822 (handle_query): Inform that QSetWorkingDir is supported.
1823 * win32-low.c (create_process): Pass the inferior's cwd to
1824 CreateProcess.
1825
d092c5a2
SDJ
18262017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1827
1828 * inferiors.c (current_inferior_cwd): New global variable.
1829 (get_inferior_cwd): New function.
1830 * inferiors.h (struct process_info) <cwd>: New field.
1831
7da0a886
SDJ
18322017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1833
1834 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1835 (OBS): Add gdb_tilde_expand.o.
1836
289a6840
SM
18372017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1838
1839 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1840 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1841
256642e8
PA
18422017-09-29 Pedro Alves <palves@redhat.com>
1843
1844 * ax.c (gdb_parse_agent_expr): Constify.
1845 * ax.h (gdb_parse_agent_expr): Constify.
1846 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1847 Constify.
1848 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1849 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1850 * remote-utils.h (read_ptid): Constify.
1851 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1852 (process_point_options, process_serial_event): Constify.
1853 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1854 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1855 (cmd_qtbuffer): Constify.
1856
5b9ca4d4
PA
18572017-09-29 Pedro Alves <palves@redhat.com>
1858
1859 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1860 fails.
1861
94c207e0
PA
18622017-09-29 Pedro Alves <palves@redhat.com>
1863
1864 * linux-low.c (handle_extended_wait): Pass parent thread instead
1865 of process to thread_db_notice_clone.
1866 * linux-low.h (thread_db_notice_clone): Replace parent process
1867 parameter with parent thread parameter.
1868 * thread-db.c (find_one_thread): Add comment.
1869 (thread_db_notice_clone): Replace parent process parameter with
1870 parent thread parameter. Temporarily switch to the parent thread.
1871
75352e28
SDJ
18722017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1873
1874 * gdbthread.h: Include "common-gdbthread.h".
1875 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1876 "if" when validating the ptid.
1877 * remote-utils.c: Include "gdbthread.h".
1878 (prepare_resume_reply): Use "switch_to_thread".
1879 * target.c (done_accessing_memory): Likewise.
1880
ad339634
AA
18812017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1882
1883 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1884 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1885 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1886 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1887 s390x-gs-linux64-ipa.o to ipa_obj.
1888 * linux-s390-low.c (HWCAP_S390_GS): New define.
1889 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1890 New functions.
1891 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1892 (s390_arch_setup): Check for guarded-storage support and choose
1893 appropriate tdesc.
1894 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1895 init_registers_s390x_gs_linux64.
1896 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1897 enum value.
1898 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1899 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1900
cc4d742f
SM
19012017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1902
1903 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1904
f6327dcb
KB
19052017-09-21 Kevin Buettner <kevinb@redhat.com>
1906
1907 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1908 (thread_db_thread_handle): Declare.
1909 * linux-low.c (linux_target_ops): Initialize thread_handle.
1910 * server.c (handle_qxfer_threads_worker): Add support for
1911 "handle" attribute.
1912 * target.h (struct target_ops): Add new function pointer,
1913 thread_handle.
1914 (target_thread_handle): Define.
1915 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1916 field in lwp.
1917 (thread_db_thread_handle): New function.
1918
86299109
KB
19192017-09-21 Kevin Buettner <kevinb@redhat.com>
1920
1921 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1922 * linux-low.h (thread_db_notice_clone): Declare.
1923 * thread-db.c (thread_db_notice_clone): New function.
1924
f557a88a
PA
19252017-09-21 Pedro Alves <palves@redhat.com>
1926
1927 * server.c (gdb_read_memory, handle_status, process_serial_event)
1928 (handle_serial_event, handle_target_event): Adjust to
1929 set_desired_thread prototype change.
1930 * target.c (set_desired_thread): Remove 'use_general' parameter
1931 and adjust.
1932 * target.h (set_desired_thread): Remove 'use_general' parameter.
1933
223ffa71
TT
19342017-09-20 Tom Tromey <tom@tromey.com>
1935
1936 * target.c (target_terminal::terminal_state): Define.
1937 (target_terminal::init): Rename from target_terminal_init.
1938 (target_terminal::inferior): Rename from
1939 target_terminal_inferior.
1940 (target_terminal::ours): Rename from target_terminal_ours.
1941 (target_terminal::ours_for_output, target_terminal::info): New.
1942
04fd3ba9
SM
19432017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1944
1945 * server.c (accumulate_file_name_length): Remove.
1946 (emit_dll_description): Adjust to std::string change.
1947 (handle_qxfer_libraries): Use std::string to hold document.
1948
5e187554
SM
19492017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1952 return type of xml_escape_text.
1953 * server.c (emit_dll_description): Likewise.
1954
1526853e
SM
19552017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1956
1957 * server.c (captured_main): Accept argument for --selftest.
1958 Update run_tests call.
1959 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1960 when registering selftests.
1961
c4dfafab
SDJ
19622017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1963
1964 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1965 instead of "VEC" for "target_desc.reg_defs".
1966 (regcache_cpy): Likewise.
1967 (registers_to_string): Likewise.
1968 (registers_from_string): Likewise.
1969 (find_regno): Likewise.
1970 (supply_regblock): Likewise.
1971 (regcache_raw_read_unsigned): Likewise.
1972 * tdesc.c (init_target_desc): Likewise.
1973 (tdesc_create_reg): Likewise.
1974 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1975 (struct target_desc) <reg_defs>: Convert to "std::vector".
1976 (target_desc): Do not initialize "reg_defs".
1977 (~target_desc): Update code to use "std::vector" instead of "VEC"
1978 for "target_desc.reg_defs".
1979 (operator==): Likewise.
1980
124aceb4
SM
19812017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1982
1983 * inferiors.h (thread_to_gdb_id): Remove.
1984 * inferiors.c (thread_to_gdb_id): Remove.
1985 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1986 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1987 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1988 Likewise.
1989 * nto-low.c (nto_fetch_registers, nto_store_registers,
1990 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1991
96cde54f
SM
19922017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1993
1994 * inferiors.h (gdb_id_to_thread_id): Remove.
1995 * inferiors.c (gdb_id_to_thread_id): Remove.
1996 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1997 removal. Move pid declaration closer to where it's used.
1998
e8ca139e
SM
19992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * server.c (handle_detach): New function.
2002 (process_serial_event): Move code out, call handle_detach.
2003
f8a4e119
SM
20042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2005
2006 * server.c (require_running): Rename to ...
2007 (require_running_or_return): ... this ...
2008 (require_running_or_break): ... and this.
2009 (handle_query, process_serial_event): Adjust.
2010
0eb0a407
SM
20112017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2012
2013 * linux-low.c (linux_set_resume_request): Remove unused
2014 variables.
2015
785922a5
SM
20162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2017
2018 * server.c (first_thread_of): Remove.
2019 (process_serial_event): Replace usage of first_thread_of with
2020 find_any_thread_of_pid.
2021 * tracepoint.c (same_process_p): Remove.
2022 (gdb_agent_about_to_close): Replace usage of same_process_p with
2023 find_any_thread_of_pid.
2024 * linux-x86-low.c (same_process_callback): Remove.
2025 (x86_arch_setup_process_callback): Replace usage of
2026 same_process_callback with find_any_thread_of_pid.
2027 * thread-db.c (any_thread_of): Remove.
2028 (switch_to_process): Replace usage of any_thread_of with
2029 find_any_thread_of_pid.
2030 * inferiors.c (thread_pid_matches_callback): Remove.
2031 (find_thread_process): Adjust to use find_any_thread_of_pid.
2032
a059f00c
SDJ
20332017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2034
2035 * regcache.c (get_thread_regcache): Guard calls to "memset"
2036 with "!VEC_empty".
2037
cc397f3a
SDJ
20382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2039
2040 * linux-low.c (handle_extended_wait): Use
2041 "allocate_target_description" instead of "XNEW".
2042 * linux-x86-low.c (initialize_low_arch): Likewise.
2043
22916b07
YQ
20442017-09-05 Yao Qi <yao.qi@linaro.org>
2045
2046 * configure.srv (srv_i386_regobj): Remove.
2047 (srv_amd64_regobj): Remove.
2048 (srv_regobj): Set it to "" for x86 non-linux targets.
2049 * linux-x86-tdesc.c (i386_linux_read_description):
2050 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2051 (init_registers_i386): Remove the declaration.
2052 (tdesc_i386): Remove the declaration.
2053 (lynx_i386_arch_setup): Call i386_create_target_description.
2054 * nto-x86-low.c: Likewise.
2055 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2056 [!__x86_64__]: include arch/i386.h.
2057 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2058
38602d55
YQ
20592017-09-05 Yao Qi <yao.qi@linaro.org>
2060
2061 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2062 i386/amd64-XXX-linux from it.
2063
44b886ff
YQ
20642017-09-05 Yao Qi <yao.qi@linaro.org>
2065
2066 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2067 false.
2068 (ipa_amd64_linux_regobj): Remove.
2069 (ipa_x32_linux_regobj): Remove.
2070
b4570e4b
YQ
20712017-09-05 Yao Qi <yao.qi@linaro.org>
2072
2073 * Makefile.in (arch-amd64.o): New rule.
2074 * configure.srv: Append arch-amd64.o.
2075 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2076 (get_ipa_tdesc): Call amd64_linux_read_description.
2077 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2078 and init_registers_amd64_XXX.
2079 * linux-x86-low.c (x86_linux_read_description): Call
2080 amd64_linux_read_description.
2081 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2082 (initialize_low_arch): Don't call init_registers_x32_XXX and
2083 init_registers_amd64_XXX.
2084 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2085 and tdesc_amd64_XXX.
2086 [__x86_64__] (amd64_tdesc_test): New function.
2087 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2088 and init_registers_amd64_XXX.
2089 * linux-x86-tdesc.c: Include arch/amd64.h.
2090 (xcr0_to_tdesc_idx): New function.
2091 (i386_linux_read_description): New function.
2092 (amd64_get_ipa_tdesc_idx): New function.
2093 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2094 (amd64_get_ipa_tdesc): Declare.
2095
d1f28ea2
YQ
20962017-09-05 Yao Qi <yao.qi@linaro.org>
2097
2098 * configure.srv (srv_i386_linux_xmlfiles): Remove
2099 i386/i386-XXX-linux.xml from it.
2100
25a93583
YQ
21012017-09-05 Yao Qi <yao.qi@linaro.org>
2102
2103 * configure.srv: Set srv_i386_linux_regobj empty if $development
2104 is false.
2105 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2106 initialize_low_tdesc.
2107 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2108 with #if initialize_low_tdesc.
2109 * linux-x86-tdesc-selftest.c: New file.
2110 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2111
5f035c07
YQ
21122017-09-05 Yao Qi <yao.qi@linaro.org>
2113
2114 * Makefile.in (arch-i386.o): New rule.
2115 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2116 (x86_64-*-linux*): Likewise.
2117 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2118 include arch/i386.h.
2119 (i386_linux_read_description): Remove code and call
2120 i386_create_target_description.
2121 * tdesc.c (allocate_target_description): New function.
2122 * tdesc.h (set_tdesc_architecture): Remove declaration.
2123 (set_tdesc_osabi): Likewise.
2124
0abe8a89
YQ
21252017-09-05 Yao Qi <yao.qi@linaro.org>
2126
2127 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2128 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2129 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2130 .xmltarget.
2131 * server.c (get_features_xml): Call tdesc_get_features_xml.
2132 * tdesc.c (set_tdesc_architecture): New function.
2133 (set_tdesc_osabi): New function.
2134 (tdesc_get_features_xml): New function.
2135 (tdesc_create_feature): Add an argument.
2136 * tdesc.h (struct target_desc) <features>: New field.
2137 <arch, osabi>: New field.
2138 (~target_desc): xfree features, arch, and osabi.
2139 (target_desc::oerator==): Don't compare .xmltarget.
2140 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2141 (set_tdesc_osabi): Likewise.
2142 (tdesc_get_features_xml): Likewise.
2143
0a188386
YQ
21442017-09-05 Yao Qi <yao.qi@linaro.org>
2145
2146 * linux-x86-tdesc.c: Include selftest.h.
2147 (i386_tdesc_test): New function.
2148 (initialize_low_tdesc): Call selftests::register_test.
2149 * tdesc.h: Include regdef.h.
2150 (target_desc): Override operator == and !=.
2151
f49ff000
YQ
21522017-09-05 Yao Qi <yao.qi@linaro.org>
2153
2154 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2155 (ipa_obj): Likewise.
2156 * linux-i386-ipa.c: Include common/x86-xstate.h
2157 (get_ipa_tdesc): Call i386_linux_read_description.
2158 (initialize_low_tracepoint): Don't call init_registers_XXX
2159 functions, call initialize_low_tdesc instead.
2160 * linux-x86-low.c (x86_linux_read_description): Call
2161 i386_linux_read_description.
2162 (initialize_low_arch): Don't call init_registers_i386_XXX
2163 functions, call initialize_low_tdesc.
2164 * linux-x86-tdesc.c: New file.
2165 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2166 (i386_get_ipa_tdesc_idx): Declare.
2167 (i386_get_ipa_tdesc): Declare.
2168 (initialize_low_tdesc): Declare.
2169
2b68ef2f
YQ
21702017-09-05 Yao Qi <yao.qi@linaro.org>
2171
2172 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2173 instead of 0.
2174
f7000548
YQ
21752017-09-05 Yao Qi <yao.qi@linaro.org>
2176
2177 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2178 * regcache.c (get_thread_regcache): Use VEC_length.
2179 (init_register_cache): Likewise.
2180 (regcache_cpy): Likewise.
2181 (registers_to_string): Iterate reg_defs via VEC_iterate.
2182 (find_regno): Likewise.
2183 (find_register_by_number): Use VEC_index.
2184 (register_size): Call find_register_by_number.
2185 (register_data): Call find_register_by_number.
2186 (supply_regblock): Use VEC_length.
2187 (regcache_raw_read_unsigned): Likewise.
2188 * tdesc.c (init_target_desc): Iterate reg_defs via
2189 VEC_iterate.
2190 (default_description): Update initializer.
2191 (copy_target_description): Don't update field num_registers.
2192 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2193 <num_registers>: Remove.
2194
50a421ac
SM
21952017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2196
2197 * Makefile.in (.SECONDARY): Define target.
2198
23fdd69e
SM
21992017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2200
2201 * linux-low.c (linux_wait_1): Adjust.
2202 * server.c (queue_stop_reply_callback): Adjust.
2203
0a2dde4a
SDJ
22042017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2205
2206 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2207 QEnvironmentUnset and QEnvironmentReset packets.
2208 (handle_query): Inform remote that QEnvironmentHexEncoded,
2209 QEnvironmentUnset and QEnvironmentReset are supported.
2210
6afd337d
SM
22112017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2212
2213 * inferiors.h (inferior_target_data): Rename to ...
2214 (thread_target_data): ... this.
2215 (inferior_regcache_data): Rename to ...
2216 (thread_regcache_data): ... this.
2217 (set_inferior_regcache_data): Rename to ...
2218 (set_thread_regcache_data): ... this.
2219 * inferiors.c (inferior_target_data): Rename to ...
2220 (thread_target_data): ... this.
2221 (inferior_regcache_data): Rename to ...
2222 (thread_regcache_data): ... this.
2223 (set_inferior_regcache_data): Rename to ...
2224 (set_thread_regcache_data): ... this.
2225 (free_one_thread): Update.
2226 * linux-low.h (get_thread_lwp): Update.
2227 * regcache.c (get_thread_regcache): Update.
2228 (regcache_invalidate_thread): Update.
2229 (free_register_cache_thread): Update.
2230 * win32-i386-low.c (update_debug_registers_callback): Update.
2231 (win32_get_current_dr): Update.
2232 * win32-low.c (thread_rec): Update.
2233 (delete_thread_info): Update.
2234 (continue_one_thread): Update.
2235 (suspend_one_thread): Update.
2236
a160cc46
SM
22372017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2238
2239 * inferiors.c (set_inferior_target_data): Remove.
2240 * inferiors.h (set_inferior_target_data): Remove.
2241
6d580b63
YQ
22422017-08-18 Yao Qi <yao.qi@linaro.org>
2243
2244 * Makefile.in (OBS): Add selftest.o.
2245 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2246 * configure, config.in: Re-generated.
2247 * server.c: Include common/sefltest.h.
2248 (captured_main): Handle option --selftest.
2249
f5a29eb0
YQ
22502017-08-09 Yao Qi <yao.qi@linaro.org>
2251
2252 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2253 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2254 i386-avx-mpx.o and i386-mmx.o.
2255 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2256 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2257 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2258 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2259 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2260 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2261 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2262 i386/amd64-avx-mpx.xml.
2263
57757c2f
YQ
22642017-08-09 Yao Qi <yao.qi@linaro.org>
2265
2266 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2267 and x32-avx-avx512.o.
2268 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2269 i386/x32-avx-avx512.xml.
2270
229d26fc
SM
22712017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2272
2273 * tracepoint.h (enum class fast_tpoint_collect_result): New
2274 enumeration.
2275 (fast_tracepoint_collecting): Change return type to
2276 fast_tpoint_collect_result.
2277 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2278 * linux-low.h: Include tracepoint.h.
2279 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2280 fast_tpoint_collect_result.
2281 * linux-low.c (handle_tracepoints): Adjust.
2282 (linux_fast_tracepoint_collecting): Change return type to
2283 fast_tpoint_collect_result.
2284 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2285 linux_wait_1, stuck_in_jump_pad_callback,
2286 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2287 proceed_one_lwp): Adjust to type change.
2288
2e1e43e1
YQ
22892017-07-10 Yao Qi <yao.qi@linaro.org>
2290
2291 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2292
adc764e7
YQ
22932017-06-29 Yao Qi <yao.qi@linaro.org>
2294
2295 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2296 Remove.
2297 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2298
a206891a
SM
22992017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2300
2301 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2302
9a6c7d9c
SDJ
23032017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2304
2305 * linux-low.c (linux_create_inferior): Adjust code to access the
2306 environment information via 'gdb_environ' class.
2307 * lynx-low.c (lynx_create_inferior): Likewise.
2308 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2309 (get_environ): Return a pointer to 'our_environ'.
2310 (captured_main): Initialize 'our_environ'.
2311 * server.h (get_environ): Adjust prototype.
2312 * spu-low.c (spu_create_inferior): Adjust code to access the
2313 environment information via 'gdb_environ' class.
2314
ae3e2ccf
SM
23152017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2316
2317 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2318 usage of "register" keyword.
2319
3e019bdc
SM
23202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2321
2322 * configure: Re-generate.
2323
8465943a
SM
23242017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * configure: Re-generate.
2327
cf0dd6f0
SM
23282017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * Makefile.in (COMPILE.pre): Add "-x c++".
2331
9845682b
SDJ
23322017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2333
2334 * fork-child.c: Conditionally include <signal.h>.
2335
aefd8b33
SDJ
23362017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2337
2338 * server.c (handle_general_set): Handle new packet
2339 "QStartupWithShell".
2340 (handle_query): Add "QStartupWithShell" to the list of supported
2341 packets.
2342 (gdbserver_usage): Add help text explaining the
2343 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2344 options.
2345 (captured_main): Recognize and act upon the presence of the new
2346 CLI options.
2347
2090129c
SDJ
23482017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2349 Pedro Alves <palves@redhat.com>
2350
2351 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2352 * configure: Regenerate.
2353 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2354 "fork-inferior.o".
2355 (i[34567]86-*-lynxos*): Likewise.
2356 (spu*-*-*): Likewise.
2357 * fork-child.c: New file.
2358 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2359 and "environ.h".
2360 (linux_ptrace_fun): New function.
2361 (linux_create_inferior): Adjust function prototype to reflect
2362 change on "target.h". Adjust function code to use
2363 "fork_inferior".
2364 (linux_request_interrupt): Delete "signal_pid".
2365 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2366 (lynx_ptrace_fun): New function.
2367 (lynx_create_inferior): Adjust function prototype to reflect
2368 change on "target.h". Adjust function code to use
2369 "fork_inferior".
2370 * nto-low.c (nto_create_inferior): Adjust function prototype and
2371 code to reflect change on "target.h". Update comments.
2372 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2373 "common-terminal.h" and "environ.h".
2374 (terminal_fd): Moved to fork-child.c.
2375 (old_foreground_pgrp): Likewise.
2376 (restore_old_foreground_pgrp): Likewise.
2377 (last_status): Make it global.
2378 (last_ptid): Likewise.
2379 (our_environ): New variable.
2380 (startup_with_shell): Likewise.
2381 (program_name): Likewise.
2382 (program_argv): Rename to...
2383 (program_args): ...this.
2384 (wrapper_argv): New variable.
2385 (start_inferior): Delete function.
2386 (get_exec_wrapper): New function.
2387 (get_exec_file): Likewise.
2388 (get_environ): Likewise.
2389 (prefork_hook): Likewise.
2390 (post_fork_inferior): Likewise.
2391 (postfork_hook): Likewise.
2392 (postfork_child_hook): Likewise.
2393 (handle_v_run): Update code to deal with arguments coming from the
2394 remote host. Update calls from "start_inferior" to
2395 "create_inferior".
2396 (captured_main): Likewise. Initialize environment variable. Call
2397 "have_job_control".
2398 * server.h (post_fork_inferior): New prototype.
2399 (get_environ): Likewise.
2400 (last_status): Declare.
2401 (last_ptid): Likewise.
2402 (signal_pid): Likewise.
2403 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2404 (spu_ptrace_fun): New function.
2405 (spu_create_inferior): Adjust function prototype to reflect change
2406 on "target.h". Adjust function code to use "fork_inferior".
2407 * target.c (target_terminal_init): New function.
2408 (target_terminal_inferior): Likewise.
2409 (target_terminal_ours): Likewise.
2410 * target.h: Include <vector>.
2411 (struct target_ops) <create_inferior>: Update prototype.
2412 (create_inferior): Update macro.
2413 * utils.c (gdb_flush_out_err): New function.
2414 * win32-low.c (win32_create_inferior): Adjust function prototype
2415 and code to reflect change on "target.h".
2416
043a4934
SDJ
24172017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2418
2419 * inferiors.c (switch_to_thread): New function.
2420
15652511
SDJ
24212017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2422
2423 * Makefile.in (SFILE): Add "common/job-control.c".
2424 (OBS): Add "job-control.o".
2425
21ea5acd
SDJ
24262017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2427
2428 * Makefile: Remove "@host_makefile_frag@".
2429
e13cb306
PA
24302017-05-05 Pedro Alves <palves@redhat.com>
2431
2432 * configure: Regenerate.
2433
c94fee56
SDJ
24342017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2435
2436 * configure: Regenerate.
2437
a0ff9e1a
SM
24382017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2439
2440 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2441 software_single_step change of return type to
2442 std::vector<CORE_ADDR>.
2443 * linux-low.c (install_software_single_step_breakpoints):
2444 Likewise.
2445 * linux-low.h (install_software_single_step_breakpoints):
2446 Likewise.
2447
be628ab8
SDJ
24482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2449
2450 * remote-utils.c: Include "gdb_termios.h" instead of
2451 "terminal.h".
2452 * terminal.h: Delete file.
2453
7c5ded6a
SDJ
24542017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2455
2456 * server.c: Include <vector>.
2457 <program_argv, wrapper_argv>: Convert to std::vector.
2458 (start_inferior): Rewrite function to use C++.
2459 (handle_v_run): Likewise. Update code that calculates the argv
2460 based on the vRun packet; use C++.
2461 (captured_main): Likewise.
2462
436252de
SM
24632017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2464
2465 * server.c (handle_v_cont): Initialize thread_resume::thread
2466 with null_ptid.
2467
9bf2a700
PA
24682017-04-05 Pedro Alves <palves@redhat.com>
2469
2470 * configure: Regenerate.
2471
a121b7c1
PA
24722017-04-05 Pedro Alves <palves@redhat.com>
2473
2474 * gdbreplay.c (sync_error): Constify.
2475 * linux-x86-low.c (push_opcode): Constify.
2476
21c8a587
PA
24772017-04-05 Pedro Alves <palves@redhat.com>
2478
2479 * win32-low.c (get_child_debug_event)
2480 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2481 Report TARGET_WAITKIND_SPURIOUS instead.
2482
fb32b4f7
PA
24832017-04-05 Pedro Alves <palves@redhat.com>
2484
2485 * remote-utils.c (remote_prepare, remote_open): Constify.
2486 * remote-utils.h (remote_prepare, remote_open): Constify.
2487 * server.c (captured_main): Constify 'port' handling.
2488
65dd1e59
SM
24892017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2490
2491 * Makefile.in (clean): Clear .deps.
2492
8fa5b777
SM
24932017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2494
2495 * .gitignore: Remove generated files, replace with wildcard.
2496 * (clean): Replace removal of generated files with wildcard.
2497 (version.c): Replace with...
2498 (version-generated.c): ...this.
2499 (xml-builtin.c): Replace with...
2500 (xml-builtin-generated.c): ...this.
2501 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2502 (%.c: *regformats*): Replace with...
2503 (%-generated.c: *regformats*): ...this.
2504
a12e714b
MF
25052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2506
2507 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2508 (xtensa_fill_gregset): Call collect_register_by_name for
2509 threadptr register.
2510 (xtensa_store_gregset): Call supply_register_by_name for
2511 threadptr register.
2512
1a09b50a
MF
25132017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2514
2515 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2516 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2517 (xtensa_store_gregset): Call supply_register for all registers in
2518 a0_regnum..a0_regnum + C0_NREGS range.
2519
1a01e7c6
SM
25202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2521
2522 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2523 (ax-ipa.o: ax.c): Remove.
2524 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2525 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2526 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2527 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2528 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2529
36bc18a8
SM
25302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2531
2532 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2533 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2534 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2535 (errors-ipa.o: ../common/errors.c): Remove.
2536 (format-ipa.o: ../common/format.c): Remove.
2537 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2538
a8ebe3d5
SM
25392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2540
2541 * Makefile.in (%-ipa.o: %.c): New rule.
2542 (tracepoint-ipa.o: tracepoint.c): Remove.
2543 (utils-ipa.o: utils.c): Remove.
2544 (remote-utils-ipa.o: remote-utils.c): Remove.
2545 (regcache-ipa.o: regcache.c): Remove.
2546 (i386-linux-ipa.o: i386-linux.c): Remove.
2547 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2548 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2549 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2550 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2551 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2552 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2553 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2554 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2555 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2556 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2557 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2558 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2559 (aarch64-ipa.o: aarch64.c): Remove.
2560 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2561 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2562 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2563 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2564 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2565 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2566 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2567 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2568 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2569 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2570 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2571 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2572 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2573 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2574 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2575 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2576 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2577 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2578 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2579 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2580 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2581 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2582 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2583 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2584 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2585 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2586 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2587 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2588 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2589 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2590 (tdesc-ipa.o: tdesc.c): Remove.
2591 (x32-linux-ipa.o: x32-linux.c): Remove.
2592 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2593 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2594
50cfacb7
SM
25952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2596
2597 * Makefile.in (%.o: ../arch/%.c): New rule.
2598 (arm.o: ../arch/arm.c): Remove.
2599 (arm-linux.o: ../arch/arm-linux.c): Remove.
2600 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2601 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2602
c5a22423
SM
26032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2604
2605 * Makefile.in (%.o: ../nat/%.c): New rule.
2606 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2607 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2608 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2609 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2610 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2611 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2612 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2613 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2614 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2615 (linux-personality.o: ../nat/linux-personality.c): Remove.
2616 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2617 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2618 (x86-linux.o: ../nat/x86-linux.c): Remove.
2619 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2620 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2621
6bda016b
SM
26222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2623
2624 * Makefile.in (%.o: ../common/%.c): New rule.
2625 (signals.o: ../common/signals.c): Remove.
2626 (print-utils.o: ../common/print-utils.c): Remove.
2627 (rsp-low.o: ../common/rsp-low.c): Remove.
2628 (common-utils.o: ../common/common-utils.c): Remove.
2629 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2630 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2631 (vec.o: ../common/vec.c): Remove.
2632 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2633 (xml-utils.o: ../common/xml-utils.c): Remove.
2634 (ptid.o: ../common/ptid.c): Remove.
2635 (buffer.o: ../common/buffer.c): Remove.
2636 (format.o: ../common/format.c): Remove.
2637 (filestuff.o: ../common/filestuff.c): Remove.
2638 (agent.o: ../common/agent.c): Remove.
2639 (errors.o: ../common/errors.c): Remove.
2640 (environ.o: ../common/environ.c): Remove.
2641 (common-debug.o: ../common/common-debug.c): Remove.
2642 (cleanups.o: ../common/cleanups.c): Remove.
2643 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2644 (fileio.o: ../common/fileio.c): Remove.
2645 (common-regcache.o: ../common/common-regcache.c): Remove.
2646 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2647 (new-op.o: ../common/new-op.c): Remove.
2648 (btrace-common.o: ../common/btrace-common.c): Remove.
2649
21122961
SM
26502017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2651
2652 * Makefile.in (%.o: ../target/%.c): New rule.
2653 (waitstatus.o: ../target/waitstatus.c): Remove.
2654
c362e621
SM
26552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2656
2657 * Makefile.in
2658 (%.c: ../regformats/%.dat,
2659 (%.c: ../regformats/arm/%.dat,
2660 (%.c: ../regformats/i386/%.dat,
2661 (%.c: ../regformats/rs6000/%.dat): New rules.
2662 (aarch64.c): Remove.
2663 (reg-arm.c): Remove.
2664 (arm-with-iwmmxt.c): Remove.
2665 (arm-with-vfpv2.c): Remove.
2666 (arm-with-vfpv3.c): Remove.
2667 (arm-with-neon.c): Remove.
2668 (reg-bfin.c): Remove.
2669 (reg-cris.c): Remove.
2670 (reg-crisv32.c): Remove.
2671 (i386.c): Remove.
2672 (i386-linux.c): Remove.
2673 (i386-avx.c): Remove.
2674 (i386-avx-linux.c): Remove.
2675 (i386-avx-avx512.c): Remove.
2676 (i386-avx-avx512-linux.c): Remove.
2677 (i386-mpx.c): Remove.
2678 (i386-mpx-linux.c): Remove.
2679 (i386-avx-mpx-avx512-pku.c): Remove.
2680 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2681 (i386-avx-mpx.c): Remove.
2682 (i386-avx-mpx-linux.c): Remove.
2683 (i386-mmx.c): Remove.
2684 (i386-mmx-linux.c): Remove.
2685 (reg-ia64.c): Remove.
2686 (reg-m32r.c): Remove.
2687 (reg-m68k.c): Remove.
2688 (reg-cf.c): Remove.
2689 (mips-linux.c): Remove.
2690 (mips-dsp-linux.c): Remove.
2691 (mips64-linux.c): Remove.
2692 (mips64-dsp-linux.c): Remove.
2693 (nios2-linux.c): Remove.
2694 (powerpc-32.c): Remove.
2695 (powerpc-32l.c): Remove.
2696 (powerpc-altivec32l.c): Remove.
2697 (powerpc-cell32l.c): Remove.
2698 (powerpc-vsx32l.c): Remove.
2699 (powerpc-isa205-32l.c): Remove.
2700 (powerpc-isa205-altivec32l.c): Remove.
2701 (powerpc-isa205-vsx32l.c): Remove.
2702 (powerpc-e500l.c): Remove.
2703 (powerpc-64l.c): Remove.
2704 (powerpc-altivec64l.c): Remove.
2705 (powerpc-cell64l.c): Remove.
2706 (powerpc-vsx64l.c): Remove.
2707 (powerpc-isa205-64l.c): Remove.
2708 (powerpc-isa205-altivec64l.c): Remove.
2709 (powerpc-isa205-vsx64l.c): Remove.
2710 (s390-linux32.c): Remove.
2711 (s390-linux32v1.c): Remove.
2712 (s390-linux32v2.c): Remove.
2713 (s390-linux64.c): Remove.
2714 (s390-linux64v1.c): Remove.
2715 (s390-linux64v2.c): Remove.
2716 (s390-te-linux64.c): Remove.
2717 (s390-vx-linux64.c): Remove.
2718 (s390-tevx-linux64.c): Remove.
2719 (s390x-linux64.c): Remove.
2720 (s390x-linux64v1.c): Remove.
2721 (s390x-linux64v2.c): Remove.
2722 (s390x-te-linux64.c): Remove.
2723 (s390x-vx-linux64.c): Remove.
2724 (s390x-tevx-linux64.c): Remove.
2725 (tic6x-c64xp-linux.c): Remove.
2726 (tic6x-c64x-linux.c): Remove.
2727 (tic6x-c62x-linux.c): Remove.
2728 (reg-sh.c): Remove.
2729 (reg-sparc64.c): Remove.
2730 (reg-spu.c): Remove.
2731 (amd64.c): Remove.
2732 (amd64-linux.c): Remove.
2733 (amd64-avx.c): Remove.
2734 (amd64-avx-linux.c): Remove.
2735 (amd64-avx-avx512.c): Remove.
2736 (amd64-avx-avx512-linux.c): Remove.
2737 (amd64-mpx.c): Remove.
2738 (amd64-mpx-linux.c): Remove.
2739 (amd64-avx-mpx-avx512-pku.c): Remove.
2740 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2741 (amd64-avx-mpx.c): Remove.
2742 (amd64-avx-mpx-linux.c): Remove.
2743 (x32.c): Remove.
2744 (x32-linux.c): Remove.
2745 (x32-avx.c): Remove.
2746 (x32-avx-linux.c): Remove.
2747 (x32-avx-avx512.c): Remove.
2748 (x32-avx-avx512-linux.c): Remove.
2749 (reg-xtensa.c): Remove.
2750 (reg-tilegx.c): Remove.
2751 (reg-tilegx32.c): Remove.
2752
1672e0d9
SDJ
27532017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2754
2755 * Makefile.in (SFILES): Add "common/environ.c".
2756 (OBJS): Add "common/environ.h".
2757
239b6d10
WT
27582017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2759
2760 * configure.ac: Check if the fs_base and gs_base members of
2761 `struct user_regs_struct' exist.
2762 * config.in: Regenerated.
2763 * configure: Likewise.
2764
694b382c
AT
27652017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2766
2767 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2768 target_read_memory.
2769 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2770 (get_next_pcs_syscall_next_pc): Likewise.
2771
7dc53023
LM
27722016-12-23 Luis Machado <lgustavo@codesourcery.com>
2773
2774 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2775 * nto-x86-low.c: Likewise.
2776
ad02e4fe
SM
27772016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2778
2779 * Makefile.in: Include disable-implicit-rules.mk.
2780
dcb07cfa
PA
27812016-11-23 Pedro Alves <palves@redhat.com>
2782
2783 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2784 (debug_vprintf): Use std::chrono::steady_clock instead of
2785 gettimeofday. Use '.' instead of ':'.
2786 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2787 (get_timestamp): Use std::chrono::steady_clock instead of
2788 gettimeofday.
2789
8629c02c
SM
27902016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2791
2792 * Makefile.in: Fix whitespace formatting.
2793
b593ecca
SM
27942016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2795
2796 * Makefile.in (SFILES, OBS): Flatten list and order
2797 alphabetically.
2798
9986ba08
PA
27992016-11-23 Pedro Alves <palves@redhat.com>
2800
2801 * event-loop.c (handle_file_event): Use warning.
2802 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2803 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2804 Use warning.
2805
4eefa7bc
PA
28062016-11-23 Pedro Alves <palves@redhat.com>
2807
2808 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2809 output.
2810 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2811 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2812 debug_printf and debug_flush for debug output.
2813 * server.c (handle_general_set): Likewise.
2814 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2815 output.
2816
5443506e
SM
28172016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2818
2819 * Makefile.in (.c.o): Replace rule with ...
2820 (%.o: %.c): ... this one.
2821
3b165252
SM
28222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2823
2824 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2825 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2826 make.
2827 * configure.ac: Remove checks for the make program.
2828 * configure: Re-generate.
2829
0bcda685
PA
28302016-10-28 Pedro Alves <palves@redhat.com>
2831
2832 * Makefile.in (CXX_DIALECT): Get from configure.
2833 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2834 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2835 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2836 * config.in: Regenerate.
2837 * configure: Regenerate.
2838
c3805894
YQ
28392016-10-27 Yao Qi <yao.qi@linaro.org>
2840
2841 * linux-low.c (linux_supports_range_stepping): Return true if
2842 can_software_single_step return true.
2843
89342618
YQ
28442016-10-27 Yao Qi <yao.qi@linaro.org>
2845
2846 * inferiors.c (find_inferior_in_random): New function.
2847 * inferiors.h (find_inferior_in_random): Declare.
2848 * linux-low.c (linux_wait_for_event_filtered): Call
2849 find_inferior_in_random instead of find_inferior.
2850
e3652c84
YQ
28512016-10-27 Yao Qi <yao.qi@linaro.org>
2852
2853 * linux-low.c (linux_wait_1): If single-step breakpoints are
2854 inserted, remove them.
2855
5a04c4cf
PA
28562016-10-26 Pedro Alves <palves@redhat.com>
2857
2858 * linux-low.c (handle_extended_wait): Link parent/child fork
2859 threads.
2860 (linux_wait_1): Unlink them.
2861 (linux_set_resume_request): Ignore resume requests for
2862 already-resumed and unhandled fork child threads.
2863 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2864 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2865 New functions.
2866 (handle_v_requests) <vCont>: Don't call require_running.
2867 * server.h (in_queued_stop_replies): New declaration.
2868
cb93dc7f
YQ
28692016-10-24 Yao Qi <yao.qi@linaro.org>
2870
2871 PR server/20733
2872 * linux-aarch64-low.c (append_insns): Cast the return value to
2873 'uint32_t *'.
2874
a1078bea
YQ
28752016-10-10 Yao Qi <yao.qi@linaro.org>
2876
2877 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2878
1fb77080
SDJ
28792016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2880
2881 * target.c (target_supports_multi_process): New function, moved
2882 from...
2883 * target.h (target_supports_multi_process): ... here. Remove
2884 macro.
2885
39b5a3b9
TT
28862016-10-05 Tom Tromey <tom@tromey.com>
2887
2888 PR remote/20655:
2889 * tracepoint.c (handle_tracepoint_bkpts): Check
2890 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2891
c1d0b70a
YQ
28922016-10-05 Yao Qi <yao.qi@linaro.org>
2893
2894 * configure.srv: Update the path of arm-*.xml files.
2895
0a69eedb
YQ
28962016-10-05 Terry Guo <terry.guo@arm.com>
2897 Yao Qi <yao.qi@linaro.org>
2898
2899 * Makefile.in: Adjust the path of rules.
2900 * configure.srv: Update the path of xml files.
2901 * regformats/arm-with-iwmmxt.dat: Regenerated.
2902 * regformats/arm-with-neon.dat: Likewise.
2903 * regformats/arm-with-vfpv2.dat: Likewise.
2904 * regformats/arm-with-vfpv3.dat Likewise.
2905
17e16485
YQ
29062016-09-30 Yao Qi <yao.qi@linaro.org>
2907
2908 PR gdbserver/20627
2909 * target.c (target_stop_and_wait): Don't call
2910 target_continue_no_signal, use resume_stop instead.
2911
edeeb602
YQ
29122016-09-26 Yao Qi <yao.qi@linaro.org>
2913
2914 * linux-low.c (linux_wait_1): Call debug_exit.
2915
503b1c39
PA
29162016-09-23 Pedro Alves <palves@redhat.com>
2917
2918 * Makefile.in (SFILES): Add common/new-op.c.
2919 (OBS): Add common/new-op.o.
2920 (new-op.o): New rule.
2921
74172ecf
SM
29222016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2923
2924 * .gitinore: Ignore more files.
2925
fc6cda2e
YQ
29262016-09-21 Yao Qi <yao.qi@linaro.org>
2927
2928 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2929 23.
2930
bc1e6c81
SDJ
29312016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2932
2933 * server.c (start_inferior): Call target_mourn_inferior instead of
2934 mourn_inferior; pass ptid_t argument to it.
2935 (resume): Likewise.
2936 (handle_target_event): Likewise.
2937 * target.c (target_mourn_inferior): New function.
2938 * target.h (mourn_inferior): Delete macro.
2939
0e00e962
AA
29402016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2941
2942 * linux-low.c (lwp_is_stepping): New function.
2943
1d8cb77d
CL
29442016-09-06 Carl Love <cel@us.ibm.com>
2945
2946 * server.c (start_inferior): Fixed comment, requested comment change
2947 didn't get updated correctly. Removed reference to ptrace () call as
2948 it is only true on Linux systems.
2949
7313bced
CL
29502016-09-06 Carl Love <cel@us.ibm.com>
2951
2952 * server.c (start_inferior): Do not call
2953 function target_post_create_inferior () if the
2954 inferior process has already exited.
2955
cf6de44d
PA
29562016-09-05 Pedro Alves <palves@redhat.com>
2957
2958 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2959 (COMPILE.pre, CC_LD): Use CXX directly.
2960 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2961 * acinclude.m4: Don't include build-with-cxx.m4.
2962 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2963 * configure: Regenerate.
2964
c1da6748
AT
29652016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2966
2967 PR gdb/19495
2968 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2969 call writing data to own_buf.
2970
f2b9e3df
SDJ
29712016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2972
2973 * target.c (mywait): Call target_wait instead of
2974 the_target->wait.
2975 (target_wait): New function.
2976
049a8570
SDJ
29772016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2978
2979 * server.c (start_inferior): New variable 'ptid'. Replace calls
2980 to the_target->resume by target_continue{,_no_signal}, depending
2981 on the case.
2982 * target.c (target_stop_and_wait): Call target_continue_no_signal
2983 instead of the_target->resume.
2984 (target_continue): New function.
2985
3aa5cfa0
AT
29862016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2987
2988 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2989
754653a7
AZ
29902016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2991
2992 PR server/20491
2993 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2994 ps_prochandle.
2995 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2996 * linux-arm-low.c (ps_get_thread_area): Likewise.
2997 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2998 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2999 * linux-mips-low.c (ps_get_thread_area): Likewise.
3000 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3001 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3002 * linux-x86-low.c (ps_get_thread_area): Likewise.
3003 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3004
ed036b40
PA
30052016-08-19 Pedro Alves <palves@redhat.com>
3006
3007 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3008
c8ef42ee
PA
30092016-08-19 Pedro Alves <palves@redhat.com>
3010
3011 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3012 comment. Use memcpy instead of casting through unsigned long.
3013
9c235a72
PA
30142016-08-19 Pedro Alves <palves@redhat.com>
3015
3016 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3017 allocating around 0x80000000.
3018
201506da
PA
30192016-08-19 Pedro Alves <palves@redhat.com>
3020
3021 PR gdb/20415
3022 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3023 (x32-avx512-linux-ipa.o): New rules.
3024 * configure.ac (x86_64-*-linux*): New x32 check.
3025 * configure.srv (ipa_x32_linux_regobj): New.
3026 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3027 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3028 descriptions.
3029 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3030 descriptions.
3031 * configure: Regenerate.
3032
f348d89a
PA
30332016-08-09 Pedro Alves <palves@redhat.com>
3034
3035 PR gdb/18653
3036 * Makefile.in (OBS): Add signals-state-save-restore.o.
3037 (signals-state-save-restore.o): New rule.
3038 * config.in: Regenerate.
3039 * configure: Regenerate.
3040 * linux-low.c: Include "signals-state-save-restore.h".
3041 (linux_create_inferior): Call
3042 restore_original_signals_state.
3043 * server.c: Include "dispositions-save-restore.h".
3044 (captured_main): Call save_original_signals_state.
3045
1baf5149
PA
30462016-08-05 Pedro Alves <palves@redhat.com>
3047
3048 * configure: Regenerate.
3049
fcd4a73d
YQ
30502016-08-04 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-low.c (regsets_fetch_inferior_registers): Check
3053 errno is ESRCH or not.
3054
979659d0
YQ
30552016-08-02 Yao Qi <yao.qi@linaro.org>
3056
3057 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3058 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3059 (thread_db_load_search): Update.
3060 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3061 td_ta_set_event and td_ta_event_getmsg.
3062
6598661d
PA
30632016-07-26 Pedro Alves <palves@redhat.com>
3064
3065 PR server/20414
3066 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3067 of unsigned long for 64-bit registers and use uint32_t instead of
3068 unsigned int for 32-bit registers.
3069
9cf12d57
PA
30702016-07-26 Pedro Alves <palves@redhat.com>
3071
3072 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3073 to 'ptrace'.
3074
305450ed
TT
30752016-07-21 Tom Tromey <tom@tromey.com>
3076
3077 * configure: Rebuild.
3078
2583da7c
YQ
30792016-07-21 Yao Qi <yao.qi@linaro.org>
3080
3081 * mem-break.c (find_gdb_breakpoint): Cast bp to
3082 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3083
21536b36
YQ
30842016-07-21 Yao Qi <yao.qi@linaro.org>
3085
3086 * server.c (handle_v_requests): Support s and S actions
3087 if target_supports_software_single_step return true.
3088
8901d193
YQ
30892016-07-21 Yao Qi <yao.qi@linaro.org>
3090
3091 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3092 is resume_step, call maybe_hw_step.
3093 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3094 and unstop them.
3095 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3096 breakpoints or not.
3097 (proceed_one_lwp): If resume request is resume_step, install
3098 reinsert breakpoints and call maybe_hw_step.
3099
0e9a339e
YQ
31002016-07-21 Yao Qi <yao.qi@linaro.org>
3101
3102 * linux-low.c (proceed_one_lwp): Declare.
3103 (linux_resume_one_thread): Remove local variable 'step'.
3104 Lift code enqueue signal. Call proceed_one_lwp instead of
3105 linux_resume_one_lwp.
3106
4281b351
YQ
31072016-07-21 Yao Qi <yao.qi@linaro.org>
3108
3109 * linux-low.c (linux_resume_one_thread): Call
3110 enqueue_pending_signal.
3111
984a2c04
YQ
31122016-07-21 Yao Qi <yao.qi@linaro.org>
3113
3114 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3115 * inferiors.c (do_restore_current_thread_cleanup): New function.
3116 (make_cleanup_restore_current_thread): Likewise.
3117 * linux-low.c (install_software_single_step_breakpoints): Call
3118 make_cleanup_restore_current_thread. Switch current_thread to
3119 thread.
3120
bec903c9
YQ
31212016-07-21 Yao Qi <yao.qi@linaro.org>
3122
3123 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3124 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3125 (clone_one_breakpoint): Likewise.
3126 (delete_reinsert_breakpoints): Change parameter to thread.
3127 Callers updated.
3128 (has_reinsert_breakpoints): Likewise.
3129 (uninsert_reinsert_breakpoints): Likewise.
3130 (reinsert_reinsert_breakpoints): Likewise.
3131 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3132 (delete_reinsert_breakpoints): Likewise.
3133 (reinsert_reinsert_breakpoints): Likewise.
3134 (uninsert_reinsert_breakpoints): Likewise.
3135 (has_reinsert_breakpoints): Likewise.
3136
63c40ec7
YQ
31372016-07-21 Yao Qi <yao.qi@linaro.org>
3138
3139 * inferiors.c (get_thread_process): Make parameter const.
3140 * inferiors.h (get_thread_process): Update declaration.
3141 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3142 Add new parameters child_thread and parent_thread. Callers
3143 updated.
3144 * mem-break.h (clone_all_breakpoints): Update declaration.
3145
9aa76cd0
YQ
31462016-07-21 Yao Qi <yao.qi@linaro.org>
3147
3148 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3149 <command_list, handler>: Remove.
3150 (struct gdb_breakpoint): New.
3151 (struct other_breakpoint): New.
3152 (struct reinsert_breakpoint): New.
3153 (is_gdb_breakpoint): New function.
3154 (any_persistent_commands): Update command_list if
3155 is_gdb_breakpoint returns true.
3156 (set_breakpoint): Create breakpoints according to their types.
3157 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3158 (set_gdb_breakpoint_1): Likewise.
3159 (set_gdb_breakpoint): Likewise.
3160 (clear_breakpoint_conditions): Change parameter type to
3161 'struct gdb_breakpoint *'.
3162 (clear_breakpoint_commands): Likewise.
3163 (clear_breakpoint_conditions_and_commands): Likewise.
3164 (add_condition_to_breakpoint): Likewise.
3165 (add_breakpoint_condition): Likewise.
3166 (add_commands_to_breakpoint): Likewise.
3167 (check_breakpoints): Check other_breakpoint.
3168 (clone_one_breakpoint): Clone breakpopint according to its type.
3169 * mem-break.h (struct gdb_breakpoint): Declare.
3170 (set_gdb_breakpoint): Update declaration.
3171 (clear_breakpoint_conditions_and_commands): Likewise.
3172 (add_breakpoint_condition): Likewise.
3173 (add_breakpoint_commands): Likewise.
3174 * server.c (process_point_options): Change parameter type to
3175 'struct gdb_breakpoint *'.
3176
811f8301
YQ
31772016-07-21 Yao Qi <yao.qi@linaro.org>
3178
3179 * mem-break.c (set_breakpoint_at): Rename it to ...
3180 (set_breakpoint_type_at): ... it.
3181 (set_breakpoint_at): Call set_breakpoint_type_at.
3182 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3183 * mem-break.h (set_breakpoint_at): Update comments.
3184
b1c51e36
CLT
31852016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3186
3187 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3188 to buf parameter.
3189 (nios2_store_gregset): Likewise.
3190
ced2dffb
PA
31912016-07-01 Pedro Alves <palves@redhat.com>
3192 Antoine Tremblay <antoine.tremblay@ericsson.com>
3193
3194 * linux-low.c: Change interface to take the target lwp_info
3195 pointer directly and return void. Handle detaching from a zombie
3196 thread.
3197 (linux_detach_lwp_callback): New function.
3198 (linux_detach): Detach from the leader thread after detaching from
3199 the clone threads.
3200
2ac09a5b
YQ
32012016-06-28 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3204 for variable new_offset.
3205 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3206 (aarch64_ftrace_insn_reloc_cb): Likewise.
3207 (aarch64_ftrace_insn_reloc_tb): Likewise.
3208 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3209 PRIx64 instead of PRIx32.
3210
79e7fd4f
YQ
32112016-06-28 Yao Qi <yao.qi@linaro.org>
3212
3213 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3214 (the_low_target): Install arm_get_syscall_trapinfo.
3215
061fc021
YQ
32162016-06-28 Yao Qi <yao.qi@linaro.org>
3217
3218 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3219 function.
3220 (the_low_target): Install aarch64_get_syscall_trapinfo.
3221
4cc32bec
YQ
32222016-06-28 Yao Qi <yao.qi@linaro.org>
3223
3224 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3225 Callers updated.
3226 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3227 Remove parameter sysno.
3228 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3229 sysret.
3230
782c1122
AA
32312016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3232
3233 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3234 (s390_emit_ne_goto): Likewise.
3235 (s390_emit_lt_goto): Likewise.
3236 (s390_emit_le_goto): Likewise.
3237 (s390_emit_gt_goto): Likewise.
3238 (s390_emit_ge_goto): Likewise.
3239 (s390x_emit_eq_goto): Likewise.
3240 (s390x_emit_ne_goto): Likewise.
3241 (s390x_emit_lt_goto): Likewise.
3242 (s390x_emit_le_goto): Likewise.
3243 (s390x_emit_gt_goto): Likewise.
3244 (s390x_emit_ge_goto): Likewise.
3245 (s390_emit_ops_impl): Mark variable static.
3246 (s390x_emit_ops): Likewise.
3247
2e7b624b
YQ
32482016-06-17 Yao Qi <yao.qi@linaro.org>
3249
3250 * linux-low.c (handle_extended_wait): Call
3251 uninsert_reinsert_breakpoints for the parent process. Remove
3252 reinsert breakpoints from the child process. Reinsert them to
3253 the parent process when vfork is done.
3254 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3255 (reinsert_reinsert_breakpoints): New function.
3256 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3257 (reinsert_reinsert_breakpoints): Declare.
3258
8a81c5d7
YQ
32592016-06-17 Yao Qi <yao.qi@linaro.org>
3260
3261 * linux-low.c (handle_extended_wait): If the parent is doing
3262 step-over, remove the reinsert breakpoints from the forked child.
3263
f50bf8e5
YQ
32642016-06-17 Yao Qi <yao.qi@linaro.org>
3265
3266 * linux-low.c (unsuspend_all_lwps): Declare.
3267 (linux_low_filter_event): If thread exited, call finish_step_over.
3268 If step-over is finished, unsuspend other threads.
3269
8376a3cb
YQ
32702016-06-17 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-low.c (linux_resume_one_lwp_throw): Assert
3273 has_reinsert_breakpoints returns false.
3274 * mem-break.c (delete_disabled_breakpoints): Assert
3275 bp type isn't reinsert_breakpoint.
3276
f79b145d
YQ
32772016-06-17 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-low.c (maybe_hw_step): New function.
3280 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3281 (finish_step_over): Switch current_thread to lwp temporarily,
3282 and assert has_reinsert_breakpoints returns true.
3283 (proceed_one_lwp): Call maybe_hw_step.
3284 * mem-break.c (has_reinsert_breakpoints): New function.
3285 * mem-break.h (has_reinsert_breakpoints): Declare.
3286
0ae534d2
JT
32872016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3288
3289 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3290
fcdad592
YQ
32912016-05-17 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3294 instead of find_inferior.
3295
9e784964
YQ
32962016-05-05 Yao Qi <yao.qi@linaro.org>
3297
3298 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3299 Initialize res to zero.
3300
cf2ebb6e
YQ
33012016-05-05 Yao Qi <yao.qi@linaro.org>
3302
3303 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3304 to uint32_t.
3305
c1aebf87
UW
33062016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3307
3308 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3309 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3310 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3311
35fd2deb 33122016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3313 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3314
3315 * tracepoint.c (write_inferior_int8): New function.
3316 (cmd_qtenable_disable): Write enable flag using
3317 write_inferior_int8.
3318
484b3c32
YQ
33192016-04-25 Yao Qi <yao.qi@linaro.org>
3320
3321 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3322 (need_step_over_p): Return zero if the LWP has pending signals
3323 can be delivered on software single step target.
3324
85ba7d86
YQ
33252016-04-25 Yao Qi <yao.qi@linaro.org>
3326
3327 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3328 return instead of error.
3329
3539aa13
YQ
33302016-04-22 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3333 to 23.
3334
5b061e98
YQ
33352016-04-22 Yao Qi <yao.qi@linaro.org>
3336
3337 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3338 signal when stepping over breakpoint with software single
3339 step.
3340
3451269c
PA
33412016-04-21 Pedro Alves <palves@redhat.com>
3342
3343 * linux-s390-low.c (s390_collect_ptrace_register)
3344 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3345 add casts.
3346 (s390_check_regset): Use void * instead of gdb_byte *.
3347
a2358508
PA
33482016-04-20 Pedro Alves <palves@redhat.com>
3349
3350 * configure: Renegerate.
3351
6885166d
YQ
33522016-04-20 Yao Qi <yao.qi@linaro.org>
3353
3354 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3355 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3356 number 16.
3357 (arm_store_gregset): Likewise.
3358
2b863f51
WT
33592016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3360
3361 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3362 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3363 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3364 (amd64-avx-mpx-linux.c): New rules.
3365 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3366 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3367 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3368 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3369 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3370 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3371 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3372 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3373 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3374 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3375 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3376 * linux-x86-low.c (x86_linux_read_description): Add case for
3377 X86_XSTATE_AVX_MPX_MASK.
3378 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3379 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3380 init_registers_i386_avx_mpx_linux.
3381 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3382 (initialize_low_tracepoint): Call
3383 init_registers_i386_avx_mpx_linux.
3384 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3385 (initialize_low_tracepoint): Call
3386 init_registers_amd64_avx_mpx_linux.
3387 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3388 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3389 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3390 declarations.
3391
9b30624b
PA
33922016-04-18 Pedro Alves <palves@redhat.com>
3393
3394 * configure: Regenerate.
3395
45e3745e
AT
33962016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3397
3398 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3399 (aarch64_emit_sub): Likewise.
3400
2afc13ff
PA
34012016-04-12 Pedro Alves <palves@redhat.com>
3402
3403 * utils.c (prepare_to_throw_exception): Delete.
3404
6e774b13
SM
34052016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3406
3407 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3408
4dca19f8
MK
34092016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3410
3411 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3412
d0a9981f
MK
34132016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3414
3415 * linux-aarch64-ipa.c: Add <elf.h> include.
3416 * linux-ppc-ipa.c: Add <elf.h> include.
3417 * linux-s390-ipa.c: Add <elf.h> include.
3418
252db07e
MK
34192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3420
3421 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3422 (get_raw_reg_ptr): Likewise.
3423 (get_trace_state_variable_value_ptr): Likewise.
3424 (set_trace_state_variable_value_ptr): Likewise.
3425 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3426 char *.
3427
14e2b6d9
MK
34282016-03-31 Wei-cheng Wang <cole945@gmail.com>
3429 Marcin Kościelnicki <koriakin@0x04.net>
3430
3431 PR/17221
3432 * linux-ppc-low.c (emit_insns): New function.
3433 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3434 (ppc_emit_prologue): New function.
3435 (ppc_emit_epilogue): New function.
3436 (ppc_emit_add): New function.
3437 (ppc_emit_sub): New function.
3438 (ppc_emit_mul): New function.
3439 (ppc_emit_lsh): New function.
3440 (ppc_emit_rsh_signed): New function.
3441 (ppc_emit_rsh_unsigned): New function.
3442 (ppc_emit_ext): New function.
3443 (ppc_emit_zero_ext): New function.
3444 (ppc_emit_log_not): New function.
3445 (ppc_emit_bit_and): New function.
3446 (ppc_emit_bit_or): New function.
3447 (ppc_emit_bit_xor): New function.
3448 (ppc_emit_bit_not): New function.
3449 (ppc_emit_equal): New function.
3450 (ppc_emit_less_signed): New function.
3451 (ppc_emit_less_unsigned): New function.
3452 (ppc_emit_ref): New function.
3453 (ppc_emit_const): New function.
3454 (ppc_emit_reg): New function.
3455 (ppc_emit_pop): New function.
3456 (ppc_emit_stack_flush): New function.
3457 (ppc_emit_swap): New function.
3458 (ppc_emit_stack_adjust): New function.
3459 (ppc_emit_call): New function.
3460 (ppc_emit_int_call_1): New function.
3461 (ppc_emit_void_call_2): New function.
3462 (ppc_emit_if_goto): New function.
3463 (ppc_emit_goto): New function.
3464 (ppc_emit_eq_goto): New function.
3465 (ppc_emit_ne_goto): New function.
3466 (ppc_emit_lt_goto): New function.
3467 (ppc_emit_le_goto): New function.
3468 (ppc_emit_gt_goto): New function.
3469 (ppc_emit_ge_goto): New function.
3470 (ppc_write_goto_address): New function.
3471 (ppc_emit_ops_impl): New static variable.
3472 (ppc64v1_emit_prologue): New function.
3473 (ppc64v2_emit_prologue): New function.
3474 (ppc64_emit_epilogue): New function.
3475 (ppc64_emit_add): New function.
3476 (ppc64_emit_sub): New function.
3477 (ppc64_emit_mul): New function.
3478 (ppc64_emit_lsh): New function.
3479 (ppc64_emit_rsh_signed): New function.
3480 (ppc64_emit_rsh_unsigned): New function.
3481 (ppc64_emit_ext): New function.
3482 (ppc64_emit_zero_ext): New function.
3483 (ppc64_emit_log_not): New function.
3484 (ppc64_emit_bit_and): New function.
3485 (ppc64_emit_bit_or): New function.
3486 (ppc64_emit_bit_xor): New function.
3487 (ppc64_emit_bit_not): New function.
3488 (ppc64_emit_equal): New function.
3489 (ppc64_emit_less_signed): New function.
3490 (ppc64_emit_less_unsigned): New function.
3491 (ppc64_emit_ref): New function.
3492 (ppc64_emit_const): New function.
3493 (ppc64v1_emit_reg): New function.
3494 (ppc64v2_emit_reg): New function.
3495 (ppc64_emit_pop): New function.
3496 (ppc64_emit_stack_flush): New function.
3497 (ppc64_emit_swap): New function.
3498 (ppc64v1_emit_call): New function.
3499 (ppc64v2_emit_call): New function.
3500 (ppc64v1_emit_int_call_1): New function.
3501 (ppc64v2_emit_int_call_1): New function.
3502 (ppc64v1_emit_void_call_2): New function.
3503 (ppc64v2_emit_void_call_2): New function.
3504 (ppc64_emit_if_goto): New function.
3505 (ppc64_emit_eq_goto): New function.
3506 (ppc64_emit_ne_goto): New function.
3507 (ppc64_emit_lt_goto): New function.
3508 (ppc64_emit_le_goto): New function.
3509 (ppc64_emit_gt_goto): New function.
3510 (ppc64_emit_ge_goto): New function.
3511 (ppc64v1_emit_ops_impl): New static variable.
3512 (ppc64v2_emit_ops_impl): New static variable.
3513 (ppc_emit_ops): New function.
3514 (linux_low_target): Wire in ppc_emit_ops.
3515
a2174ba4
MK
35162016-03-31 Wei-cheng Wang <cole945@gmail.com>
3517 Marcin Kościelnicki <koriakin@0x04.net>
3518
3519 PR/17221
3520 * Makefile.in: Add powerpc-*-ipa.o
3521 * configure.srv: Add ipa_obj for powerpc*-linux.
3522 * linux-ppc-ipa.c: New file.
3523 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3524 includes.
3525 (PPC_FIELD): New macro.
3526 (PPC_SEXT): New macro.
3527 (PPC_OP6): New macro.
3528 (PPC_BO): New macro.
3529 (PPC_LI): New macro.
3530 (PPC_BD): New macro.
3531 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3532 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3533 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3534 (ppc_get_thread_area): New function.
3535 (is_elfv2_inferior): New function.
3536 (gen_ds_form): New function.
3537 (GEN_STD): New macro.
3538 (GEN_STDU): New macro.
3539 (GEN_LD): New macro.
3540 (GEN_LDU): New macro.
3541 (gen_d_form): New function.
3542 (GEN_ADDI): New macro.
3543 (GEN_ADDIS): New macro.
3544 (GEN_LI): New macro.
3545 (GEN_LIS): New macro.
3546 (GEN_ORI): New macro.
3547 (GEN_ORIS): New macro.
3548 (GEN_LWZ): New macro.
3549 (GEN_STW): New macro.
3550 (GEN_STWU): New macro.
3551 (gen_xfx_form): New function.
3552 (GEN_MFSPR): New macro.
3553 (GEN_MTSPR): New macro.
3554 (GEN_MFCR): New macro.
3555 (GEN_MTCR): New macro.
3556 (GEN_SYNC): New macro.
3557 (GEN_LWSYNC): New macro.
3558 (gen_x_form): New function.
3559 (GEN_OR): New macro.
3560 (GEN_MR): New macro.
3561 (GEN_LWARX): New macro.
3562 (GEN_STWCX): New macro.
3563 (GEN_CMPW): New macro.
3564 (gen_md_form): New function.
3565 (GEN_RLDICL): New macro.
3566 (GEN_RLDICR): New macro.
3567 (gen_i_form): New function.
3568 (GEN_B): New macro.
3569 (GEN_BL): New macro.
3570 (gen_b_form): New function.
3571 (GEN_BNE): New macro.
3572 (GEN_LOAD): New macro.
3573 (GEN_STORE): New macro.
3574 (gen_limm): New function.
3575 (gen_atomic_xchg): New function.
3576 (gen_call): New function.
3577 (ppc_relocate_instruction): New function.
3578 (ppc_install_fast_tracepoint_jump_pad): New function.
3579 (ppc_get_min_fast_tracepoint_insn_len): New function.
3580 (ppc_get_ipa_tdesc_idx): New function.
3581 (the_low_target): Wire in the new functions.
3582 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3583 tdescs.
3584 * linux-ppc-tdesc.h: New file.
3585
a13c4696
MK
35862016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3587
3588 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3589 (alloc_jump_pad_buffer): New function.
3590 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3591 (alloc_jump_pad_buffer): New function.
3592 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3593 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3594 (alloc_jump_pad_buffer): New function.
3595 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3596 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3597 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3598 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3599
1cda1512
MK
36002016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3601
3602 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3603 * linux-amd64-ipa.c: Likewise.
3604 * linux-i386-ipa.c: Likewise.
3605 * linux-s390-ipa.c: Likewise.
3606 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3607 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3608 set_trace_state_variable_value_ptr.
3609 (struct ipa_sym_addresses): Likewise.
3610 (symbol_list): Likewise.
3611 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3612 accessing gdb_collect directly.
3613 (gdb_collect_ptr_type): New typedef.
3614 (get_raw_reg_ptr_type): New typedef.
3615 (get_trace_state_variable_value_ptr_type): New typedef.
3616 (set_trace_state_variable_value_ptr_type): New typedef.
3617 (gdb_collect_ptr): New global.
3618 (get_raw_reg_ptr): New global.
3619 (get_trace_state_variable_value_ptr): New global.
3620 (set_trace_state_variable_value_ptr): New global.
3621 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3622 accessing get_raw_reg directly.
3623 (get_get_tsv_func_addr): Likewise for
3624 get_trace_state_variable_value_ptr.
3625 (get_set_tsv_func_addr): Likewise for
3626 set_trace_state_variable_value_ptr.
3627 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3628
72fb5488
SM
36292016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3630
3631 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3632
28170b88
MK
36332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3634
3635 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3636 packets.
3637 (relocate_instruction): Remove own_buf.
3638 * server.c (own_buf): Make global.
3639 (handle_v_requests): Make global.
3640 * server.h (own_buf): New declaration.
3641 (handle_v_requests): New prototype.
3642
f39e8743
MK
36432016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3644
3645 PR 18377
3646 * linux-s390-low.c (add_insns): New function.
3647 (s390_emit_prologue): New function.
3648 (s390_emit_epilogue): New function.
3649 (s390_emit_add): New function.
3650 (s390_emit_sub): New function.
3651 (s390_emit_mul): New function.
3652 (s390_emit_lsh): New function.
3653 (s390_emit_rsh_signed): New function.
3654 (s390_emit_rsh_unsigned): New function.
3655 (s390_emit_ext): New function.
3656 (s390_emit_log_not): New function.
3657 (s390_emit_bit_and): New function.
3658 (s390_emit_bit_or): New function.
3659 (s390_emit_bit_xor): New function.
3660 (s390_emit_bit_not): New function.
3661 (s390_emit_equal): New function.
3662 (s390_emit_less_signed): New function.
3663 (s390_emit_less_unsigned): New function.
3664 (s390_emit_ref): New function.
3665 (s390_emit_if_goto): New function.
3666 (s390_emit_goto): New function.
3667 (s390_write_goto_address): New function.
3668 (s390_emit_litpool): New function.
3669 (s390_emit_const): New function.
3670 (s390_emit_call): New function.
3671 (s390_emit_reg): New function.
3672 (s390_emit_pop): New function.
3673 (s390_emit_stack_flush): New function.
3674 (s390_emit_zero_ext): New function.
3675 (s390_emit_swap): New function.
3676 (s390_emit_stack_adjust): New function.
3677 (s390_emit_set_r2): New function.
3678 (s390_emit_int_call_1): New function.
3679 (s390_emit_void_call_2): New function.
3680 (s390_emit_eq_goto): New function.
3681 (s390_emit_ne_goto): New function.
3682 (s390_emit_lt_goto): New function.
3683 (s390_emit_le_goto): New function.
3684 (s390_emit_gt_goto): New function.
3685 (s390_emit_ge_goto): New function.
3686 (s390x_emit_prologue): New function.
3687 (s390x_emit_epilogue): New function.
3688 (s390x_emit_add): New function.
3689 (s390x_emit_sub): New function.
3690 (s390x_emit_mul): New function.
3691 (s390x_emit_lsh): New function.
3692 (s390x_emit_rsh_signed): New function.
3693 (s390x_emit_rsh_unsigned): New function.
3694 (s390x_emit_ext): New function.
3695 (s390x_emit_log_not): New function.
3696 (s390x_emit_bit_and): New function.
3697 (s390x_emit_bit_or): New function.
3698 (s390x_emit_bit_xor): New function.
3699 (s390x_emit_bit_not): New function.
3700 (s390x_emit_equal): New function.
3701 (s390x_emit_less_signed): New function.
3702 (s390x_emit_less_unsigned): New function.
3703 (s390x_emit_ref): New function.
3704 (s390x_emit_if_goto): New function.
3705 (s390x_emit_const): New function.
3706 (s390x_emit_call): New function.
3707 (s390x_emit_reg): New function.
3708 (s390x_emit_pop): New function.
3709 (s390x_emit_stack_flush): New function.
3710 (s390x_emit_zero_ext): New function.
3711 (s390x_emit_swap): New function.
3712 (s390x_emit_stack_adjust): New function.
3713 (s390x_emit_int_call_1): New function.
3714 (s390x_emit_void_call_2): New function.
3715 (s390x_emit_eq_goto): New function.
3716 (s390x_emit_ne_goto): New function.
3717 (s390x_emit_lt_goto): New function.
3718 (s390x_emit_le_goto): New function.
3719 (s390x_emit_gt_goto): New function.
3720 (s390x_emit_ge_goto): New function.
3721 (s390_emit_ops): New function.
3722 (struct linux_target_ops): Fill in emit_ops hook.
3723
abd9baf9
MK
37242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3725
3726 PR 18377
3727 * Makefile.in: Add s390 IPA files.
3728 * configure.srv: Build IPA for s390.
3729 * linux-s390-ipa.c: New file.
3730 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3731 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3732 (tdesc_s390_linux32): Likewise.
3733 (init_registers_s390_linux32v1): Likewise.
3734 (tdesc_s390_linux32v1): Likewise.
3735 (init_registers_s390_linux32v2): Likewise.
3736 (tdesc_s390_linux32v2): Likewise.
3737 (init_registers_s390_linux64): Likewise.
3738 (tdesc_s390_linux64): Likewise.
3739 (init_registers_s390_linux64v1): Likewise.
3740 (tdesc_s390_linux64v1): Likewise.
3741 (init_registers_s390_linux64v2): Likewise.
3742 (tdesc_s390_linux64v2): Likewise.
3743 (init_registers_s390_te_linux64): Likewise.
3744 (tdesc_s390_te_linux64): Likewise.
3745 (init_registers_s390_vx_linux64): Likewise.
3746 (tdesc_s390_vx_linux64): Likewise.
3747 (init_registers_s390_tevx_linux64): Likewise.
3748 (tdesc_s390_tevx_linux64): Likewise.
3749 (init_registers_s390x_linux64): Likewise.
3750 (tdesc_s390x_linux64): Likewise.
3751 (init_registers_s390x_linux64v1): Likewise.
3752 (tdesc_s390x_linux64v1): Likewise.
3753 (init_registers_s390x_linux64v2): Likewise.
3754 (tdesc_s390x_linux64v2): Likewise.
3755 (init_registers_s390x_te_linux64): Likewise.
3756 (tdesc_s390x_te_linux64): Likewise.
3757 (init_registers_s390x_vx_linux64): Likewise.
3758 (tdesc_s390x_vx_linux64): Likewise.
3759 (init_registers_s390x_tevx_linux64): Likewise.
3760 (tdesc_s390x_tevx_linux64): Likewise.
3761 (have_hwcap_s390_vx): New static variable.
3762 (s390_arch_setup): Fill have_hwcap_s390_vx.
3763 (s390_get_thread_area): New function.
3764 (s390_ft_entry_gpr_esa): New const.
3765 (s390_ft_entry_gpr_zarch): New const.
3766 (s390_ft_entry_misc): New const.
3767 (s390_ft_entry_fr): New const.
3768 (s390_ft_entry_vr): New const.
3769 (s390_ft_main_31): New const.
3770 (s390_ft_main_64): New const.
3771 (s390_ft_exit_fr): New const.
3772 (s390_ft_exit_vr): New const.
3773 (s390_ft_exit_misc): New const.
3774 (s390_ft_exit_gpr_esa): New const.
3775 (s390_ft_exit_gpr_zarch): New const.
3776 (append_insns): New function.
3777 (s390_relocate_instruction): New function.
3778 (s390_install_fast_tracepoint_jump_pad): New function.
3779 (s390_get_min_fast_tracepoint_insn_len): New function.
3780 (s390_get_ipa_tdesc_idx): New function.
3781 (struct linux_target_ops): Wire in the above functions.
3782 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3783 * linux-s390-tdesc.h: New file.
3784
a4105d04
MK
37852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3786
3787 * linux-s390-low.c (s390_supports_tracepoints): New function.
3788 (struct linux_target_ops): Fill supports_tracepoints hook.
3789
35ac8b3e
YQ
37902016-03-18 Yao Qi <yao.qi@linaro.org>
3791
3792 * linux-low.c (lwp_signal_can_be_delivered): New function.
3793 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3794
94610ec4
YQ
37952016-03-18 Yao Qi <yao.qi@linaro.org>
3796
3797 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3798 0 if signal is enqueued. Remove 'signal' from one debugging
3799 message. Move one debugging message to some lines below.
3800 Remove code setting 'signal' to 0.
3801
80aea927
YQ
38022016-03-18 Yao Qi <yao.qi@linaro.org>
3803
3804 * linux-low.c (linux_low_filter_event): Remove redundant
3805 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3806
b04fd3be
MK
38072016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3808
3809 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3810 (struct linux_target_ops): Wire in the above.
3811
c40c8d4b
YQ
38122016-03-03 Yao Qi <yao.qi@linaro.org>
3813
3814 * linux-low.c: Update comments to start_step_over.
3815
0f8288ae
YQ
38162016-03-03 Yao Qi <yao.qi@linaro.org>
3817
3818 PR server/19736
3819 * linux-low.c (handle_extended_wait): Set child suspended
3820 if event_lwp->bp_reinsert isn't zero.
3821
fdbd04a8
YQ
38222016-03-02 Yao Qi <yao.qi@linaro.org>
3823
3824 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3825 enqueue_pending_signal.
3826
6896a8fa
MK
38272016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3828
3829 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3830 is actually loaded.
3831
ab503087
MK
38322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3833
3834 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3835 (s390_regmap_3264) [!__s390x__]: New global.
3836 (s390_collect_ptrace_register): Skip map entries containing -1.
3837 (s390_supply_ptrace_register): Ditto.
3838 (s390_fill_gprs_high): New function.
3839 (s390_store_gprs_high): New function.
3840 (s390_regsets): Add NT_S390_HIGH_GPRS.
3841 (s390_get_hwcap): Enable on 31-bit.
3842 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3843 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3844 Detect NT_S390_HIGH_GPRS.
3845 (s390_usrregs_info_3264): Enable on 31-bit.
3846 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3847 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3848
ae91f625
MK
38492016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3850
3851 PR gdb/13808
3852 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3853 * configure.srv: Ditto.
3854 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3855 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3856 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3857 (init_registers_amd64_linux): Remove prototype.
3858 (tdesc_amd64_linux): Remove declaration.
3859 (get_ipa_tdesc): New function.
3860 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3861 initialize remaining tdescs.
3862 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3863 (init_registers_i386_linux): Remove prototype.
3864 (tdesc_i386_linux): Remove declaration.
3865 (get_ipa_tdesc): New function.
3866 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3867 initialize remaining tdescs.
3868 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3869 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3870 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3871 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3872 (x86_get_ipa_tdesc_idx): New function.
3873 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3874 * linux-x86-tdesc.h: New file.
3875 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3876 (target_get_ipa_tdesc_idx): New macro.
3877 * tracepoint.c (ipa_tdesc_idx): New macro.
3878 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3879 (symbol_list): Add ipa_tdesc_idx.
3880 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3881 (ipa_tdesc): Remove.
3882 (ipa_tdesc_idx): New variable.
3883 (get_context_regcache): Use get_ipa_tdesc.
3884 (gdb_collect): Ditto.
3885 (gdb_probe): Ditto.
3886 * tracepoint.h (get_ipa_tdesc): New prototype.
3887 (ipa_tdesc): Remove.
3888
e7ad2f14
PA
38892016-02-24 Pedro Alves <palves@redhat.com>
3890
3891 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3892 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3893 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3894 Factor out common code between the USE_SIGTRAP_SIGINFO and
3895 !USE_SIGTRAP_SIGINFO blocks.
3896 (linux_low_filter_event): Call save_stop_reason instead of
3897 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3898 Update comments.
3899 (linux_wait_1): Update comments.
3900
657f9cde
WW
39012016-02-24 Wei-cheng Wang <cole945@gmail.com>
3902
3903 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3904 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3905 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3906 ppc_insert_point, ppc_remove_point.
3907
b00b61e1
MK
39082016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3909
3910 * linux-s390-low.c (s390_supports_z_point_type): New function.
3911 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3912
553cb527
YQ
39132016-02-16 Yao Qi <yao.qi@linaro.org>
3914
3915 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3916 PC. Get pc from regcache_read_pc.
3917
a5652c21
YQ
39182016-02-12 Yao Qi <yao.qi@linaro.org>
3919
3920 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3921 or linux_get_pc_32bit.
3922 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3923
ed443b61
YQ
39242016-02-12 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3927 arm_linux_get_next_pcs_fixup.
3928
020ecd38
MK
39292016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3930
3931 * tracepoint.c (x_tracepoint_action_download): Change
3932 write_inferior_data_ptr to write_inferior_data_pointer.
3933 (cmd_qtstart): Likewise.
3934 (write_inferior_data_ptr): Remove.
3935 (download_agent_expr): Change write_inferior_data_ptr to
3936 write_inferior_data_pointer.
3937 (download_tracepoint_1): Likewise.
3938 (download_tracepoint): Likewise.
3939 (download_trace_state_variables): Likewise.
3940
7cae9051
WW
39412016-02-11 Wei-cheng Wang <cole945@gmail.com>
3942 Marcin Kościelnicki <koriakin@0x04.net>
3943
3944 * tracepoint.c (struct tracepoint_action_ops): Remove.
3945 (struct tracepoint_action): Remove ops.
3946 (m_tracepoint_action_download, r_tracepoint_action_download)
3947 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3948 size and offset accordingly.
3949 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3950 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3951 (tracepoint_action_send, tracepoint_action_download): New functions.
3952 Helpers for trace action handlers.
3953 (add_tracepoint_action): Remove setup actions ops.
3954 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3955
9f6a71b4
YQ
39562016-02-10 Yao Qi <yao.qi@linaro.org>
3957
3958 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3959
1e94266c
SM
39602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3961
3962 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3963 to AC_OUTPUT.
3964 * configure: Regenerate.
3965
8adce034
SM
39662016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3967
3968 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3969 void * to gdb_byte *.
3970 * linux-low.c (siginfo_fixup): Likewise.
3971 (linux_xfer_siginfo): Likewise.
3972 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3973 Likewise.
3974 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3975
93813b37
WT
39762016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3977
3978 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3979 to srv_tgtobj.
3980 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3981 to srv_tgtobj.
3982 * linux-x86-low.c [__x86_64__]: Include
3983 "nat/amd64-linux-siginfo.h".
3984 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3985 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3986 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3987 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3988 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3989 (cpt_si_fd, si_timerid, si_overrun): Move from
3990 nat/amd64-linux-siginfo.c.
3991 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3992
8424cc97
SM
39932016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * server.c (skip_to_semicolon): Remove.
3996 (process_point_options): Use strchrnul instead of
3997 skip_to_semicolon.
3998
4d18591b
YQ
39992016-01-26 Yao Qi <yao.qi@linaro.org>
4000
4001 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4002 * linux-low.c (install_software_single_step_breakpoints): Don't
4003 call regcache_read_pc.
4004 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4005 argument pc.
4006
d8020970
YQ
40072016-01-26 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-low.c (install_software_single_step_breakpoints): Call
4010 regcache_read_pc instead of get_pc.
4011
8b207339
YQ
40122016-01-26 Yao Qi <yao.qi@linaro.org>
4013
4014 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4015 (unblock_async_io): Rename to ...
4016 (block_unblock_async_io): ... it. New function.
4017 (enable_async_io): Don't install SIGIO handler. Unblock it
4018 instead.
4019 (disable_async_io): Don't ignore SIGIO. Block it instead.
4020 (initialize_async_io): Install SIGIO handler. Don't call
4021 unblock_async_io.
4022
18879fef
YQ
40232016-01-26 Yao Qi <yao.qi@linaro.org>
4024
4025 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4026 first character is '\003', call *the_target->request_interrupt.
4027
a0f8e08a
YQ
40282016-01-25 Yao Qi <yao.qi@linaro.org>
4029
4030 * remote-utils.c (new_thread_notify): Remove.
4031 (dead_thread_notify): Likewise.
4032 * remote-utils.h (new_thread_notify): Remove declaration.
4033 (dead_thread_notify): Likewise.
4034
cc5fd9ab
MK
40352016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4036
4037 * gdb.trace/pending.exp: Fix expected message on continue.
4038
99e8eb11
MK
40392016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4040
4041 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4042 it works properly on big-endian machines where sizeof (CORE_ADDR)
4043 != sizeof (void *).
4044
a994041d
PA
40452016-01-21 Pedro Alves <palves@redhat.com>
4046
4047 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4048 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4049 * configure: Regenerate.
4050
f7a6a40d
YQ
40512016-01-21 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4054 is_thumb and set it according to CPSR saved on the stack.
4055 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4056 arm_sigreturn_next_pc.
4057
6f69e520
YQ
40582016-01-18 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-low.c (linux_set_pc_64bit): New function.
4061 (linux_get_pc_64bit): New function.
4062 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4063 Declare.
4064 * linux-sparc-low.c (debug_threads): Remove declaration.
4065 (sparc_get_pc): Remove.
4066 (the_low_target): Use linux_get_pc_64bit instead of
4067 sparc_get_pc.
4068 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4069 (the_low_target): Use linux_get_pc_64bit and
4070 linux_set_pc_64bit.
4071
276d4552
YQ
40722016-01-18 Yao Qi <yao.qi@linaro.org>
4073
4074 * linux-arm-low.c (debug_threads): Remove declaration.
4075 (arm_get_pc, arm_set_pc): Remove.
4076 (the_low_target): Use linux_get_pc_32bit and
4077 linux_set_pc_32bit.
4078 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4079 (the_low_target): Use linux_get_pc_32bit and
4080 linux_set_pc_32bit.
4081 * linux-cris-low.c (debug_threads): Remove declaration.
4082 (cris_get_pc, cris_set_pc,): Remove.
4083 (the_low_target): Use linux_get_pc_32bit and
4084 linux_set_pc_32bit.
4085 * linux-crisv32-low.c (debug_threads): Remove declaration.
4086 (cris_get_pc, cris_set_pc): Remove.
4087 (the_low_target): Use linux_get_pc_32bit and
4088 linux_set_pc_32bit.
4089 * linux-low.c: Include inttypes.h.
4090 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4091 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4092 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4093 (the_low_target): Use linux_get_pc_32bit and
4094 linux_set_pc_32bit.
4095 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4096 (the_low_target): Use linux_get_pc_32bit and
4097 linux_set_pc_32bit.
4098 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4099 (the_low_target): Use linux_get_pc_32bit and
4100 linux_set_pc_32bit.
4101 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4102 (the_low_target): Use linux_get_pc_32bit and
4103 linux_set_pc_32bit.
4104 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4105 (the_low_target): Use linux_get_pc_32bit and
4106 linux_set_pc_32bit.
4107
eb0edac8
GB
41082016-01-18 Gary Benson <gbenson@redhat.com>
4109
4110 * configure.ac (AC_FUNC_FORK): New check.
4111 * config.in: Regenerate.
4112 * configure: Likewise.
4113
1b451dda
YQ
41142016-01-14 Yao Qi <yao.qi@linaro.org>
4115
4116 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4117 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4118 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4119 arm_get_next_pcs_ctor.
4120
82075af2
JS
41212016-01-12 Josh Stone <jistone@redhat.com>
4122 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4123
4124 * inferiors.h: Include "gdb_vecs.h".
4125 (struct process_info): Add syscalls_to_catch.
4126 * inferiors.c (remove_process): Free syscalls_to_catch.
4127 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4128 syscall_return stops.
4129 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4130 * server.c (handle_general_set): Handle QCatchSyscalls.
4131 (handle_query): Report support for QCatchSyscalls.
4132 * target.h (struct target_ops): Add supports_catch_syscall.
4133 (target_supports_catch_syscall): New macro.
4134 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4135 (struct lwp_info): Add syscall_state.
4136 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4137 Maintain syscall_state and syscalls_to_catch across exec.
4138 (get_syscall_trapinfo): New function, proxy to the_low_target.
4139 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4140 (linux_low_filter_event): Toggle syscall_state entry/return for
4141 syscall traps, and set it ignored for all others.
4142 (gdb_catching_syscalls_p): New function.
4143 (gdb_catch_this_syscall_p): New function.
4144 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4145 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4146 (linux_supports_catch_syscall): New function.
4147 (linux_target_ops): Install it.
4148 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4149 (the_low_target): Install it.
4150
8f13a3ce
MF
41512016-01-12 Mike Frysinger <vapier@gentoo.org>
4152
4153 * acinclude.m4: Include new ../warning.m4 file.
4154 * configure: Regenerated.
4155 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4156
5b3da067
MF
41572016-01-12 Mike Frysinger <vapier@gentoo.org>
4158
4159 * ax.c (is_goto_target): Mark static.
4160 * linux-low.c (register_addr): Likewise.
4161 (linux_fetch_registers, linux_store_registers): Likewise.
4162 * mem-break.c (any_persistent_commands): Fix old prototype.
4163 (add_commands_to_breakpoint): Mark static.
4164 * regcache.c (find_register_by_name): Delete unused func.
4165 * remote-utils.c (hex_or_minus_one): Mark static.
4166 * server.c (monitor_show_help): Mark static.
4167 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4168 handle_v_requests): Likewise.
4169
bc504a31
PA
41702016-01-12 Pedro Alves <palves@redhat.com>
4171
4172 Remove use of the registered trademark symbol throughout.
4173
5a0dd67a
YQ
41742016-01-08 Yao Qi <yao.qi@linaro.org>
4175
4176 * remote-utils.c (getpkt): If c is '\003', call target hook
4177 request_interrupt.
4178
b2ca446f
YQ
41792016-01-06 Yao Qi <yao.qi@linaro.org>
4180
4181 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4182 linux-aarch32-low.c.
4183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4184 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4185 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4186 (thumb2_breakpoint): Declare.
4187 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4188 linux-aarch32-low.h.
4189 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4190 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4191 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4192
edd88788
JB
41932016-01-01 Joel Brobecker <brobecker@adacore.com>
4194
4195 * gdbreplay.c (gdbreplay_version): Change copyright year in
4196 version message.
4197 * server.c (gdbserver_version): Likewise.
4198
65da7f14
PP
41992015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4200
4201 * server.c (crc32_table): Delete.
4202 (crc32): Use libiberty's xcrc32 function.
4203
4abd5ed2
JB
42042015-12-22 Joel Brobecker <brobecker@adacore.com>
4205
4206 * lynx-low.c (lynx_delete_thread_callback): New function.
4207 (lynx_mourn): Properly delete our process and all of its
4208 threads. Remove call to clear_inferiors.
4209
0e50fe5c
JB
42102015-12-22 Joel Brobecker <brobecker@adacore.com>
4211
4212 * target.c (thread_search_callback): Add check that
4213 the thread_stopped target callback is not NULL before
4214 calling it.
4215
35adc03f
YQ
42162015-12-21 Yao Qi <yao.qi@linaro.org>
4217
4218 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4219 arm breakpoint.
4220
bd2b2909
AT
42212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4222
4223 * server.c (handle_query): Call target_supports_software_single_step.
4224
7fe5e27e
AT
42252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4226
4227 * linux-low.c (single_step): New function.
4228 (linux_resume_one_lwp_throw): Call single_step.
4229 (start_step_over): Likewise.
4230
d9311bfa
AT
42312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4232
4233 * Makefile.in (SFILES): Append arch/arm-linux.c,
4234 arch/arm-get-next-pcs.c.
4235 (arm-linux.o): New rule.
4236 (arm-get-next-pcs.o): New rule.
4237 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4238 arm-linux.o.
4239 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4240 to linux-aarch32-low.c.
4241 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4242 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4243 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4244 (thumb2_breakpoint_len): Likewise.
4245 (arm_is_thumb_mode): Make non-static.
4246 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4247 from linux-aarch32-low.c.
4248 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4249 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4250 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4251 (thumb2_breakpoint_len): Likewise.
4252 (arm_is_thumb_mode): New declaration.
4253 * linux-arm-low.c: Include arch/arm-linux.h
4254 aarch/arm-get-next-pcs.h, sys/syscall.h.
4255 (get_next_pcs_ops): New struct.
4256 (get_next_pcs_addr_bits_remove): New function.
4257 (get_next_pcs_is_thumb): New function.
4258 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4259 (arm_sigreturn_next_pc): Likewise.
4260 (get_next_pcs_syscall_next_pc): Likewise.
4261 (arm_gdbserver_get_next_pcs): Likewise.
4262 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4263 Initialize.
4264 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4265 * server.h: Include gdb_vecs.h.
4266
68ce2059
AT
42672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4268
4269 * Makefile.in (SFILES): Append common/common-regcache.c.
4270 (OBS): Append common-regcache.o.
4271 (common-regcache.o): New rule.
4272 * regcache.c (init_register_cache): Initialize cache to
4273 REG_UNAVAILABLE.
4274 (regcache_raw_read_unsigned): New function.
4275 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4276 register_status enum.
4277
fa5308bd
AT
42782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4279
4280 * linux-aarch64-low.c (the_low_targets): Rename
4281 breakpoint_reinsert_addr to get_next_pcs.
4282 * linux-arm-low.c (the_low_targets): Likewise.
4283 * linux-bfin-low.c (the_low_targets): Likewise.
4284 * linux-cris-low.c (the_low_targets): Likewise.
4285 * linux-crisv32-low.c (the_low_targets): Likewise.
4286 * linux-low.c (can_software_single_step): Likewise.
4287 (install_software_single_step_breakpoints): New function.
4288 (start_step_over): Use install_software_single_step_breakpoints.
4289 * linux-low.h: New CORE_ADDR vector.
4290 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4291 get_next_pcs.
4292 * linux-mips-low.c (the_low_targets): Likewise.
4293 * linux-nios2-low.c (the_low_targets): Likewise.
4294 * linux-sparc-low.c (the_low_targets): Likewise.
4295
4a6ed09b
PA
42962015-12-17 Pedro Alves <palves@redhat.com>
4297
4298 * linux-low.c (linux_kill_one_lwp): Remove references to
4299 LinuxThreads.
4300 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4301 to 'kill'.
4302 (linux_init_signals): Delete.
4303 (initialize_low): Adjust.
4304 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4305
7544db95
PA
43062015-12-16 Pedro Alves <palves@redhat.com>
4307
4308 * configure.ac (compiler warning flags): When testing a
4309 -Wno-foo option, check whether -Wfoo works instead.
4310 * configure: Regenerate.
4311
8020350c
DB
43122015-12-11 Don Breazeal <donb@codesourcery.com>
4313
4314 * server.c (process_serial_event): Don't exit from gdbserver
4315 in remote mode if there are still active inferiors.
4316
db91f502
YQ
43172015-12-11 Yao Qi <yao.qi@linaro.org>
4318
4319 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4320 arm_breakpoint_at if the process is 32-bit.
4321
b37a6290
YQ
43222015-12-11 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4325 arm breakpoint.
4326
17b1509a
YQ
43272015-12-07 Yao Qi <yao.qi@linaro.org>
4328
4329 * configure.srv: Append arm.o to srv_tgtobj for
4330 aarch64*-*-linux* target.
4331 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4332 from linux-arm-low.c.
4333 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4334 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4335 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4336 (thumb2_breakpoint_len): Likewise.
4337 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4338 (arm_breakpoint_kinds): Likewise.
4339 (arm_breakpoint_kind_from_pc): Likewise.
4340 (arm_sw_breakpoint_from_kind): Likewise.
4341 (arm_breakpoint_kind_from_current_state): Likewise.
4342 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4343 (arm_sw_breakpoint_from_kind): Declare.
4344 (arm_breakpoint_kind_from_current_state): Declare.
4345 (arm_breakpoint_at): Declare.
4346 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4347 arm_sw_breakpoint_from_kind if process is 32-bit.
4348 (aarch64_breakpoint_kind_from_pc): New function.
4349 (aarch64_breakpoint_kind_from_current_state): New function.
4350 (the_low_target): Initialize fields breakpoint_kind_from_pc
4351 and breakpoint_kind_from_current_state.
4352 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4353 linux-aarch32-low.c.
4354 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4355 (arm_breakpoint, arm_breakpoint_len): Likewise.
4356 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4357 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4358 (arm_is_thumb_mode): Likewise.
4359 (arm_breakpoint_at): Likewise.
4360 (arm_breakpoint_kind_from_pc): Likewise.
4361 (arm_sw_breakpoint_from_kind): Likewise.
4362 (arm_breakpoint_kind_from_current_state): Likewise.
4363
4364 Revert:
4365 2015-08-04 Yao Qi <yao.qi@linaro.org>
4366
4367 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4368 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4369 * server.c (extended_protocol): Remove "static".
4370 * server.h (extended_protocol): Declare it.
4371
ece66d65
JS
43722015-12-04 Josh Stone <jistone@redhat.com>
4373
4374 * target.h (struct target_ops) <arch_setup>: Rename to ...
4375 (struct target_ops) <post_create_inferior>: ... this.
4376 (target_arch_setup): Rename to ...
4377 (target_post_create_inferior): ... this, calling post_create_inferior.
4378 * server.c (start_inferior): Update target_arch_setup calls to
4379 target_post_create_inferior.
4380 * linux-low.c (linux_low_ptrace_options): Forward declare.
4381 (linux_arch_setup): Update its comment for general use.
4382 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4383 (struct linux_target_ops): Use linux_post_create_inferior.
4384 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4385 to post_create_inferior.
4386 * nto-low.c (struct nto_target_ops): Likewise.
4387 * spu-low.c (struct spu_target_ops): Likewise.
4388 * win32-low.c (struct win32_target_ops): Likewise.
4389
e58c48b4
AT
43902015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4391
4392 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4393
fbec8956
AT
43942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4395
4396 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4397 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4398 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4399 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4400 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4401 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4402 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4404 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4405 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4406 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4408
9b4c5f87
AT
44092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4410
4411 * linux-low.c (linux_look_up_symbols): Don't call
4412 linux_supports_traceclone.
4413 * linux-low.h (thread_db_init): Remove use_events argument.
4414 * thread-db.c (thread_db_use_event): Remove global variable.
4415 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4416 (struct thread_db) <td_create_bp>: Remove field.
4417 (thread_db_create_event): Remove function.
4418 (thread_db_enable_reporting): Likewise.
4419 (find_one_thread): Don't check for thread_db_use_events.
4420 (attach_thread): Likewise.
4421 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4422 (try_thread_db_load_1): Don't check for thread_db_use_events.
4423 (thread_db_init): Remove use_events argument and thread events
4424 handling.
4425 (remove_thread_event_breakpoints): Remove function.
4426 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4427
7d00775e
AT
44282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4429
4430 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4431 New function.
4432 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4433 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4434 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4435 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4436 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4437 Initialize.
4438 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4439 New function.
4440 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4441 * linux-low.c (can_hardware_single_step): Use
4442 supports_hardware_single_step.
4443 (can_software_single_step): New function.
4444 (start_step_over): Call can_software_single_step.
4445 (linux_supports_hardware_single_step): New function.
4446 (struct target_ops) <supports_software_single_step>: Initialize.
4447 * linux-low.h (struct linux_target_ops)
4448 <supports_hardware_single_step>: Initialize.
4449 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4451 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4452 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4453 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4455 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4457 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4458 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4459 Initialize.
4460 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4461 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4462 Initialize.
4463 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4465 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4466 New function.
4467 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4468 * target.h (struct target_ops): <supports_software_single_step>:
4469 New field.
4470 (target_supports_software_single_step): New macro.
4471
2d97cd35
AT
44722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4473
4474 * linux-low.c (linux_wait_1): Fix pc advance condition.
4475 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4476 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4477
769ef81f
AT
44782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4479
4480 * linux-arm-low.c (arm_is_thumb_mode): New function.
4481 (arm_breakpoint_at): Use arm_is_thumb_mode.
4482 (arm_breakpoint_kind_from_current_state): New function.
4483 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4484 Initialize.
4485 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4486 (linux_breakpoint_kind_from_current_state): New function.
4487 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4488 * linux-low.h (struct linux_target_ops)
4489 <breakpoint_kind_from_current_state>: New field.
4490 * target.h (struct target_ops): Likewise.
4491 (target_breakpoint_kind_from_current_state): New macro.
4492
1bebeeca
PA
44932015-11-30 Pedro Alves <palves@redhat.com>
4494
4495 * linux-low.c (linux_resume): Wake up the event loop before
4496 returning.
4497
a67a9fae
PA
44982015-11-30 Pedro Alves <palves@redhat.com>
4499
4500 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4501 check.
4502 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4503 to -1.
4504 * target.c (struct thread_search): New structure.
4505 (thread_search_callback): New function.
4506 (prev_general_thread): New global.
4507 (prepare_to_access_memory, done_accessing_memory): New functions.
4508 * target.h (prepare_to_access_memory, done_accessing_memory):
4509 Replace macros with function declarations.
4510
f2faf941
PA
45112015-11-30 Pedro Alves <palves@redhat.com>
4512
4513 PR 14618
4514 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4515 report TARGET_WAITKIND_NO_RESUMED.
4516 * remote-utils.c (prepare_resume_reply): Handle
4517 TARGET_WAITKIND_NO_RESUMED.
4518 * server.c (report_no_resumed): New global.
4519 (handle_query) <qSupported>: Handle "no-resumed+". Report
4520 "no-resumed+" support.
4521 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4522 return error if the client doesn't support no-resumed events.
4523 (push_stop_notification): New function.
4524 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4525 events if the client supports them.
4526
a681f9c9
PA
45272015-11-30 Pedro Alves <palves@redhat.com>
4528
4529 * linux-low.c (thread_still_has_status_pending_p): Don't check
4530 vCont;t here.
4531 (lwp_resumed): New function.
4532 (status_pending_p_callback): Return early if the LWP is not
4533 supposed to be resumed.
4534
65706a29
PA
45352015-11-30 Pedro Alves <palves@redhat.com>
4536
4537 * linux-low.c (handle_extended_wait): Assert that the LWP's
4538 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4539 thread create events, leave the new child's status pending.
4540 (linux_low_filter_event): If GDB wants to hear about thread exit
4541 events, leave the LWP marked dead and don't delete it.
4542 (linux_wait_for_event_filtered): Don't check for thread exit.
4543 (filter_exit_event): New function.
4544 (linux_wait_1): Use it, when returning an exit event.
4545 (linux_resume_one_lwp_throw): Assert that the LWP's
4546 waitstatus is TARGET_WAITKIND_IGNORE.
4547 * remote-utils.c (prepare_resume_reply): Handle
4548 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4549 * server.c (report_thread_events): New global.
4550 (handle_general_set): Handle QThreadEvents.
4551 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4552 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4553 TARGET_WAITKIND_THREAD_EXITED.
4554 * server.h (report_thread_events): Declare.
4555
56cf4bed
PA
45562015-11-30 Pedro Alves <palves@redhat.com>
4557
4558 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4559 the thread's last_resume_kind was resume_stop.
4560
500c1d85
PA
45612015-11-30 Pedro Alves <palves@redhat.com>
4562
4563 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4564 before returning.
4565
de979965
PA
45662015-11-30 Pedro Alves <palves@redhat.com>
4567
4568 * server.c (handle_v_requests): Handle vCtrlC.
4569
34c65914
PA
45702015-11-30 Pedro Alves <palves@redhat.com>
4571
4572 * gdbthread.h (find_any_thread_of_pid): Declare.
4573 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4574 functions.
4575 * server.c (handle_query): If current_thread is NULL, look for
4576 another thread of the selected process.
4577
79efa585 45782015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4579 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4580
4581 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4582 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4583 name in reply.
4584 * target.h (struct target_ops) <thread_name>: New field.
4585 (target_thread_name): New macro.
4586
80d82c19
JB
45872015-11-23 Joel Brobecker <brobecker@adacore.com>
4588
4589 * regcache.h (regcache_invalidate_pid): Add declaration.
4590 * regcache.c (regcache_invalidate_pid): New function, extracted
4591 from regcache_invalidate.
4592 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4593 Add trivial documentation comment.
4594 * lynx-low.c: Use regcache_invalidate_pid instead of
4595 regcache_invalidate.
4596
64da5dd5
JB
45972015-11-23 Joel Brobecker <brobecker@adacore.com>
4598
4599 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4600 and Elf64_auxv_t if the target is Android.
4601
37ce4055
DE
46022015-11-22 Doug Evans <xdje42@gmail.com>
4603
4604 * target.h: #include <sys/types.h>.
4605
06e03fff
PA
46062015-11-19 Pedro Alves <palves@redhat.com>
4607
4608 * linux-low.c (linux_process_qsupported): Change prototype.
4609 Adjust.
4610 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4611 Change prototype.
4612 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4613 and adjust to loop over all features.
4614 * server.c (handle_query) <qSupported>: Adjust to call
4615 target_process_qsupported once, passing it a vector of unprocessed
4616 features.
4617 * target.h (struct target_ops) <process_qsupported>: Change
4618 prototype.
4619 (target_process_qsupported): Adjust.
4620
9a084706
PA
46212015-11-19 Pedro Alves <palves@redhat.com>
4622
4623 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4624 mode.
4625 * configure: Regenerate.
4626
dad44a1f
PA
46272015-11-19 Pedro Alves <palves@redhat.com>
4628
4629 * configure: Regenerate.
4630
231c0592
YQ
46312015-11-19 Yao Qi <yao.qi@linaro.org>
4632
4633 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4634 type to uint32_t.
4635
6c1c9a8b
YQ
46362015-11-19 Yao Qi <yao.qi@linaro.org>
4637
4638 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4639 (struct aarch64_operand): Move enum out.
4640
9caa3311
YQ
46412015-11-19 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4644 struct user_fpsimd_state *.
4645 (aarch64_store_fpregset): Likewise.
4646
6a69a054
YQ
46472015-11-19 Yao Qi <yao.qi@linaro.org>
4648
4649 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4650 struct user_pt_regs *.
4651 (aarch64_store_gregset): Likewise.
4652
1798301e
PA
46532015-11-18 Pedro Alves <palves@redhat.com>
4654
4655 * Makefile.in (all_object_files): Add $IPA_OBJS.
4656
ce7715e2
PA
46572015-11-17 Pedro Alves <palves@redhat.com>
4658
4659 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4660 GDB_SIGNAL_0 and gdb_signal_to_string.
4661
c0879059
PA
46622015-11-17 Pedro Alves <palves@redhat.com>
4663
4664 * win32-low.c (handle_output_debug_string): Remove parameter.
4665 (win32_kill): Remove our_status local and adjust call to
4666 handle_output_debug_string.
4667 (get_child_debug_event): Adjust call to
4668 handle_output_debug_string.
4669
1996e237
SM
46702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4671
4672 * linux-mips-low.c (mips_fill_gregset): Add cast.
4673 (mips_store_gregset): Likewise.
4674 (mips_fill_fpregset): Likewise.
4675 (mips_store_fpregset): Likewise.
4676
cbec665b
SM
46772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4678
4679 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4680 priv.
4681
eb3e3c67
SM
46822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4683
4684 * linux-mips-low.c (mips_linux_new_thread): Change type of
4685 watch_type to enum target_hw_bp_type.
4686
171de4b8
SM
46872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4688
4689 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4690 Change return type to arm_hwbp_type.
4691
04248ead
SM
46922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4693
4694 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4695 (arm_store_gregset): Likewise.
4696 * linux-arm-low.c (arm_get_hwcap): Likewise.
4697 (arm_read_description): Likewise.
4698
04b3479c
SM
46992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4700
4701 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4702
2bc84e8a
SM
47032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4704
4705 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4706 (ppc_fill_vsxregset): Likewise.
4707 (ppc_store_vsxregset): Likewise.
4708 (ppc_fill_vrregset): Likewise.
4709 (ppc_store_vrregset): Likewise.
4710 (ppc_fill_evrregset): Likewise.
4711 (ppc_store_evrregset): Likewise.
4712
e6c5bb05
SM
47132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4714
4715 * linux-ppc-low.c (ppc_usrregs_info): Remove
4716 forward-declaration.
4717 (ppc_arch_setup): Move lower in file.
4718
7ea45d72
SM
47192015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4720
4721 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4722 (ps_pdwrite): Likewise.
4723
69291610
HW
47242015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4725
4726 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4727 to after assert checks.
4728
b42945fd
SM
47292015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4730
4731 * proc-service.c (ps_pdread): Add/adjust casts.
4732 (ps_pdwrite): Add/adjust casts.
4733
d6f85c84
SM
47342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4735
4736 * server.c (handle_search_memory_1): Cast return value of
4737 memmem.
4738
f98cd059
SM
47392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4740
4741 * server.c (write_qxfer_response): Change type of data to
4742 gdb_byte *.
4743
d2412fa5
PA
47442015-10-29 Pedro Alves <palves@redhat.com>
4745
4746 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4747
c17414a2
PA
47482015-10-29 Pedro Alves <palves@redhat.com>
4749
4750 * tracepoint.c (clear_installed_tracepoints): Add casts.
4751
e053fbc4
PA
47522015-10-29 Pedro Alves <palves@redhat.com>
4753
4754 * server.c (handle_v_cont, process_serial_event): Add enum
4755 gdb_signal casts to signal parsing code.
4756
add67df8
PA
47572015-10-29 Pedro Alves <palves@redhat.com>
4758
4759 * linux-low.h (NULL_REGSET): Define.
4760 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4761 * linux-arm-low.c (arm_regsets): Likewise.
4762 * linux-crisv32-low.c (cris_regsets): Likewise.
4763 * linux-m68k-low.c (m68k_regsets): Likewise.
4764 * linux-mips-low.c (mips_regsets): Likewise.
4765 * linux-nios2-low.c (nios2_regsets): Likewise.
4766 * linux-ppc-low.c (ppc_regsets): Likewise.
4767 * linux-s390-low.c (s390_regsets): Likewise.
4768 * linux-sh-low.c (sh_regsets): Likewise.
4769 * linux-sparc-low.c (sparc_regsets): Likewise.
4770 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4771 * linux-tile-low.c (tile_regsets): Likewise.
4772 * linux-x86-low.c (x86_regsets): Likewise.
4773 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4774
50bc912a
PA
47752015-10-29 Pedro Alves <palves@redhat.com>
4776
4777 * linux-low.h (NULL_REGSET): Define.
4778 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4779 * linux-arm-low.c (arm_regsets): Likewise.
4780 * linux-crisv32-low.c (cris_regsets): Likewise.
4781 * linux-m68k-low.c (m68k_regsets): Likewise.
4782 * linux-mips-low.c (mips_regsets): Likewise.
4783 * linux-nios2-low.c (nios2_regsets): Likewise.
4784 * linux-ppc-low.c (ppc_regsets): Likewise.
4785 * linux-s390-low.c (s390_regsets): Likewise.
4786 * linux-sh-low.c (sh_regsets): Likewise.
4787 * linux-sparc-low.c (sparc_regsets): Likewise.
4788 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4789 * linux-tile-low.c (tile_regsets): Likewise.
4790 * linux-x86-low.c (x86_regsets): Likewise.
4791 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4792
682b2546
DE
47932015-10-26 Doug Evans <dje@google.com>
4794
4795 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4796
963843d4
DE
47972015-10-26 Doug Evans <dje@google.com>
4798
4799 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4800
d41401ac
DE
48012015-10-26 Doug Evans <dje@google.com>
4802
4803 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4804 for debug_printf.
4805 (attach_thread, find_new_threads_callback): Ditto.
4806
3db28855
AT
48072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4808
4809 * mem-break.h (set_breakpoint_data): Remove.
4810
fb78e89c
AT
48112015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4812
4813 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4814 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4815 (initialize_low): Remove set_breakpoint_data call.
4816 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4817 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4818 (initialize_low): Remove set_breakpoint_data call.
4819 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4820 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4821 (initialize_low): Remove set_breakpoint_data call.
4822
2e6ee069
AT
48232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4824
4825 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4826 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4827 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4828 * target.h (target_breakpoint_kind_from_pc): New macro.
4829
1652a986
AT
48302015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4831
4832 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4833 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4834 the default breakpoint kind.
4835
abeead09
AT
48362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4837
4838 * linux-arm-low.c (arm_supports_z_point_type): Add software
4839 breakpoint support.
4840
b0b4b501
AT
48412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4842
4843 * linux-arm-low.c: Refactor breakpoint definitions.
4844 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4845 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4846
8689682c
AT
48472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848
4849 * Makefile.in: Add arm.c/o.
4850 * configure.srv: Likewise.
4851 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4852 (arm_breakpoint_kind_from_pc): New function.
4853 (arm_sw_breakpoint_from_kind): Return proper kind.
4854 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4855
27165294
AT
48562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4857
4858 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4859 removal.
4860 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4861 (struct raw_breakpoint) <size>: Remove.
4862 (struct raw_breakpoint) <kind>: Add.
4863 (bp_size): New function.
4864 (bp_opcode): Likewise.
4865 (find_raw_breakpoint_at): Adjust for kind.
4866 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4867 (remove_memory_breakpoint): Adjust for kind call bp_size.
4868 (set_raw_breakpoint_at): Adjust for kind.
4869 (set_breakpoint): Likewise.
4870 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4871 (delete_raw_breakpoint): Adjust for kind.
4872 (delete_breakpoint): Likewise.
4873 (find_gdb_breakpoint): Likewise.
4874 (set_gdb_breakpoint_1): Likewise.
4875 (set_gdb_breakpoint): Likewise.
4876 (delete_gdb_breakpoint_1): Likewise.
4877 (delete_gdb_breakpoint): Likewise.
4878 (uninsert_raw_breakpoint): Likewise.
4879 (reinsert_raw_breakpoint): Likewise.
4880 (set_breakpoint_data): Remove.
4881 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4882 (check_mem_read): Adjust for kind call bp_size.
4883 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4884 (clone_one_breakpoint): Adjust for kind.
4885 * mem-break.h (set_gdb_breakpoint): Likewise.
4886 (delete_gdb_breakpoint): Likewise.
4887 * server.c (process_serial_event): Likewise.
4888
dd373349
AT
48892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4890
4891 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4892 (struct linux_target_ops) <breakpoint>: Remove.
4893 (struct linux_target_ops) <breakpoint_len>: Remove.
4894 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4895 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4896 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4897 (arm_sw_breakpoint_from_kind): New function.
4898 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4899 (struct linux_target_ops) <breakpoint>: Remove.
4900 (struct linux_target_ops) <breakpoint_len>: Remove.
4901 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4902 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4903 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4904 (struct linux_target_ops) <breakpoint>: Remove.
4905 (struct linux_target_ops) <breakpoint_len>: Remove.
4906 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4907 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4908 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4909 (struct linux_target_ops) <breakpoint>: Remove.
4910 (struct linux_target_ops) <breakpoint_len>: Remove.
4911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4913 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4914 and sw_breakpoint_from_kind to increment the pc.
4915 (linux_breakpoint_kind_from_pc): New function.
4916 (linux_sw_breakpoint_from_kind): New function.
4917 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4918 (initialize_low): Call breakpoint_kind_from_pc and
4919 sw_breakpoint_from_kind to replace breakpoint_data/len.
4920 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4921 New field.
4922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4923 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4924 (struct linux_target_ops) <breakpoint>: Remove.
4925 (struct linux_target_ops) <breakpoint_len>: Remove.
4926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4928 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4929 (struct linux_target_ops) <breakpoint>: Remove.
4930 (struct linux_target_ops) <breakpoint_len>: Remove.
4931 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4933 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4934 (struct linux_target_ops) <breakpoint>: Remove.
4935 (struct linux_target_ops) <breakpoint_len>: Remove.
4936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4938 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4939 (struct linux_target_ops) <breakpoint>: Remove.
4940 (struct linux_target_ops) <breakpoint_len>: Remove.
4941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4943 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4944 (struct linux_target_ops) <breakpoint>: Remove.
4945 (struct linux_target_ops) <breakpoint_len>: Remove.
4946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4948 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4949 (struct linux_target_ops) <breakpoint>: Remove.
4950 (struct linux_target_ops) <breakpoint_len>: Remove.
4951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4953 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4954 (struct linux_target_ops) <breakpoint>: Remove.
4955 (struct linux_target_ops) <breakpoint_len>: Remove.
4956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4958 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4959 (struct linux_target_ops) <breakpoint>: Remove.
4960 (struct linux_target_ops) <breakpoint_len>: Remove.
4961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4963 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4964 (struct linux_target_ops) <breakpoint>: Remove.
4965 (struct linux_target_ops) <breakpoint_len>: Remove.
4966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4968 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4969 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4970 (struct linux_target_ops) <breakpoint>: Remove.
4971 (struct linux_target_ops) <breakpoint_len>: Remove.
4972 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4973 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4974 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4975 (struct linux_target_ops) <breakpoint>: Remove.
4976 (struct linux_target_ops) <breakpoint_len>: Remove.
4977 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4978 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4979
4cd98a19
AT
49802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4981
4982 * linux-cris-low.c (cris_get_pc): Remove void arg.
4983
774ee6d2
AR
49842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4985
4986 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4987 variable name.
4988
833dcd29
AR
49892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4990
4991 * inferiors.c (thread_pid_matches_callback): New function.
4992 (find_thread_process): New function.
4993 (remove_thread): Reset current_thread.
4994 (remove_process): Assert threads have been removed first.
4995
8d689ee5
YQ
49962015-10-15 Yao Qi <yao.qi@linaro.org>
4997
4998 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4999 if it is 3.
5000 (aarch64_remove_point): Likewise.
5001 * regcache.c (regcache_register_size): New function.
5002
1c2e1515
YQ
50032015-10-12 Yao Qi <yao.qi@linaro.org>
5004
5005 * linux-aarch64-low.c: Update all callers as emit_load_store
5006 is renamed to aarch64_emit_load_store.
5007
e1c587c3
YQ
50082015-10-12 Yao Qi <yao.qi@linaro.org>
5009
5010 * linux-aarch64-low.c: Update all callers of function renaming
5011 from emit_insn to aarch64_emit_insn.
5012
b6542f81
YQ
50132015-10-12 Yao Qi <yao.qi@linaro.org>
5014
5015 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5016 arch/aarch64-insn.h.
5017 (struct aarch64_memory_operand): Likewise.
5018 (ENCODE): Likewise.
5019 (emit_insn): Move to arch/aarch64-insn.c.
5020 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5021 (emit_load_store): Move to arch/aarch64-insn.c.
5022 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5023 (can_encode_int32): Remove.
5024
246994ce
YQ
50252015-10-12 Yao Qi <yao.qi@linaro.org>
5026
5027 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5028 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5029 (aarch64_relocate_instruction): Likewise.
5030 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5031 (struct aarch64_insn_visitor): Likewise.
5032
0badd99f
YQ
50332015-10-12 Yao Qi <yao.qi@linaro.org>
5034
5035 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5036 (struct aarch64_insn_visitor): New.
5037 (struct aarch64_insn_relocation_data): New.
5038 (aarch64_ftrace_insn_reloc_b): New function.
5039 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5040 (aarch64_ftrace_insn_reloc_cb): Likewise.
5041 (aarch64_ftrace_insn_reloc_tb): Likewise.
5042 (aarch64_ftrace_insn_reloc_adr): Likewise.
5043 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5044 (aarch64_ftrace_insn_reloc_others): Likewise.
5045 (visitor): New.
5046 (aarch64_relocate_instruction): Use visitor.
5047
dfaffe9d
YQ
50482015-10-12 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5051 int. Add argument buf.
5052 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5053 aarch64_relocate_instruction.
5054
70b439f0
YQ
50552015-10-12 Yao Qi <yao.qi@linaro.org>
5056
5057 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5058 argument insn. Remove local variable insn. Don't call
5059 target_read_uint32.
5060 (aarch64_install_fast_tracepoint_jump_pad): Call
5061 target_read_uint32.
5062
7781c06f
YQ
50632015-09-30 Yao Qi <yao.qi@linaro.org>
5064
5065 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5066 (emit_load_store_pair): Likewise.
5067
9a3c8263
SM
50682015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5069
5070 * dll.c (match_dll): Add cast(s).
5071 (unloaded_dll): Likewise.
5072 * linux-low.c (second_thread_of_pid_p): Likewise.
5073 (delete_lwp_callback): Likewise.
5074 (count_events_callback): Likewise.
5075 (select_event_lwp_callback): Likewise.
5076 (linux_set_resume_request): Likewise.
5077 * server.c (accumulate_file_name_length): Likewise.
5078 (emit_dll_description): Likewise.
5079 (handle_qxfer_threads_worker): Likewise.
5080 (visit_actioned_threads): Likewise.
5081 * thread-db.c (any_thread_of): Likewise.
5082 * tracepoint.c (same_process_p): Likewise.
5083 (match_blocktype): Likewise.
5084 (build_traceframe_info_xml): Likewise.
5085
224c3ddb
SM
50862015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5087
5088 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5089 assignment.
5090 (gdb_unparse_agent_expr): Likewise.
5091 * hostio.c (require_data): Likewise.
5092 (handle_pread): Likewise.
5093 * linux-low.c (disable_regset): Likewise.
5094 (fetch_register): Likewise.
5095 (store_register): Likewise.
5096 (get_dynamic): Likewise.
5097 (linux_qxfer_libraries_svr4): Likewise.
5098 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5099 (set_fast_tracepoint_jump): Likewise.
5100 (uninsert_fast_tracepoint_jumps_at): Likewise.
5101 (reinsert_fast_tracepoint_jumps_at): Likewise.
5102 (validate_inserted_breakpoint): Likewise.
5103 (clone_agent_expr): Likewise.
5104 * regcache.c (init_register_cache): Likewise.
5105 * remote-utils.c (putpkt_binary_1): Likewise.
5106 (decode_M_packet): Likewise.
5107 (decode_X_packet): Likewise.
5108 (look_up_one_symbol): Likewise.
5109 (relocate_instruction): Likewise.
5110 (monitor_output): Likewise.
5111 * server.c (handle_search_memory): Likewise.
5112 (handle_qxfer_exec_file): Likewise.
5113 (handle_qxfer_libraries): Likewise.
5114 (handle_qxfer): Likewise.
5115 (handle_query): Likewise.
5116 (handle_v_cont): Likewise.
5117 (handle_v_run): Likewise.
5118 (captured_main): Likewise.
5119 * target.c (write_inferior_memory): Likewise.
5120 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5121 * tracepoint.c (init_trace_buffer): Likewise.
5122 (add_tracepoint_action): Likewise.
5123 (add_traceframe): Likewise.
5124 (add_traceframe_block): Likewise.
5125 (cmd_qtdpsrc): Likewise.
5126 (cmd_qtdv): Likewise.
5127 (cmd_qtstatus): Likewise.
5128 (response_source): Likewise.
5129 (response_tsv): Likewise.
5130 (cmd_qtnotes): Likewise.
5131 (gdb_collect): Likewise.
5132 (initialize_tracepoint): Likewise.
5133
afbe19f8
PL
51342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5135
5136 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5137 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5138 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5139 <NOP>: New.
5140 (enum aarch64_condition_codes): New enum.
5141 (w0): New static global.
5142 (fp): Likewise.
5143 (lr): Likewise.
5144 (struct aarch64_memory_operand) <type>: New
5145 MEMORY_OPERAND_POSTINDEX type.
5146 (postindex_memory_operand): New helper function.
5147 (emit_ret): New function.
5148 (emit_load_store_pair): New function, factored out of emit_stp
5149 with support for MEMORY_OPERAND_POSTINDEX.
5150 (emit_stp): Rewrite using emit_load_store_pair.
5151 (emit_ldp): New function.
5152 (emit_load_store): Likewise.
5153 (emit_ldr): Mention post-index instruction in comment.
5154 (emit_ldrh): New function.
5155 (emit_ldrb): New function.
5156 (emit_ldrsw): Mention post-index instruction in comment.
5157 (emit_str): Likewise.
5158 (emit_subs): New function.
5159 (emit_cmp): Likewise.
5160 (emit_and): Likewise.
5161 (emit_orr): Likewise.
5162 (emit_orn): Likewise.
5163 (emit_eor): Likewise.
5164 (emit_mvn): Likewise.
5165 (emit_lslv): Likewise.
5166 (emit_lsrv): Likewise.
5167 (emit_asrv): Likewise.
5168 (emit_mul): Likewise.
5169 (emit_sbfm): Likewise.
5170 (emit_sbfx): Likewise.
5171 (emit_ubfm): Likewise.
5172 (emit_ubfx): Likewise.
5173 (emit_csinc): Likewise.
5174 (emit_cset): Likewise.
5175 (emit_nop): Likewise.
5176 (emit_ops_insns): New helper function.
5177 (emit_pop): Likewise.
5178 (emit_push): Likewise.
5179 (aarch64_emit_prologue): New function.
5180 (aarch64_emit_epilogue): Likewise.
5181 (aarch64_emit_add): Likewise.
5182 (aarch64_emit_sub): Likewise.
5183 (aarch64_emit_mul): Likewise.
5184 (aarch64_emit_lsh): Likewise.
5185 (aarch64_emit_rsh_signed): Likewise.
5186 (aarch64_emit_rsh_unsigned): Likewise.
5187 (aarch64_emit_ext): Likewise.
5188 (aarch64_emit_log_not): Likewise.
5189 (aarch64_emit_bit_and): Likewise.
5190 (aarch64_emit_bit_or): Likewise.
5191 (aarch64_emit_bit_xor): Likewise.
5192 (aarch64_emit_bit_not): Likewise.
5193 (aarch64_emit_equal): Likewise.
5194 (aarch64_emit_less_signed): Likewise.
5195 (aarch64_emit_less_unsigned): Likewise.
5196 (aarch64_emit_ref): Likewise.
5197 (aarch64_emit_if_goto): Likewise.
5198 (aarch64_emit_goto): Likewise.
5199 (aarch64_write_goto_address): Likewise.
5200 (aarch64_emit_const): Likewise.
5201 (aarch64_emit_call): Likewise.
5202 (aarch64_emit_reg): Likewise.
5203 (aarch64_emit_pop): Likewise.
5204 (aarch64_emit_stack_flush): Likewise.
5205 (aarch64_emit_zero_ext): Likewise.
5206 (aarch64_emit_swap): Likewise.
5207 (aarch64_emit_stack_adjust): Likewise.
5208 (aarch64_emit_int_call_1): Likewise.
5209 (aarch64_emit_void_call_2): Likewise.
5210 (aarch64_emit_eq_goto): Likewise.
5211 (aarch64_emit_ne_goto): Likewise.
5212 (aarch64_emit_lt_goto): Likewise.
5213 (aarch64_emit_le_goto): Likewise.
5214 (aarch64_emit_gt_goto): Likewise.
5215 (aarch64_emit_ge_got): Likewise.
5216 (aarch64_emit_ops_impl): New static global variable.
5217 (aarch64_emit_ops): New target function, return
5218 &aarch64_emit_ops_impl.
5219 (struct linux_target_ops): Install it.
5220
bb903df0
PL
52212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5222
5223 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5224 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5225 aarch64-ipa.o.
5226 * linux-aarch64-ipa.c: New file.
5227 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5228 and endian.h.
5229 (aarch64_get_thread_area): New target method.
5230 (extract_signed_bitfield): New helper function.
5231 (aarch64_decode_ldr_literal): New function.
5232 (enum aarch64_opcodes): New enum.
5233 (struct aarch64_register): New struct.
5234 (struct aarch64_operand): New struct.
5235 (x0): New static global.
5236 (x1): Likewise.
5237 (x2): Likewise.
5238 (x3): Likewise.
5239 (x4): Likewise.
5240 (w2): Likewise.
5241 (ip0): Likewise.
5242 (sp): Likewise.
5243 (xzr): Likewise.
5244 (aarch64_register): New helper function.
5245 (register_operand): Likewise.
5246 (immediate_operand): Likewise.
5247 (struct aarch64_memory_operand): New struct.
5248 (offset_memory_operand): New helper function.
5249 (preindex_memory_operand): Likewise.
5250 (enum aarch64_system_control_registers): New enum.
5251 (ENCODE): New macro.
5252 (emit_insn): New helper function.
5253 (emit_b): New function.
5254 (emit_bcond): Likewise.
5255 (emit_cb): Likewise.
5256 (emit_tb): Likewise.
5257 (emit_blr): Likewise.
5258 (emit_stp): Likewise.
5259 (emit_ldp_q_offset): Likewise.
5260 (emit_stp_q_offset): Likewise.
5261 (emit_load_store): Likewise.
5262 (emit_ldr): Likewise.
5263 (emit_ldrsw): Likewise.
5264 (emit_str): Likewise.
5265 (emit_ldaxr): Likewise.
5266 (emit_stxr): Likewise.
5267 (emit_stlr): Likewise.
5268 (emit_data_processing_reg): Likewise.
5269 (emit_data_processing): Likewise.
5270 (emit_add): Likewise.
5271 (emit_sub): Likewise.
5272 (emit_mov): Likewise.
5273 (emit_movk): Likewise.
5274 (emit_mov_addr): Likewise.
5275 (emit_mrs): Likewise.
5276 (emit_msr): Likewise.
5277 (emit_sevl): Likewise.
5278 (emit_wfe): Likewise.
5279 (append_insns): Likewise.
5280 (can_encode_int32_in): New helper function.
5281 (aarch64_relocate_instruction): New function.
5282 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5283 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5284 (struct linux_target_ops): Install aarch64_get_thread_area,
5285 aarch64_install_fast_tracepoint_jump_pad and
5286 aarch64_get_min_fast_tracepoint_insn_len.
5287
787749ea
PL
52882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5289
5290 * Makefile.in (aarch64-insn.o): New rule.
5291 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5292
9812b2e6
YQ
52932015-09-21 Yao Qi <yao.qi@linaro.org>
5294
5295 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5296
18fe412b
YQ
52972015-09-21 Yao Qi <yao.qi@linaro.org>
5298
5299 * tracepoint.c (max_jump_pad_size): Remove.
5300
a0cc84cd
YQ
53012015-09-18 Yao Qi <yao.qi@linaro.org>
5302
5303 * linux-aarch64-low.c: Don't include sys/uio.h.
5304 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5305
d78908cf
WW
53062015-09-16 Wei-cheng Wang <cole945@gmail.com>
5307
5308 * tracepoint.c (eval_result_type): Change prototype.
5309 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5310
d57e0d50
PA
53112015-09-15 Pedro Alves <palves@redhat.com>
5312
5313 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5314 Check whether to report exec events instead of checking whether
5315 multiprocess is enabled.
5316
5a676acc
PA
53172015-09-15 Pedro Alves <palves@redhat.com>
5318
5319 PR remote/18965
5320 * remote-utils.c (prepare_resume_reply): Merge
5321 TARGET_WAITKIND_VFORK_DONE switch case with the
5322 TARGET_WAITKIND_FORKED case.
5323
7c5d0fad
YQ
53242015-09-15 Yao Qi <yao.qi@linaro.org>
5325
5326 * server.c (handle_query): Check string comparison using
5327 "else if" instead of "if".
5328
750ce8d1
YQ
53292015-09-15 Yao Qi <yao.qi@linaro.org>
5330
5331 * server.c (vCont_supported): New global variable.
5332 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5333 matches. Append ";vContSupported+" to own_buf.
5334 (handle_v_requests): Append ";s;S" to own_buf if target supports
5335 hardware single step or vCont_supported is false.
5336 (capture_main): Set vCont_supported to zero.
5337
70b90b91
YQ
53382015-09-15 Yao Qi <yao.qi@linaro.org>
5339
5340 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5341 it to ...
5342 (linux_supports_hardware_single_step): ... New function.
5343 (linux_target_ops): Update.
5344 * lynx-low.c (lynx_target_ops): Set field
5345 supports_hardware_single_step to target_can_do_hardware_single_step.
5346 * nto-low.c (nto_target_ops): Likewise.
5347 * spu-low.c (spu_target_ops): Likewise.
5348 * win32-low.c (win32_target_ops): Likewise.
5349 * target.c (target_can_do_hardware_single_step): New function.
5350 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5351 Remove. <supports_hardware_single_step>: New field.
5352 (target_supports_conditional_breakpoints): Remove.
5353 (target_supports_hardware_single_step): New macro.
5354 (target_can_do_hardware_single_step): Declare.
5355 * server.c (handle_query): Use target_supports_hardware_single_step
5356 instead of target_supports_conditional_breakpoints.
5357
ade90bde
YQ
53582015-09-15 Yao Qi <yao.qi@linaro.org>
5359
5360 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5361 function.
5362 (struct linux_target_ops the_low_target): Install
5363 aarch64_linux_siginfo_fixup.
5364
94585166
DB
53652015-09-11 Don Breazeal <donb@codesourcery.com>
5366 Luis Machado <lgustavo@codesourcery.com>
5367
5368 * linux-low.c (linux_mourn): Static declaration.
5369 (linux_arch_setup): Move in front of
5370 handle_extended_wait.
5371 (linux_arch_setup_thread): New function.
5372 (handle_extended_wait): Handle exec events. Call
5373 linux_arch_setup_thread. Make event_lwp argument a
5374 pointer-to-a-pointer.
5375 (check_zombie_leaders): Do not check stopped threads.
5376 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5377 (linux_low_filter_event): Add lwp and thread for exec'ing
5378 non-leader thread if leader thread has been deleted.
5379 Refactor code into linux_arch_setup_thread and call it.
5380 Pass child lwp pointer by reference to handle_extended_wait.
5381 (linux_wait_for_event_filtered): Update comment.
5382 (linux_wait_1): Prevent clobbering exec event status.
5383 (linux_supports_exec_events): New function.
5384 (linux_target_ops) <supports_exec_events>: Initialize new member.
5385 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5386 new member.
5387 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5388 * server.c (report_exec_events): New global variable.
5389 (handle_query): Handle qSupported query for exec-events feature.
5390 (captured_main): Initialize report_exec_events.
5391 * server.h (report_exec_events): Declare new global variable.
5392 * target.h (struct target_ops) <supports_exec_events>: New
5393 member.
5394 (target_supports_exec_events): New macro.
5395 * win32-low.c (win32_target_ops) <supports_exec_events>:
5396 Initialize new member.
5397
0568462b
MM
53982015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5399
5400 * linux-low.c (linux_low_enable_btrace): Remove.
5401 (linux_target_ops): Replace linux_low_enable_btrace with
5402 linux_enable_btrace.
5403
39edd165
YQ
54042015-09-03 Yao Qi <yao.qi@linaro.org>
5405
5406 * linux-aarch64-low.c (aarch64_insert_point): Call
5407 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5408 returns true.
5409
1db33b5a
UW
54102015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5411
5412 * linux-low.c (check_stopped_by_breakpoint): Use
5413 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5414
ab290430
PA
54152015-08-27 Pedro Alves <palves@redhat.com>
5416
5417 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5418
8d749320
SM
54192015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5420
6711b7f8
SM
5421 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5422 the XNEW-family equivalent.
8d749320
SM
5423 (compile_bytecodes): Likewise.
5424 * dll.c (loaded_dll): Likewise.
5425 * event-loop.c (append_callback_event): Likewise.
5426 (create_file_handler): Likewise.
5427 (create_file_event): Likewise.
5428 * hostio.c (handle_open): Likewise.
5429 * inferiors.c (add_thread): Likewise.
5430 (add_process): Likewise.
5431 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5432 * linux-arm-low.c (arm_new_process): Likewise.
5433 (arm_new_thread): Likewise.
5434 * linux-low.c (add_to_pid_list): Likewise.
5435 (linux_add_process): Likewise.
5436 (handle_extended_wait): Likewise.
5437 (add_lwp): Likewise.
5438 (enqueue_one_deferred_signal): Likewise.
5439 (enqueue_pending_signal): Likewise.
5440 (linux_resume_one_lwp_throw): Likewise.
5441 (linux_resume_one_thread): Likewise.
5442 (linux_read_memory): Likewise.
5443 (linux_write_memory): Likewise.
5444 * linux-mips-low.c (mips_linux_new_process): Likewise.
5445 (mips_linux_new_thread): Likewise.
5446 (mips_add_watchpoint): Likewise.
5447 * linux-x86-low.c (initialize_low_arch): Likewise.
5448 * lynx-low.c (lynx_add_process): Likewise.
5449 * mem-break.c (set_raw_breakpoint_at): Likewise.
5450 (set_breakpoint): Likewise.
5451 (add_condition_to_breakpoint): Likewise.
5452 (add_commands_to_breakpoint): Likewise.
5453 (clone_agent_expr): Likewise.
5454 (clone_one_breakpoint): Likewise.
5455 * regcache.c (new_register_cache): Likewise.
5456 * remote-utils.c (look_up_one_symbol): Likewise.
5457 * server.c (queue_stop_reply): Likewise.
5458 (start_inferior): Likewise.
5459 (queue_stop_reply_callback): Likewise.
5460 (handle_target_event): Likewise.
5461 * spu-low.c (fetch_ppc_memory): Likewise.
5462 (store_ppc_memory): Likewise.
5463 * target.c (set_target_ops): Likewise.
5464 * thread-db.c (thread_db_load_search): Likewise.
5465 (try_thread_db_load_1): Likewise.
5466 * tracepoint.c (add_tracepoint): Likewise.
5467 (add_tracepoint_action): Likewise.
5468 (create_trace_state_variable): Likewise.
5469 (cmd_qtdpsrc): Likewise.
5470 (cmd_qtro): Likewise.
5471 (add_while_stepping_state): Likewise.
5472 * win32-low.c (child_add_thread): Likewise.
5473 (get_image_name): Likewise.
5474
ed8b7b42
YQ
54752015-08-25 Yao Qi <yao.qi@linaro.org>
5476
5477 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5478
db3cb7cb
YQ
54792015-08-25 Yao Qi <yao.qi@linaro.org>
5480
5481 * Makefile.in (aarch64-linux.o): New rule.
5482 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5483 srv_tgtobj.
5484 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5485 (aarch64_init_debug_reg_state): Make it extern.
5486 (aarch64_linux_prepare_to_resume): Remove.
5487
f6011a1c
YQ
54882015-08-25 Yao Qi <yao.qi@linaro.org>
5489
5490 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5491 lwp_arch_private_info and ptid_of_lwp.
5492
88e2cf7e
YQ
54932015-08-25 Yao Qi <yao.qi@linaro.org>
5494
5495 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5496 Find proc_info by find_process_pid. All callers updated.
5497
5e35436e
YQ
54982015-08-25 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5501 Remove.
5502 (debug_reg_change_callback): Remove.
5503 (aarch64_notify_debug_reg_change): Remove.
5504
4a8a7965
YQ
55052015-08-25 Yao Qi <yao.qi@linaro.org>
5506
5507 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5508 Call current_lwp_ptid.
5509
32a271ee
YQ
55102015-08-25 Yao Qi <yao.qi@linaro.org>
5511
5512 * linux-aarch64-low.c (debug_reg_change_callback): Use
5513 debug_printf.
5514
0d51c8d7
YQ
55152015-08-25 Yao Qi <yao.qi@linaro.org>
5516
5517 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5518
31a43dd5
YQ
55192015-08-25 Yao Qi <yao.qi@linaro.org>
5520
5521 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5522
8ee52567
YQ
55232015-08-25 Yao Qi <yao.qi@linaro.org>
5524
5525 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5526 the code.
5527
ff3f0f45
YQ
55282015-08-25 Yao Qi <yao.qi@linaro.org>
5529
5530 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5531 Remove.
5532 (debug_reg_change_callback): Remove argument entry and add argument
5533 lwp. Remove local variable thread. Don't print thread id in the
5534 debugging output. Don't check whether pid of thread equals to pid.
5535 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5536 iterate_over_lwps instead find_inferior.
5537
3d40fbb5
PA
55382015-08-24 Pedro Alves <palves@redhat.com>
5539
5540 * inferiors.c (get_first_process): New function.
5541 * inferiors.h (get_first_process): New declaration.
5542 * remote-utils.c (read_ptid): Default to the first process in the
5543 list, instead of to the current thread's process.
5544
438e1e42
PA
55452015-08-24 Pedro Alves <palves@redhat.com>
5546
5547 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5548 * event-loop.c: Likewise.
5549 * remote-utils.c: Likewise.
5550 * tracepoint.c: Likewise.
5551
a8c6d4fc
PA
55522015-08-24 Pedro Alves <palves@redhat.com>
5553
5554 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5555 ptid_get_lwp.
5556
99b0bb12
PA
55572015-08-21 Pedro Alves <palves@redhat.com>
5558
5559 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5560 instead of literal 1.
5561
f8904751
PA
55622015-08-21 Pedro Alves <palves@redhat.com>
5563
5564 * tdesc.c (default_description): Explicitly zero-initialize.
5565
465a859e
PA
55662015-08-21 Pedro Alves <palves@redhat.com>
5567
5568 PR gdb/18749
5569 * inferiors.c (remove_thread): Discard any pending stop reply for
5570 this thread.
5571 * server.c (remove_all_on_match_pid): Rename to ...
5572 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5573 instead of a pid.
5574 (discard_queued_stop_replies): Change parameter to a ptid. Now
5575 extern.
5576 (handle_v_kill, kill_inferior_callback, captured_main)
5577 (process_serial_event): Adjust.
5578 * server.h (discard_queued_stop_replies): Declare.
5579
f0db101d
PA
55802015-08-21 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (wait_for_sigstop): Always switch to no thread
5583 selected if the previously current thread dies.
5584 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5585 process instead of the current thread's.
5586 * remote-utils.c (input_interrupt): Don't check if there's no
5587 current thread.
5588 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5589 current thread to the general thread fails, error out.
5590 (handle_qxfer_auxv, handle_qxfer_libraries)
5591 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5592 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5593 (handle_query): Check if there's a thread selected instead of
5594 checking whether there's any thread in the thread list.
5595 (handle_qxfer_threads, handle_qxfer_btrace)
5596 (handle_qxfer_btrace_conf): Don't error out early if there's no
5597 thread in the thread list.
5598 (handle_v_cont, myresume): Don't set the current thread to the
5599 continue thread.
5600 (process_serial_event) <Hg handling>: Also set thread_id if the
5601 previous general thread is still alive.
5602 (process_serial_event) <g/G handling>: If setting the current
5603 thread to the general thread fails, error out.
5604 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5605 thread's lwp instead of the current thread's.
5606 * target.c (set_desired_thread): If the desired thread was not
5607 found, leave the current thread pointing to NULL. Return an int
5608 (boolean) indicating success.
5609 * target.h (set_desired_thread): Change return type to int.
5610
40045d91
MF
56112015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5612
5613 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5614 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5615 #includes.
5616 (ps_get_thread_area): New function.
5617
45face3b
GB
56182015-08-19 Gary Benson <gbenson@redhat.com>
5619
5620 * hostio.c (handle_pread): Do not attempt to read more data
5621 than hostio_reply_with_data can fit in a packet.
5622
16d5f642
JB
56232015-08-18 Joel Brobecker <brobecker@adacore.com>
5624
5625 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5626
a738da3a
MF
56272015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5628
5629 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5630
33ebda9d
PA
56312015-08-06 Pedro Alves <palves@redhat.com>
5632
5633 * tracepoint.c (expr_eval_result): Now an int.
5634
a44892be
PA
56352015-08-06 Pedro Alves <palves@redhat.com>
5636
5637 * gdbthread.h (struct regcache): Forward declare.
5638 (struct thread_info) <regcache_data>: Now a struct regcache
5639 pointer.
5640 * inferiors.c (inferior_regcache_data)
5641 (set_inferior_regcache_data): Now work with struct regcache
5642 pointers.
5643 * inferiors.h (struct regcache): Forward declare.
5644 (inferior_regcache_data, set_inferior_regcache_data): Now work
5645 with struct regcache pointers.
5646 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5647 (free_register_cache_thread): Remove struct regcache pointer
5648 casts.
5649
608a1e46
PA
56502015-08-06 Pedro Alves <palves@redhat.com>
5651
5652 * server.c (captured_main): On error, print the exception message
5653 to stderr, and if run_once is set, throw a quit.
5654
f0ce0d3a
PA
56552015-08-06 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5658 the current thread.
5659
bf47e248
PA
56602015-08-06 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5663 reading beyond the passed in buffer length.
5664
b6b9ffcc
PL
56652015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5666
5667 * tracepoint.c (symbol_list) <required>: Remove.
5668
863d01bd
PA
56692015-08-06 Pedro Alves <palves@redhat.com>
5670
5671 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5672 count if stopping and suspending threads.
5673 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5674 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5675 (linux_detach): Complete an ongoing step-over.
5676 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5677 throughout.
5678 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5679 (linux_wait_1): If passing a signal to the inferior after
5680 finishing a step-over, unsuspend and re-resume all lwps. If we
5681 see a single-step event but the thread should be continuing, don't
5682 pass the trap to gdb.
5683 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5684 internal_error instead of gdb_assert.
5685 (enqueue_pending_signal): New function.
5686 (check_ptrace_stopped_lwp_gone): Add debug output.
5687 (start_step_over): Use internal_error instead of gdb_assert.
5688 (complete_ongoing_step_over): New function.
5689 (linux_resume_one_thread): Don't resume a suspended thread.
5690 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5691 it stepping.
5692
00db26fa
PA
56932015-08-06 Pedro Alves <palves@redhat.com>
5694
5695 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5696 (linux_thread_alive): Use lwp_is_marked_dead.
5697 (extended_event_reported): Delete.
5698 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5699 instead of extended_event_reported.
5700 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5701 as well.
5702 (lwp_is_marked_dead): New function.
5703 (lwp_running): Use lwp_is_marked_dead.
5704 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5705 comment.
5706
ad071a30
PA
57072015-08-06 Pedro Alves <palves@redhat.com>
5708
5709 * linux-low.c (linux_wait_1): Move fork event output out of the
5710 !report_to_gdb check. Pass event_child->waitstatus to
5711 target_waitstatus_to_string instead of ourstatus.
5712
524b57e6
YQ
57132015-08-04 Yao Qi <yao.qi@linaro.org>
5714
5715 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5716 if current_thread is 32 bit.
5717
6085d6f6
YQ
57182015-08-04 Yao Qi <yao.qi@linaro.org>
5719
5720 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5721 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5722 * server.c (extended_protocol): Remove "static".
5723 * server.h (extended_protocol): Declare it.
5724
8a7e4587
YQ
57252015-08-04 Yao Qi <yao.qi@linaro.org>
5726
5727 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5728 both aarch64 and aarch32.
5729 (aarch64_set_pc): Likewise.
5730
3b53ae99
YQ
57312015-08-04 Yao Qi <yao.qi@linaro.org>
5732
5733 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5734 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5735 arm-with-neon.xml to srv_xmlfiles.
5736 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5737 (is_64bit_tdesc): New function.
5738 (aarch64_linux_read_description): New function.
5739 (aarch64_arch_setup): Call aarch64_linux_read_description.
5740 (regs_info): Rename to regs_info_aarch64.
5741 (aarch64_regs_info): Return right regs_info.
5742 (initialize_low_arch): Call initialize_low_arch_aarch32.
5743
bd9e6534
YQ
57442015-08-04 Yao Qi <yao.qi@linaro.org>
5745
5746 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5747 * linux-aarch32-low.c: New file.
5748 * linux-aarch32-low.h: New file.
5749 * linux-arm-low.c (arm_fill_gregset): Move it to
5750 linux-aarch32-low.c.
5751 (arm_store_gregset): Likewise.
5752 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5753 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5754 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5755 (regs_info): Rename to regs_info_arm.
5756 (arm_regs_info): Return regs_info_aarch32 if
5757 have_ptrace_getregset is 1 and target description is
5758 arm_with_neon or arm_with_vfpv3.
5759 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5760 Call initialize_low_arch_aarch32 instead.
5761
ded48a5e
YQ
57622015-08-04 Yao Qi <yao.qi@linaro.org>
5763
5764 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5765 * linux-low.c: ... here.
5766 * linux-low.h (have_ptrace_getregset): Declare it.
5767
96e9210f
PA
57682015-08-04 Pedro Alves <palves@redhat.com>
5769
5770 * thread-db.c (struct thread_db): Use new typedefs.
5771 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5772 CHK calls.
5773 (disable_thread_event_reporting): Cast result of dlsym to
5774 destination function pointer type.
5775 (thread_db_mourn): Use td_ta_delete_ftype.
5776
af60a1ef
SL
57772015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5778
5779 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5780 arch variant.
5781 (CDX_BREAKPOINT): Define for R2.
5782 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5783 (the_low_target): Add comments.
5784
e8b41681
YQ
57852015-07-30 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-arm-low.c (arm_hwcap): Remove it.
5788 (arm_read_description): New local variable arm_hwcap. Don't
5789 set arm_hwcap to zero.
5790
89abb039
YQ
57912015-07-30 Yao Qi <yao.qi@linaro.org>
5792
5793 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5794 Use regcache->tdesc instead.
5795 (arm_store_wmmxregset): Likewise.
5796 (arm_fill_vfpregset): Likewise.
5797 (arm_store_vfpregset): Likewise.
5798
deca266c
YQ
57992015-07-30 Yao Qi <yao.qi@linaro.org>
5800
5801 * linux-arm-low.c: Include arch/arm.h.
5802 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5803 (arm_store_gregset): Likewise.
5804
aa58a496
SM
58052015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5806
5807 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5808 ptrace's 4th parameter.
5809
50904b25
YQ
58102015-07-27 Yao Qi <yao.qi@linaro.org>
5811
5812 * configure.srv (case aarch64*-*-linux*): Don't set
5813 srv_linux_usrregs.
5814
5826e159
PA
58152015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5816
5817 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5818 sys/ptrace.h.
5819 * linux-arm-low.c: Likewise.
5820 * linux-cris-low.c: Likewise.
5821 * linux-crisv32-low.c: Likewise.
5822 * linux-low.c: Likewise.
5823 * linux-m68k-low.c: Likewise.
5824 * linux-mips-low.c: Likewise.
5825 * linux-nios2-low.c: Likewise.
5826 * linux-s390-low.c: Likewise.
5827 * linux-sparc-low.c: Likewise.
5828 * linux-tic6x-low.c: Likewise.
5829 * linux-tile-low.c: Likewise.
5830 * linux-x86-low.c: Likewise.
5831
54019719
PA
58322015-07-24 Pedro Alves <palves@redhat.com>
5833
5834 * config.in: Regenerate.
5835 * configure: Regenerate.
5836
eb7aa561
PA
58372015-07-24 Pedro Alves <palves@redhat.com>
5838
5839 * acinclude.m4: Include ../ptrace.m4.
5840 * configure.ac: Call GDB_AC_PTRACE.
5841 * config.in, configure: Regenerate.
5842
55d7b841
YQ
58432015-07-24 Yao Qi <yao.qi@linaro.org>
5844
5845 * linux-low.c (linux_create_inferior): Remove setting to
5846 proc->priv->new_inferior.
5847 (linux_attach): Likewise.
5848 (linux_low_filter_event): Likewise.
5849 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5850
c06cbd92
YQ
58512015-07-24 Yao Qi <yao.qi@linaro.org>
5852
5853 * linux-low.c (linux_arch_setup): New function.
5854 (linux_low_filter_event): If proc->tdesc is NULL and
5855 proc->attached is true, call the_low_target.arch_setup.
5856 Otherwise, keep status pending, and return.
5857 (linux_resume_one_lwp_throw): Don't call get_pc if
5858 thread->while_stepping isn't NULL. Don't call
5859 get_thread_regcache if proc->tdesc is NULL.
5860 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5861 (linux_target_ops): Install arch_setup.
5862 * server.c (start_inferior): Call the_target->arch_setup.
5863 * target.h (struct target_ops) <arch_setup>: New field.
5864 (target_arch_setup): New marco.
5865 * lynx-low.c (lynx_target_ops): Update.
5866 * nto-low.c (nto_target_ops): Update.
5867 * spu-low.c (spu_target_ops): Update.
5868 * win32-low.c (win32_target_ops): Update.
5869
5ae3ebba
YQ
58702015-07-24 Yao Qi <yao.qi@linaro.org>
5871
5872 * linux-low.c (linux_add_process): Don't set
5873 proc->priv->new_inferior.
5874 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5875 (linux_attach): Likewise.
5876
eb97750b
YQ
58772015-07-24 Yao Qi <yao.qi@linaro.org>
5878
5879 * server.c (start_inferior): Code refactor.
5880
51aee833
YQ
58812015-07-24 Yao Qi <yao.qi@linaro.org>
5882
5883 * server.c (process_serial_event): Set general_thread.
5884
af1b22f3
YQ
58852015-07-21 Yao Qi <yao.qi@linaro.org>
5886
5887 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5888 aarch64_linux_get_debug_reg_capacity.
5889
554717a3
YQ
58902015-07-17 Yao Qi <yao.qi@linaro.org>
5891
5892 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5893 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5894 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5895 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5896 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5897 (AARCH64_HWP_ALIGNMENT): Likewise.
5898 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5899 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5900 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5901 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5902 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5903 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5904 (struct aarch64_debug_reg_state): Likewise.
5905 (struct arch_lwp_info): Likewise.
5906 (aarch64_align_watchpoint): Likewise.
5907 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5908 (aarch64_watchpoint_length): Likewise.
5909 (aarch64_point_encode_ctrl_reg): Likewise
5910 (aarch64_point_is_aligned): Likewise.
5911 (aarch64_align_watchpoint): Likewise.
5912 (aarch64_linux_set_debug_regs):
5913 (aarch64_dr_state_insert_one_point): Likewise.
5914 (aarch64_dr_state_remove_one_point): Likewise.
5915 (aarch64_handle_breakpoint): Likewise.
5916 (aarch64_handle_aligned_watchpoint): Likewise.
5917 (aarch64_handle_unaligned_watchpoint): Likewise.
5918 (aarch64_handle_watchpoint): Likewise.
5919
c67ca4de
YQ
59202015-07-17 Yao Qi <yao.qi@linaro.org>
5921
5922 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5923 and don't aarch64_get_debug_reg_state. All callers update.
5924 (aarch64_handle_aligned_watchpoint): Likewise.
5925 (aarch64_handle_unaligned_watchpoint): Likewise.
5926 (aarch64_handle_watchpoint): Likewise.
5927 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5928 (aarch64_remove_point): Likewise.
5929
25abf979
YQ
59302015-07-17 Yao Qi <yao.qi@linaro.org>
5931
5932 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5933 debug_printf.
5934 (aarch64_handle_unaligned_watchpoint): Likewise.
5935
db1ff28b
JK
59362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5937
5938 Revert the previous 3 commits:
5939 Move gdb_regex* to common/
5940 Move linux_find_memory_regions_full & co.
5941 gdbserver build-id attribute generator
5942
700ca40f
JK
59432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5944 Jan Kratochvil <jan.kratochvil@redhat.com>
5945
5946 gdbserver build-id attribute generator.
5947 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5948 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5949 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5950 (find_phdr): New.
5951 (get_dynamic): Use find_pdhr to traverse program headers.
5952 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5953 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5954 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5955 (get_hex_build_id): New.
5956 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5957 to reply XML document.
5958
9904185c
JK
59592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5960 Jan Kratochvil <jan.kratochvil@redhat.com>
5961
5962 * target.c: Include target/target-utils.h and fcntl.h.
5963 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5964 (target_fileio_read_stralloc): New functions.
5965
6e5b4429
JK
59662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5967
5968 * Makefile.in (OBS): Add gdb_regex.o.
5969 (gdb_regex.o): New.
5970 * config.in: Rebuilt.
5971 * configure: Rebuilt.
5972
ddc98fbf
JK
59732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5974 Jan Kratochvil <jan.kratochvil@redhat.com>
5975
5976 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5977 * Makefile.in (OBS): Add target-utils.o.
5978 (linux-maps.o, target-utils.o): New.
5979 * configure.srv (srv_linux_obj): Add linux-maps.o.
5980
e57bb7a0
PL
59812015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5982
5983 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5984 function, return 1.
5985 (the_low_target): Install it.
5986
586b02a9
PA
59872015-07-14 Pedro Alves <palves@redhat.com>
5988
5989 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5990 Instead, ignore ECHILD, and throw an error for other errnos.
5991
58c1b36c
PA
59922015-07-10 Pedro Alves <palves@redhat.com>
5993
5994 * event-loop.c (struct callback_event) <data>: Change type to
5995 gdb_client_data instance instead of gdb_client_data pointer.
5996 (append_callback_event): Adjust.
5997
421530db
PL
59982015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5999
6000 * linux-aarch64-low.c: Add comments for each linux_target_ops
6001 method. Remove comments already covered in target_ops and
6002 linux_target_ops definitions.
6003 (the_low_target): Add comments for each unimplemented method.
6004
c2d65f38
YQ
60052015-07-09 Yao Qi <yao.qi@linaro.org>
6006
6007 * linux-aarch64-low.c (aarch64_regmap): Remove.
6008 (aarch64_usrregs_info): Remove.
6009 (regs_info): Set field usrregs to NULL.
6010
b20a6524
MM
60112015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6012
6013 * linux-low.c: Include "rsp-low.h"
6014 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6015 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6016 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6017 (handle_btrace_enable_pt): New.
6018 (handle_btrace_general_set): Support "pt".
6019 (handle_btrace_conf_general_set): Support "pt:size".
6020
96c97461
PL
60212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6022
6023 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6024 Z_PACKET_SW_BP.
6025
37d66942
PL
60262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6027
6028 * linux-aarch64-low.c: Remove comment about endianness.
6029 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6030 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6031 memcmp.
6032
dc06243f
GB
60332015-06-24 Gary Benson <gbenson@redhat.com>
6034
6035 * linux-i386-ipa.c (stdint.h): Do not include.
6036 * lynx-i386-low.c (stdint.h): Likewise.
6037 * lynx-ppc-low.c (stdint.h): Likewise.
6038 * mem-break.c (stdint.h): Likewise.
6039 * thread-db.c (stdint.h): Likewise.
6040 * tracepoint.c (stdint.h): Likewise.
6041 * win32-low.c (stdint.h): Likewise.
6042
124e13d9
SM
60432015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6044
6045 * server.c (write_qxfer_response): Update call to
6046 remote_escape_output.
6047
909c2cda
JK
60482015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6049 Jan Kratochvil <jan.kratochvil@redhat.com>
6050
6051 Merge multiple hex conversions.
6052 * gdbreplay.c (tohex): Rename to 'fromhex'.
6053 (logchar): Use fromhex.
6054
24c05f46
JK
60552015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6056
6057 * server.c (handle_qxfer_libraries): Set `version' attribute for
6058 <library-list>.
6059
14d2069a
GB
60602015-06-10 Gary Benson <gbenson@redhat.com>
6061
6062 * target.h (struct target_ops) <multifs_open>: New field.
6063 <multifs_unlink>: Likewise.
6064 <multifs_readlink>: Likewise.
6065 * linux-low.c (nat/linux-namespaces.h): New include.
6066 (linux_target_ops): Initialize the_target->multifs_open,
6067 the_target->multifs_unlink and the_target->multifs_readlink.
6068 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6069 * hostio.c (hostio_fs_pid): New static variable.
6070 (hostio_handle_new_gdb_connection): New function.
6071 (handle_setfs): Likewise.
6072 (handle_open): Use the_target->multifs_open as appropriate.
6073 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6074 (handle_readlink): Use the_target->multifs_readlink as
6075 appropriate.
6076 (handle_vFile): Handle vFile:setfs packets.
6077 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6078 after target_handle_new_gdb_connection.
6079
4b8b5e72
GB
60802015-06-10 Gary Benson <gbenson@redhat.com>
6081
6082 * configure.ac (AC_CHECK_FUNCS): Add setns.
6083 * config.in: Regenerate.
6084 * configure: Likewise.
6085 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6086 (linux-namespaces.o): New rule.
6087 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6088
3ac2e371
GB
60892015-06-09 Gary Benson <gbenson@redhat.com>
6090
6091 * hostio.c (handle_open): Process mode argument with
6092 fileio_to_host_mode.
6093
ca9b78ce
YQ
60942015-06-01 Yao Qi <yao.qi@linaro.org>
6095
6096 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6097 * linux-x86-low.c: Likewise.
6098
bfacd19d
DB
60992015-05-28 Don Breazeal <donb@codesourcery.com>
6100
6101 * linux-low.c (handle_extended_wait): Initialize
6102 thread_info.last_resume_kind for new fork children.
6103
452003ef
PA
61042015-05-15 Pedro Alves <palves@redhat.com>
6105
6106 * target.h (target_handle_new_gdb_connection): Rewrite using if
6107 wrapped in do/while.
6108
1041a03c
JB
61092015-05-14 Joel Brobecker <brobecker@adacore.com>
6110
6111 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6112 * configure, config.in: Regenerate.
6113 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6114 Declare typedef.
6115
c269dbdb
DB
61162015-05-12 Don Breazeal <donb@codesourcery.com>
6117
6118 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6119 PTRACE_EVENT_VFORK_DONE.
6120 (linux_low_ptrace_options, extended_event_reported): Add vfork
6121 events.
6122 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6123 and "vforkdone" for RSP 'T' Stop Reply Packet.
6124 * server.h (report_vfork_events): Declare
6125 global variable.
6126
3a8a0396
DB
61272015-05-12 Don Breazeal <donb@codesourcery.com>
6128
6129 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6130 (the_low_target) <new_fork>: Initialize new member.
6131 * linux-arm-low.c (arm_new_fork): New function.
6132 (the_low_target) <new_fork>: Initialize new member.
6133 * linux-low.c (handle_extended_wait): Call new target function
6134 new_fork.
6135 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6136 * linux-mips-low.c (mips_add_watchpoint): New function
6137 extracted from mips_insert_point.
6138 (the_low_target) <new_fork>: Initialize new member.
6139 (mips_linux_new_fork): New function.
6140 (mips_insert_point): Call mips_add_watchpoint.
6141 * linux-x86-low.c (x86_linux_new_fork): New function.
6142 (the_low_target) <new_fork>: Initialize new member.
6143
de0d863e
DB
61442015-05-12 Don Breazeal <donb@codesourcery.com>
6145
6146 * linux-low.c (handle_extended_wait): Implement return value,
6147 rename argument 'event_child' to 'event_lwp', handle
6148 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6149 (linux_low_ptrace_options): New function.
6150 (linux_low_filter_event): Call linux_low_ptrace_options,
6151 use different argument fo linux_enable_event_reporting,
6152 use return value from handle_extended_wait.
6153 (extended_event_reported): New function.
6154 (linux_wait_1): Call extended_event_reported and set
6155 status to report fork events.
6156 (linux_write_memory): Add pid to debug message.
6157 (reset_lwp_ptrace_options_callback): New function.
6158 (linux_handle_new_gdb_connection): New function.
6159 (linux_target_ops): Initialize new structure member.
6160 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6161 * lynx-low.c: Initialize new structure member.
6162 * remote-utils.c (prepare_resume_reply): Implement stop reason
6163 "fork" for "T" stop message.
6164 * server.c (handle_query): Call handle_new_gdb_connection.
6165 * server.h (report_fork_events): Declare global flag.
6166 * target.h (struct target_ops) <handle_new_gdb_connection>:
6167 New member.
6168 (target_handle_new_gdb_connection): New macro.
6169 * win32-low.c: Initialize new structure member.
6170
ddcbc397
DB
61712015-05-12 Don Breazeal <donb@codesourcery.com>
6172
6173 * mem-break.c (APPEND_TO_LIST): Define macro.
6174 (clone_agent_expr): New function.
6175 (clone_one_breakpoint): New function.
6176 (clone_all_breakpoints): New function.
6177 * mem-break.h: Declare new functions.
6178
89245bc0
DB
61792015-05-12 Don Breazeal <donb@codesourcery.com>
6180
6181 * linux-low.c (linux_supports_fork_events): New function.
6182 (linux_supports_vfork_events): New function.
6183 (linux_target_ops): Initialize new structure members.
6184 (initialize_low): Call linux_check_ptrace_features.
6185 * lynx-low.c (lynx_target_ops): Initialize new structure
6186 members.
6187 * server.c (report_fork_events, report_vfork_events):
6188 New global flags.
6189 (handle_query): Add new features to qSupported packet and
6190 response.
6191 (captured_main): Initialize new global variables.
6192 * target.h (struct target_ops) <supports_fork_events>:
6193 New member.
6194 <supports_vfork_events>: New member.
6195 (target_supports_fork_events): New macro.
6196 (target_supports_vfork_events): New macro.
6197 * win32-low.c (win32_target_ops): Initialize new structure
6198 members.
6199
835205d0
GB
62002015-05-12 Gary Benson <gbenson@redhat.com>
6201
6202 * server.c (handle_qxfer_exec_file): Use current process
6203 if annex is empty.
6204
21e94bd9
SL
62052015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6206
6207 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6208 Remove HAVE_PTRACE_GETREGS conditionals.
6209 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6210 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6211
45614f15
YQ
62122015-05-08 Yao Qi <yao.qi@linaro.org>
6213
6214 * linux-low.c (linux_supports_conditional_breakpoints): New
6215 function.
6216 (linux_target_ops): Install new target method.
6217 * lynx-low.c (lynx_target_ops): Install NULL hook for
6218 supports_conditional_breakpoints.
6219 * nto-low.c (nto_target_ops): Likewise.
6220 * spu-low.c (spu_target_ops): Likewise.
6221 * win32-low.c (win32_target_ops): Likewise.
6222 * server.c (handle_query): Check
6223 target_supports_conditional_breakpoints.
6224 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6225 New field.
6226 (target_supports_conditional_breakpoints): New macro.
6227
80ad801e
PA
62282015-05-06 Pedro Alves <palves@redhat.com>
6229
6230 PR server/18081
6231 * server.c (start_inferior): If the process exits, mourn it.
6232
819843c7
GB
62332015-04-21 Gary Benson <gbenson@redhat.com>
6234
6235 * hostio.c (fileio_open_flags_to_host): Factored out to
6236 fileio_to_host_openflags in common/fileio.c. Single use
6237 updated.
6238
a2d5a9d7
MF
62392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6240
6241 * linux-xtensa-low.c (xtensa_fill_gregset)
6242 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6243 XCHAL_HAVE_LOOP.
6244
deb44829
MF
62452015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6246
6247 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6248 (regs_info): Replace usrregs pointer with NULL.
6249
e57f1de3
GB
62502015-04-17 Gary Benson <gbenson@redhat.com>
6251
6252 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6253 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6254 * server.c (handle_qxfer_exec_file): New function.
6255 (qxfer_packets): Add exec-file entry.
6256 (handle_query): Report qXfer:exec-file:read as supported packet.
6257
62828379
RN
62582015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6259
6260 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6261
b88bb450
GB
62622015-04-09 Gary Benson <gbenson@redhat.com>
6263
6264 * hostio-errno.c (errno_to_fileio_error): Remove function.
6265 Update caller to use remote_fileio_to_fio_error.
6266
c8f4bfdd
YQ
62672015-04-09 Yao Qi <yao.qi@linaro.org>
6268
6269 * linux-low.c (linux_insert_point): Call
6270 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6271 (linux_remove_point): Call remove_memory_breakpoint if type is
6272 raw_bkpt_type_sw.
6273 * linux-x86-low.c (x86_insert_point): Don't call
6274 insert_memory_breakpoint.
6275 (x86_remove_point): Don't call remove_memory_breakpoint.
6276
41f98f02
PA
62772015-04-01 Pedro Alves <palves@redhat.com>
6278 Cleber Rosa <crosa@redhat.com>
6279
6280 * server.c (gdbserver_usage): Reorganize and extend the usage
6281 message.
6282
2bf6fb9d
PA
62832015-03-24 Pedro Alves <palves@redhat.com>
6284
6285 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6286 output. Also dump TRAP_TRACE.
6287 (linux_low_filter_event): In debug output, distinguish a
6288 resume_stop SIGSTOP from a delayed SIGSTOP.
6289
369f6daa
GB
62902015-03-24 Gary Benson <gbenson@redhat.com>
6291
6292 * linux-x86-low.c (x86_linux_new_thread): Moved to
6293 nat/x86-linux.c.
6294 (x86_linux_prepare_to_resume): Likewise.
6295
8e5d4070
GB
62962015-03-24 Gary Benson <gbenson@redhat.com>
6297
6298 * Makefile.in (x86-linux-dregs.o): New rule.
6299 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6300 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6301 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6302 (x86_linux_dr_get): Likewise.
6303 (x86_linux_dr_set): Likewise.
6304 (update_debug_registers_callback): Likewise.
6305 (x86_linux_dr_set_addr): Likewise.
6306 (x86_linux_dr_get_addr): Likewise.
6307 (x86_linux_dr_set_control): Likewise.
6308 (x86_linux_dr_get_control): Likewise.
6309 (x86_linux_dr_get_status): Likewise.
6310 (x86_linux_update_debug_registers): Likewise.
6311
2b95d440
GB
63122015-03-24 Gary Benson <gbenson@redhat.com>
6313
6314 * linux-x86-low.c (x86_linux_update_debug_registers):
6315 New function, factored out from...
6316 (x86_linux_prepare_to_resume): ...this.
6317
14b0bc68
GB
63182015-03-24 Gary Benson <gbenson@redhat.com>
6319
6320 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6321 (x86_linux_dr_set): Likewise.
6322 (update_debug_registers_callback): Likewise.
6323 (x86_linux_dr_set_addr): Likewise.
6324 (x86_linux_dr_get_addr): Likewise.
6325 (x86_linux_dr_set_control): Likewise.
6326 (x86_linux_dr_get_control): Likewise.
6327 (x86_linux_dr_get_status): Likewise.
6328 (x86_linux_prepare_to_resume): Likewise.
6329
5dfe6ca8
GB
63302015-03-24 Gary Benson <gbenson@redhat.com>
6331
6332 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6333 Use perror_with_name. Pass string through gettext.
6334 (x86_linux_dr_set): Likewise.
6335
d33472ad
GB
63362015-03-24 Gary Benson <gbenson@redhat.com>
6337
6338 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6339 (x86_linux_dr_set_addr): ...this.
6340 (x86_dr_low_get_addr): Rename to...
6341 (x86_linux_dr_get_addr): ...this.
6342 (x86_dr_low_set_control): Rename to...
6343 (x86_linux_dr_set_control): ...this.
6344 (x86_dr_low_get_control): Rename to...
6345 (x86_linux_dr_get_control): ...this.
6346 (x86_dr_low_get_status): Rename to...
6347 (x86_linux_dr_get_status): ...this.
6348 (x86_dr_low): Update with new function names.
6349
4b134ca1
GB
63502015-03-24 Gary Benson <gbenson@redhat.com>
6351
6352 * Makefile.in (x86-linux.o): New rule.
6353 * configure.srv: Add x86-linux.o to relevant targets.
6354 * linux-low.c (lwp_set_arch_private_info): New function.
6355 (lwp_arch_private_info): Likewise.
6356 * linux-x86-low.c: Include nat/x86-linux.h.
6357 (arch_lwp_info): Removed structure.
6358 (update_debug_registers_callback):
6359 Use lwp_set_debug_registers_changed.
6360 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6361 and lwp_set_debug_registers_changed.
6362 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6363
34c703da
GB
63642015-03-24 Gary Benson <gbenson@redhat.com>
6365
6366 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6367 * linux-arm-low.c (arm_new_thread): Likewise.
6368 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6369 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6370 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6371 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6372
cff068da
GB
63732015-03-24 Gary Benson <gbenson@redhat.com>
6374
6375 * linux-low.c (ptid_of_lwp): New function.
6376 (lwp_is_stopped): Likewise.
6377 (lwp_stop_reason): Likewise.
6378 * linux-x86-low.c (update_debug_registers_callback):
6379 Use lwp_is_stopped.
6380 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6381 lwp_stop_reason.
6382
b2f7c7e8
GB
63832015-03-24 Gary Benson <gbenson@redhat.com>
6384
6385 * linux-low.h (linux_stop_lwp): Remove declaration.
6386
6d4ee8c6
GB
63872015-03-24 Gary Benson <gbenson@redhat.com>
6388
6389 * linux-low.h: Include nat/linux-nat.h.
6390 * linux-low.c (iterate_over_lwps_args): New structure.
6391 (iterate_over_lwps_filter): New function.
6392 (iterate_over_lwps): Likewise.
6393 * linux-x86-low.c (update_debug_registers_callback):
6394 Update signature to what iterate_over_lwps expects.
6395 Remove PID check that iterate_over_lwps now performs.
6396 (x86_dr_low_set_addr): Use iterate_over_lwps.
6397 (x86_dr_low_set_control): Likewise.
6398
70a0bb6b
GB
63992015-03-24 Gary Benson <gbenson@redhat.com>
6400
6401 * linux-x86-low.c (x86_debug_reg_state): New function.
6402 (x86_linux_prepare_to_resume): Use the above.
6403
7b669087
GB
64042015-03-24 Gary Benson <gbenson@redhat.com>
6405
6406 * linux-low.c (current_lwp_ptid): New function.
6407 * linux-x86-low.c: Include nat/linux-nat.h.
6408 (x86_dr_low_get_addr): Use current_lwp_ptid.
6409 (x86_dr_low_get_control): Likewise.
6410 (x86_dr_low_get_status): Likewise.
6411
eef49a3d
PA
64122015-03-20 Pedro Alves <palves@redhat.com>
6413
6414 * tracepoint.c (cmd_qtstatus): Make "str" const.
6415
b2333d22
PA
64162015-03-20 Pedro Alves <palves@redhat.com>
6417
6418 * server.c (handle_general_set): Make "req_str" const.
6419
23f238d3
PA
64202015-03-19 Pedro Alves <palves@redhat.com>
6421
6422 * linux-low.c (linux_resume_one_lwp): Rename to ...
6423 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6424 instead call perror_with_name.
6425 (check_ptrace_stopped_lwp_gone): New function.
6426 (linux_resume_one_lwp): Reimplement as wrapper around
6427 linux_resume_one_lwp_throw that swallows errors if the LWP is
6428 gone.
6429
91baf43f
PA
64302015-03-19 Pedro Alves <palves@redhat.com>
6431
6432 * linux-low.c (count_events_callback, select_event_lwp_callback):
6433 No longer check whether the thread has resume_stop as last resume
6434 kind.
6435
8bf3b159
PA
64362015-03-19 Pedro Alves <palves@redhat.com>
6437
6438 * linux-low.c (count_events_callback, select_event_lwp_callback):
6439 Use the lwp's status_pending_p field, not the thread's.
6440
b90fc188
PA
64412015-03-19 Pedro Alves <palves@redhat.com>
6442
6443 * linux-low.c (select_event_lwp_callback): Update comments to
6444 no longer mention SIGTRAP.
6445
464b0089
GB
64462015-03-18 Gary Benson <gbenson@redhat.com>
6447
6448 * server.c (handle_query): Do not report vFile:fstat as supported.
6449
aa9e327f
GB
64502015-03-11 Gary Benson <gbenson@redhat.com>
6451
6452 * hostio.c (sys/types.h): New include.
6453 (sys/stat.h): Likewise.
6454 (common-remote-fileio.h): Likewise.
6455 (handle_fstat): New function.
6456 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6457
791c0056
GB
64582015-03-11 Gary Benson <gbenson@redhat.com>
6459
6460 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6461 struct stat.st_blocks and struct stat.st_blksize.
6462 * configure: Regenerate.
6463 * config.in: Likewise.
6464 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6465 (OBS): Add common-remote-fileio.o.
6466 (common-remote-fileio.o): New rule.
6467
9a9df970
PA
64682015-03-09 Pedro Alves <palves@redhat.com>
6469
6470 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6471 'struct sockaddr' pointer in 'accept' call.
6472
9eb1356e
PA
64732015-03-09 Pedro Alves <palves@redhat.com>
6474
6475 Revert:
6476 2015-03-07 Pedro Alves <palves@redhat.com>
6477 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6478 or <winsock2.h> here. Instead include "gdb_socket.h".
6479 (remote_open): Use union gdb_sockaddr_u.
6480 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6481 or <winsock2.h> here. Instead include "gdb_socket.h".
6482 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6483 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6484 or <sys/un.h>.
6485 (init_named_socket, gdb_agent_helper_thread): Use union
6486 gdb_sockaddr_u.
6487
aac331e4
PA
64882015-03-07 Pedro Alves <palves@redhat.com>
6489
6490 * configure.ac (build_warnings): Move
6491 -Wdeclaration-after-statement to the C-specific set.
6492 * configure: Regenerate.
6493
366c75fc
PA
64942015-03-07 Pedro Alves <palves@redhat.com>
6495
6496 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6497 or <winsock2.h> here. Instead include "gdb_socket.h".
6498 (remote_open): Use union gdb_sockaddr_u.
6499 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6500 or <winsock2.h> here. Instead include "gdb_socket.h".
6501 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6502 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6503 or <sys/un.h>.
6504 (init_named_socket, gdb_agent_helper_thread): Use union
6505 gdb_sockaddr_u.
6506
492d29ea
PA
65072015-03-07 Pedro Alves <palves@redhat.com>
6508
6509 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6510 instead.
6511
60a191ed
YQ
65122015-03-06 Yao Qi <yao.qi@linaro.org>
6513
6514 * linux-aarch64-low.c (aarch64_insert_point): Use
6515 show_debug_regs as a boolean.
6516 (aarch64_remove_point): Likewise.
6517
f5771b1d
PA
65182015-03-05 Pedro Alves <palves@redhat.com>
6519
6520 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6521 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6522 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6523 * nto-low.c (nto_target_ops): Likewise.
6524 * spu-low.c (spu_target_ops): Likewise.
6525 * win32-low.c (win32_target_ops): Likewise.
6526
3e572f71
PA
65272015-03-04 Pedro Alves <palves@redhat.com>
6528
72f4393d 6529 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6530 Decide whether a breakpoint triggered based on the SIGTRAP's
6531 siginfo.si_code.
72f4393d
L
6532 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6533 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6534 (linux_low_filter_event): Check for breakpoints before checking
6535 watchpoints.
6536 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6537 siginfo.si_code.
72f4393d
L
6538 (linux_stopped_by_sw_breakpoint)
6539 (linux_supports_stopped_by_sw_breakpoint)
6540 (linux_stopped_by_hw_breakpoint)
6541 (linux_supports_stopped_by_hw_breakpoint): New functions.
6542 (linux_target_ops): Install new target methods.
3e572f71 6543
1ec68e26
PA
65442015-03-04 Pedro Alves <palves@redhat.com>
6545
6546 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6547 * server.c (swbreak_feature, hwbreak_feature): New globals.
6548 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6549 (captured_main): Clear swbreak_feature and hwbreak_feature.
6550 * server.h (swbreak_feature, hwbreak_feature): Declare.
6551 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6552 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6553 supports_stopped_by_hw_breakpoint>: New fields.
6554 (target_supports_stopped_by_sw_breakpoint)
6555 (target_stopped_by_sw_breakpoint)
6556 (target_supports_stopped_by_hw_breakpoint)
6557 (target_stopped_by_hw_breakpoint): Declare.
6558
15c66dd6
PA
65592015-03-04 Pedro Alves <palves@redhat.com>
6560
6561 enum lwp_stop_reason -> enum target_stop_reason
6562 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6563 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6564 (linux_wait_1, stuck_in_jump_pad_callback)
6565 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6566 (linux_stopped_by_watchpoint):
6567 * linux-low.h (enum lwp_stop_reason): Delete.
6568 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6569 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6570
98fc70d6
YQ
65712015-03-04 Yao Qi <yao.qi@linaro.org>
6572
6573 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6574
dd2ac174
GB
65752015-03-03 Gary Benson <gbenson@redhat.com>
6576
6577 * hostio.c (handle_vFile): Fix prefix lengths.
6578
d68e53f4
MM
65792015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6580
6581 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6582 ptr_bits.
6583
bf2d68ab
AA
65842015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6585
6586 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6587 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6588 (clean): Add "rm -f" for above C files.
6589 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6590 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6591 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6592 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6593 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6594 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6595 (init_registers_s390x_vx_linux64)
6596 (init_registers_s390x_tevx_linux64)
6597 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6598 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6599 declarations.
6600 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6601 (s390_store_vxrs_high): New functions.
6602 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6603 NT_S390_VXRS_HIGH.
6604 (s390_arch_setup): Add logic for selecting one of the new target
6605 descriptions. Activate the new vector regsets if applicable.
6606 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6607 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6608 and init_registers_s390x_tevx_linux64.
6609
c966a859
PA
66102015-03-01 Pedro Alves <palves@redhat.com>
6611
6612 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6613 parameter.
6614
4180215b
PA
66152015-02-27 Pedro Alves <palves@redhat.com>
6616
6617 * linux-x86-low.c (u_debugreg_offset): New function.
6618 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6619
749bab01
PA
66202015-02-27 Pedro Alves <palves@redhat.com>
6621
6622 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6623 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6624 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6625 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6626 (ps_lsetfpregs, ps_getpid)
6627 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6628 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6629 (ps_lsetxregs, ps_plog): Declare.
6630
3c14e5a3
PA
66312015-02-27 Pedro Alves <palves@redhat.com>
6632
6633 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6634 IP_AGENT_EXPORT_FUNC.
6635 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6636 IP_AGENT_EXPORT_FUNC.
6637 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6638 (IP_AGENT_EXPORT): Delete.
6639 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6640 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6641 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6642 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6643 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6644 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6645 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6646 (traceframe_read_count, traceframe_write_count)
6647 (traceframes_created, trace_state_variables, get_raw_reg)
6648 (get_trace_state_variable_value, set_trace_state_variable_value)
6649 (ust_loaded, helper_thread_id, cmd_buf): Use
6650 IPA_SYM_EXPORTED_NAME.
6651 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6652 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6653 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6654 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6655 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6656 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6657 EXTERN_C_PUSH/EXTERN_C_POP.
6658 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6659 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6660 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6661 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6662 (traceframe_write_count, traceframe_read_count)
6663 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6664 (about_to_request_buffer_space, get_trace_state_variable_value)
6665 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6666 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6667 EXTERN_C_PUSH/EXTERN_C_POP.
6668 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6669 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6670 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6671 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6672 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6673 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6674 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6675 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6676 Define.
6677 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6678 (IP_AGENT_EXPORT_VAR_DECL): Define.
6679 (tracing): Declare.
6680 (gdb_agent_get_raw_reg): Declare.
6681
fe978cb0
PA
66822015-02-27 Tom Tromey <tromey@redhat.com>
6683 Pedro Alves <palves@redhat.com>
6684
6685 Rename symbols whose names are reserved C++ keywords throughout.
6686
3bc3d82a
PA
66872015-02-27 Pedro Alves <palves@redhat.com>
6688
6689 * Makefile.in (COMPILER): New, get it from autoconf.
6690 (CXX): Get from autoconf instead.
6691 (COMPILE.pre): Use COMPILER.
6692 (CC-LD): Rename to ...
6693 (CC_LD): ... this. Use COMPILER.
6694 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6695 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6696 * acinclude.m4: Include build-with-cxx.m4.
6697 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6698 Disable -Werror by default if building in C++ mode.
6699 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6700 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6701 the C++ compiler. Save/restore CXXFLAGS too.
6702 * configure: Regenerate.
6703
07697489
PA
67042015-02-27 Pedro Alves <palves@redhat.com>
6705
6706 * acinclude.m4: Include libiberty.m4.
6707 * configure.ac: Call libiberty_INIT.
6708 * config.in, configure: Regenerate.
6709
9beb7c4e
PA
67102015-02-26 Pedro Alves <palves@redhat.com>
6711
6712 * linux-low.c (linux_wait_1): When incrementing the PC past a
6713 program breakpoint always use the_low_target.breakpoint_len as
6714 increment, rather than the maximum between that and
6715 the_low_target.decr_pc_after_break.
6716
8090aef2
PA
67172015-02-23 Pedro Alves <palves@redhat.com>
6718
6719 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6720 thread was doing a step-over; always adjust the PC if
6721 we stepped over a permanent breakpoint.
6722 (linux_wait_1): If we stepped over breakpoint that was on top of a
6723 permanent breakpoint, manually advance the PC past it.
6724
bc9540e8
PA
67252015-02-23 Pedro Alves <palves@redhat.com>
6726
6727 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6728 modes.
6729 (x86_fill_gregset, x86_store_gregset): Use it when handling
6730 $orig_eax.
6731
2db9a427
PA
67322015-02-20 Pedro Alves <palves@redhat.com>
6733
6734 * thread-db.c: Include "nat/linux-procfs.h".
6735 (thread_db_init): Skip listing new threads if the kernel supports
6736 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6737
afa8d396
PA
67382015-02-20 Pedro Alves <palves@redhat.com>
6739
6740 * linux-low.c (status_pending_p_callback): Use ptid_match.
6741
c9587f88
AT
67422015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6743
6744 PR breakpoints/16812
6745 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6746 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6747 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6748
b05ec7a5
AT
67492015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6750
6751 PR breakpoints/15956
6752 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6753
d33501a5
MM
67542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6755
6756 * linux-low.c (linux_low_btrace_conf): Print size.
6757 * server.c (handle_btrace_conf_general_set): New.
6758 (hanle_general_set): Call handle_btrace_conf_general_set.
6759 (handle_query): Report Qbtrace-conf:bts:size as supported.
6760
f4abbc16
MM
67612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6762
6763 * linux-low.c (linux_low_enable_btrace): Update parameters.
6764 (linux_low_btrace_conf): New.
6765 (linux_target_ops)<to_btrace_conf>: Initialize.
6766 * server.c (current_btrace_conf): New.
6767 (handle_btrace_enable): Rename to ...
6768 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6769 to target_enable_btrace. Update comment. Update users.
6770 (handle_qxfer_btrace_conf): New.
6771 (qxfer_packets): Add btrace-conf entry.
6772 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6773 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6774 (target_ops)<read_btrace_conf>: New.
6775 (target_enable_btrace): Update parameters.
6776 (target_read_btrace_conf): New.
6777
043c3577
MM
67782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6779
6780 * server.c (handle_btrace_general_set): Remove call to
6781 target_supports_btrace.
6782 (supported_btrace_packets): New.
6783 (handle_query): Call supported_btrace_packets.
6784 * target.h: include btrace-common.h.
6785 (btrace_target_info): Removed.
6786 (supports_btrace, target_supports_btrace): Update parameters.
6787
734b0e4b
MM
67882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6789
6790 * Makefile.in (SFILES): Add common/btrace-common.c.
6791 (OBS): Add common/btrace-common.o.
6792 (btrace-common.o): Add build rules.
6793 * linux-low: Include btrace-common.h.
6794 (linux_low_read_btrace): Use struct btrace_data. Call
6795 btrace_data_init and btrace_data_fini.
6796
d6c146e9
PA
67972015-02-06 Pedro Alves <palves@redhat.com>
6798
6799 * thread-db.c (find_new_threads_callback): Add debug output.
6800
20ba1ce6
PA
68012015-02-04 Pedro Alves <palves@redhat.com>
6802
6803 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6804 (resume_stopped_resumed_lwps): New function.
6805 (linux_wait_for_event_filtered): Use it.
6806
8cc73a39
SDJ
68072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6808
6809 * Makefile.in (SFILES): Add linux-personality.c.
6810 (linux-personality.o): New rule.
6811 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6812 list of objects to be built.
6813 * linux-low.c: Include nat/linux-personality.h.
6814 (linux_create_inferior): Remove code to disable address space
6815 randomization (moved to ../nat/linux-personality.c). Create
6816 cleanup to disable address space randomization.
6817
fb23d554
SDJ
68182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6819
6820 * Makefile.in (posix-strerror.o): New rule.
6821 (mingw-strerror.o): Likewise.
6822 * configure: Regenerated.
6823 * configure.ac: Source file ../common/common.host. Initialize new
6824 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6825
cdf43629
YQ
68262015-01-14 Yao Qi <yao@codesourcery.com>
6827
6828 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6829 (ppc-linux.o): New rule.
6830 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6831 * configure.ac: AC_CHECK_FUNCS(getauxval).
6832 * config.in: Re-generated.
6833 * configure: Re-generated.
6834 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6835 ppc64_64bit_inferior_p
6836
514c5338
YQ
68372015-01-14 Yao Qi <yao@codesourcery.com>
6838
6839 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6840 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6841 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6842 (PT_ORIG_R3, PT_TRAP): Likewise.
6843 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6844 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6845 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6846
3368c1e5
JB
68472015-01-10 Joel Brobecker <brobecker@adacore.com>
6848
6849 * i387-fp.c (i387_cache_to_xsave): In look over
6850 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6851 zmmh_low_space field by use of zmmh_high_space.
6852
582511be
PA
68532015-01-09 Pedro Alves <palves@redhat.com>
6854
6855 * linux-low.c (step_over_bkpt): Move higher up in the file.
6856 (handle_extended_wait): Don't store the stop_pc here.
6857 (get_stop_pc): Adjust comments and rename to ...
6858 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6859 stopped for a software breakpoint or hardware breakpoint.
6860 (thread_still_has_status_pending_p): New function.
6861 (status_pending_p_callback): Use
6862 thread_still_has_status_pending_p. If the event is no longer
6863 interesting, resume the LWP.
6864 (handle_tracepoints): Add assert.
6865 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6866 (wstatus_maybe_breakpoint): New function.
6867 (cancel_breakpoint): Delete function.
6868 (check_stopped_by_watchpoint): New function, factored out from
6869 linux_low_filter_event.
6870 (lp_status_maybe_breakpoint): Delete function.
6871 (linux_low_filter_event): Remove filter_ptid argument.
6872 Leave thread group exits pending here. Store the LWP's stop PC.
6873 Always leave events pending.
6874 (linux_wait_for_event_filtered): Pull all events out of the
6875 kernel, and leave them all pending.
6876 (count_events_callback, select_event_lwp_callback): Consider all
6877 events.
6878 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6879 (select_event_lwp): Only give preference to the stepping LWP in
6880 all-stop mode. Adjust comments.
6881 (ignore_event): New function.
6882 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6883 references to cancel_breakpoints. Adjust to renames. Also give
6884 equal priority to all LWPs that have had events in non-stop mode.
6885 If reporting a software breakpoint event, unadjust the LWP's PC.
6886 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6887 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6888 Adjust.
6889 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6890 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6891 (linux_stopped_by_watchpoint): Adjust.
6892 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6893 * linux-low.h (enum lwp_stop_reason): New.
6894 (struct lwp_info) <stop_pc>: Adjust comment.
6895 <stopped_by_watchpoint>: Delete field.
6896 <stop_reason>: New field.
6897 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6898 * mem-break.c (software_breakpoint_inserted_here)
6899 (hardware_breakpoint_inserted_here): New function.
6900 * mem-break.h (software_breakpoint_inserted_here)
6901 (hardware_breakpoint_inserted_here): Declare.
6902 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6903 (cancel_breakpoints): Delete.
6904 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6905 (upload_fast_traceframes): Remove references to
6906 cancel_breakpoints.
6907
a33e3959
PA
69082015-01-09 Pedro Alves <palves@redhat.com>
6909
6910 * thread-db.c (find_new_threads_callback): Ignore thread if the
6911 kernel thread ID is -1.
6912
8784d563
PA
69132015-01-09 Pedro Alves <palves@redhat.com>
6914
6915 * linux-low.c (linux_attach_fail_reason_string): Move to
6916 nat/linux-ptrace.c, and rename.
6917 (linux_attach_lwp): Update comment.
6918 (attach_proc_task_lwp_callback): New function.
6919 (linux_attach): Adjust to rename and use
6920 linux_proc_attach_tgid_threads.
6921 (linux_attach_fail_reason_string): Delete declaration.
6922
76f2b779
JB
69232015-01-01 Joel Brobecker <brobecker@adacore.com>
6924
6925 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6926 * server.c (gdbserver_version): Likewise.
6927
fafcc06a
SDJ
69282014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6929
6930 * remote-utils.c: Include ctype.h.
6931 (input_interrupt): Explicitly handle the case when the char
6932 received is the NUL byte. Improve the printing of non-ASCII
6933 characters.
6934
beed38b8
JB
69352014-12-16 Joel Brobecker <brobecker@adacore.com>
6936
6937 * linux-low.c (linux_low_filter_event): Update call to
6938 linux_enable_event_reporting following the addition of
6939 a new parameter to that function.
6940
bf330350
CU
69412014-12-16 Catalin Udma <catalin.udma@freescale.com>
6942
6943 PR server/17457
6944 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6945 (AARCH64_FPCR_REGNO): Likewise.
6946 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6947 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6948 (aarch64_store_fpregset): Likewise.
6949
5227d625
JB
69502014-12-15 Joel Brobecker <brobecker@adacore.com>
6951
6952 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6953 Remove FIXME comment about assumption about N.
6954
f93b65a0
JB
69552014-12-13 Joel Brobecker <brobecker@adacore.com>
6956
6957 * configure.ac: If large-file support is disabled in GDBserver,
6958 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6959 * configure: Regenerate.
6960
e5a9158d
AA
69612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6962
6963 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6964 warning upon ENODATA from ptrace.
6965 * linux-s390-low.c (s390_store_tdb): New.
6966 (s390_regsets): Add regset for NT_S390_TDB.
6967
feea5f36
AA
69682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6969
6970 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6971 without a fill_function.
6972 * linux-s390-low.c (s390_fill_last_break): Remove.
6973 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6974 (s390_arch_setup): Use regset's size instead of fill_function for
6975 loop end condition.
6976
098dbe61
AA
69772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6978
6979 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6980 the regset's store function when ptrace returned an error.
6981 * regcache.c (get_thread_regcache): Invalidate register cache
6982 before fetching inferior's registers.
6983
28eef672
AA
69842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6985
6986 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6987 while-loop as for-loop.
6988 (regsets_store_inferior_registers): Likewise.
6989
bdca27a2
YQ
69902014-11-28 Yao Qi <yao@codesourcery.com>
6991
6992 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6993 * config.in, configure: Re-generate.
6994 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6995 is defined.
6996
9c232dda
YQ
69972014-11-21 Yao Qi <yao@codesourcery.com>
6998
6999 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7000 (AC_CHECK_HEADERS): Remove malloc.h.
7001 * configure: Re-generated.
7002 * config.in: Re-generated.
7003 * server.h: Don't include alloca.h and malloc.h.
7004 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7005 Don't include malloc.h.
7006
43968415
JB
70072014-11-17 Joel Brobecker <brobecker@adacore.com>
7008
7009 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7010 corresponding ERRNO check in same block.
7011
40e91bc7
PA
70122014-11-12 Pedro Alves <palves@redhat.com>
7013
7014 * server.c (cont_thread): Update comment.
7015 (start_inferior, attach_inferior): No longer clear cont_thread.
7016 (handle_v_cont): No longer set cont_thread.
7017 (captured_main): Clear cont_thread each time a GDB connects.
7018
c2c118cf
PA
70192014-11-12 Pedro Alves <palves@redhat.com>
7020
7021 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7022 thread, and don't resume all threads if the Hc thread has exited.
7023
78708b7c
PA
70242014-11-12 Pedro Alves <palves@redhat.com>
7025
7026 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7027 the process group instead of to a specific LWP.
7028
a2abc7de
PA
70292014-10-15 Pedro Alves <palves@redhat.com>
7030
7031 PR server/17487
7032 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7033 parameter.
7034 (arm_set_thread_context): Delete.
7035 (the_low_target): Adjust.
7036 * win32-i386-low.c (debug_registers_changed)
7037 (debug_registers_used): Delete.
7038 (update_debug_registers_callback): New function.
7039 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7040 needing to update their debug registers.
7041 (win32_get_current_dr): New function.
7042 (x86_dr_low_get_addr, x86_dr_low_get_control)
7043 (x86_dr_low_get_status): Fetch the debug register from the thread
7044 record's context.
7045 (i386_initial_stuff): Adjust.
7046 (i386_get_thread_context): Remove current_event parameter. Don't
7047 clear debug_registers_changed nor copy DR values to
7048 debug_reg_state.
7049 (i386_set_thread_context): Delete.
7050 (i386_prepare_to_resume): New function.
7051 (i386_thread_added): Mark the thread as needing to update irs
7052 debug registers.
7053 (the_low_target): Remove i386_set_thread_context and install
7054 i386_prepare_to_resume.
7055 * win32-low.c (win32_get_thread_context): Adjust.
7056 (win32_set_thread_context): Use SetThreadContext
7057 directly.
7058 (win32_prepare_to_resume): New function.
7059 (win32_require_context): New function, factored out from ...
7060 (thread_rec): ... this.
7061 (continue_one_thread): Call win32_prepare_to_resume on each thread
7062 we're about to continue.
7063 (win32_resume): Call win32_prepare_to_resume on the event thread.
7064 * win32-low.h (struct win32_thread_info)
7065 <debug_registers_changed>: New field.
7066 (struct win32_target_ops): Change prototype of set_thread_context,
7067 delete set_thread_context and add prepare_to_resume.
7068 (win32_require_context): New declaration.
7069
a442d071
GB
70702014-10-08 Gary Benson <gbenson@redhat.com>
7071
7072 * server.h: Do not include common-exceptions.h.
7073
6f1947e8
GB
70742014-10-08 Gary Benson <gbenson@redhat.com>
7075
7076 * server.h: Do not include cleanups.h.
7077
63b434a4
JH
70782014-09-30 James Hogan <james.hogan@imgtec.com>
7079
7080 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7081 mips64-dsp-linux.c.
7082
c4d9ceb6
YQ
70832014-09-23 Yao Qi <yao@codesourcery.com>
7084
7085 * linux-low.c (lp_status_maybe_breakpoint): New function.
7086 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7087 (count_events_callback): Likewise.
7088 (select_event_lwp_callback): Likewise.
7089 (cancel_breakpoints_callback): Likewise.
7090
89a5711c
DB
70912014-09-19 Don Breazeal <donb@codesourcery.com>
7092
7093 * linux-low.c (handle_extended_wait): Call
7094 linux_ptrace_get_extended_event.
7095 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7096 linux_is_extended_waitstatus.
7097
bffc0964
JB
70982014-09-16 Joel Brobecker <brobecker@adacore.com>
7099
7100 * Makefile.in (CPPFLAGS): Define.
7101 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7102 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7103
0bfdf32f
GB
71042014-09-16 Gary Benson <gbenson@redhat.com>
7105
7106 * inferiors.h (current_inferior): Renamed as...
7107 (current_thread): New variable. All uses updated.
7108 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7109 (maybe_move_out_of_jump_pad): Likewise.
7110 (cancel_breakpoint): Likewise.
7111 (linux_low_filter_event): Likewise.
7112 (wait_for_sigstop): Likewise.
7113 (linux_resume_one_lwp): Likewise.
7114 (need_step_over_p): Likewise.
7115 (start_step_over): Likewise.
7116 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7117 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7118 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7119 and save_inferior as saved_thread.
7120 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7121 saved_thread.
7122 (regcache_invalidate_thread): Likewise.
7123 * remote-utils.c (prepare_resume_reply): Likewise.
7124 * thread-db.c (thread_db_get_tls_address): Likewise.
7125 (disable_thread_event_reporting): Likewise.
7126 (remove_thread_event_breakpoints): Likewise.
7127 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7128 as saved_thread.
7129 * target.h (set_desired_inferior): Renamed as...
7130 (set_desired_thread): New declaration. All uses updated.
7131 * server.c (myresume): Updated comment to reference thread instead
7132 of inferior.
7133 (handle_serial_event): Likewise.
7134 (handle_target_event): Likewise.
7135
361c8ade
GB
71362014-09-12 Tom Tromey <tromey@redhat.com>
7137 Gary Benson <gbenson@redhat.com>
7138
7139 * regcache.h: Include common-regcache.h.
7140 (regcache_read_pc): Don't declare.
7141 * regcache.c (get_thread_regcache_for_ptid): New function.
7142
bd9269f7
GB
71432014-09-11 Tom Tromey <tromey@redhat.com>
7144 Gary Benson <gbenson@redhat.com>
7145
7146 * symbol.c: New file.
7147 * Makefile.in (SFILES): Add symbol.c.
7148 (OBS): Add symbol.o.
7149
f8c1d06b
GB
71502014-09-11 Gary Benson <gbenson@redhat.com>
7151
7152 * target.c (target_stop_ptid, target_continue_ptid): New
7153 functions.
7154
721ec300
GB
71552014-09-11 Tom Tromey <tromey@redhat.com>
7156 Gary Benson <gbenson@redhat.com>
7157
7158 * target.h: Include target/target.h.
7159 * target.c (target_read_memory, target_read_uint32)
7160 (target_write_memory): New functions.
7161
c5e92cca
GB
71622014-09-11 Gary Benson <gbenson@redhat.com>
7163
7164 * server.h (debug_hw_points): Don't declare.
7165 * server.c (debug_hw_points): Don't define. Replace all uses
7166 with show_debug_regs.
7167 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7168 all uses with show_debug_regs.
7169
2e4bb98a
EBM
71702014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7171
7172 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7173 endianness into account.
7174 (ppc_supply_ptrace_register): Likewise.
7175
ac740bc7
JH
71762014-09-03 James Hogan <james.hogan@imgtec.com>
7177
7178 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7179 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7180
97ea6506
GB
71812014-09-03 Gary Benson <gbenson@redhat.com>
7182
7183 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7184 ALL_DEBUG_ADDRESS_REGISTERS.
7185
df7e5265
GB
71862014-09-02 Gary Benson <gbenson@redhat.com>
7187
7188 * i386-low.h: Renamed as...
7189 * x86-low.h: New file. All type, function and variable name
7190 prefixes changed from "i386_" to "x86_". All references updated.
7191 * i386-low.c: Renamed as...
7192 * x86-low.c: New file. All type, function and variable name
7193 prefixes changed from "i386_" to "x86_". All references updated.
7194
ed859da7
GB
71952014-09-02 Gary Benson <gbenson@redhat.com>
7196
7197 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7198 (x86_linux_new_thread): Likewise.
7199
860789c7
GB
72002014-08-29 Gary Benson <gbenson@redhat.com>
7201
7202 * server.h (setjmp.h): Do not include.
7203 (toplevel): Do not declare.
7204 (common-exceptions.h): Include.
7205 (cleanups.h): Likewise.
7206 * server.c (toplevel): Do not define.
7207 (exit_code): New static global.
7208 (detach_or_kill_for_exit_cleanup): New function.
7209 (main): New function. Original main renamed to...
7210 (captured_main): New function.
7211 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7212
ff55e1b5
GB
72132014-08-29 Gary Benson <gbenson@redhat.com>
7214
7215 * Makefile.in (SFILES): Add common/common-exceptions.c.
7216 (OBS): Add common-exceptions.o.
7217 (common-exceptions.o): New rule.
7218 * utils.c (prepare_to_throw_exception): New function.
7219
e9bcb658
GB
72202014-08-29 Gary Benson <gbenson@redhat.com>
7221
7222 * config.in: Regenerate.
7223 * configure: Likewise.
7224
e3180625
GB
72252014-08-29 Gary Benson <gbenson@redhat.com>
7226
7227 * Makefile.in (SFILES): Add common/cleanups.c.
7228 (OBS): cleanups.o.
7229 (cleanups.o): New rule.
7230
e3d6ba5d
GB
72312014-08-29 Gary Benson <gbenson@redhat.com>
7232
7233 * utils.c (internal_vwarning): New function.
7234
7096e886
GB
72352014-08-28 Gary Benson <gbenson@redhat.com>
7236
7237 * utils.h (fatal): Remove declaration.
7238 * utils.c (fatal): Remove function.
7239
14ce3192
GB
72402014-08-28 Gary Benson <gbenson@redhat.com>
7241
7242 * tracepoint.c (gdb_agent_init): Replace fatal with
7243 perror_with_name.
7244 (initialize_tracepoint): Likewise.
7245
50278d59
GB
72462014-08-28 Gary Benson <gbenson@redhat.com>
7247
7248 * remote-utils.c (remote_prepare): Replace fatal with error.
7249
aa96c426
GB
72502014-08-28 Gary Benson <gbenson@redhat.com>
7251
7252 * linux-low.c (linux_async): Replace fatal with warning.
7253 Tidy up and return.
7254 (linux_start_non_stop): Return -1 if linux_async failed.
7255
f7160e97
GB
72562014-08-28 Gary Benson <gbenson@redhat.com>
7257
7258 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7259 gdb_assert.
7260 (i386_dr_low_get_addr): Remove vague comment.
7261 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7262 gdb_assert.
7263
38e08fca
GB
72642014-08-28 Gary Benson <gbenson@redhat.com>
7265
7266 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7267 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7268 internal_error.
7269 (linux_resume_one_lwp): Likewise.
7270 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7271 gdb_assert.
7272 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7273 with internal_error.
7274 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7275 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7276 (find_register_by_name): Replace fatal with internal_error.
7277 (find_regno): Likewise.
7278 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7279 * thread-db.c (thread_db_create_event): Likewise.
7280 (thread_db_load_search): Likewise.
7281 (try_thread_db_load_1): Likewise.
7282 * tracepoint.c (get_jump_space_head): Replace fatal with
7283 internal_error.
7284 (claim_trampoline_space): Likewise.
7285 (have_fast_tracepoint_trampoline_buffer): Likewise.
7286 (cmd_qtstart): Likewise.
7287 (stop_tracing): Likewise.
7288 (fast_tracepoint_collecting): Likewise.
7289 (target_malloc): Likewise.
7290 (download_tracepoint): Likewise.
7291 (download_trace_state_variables): Replace check with gdb_assert.
7292 (upload_fast_traceframes): Replace fatal with internal_error.
7293
34abf635
GB
72942014-08-19 Tom Tromey <tromey@redhat.com>
7295 Gary Benson <gbenson@redhat.com>
7296
7297 * Makefile.in (SFILES): Add common/common-debug.c.
7298 (OBS): Add common-debug.o.
7299 (common-debug.o): New rule.
7300 * debug.h (debug_printf): Don't declare.
7301 * debug.c (debug_printf): Renamed and rewritten as...
7302 (debug_vprintf): New function.
7303
f6e94d78
GB
73042014-08-19 Gary Benson <gbenson@redhat.com>
7305
7306 * utils.h: Do not include print-utils.h.
7307
9239eeab
GB
73082014-08-19 Tom Tromey <tromey@redhat.com>
7309 Gary Benson <gbenson@redhat.com>
7310
7311 * server.h: Add static assertion.
7312 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7313
ef87c8bb
GB
73142014-08-19 Tom Tromey <tromey@redhat.com>
7315 Gary Benson <gbenson@redhat.com>
7316
7317 * Makefile.in (SFILES): Add common/errors.c.
7318 (OBS): Add errors.o.
7319 (IPA_OBS): Add errors-ipa.o.
7320 (errors.o): New rule.
7321 (errors-ipa.o): Likewise.
7322 * utils.h (perror_with_name, error, warning): Don't declare.
7323 * utils.c (warning): Renamed and rewritten as...
7324 (vwarning): New function.
7325 (error): Renamed and rewritten as...
7326 (verror): New function.
7327 (internal_error): Renamed and rewritten as...
7328 (internal_verror): New function.
7329
bb974a24
GB
73302014-08-07 Gary Benson <gbenson@redhat.com>
7331
7332 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7333 * configure: Regenerate.
7334 * config.in: Likewise.
7335 * server.h: Do not include errno.h.
7336 * event-loop.c: Likewise.
7337 * hostio-errno.c: Likewise.
7338 * linux-low.c: Likewise.
7339 * remote-utils.c: Likewise.
7340 * spu-low.c: Likewise.
7341 * utils.c: Likewise.
7342 * gdbreplay.c: Unconditionally include errno.h.
7343
6d3d12eb
GB
73442014-08-07 Gary Benson <gbenson@redhat.com>
7345
7346 * server.h: Do not include string.h.
7347 * event-loop.c: Likewise.
7348 * linux-low.c: Likewise.
7349 * regcache.c: Likewise.
7350 * remote-utils.c: Likewise.
7351 * spu-low.c: Likewise.
7352 * utils.c: Likewise.
7353
dccbb609
GB
73542014-08-07 Gary Benson <gbenson@redhat.com>
7355
7356 * server.h: Do not include gdb_assert.h.
7357
e76df0d0
GB
73582014-08-07 Gary Benson <gbenson@redhat.com>
7359
7360 * server.h: Do not include common-utils.h.
7361
4cb9c816
GB
73622014-08-07 Gary Benson <gbenson@redhat.com>
7363
7364 * server.h: Do not include ptid.h.
7365 * notif.h: Likewise.
7366
3995eeee
GB
73672014-08-07 Gary Benson <gbenson@redhat.com>
7368
7369 * server.h: Do not include gdb_locale.h.
7370
cb9f1a9b
GB
73712014-08-07 Gary Benson <gbenson@redhat.com>
7372
7373 * server.h: Do not include gdb/signals.h.
7374 * win32-low.c: Likewise.
7375
a5fceff8
GB
73762014-08-07 Gary Benson <gbenson@redhat.com>
7377
7378 * server.h: Do not include pathmax.h.
7379
b9391142
GB
73802014-08-07 Gary Benson <gbenson@redhat.com>
7381
7382 * server.h: Do not include libiberty.h.
7383 * linux-bfin-low.c: Likewise.
7384
0e443c87
GB
73852014-08-07 Gary Benson <gbenson@redhat.com>
7386
7387 * server.h: Do not include ansidecl.h.
7388
8ebb3f56
GB
73892014-08-07 Gary Benson <gbenson@redhat.com>
7390
7391 * linux-x86-low.c: Do not include stddef.h.
7392 * lynx-ppc-low.c: Likewise.
7393 * tracepoint.c: Likewise.
7394
8980bdf6
GB
73952014-08-07 Gary Benson <gbenson@redhat.com>
7396
7397 * server.h: Do not include stdarg.h.
7398 * nto-low.c: Likewise.
7399
d7096f71
GB
74002014-08-07 Gary Benson <gbenson@redhat.com>
7401
7402 * server.h: Do not include stdlib.h.
7403 * inferiors.c: Likewise.
7404 * linux-low.c: Likewise.
7405 * regcache.c: Likewise.
7406 * spu-low.c: Likewise.
7407 * tracepoint.c: Likewise.
7408 * utils.c: Likewise.
7409
d02f550d
GB
74102014-08-07 Gary Benson <gbenson@redhat.com>
7411
7412 * server.h: Do not include stdio.h.
7413 * linux-low.c: Likewise.
7414 * remote-utils.c: Likewise.
7415 * spu-low.c: Likewise.
7416 * utils.c: Likewise.
7417 * wincecompat.c: Likewise.
7418
87f6c4e3
GB
74192014-08-06 Gary Benson <gbenson@redhat.com>
7420
7421 * regcache.c (init_register_cache): Move conditionals inside if.
7422
7089dca4
GB
74232014-08-06 Gary Benson <gbenson@redhat.com>
7424
7425 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7426
462f517e
GB
74272014-07-31 Gary Benson <gbenson@redhat.com>
7428
7429 * ax.h: Do not include server.h.
7430 * gdbthread.h: Likewise.
7431 * lynx-low.h: Likewise.
7432 * notif.h: Likewise.
7433
976411d6
GB
74342014-07-30 Gary Benson <gbenson@redhat.com>
7435
7436 * server.h: Include common-defs.h.
7437 Do not include config.h or build-gnulib-gdbserver/config.h.
7438
d41f6d8e
GB
74392014-07-30 Gary Benson <gbenson@redhat.com>
7440
7441 * hostio-errno.c: Move server.h to top of includes list.
7442 * inferiors.c: Likewise.
7443 * linux-x86-low.c: Likewise.
7444 * notif.c: Include server.h.
7445
314c6a35
TT
74462014-07-24 Tom Tromey <tromey@redhat.com>
7447 Gary Benson <gbenson@redhat.com>
7448
7449 * server.h (CORE_ADDR): Now unsigned.
7450
69ff6be5
PA
74512014-07-16 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7454
ce9e3fe7
PA
74552014-07-15 Pedro Alves <palves@redhat.com>
7456
7457 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7458 copy.
7459
e76126e8
PA
74602014-07-11 Pedro Alves <palves@redhat.com>
7461
7462 * linux-low.c (kill_wait_lwp): New function, based on
7463 kill_one_lwp_callback, but use my_waitpid directly.
7464 (kill_one_lwp_callback, linux_kill): Use it.
7465
8e9db26e
PA
74662014-06-23 Pedro Alves <palves@redhat.com>
7467
7468 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7469 before setting DR0..DR3.
7470
698b3e08
GB
74712014-06-20 Gary Benson <gbenson@redhat.com>
7472
7473 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7474 * configure: Regenerated.
7475 * config.in: Likewise.
7476
125f8a3d
GB
74772014-06-20 Gary Benson <gbenson@redhat.com>
7478
7479 * Makefile.in (SFILES): Update locations for files moved
7480 from common to nat.
7481 (object file files): Reordered.
7482
42995dbd
GB
74832014-06-20 Gary Benson <gbenson@redhat.com>
7484
7485 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7486 (i386_dr_low_set_addr): Likewise.
7487 (i386_dr_low_get_addr): Likewise.
7488 (i386_dr_low_can_set_control): Likewise.
7489 (i386_dr_low_set_control): Likewise.
7490 (i386_dr_low_get_control): Likewise.
7491 (i386_dr_low_get_status): Likewise.
7492 (i386_get_debug_register_length): Likewise.
7493 * linux-x86-low.c (i386_dr_low_set_addr):
7494 Changed signature. Made static.
7495 (i386_dr_low_get_addr): Likewise.
7496 (i386_dr_low_set_control): Likewise.
7497 (i386_dr_low_get_control): Likewise.
7498 (i386_dr_low_get_status): Likewise.
7499 (i386_dr_low): New global variable.
7500 * win32-i386-low.c (i386_dr_low_set_addr):
7501 Changed signature. Made static.
7502 (i386_dr_low_get_addr): Likewise.
7503 (i386_dr_low_set_control): Likewise.
7504 (i386_dr_low_get_control): Likewise.
7505 (i386_dr_low_get_status): Likewise.
7506 (i386_dr_low): New global variable.
7507
e1d2394b
MS
75082014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7509
7510 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7511 * Makefile.in (AR, AR_FLAGS): Define.
7512 * configure: Regenerate.
7513
3a8ee006
GB
75142014-06-19 Gary Benson <gbenson@redhat.com>
7515
7516 * Makefile.in (i386-dregs.o): New rule.
7517 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7518 * i386-low.c (target.h): Remove include.
7519 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7520 (DR_CONTROL_SHIFT): Likewise.
7521 (DR_CONTROL_SIZE): Likewise.
7522 (DR_RW_EXECUTE): Likewise.
7523 (DR_RW_WRITE): Likewise.
7524 (DR_RW_READ): Likewise.
7525 (DR_RW_IORW): Likewise.
7526 (DR_LEN_1): Likewise.
7527 (DR_LEN_2): Likewise.
7528 (DR_LEN_4): Likewise.
7529 (DR_LEN_8): Likewise.
7530 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7531 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7532 (DR_ENABLE_SIZE): Likewise.
7533 (DR_LOCAL_SLOWDOWN): Likewise.
7534 (DR_GLOBAL_SLOWDOWN): Likewise.
7535 (DR_CONTROL_RESERVED): Likewise.
7536 (I386_DR_CONTROL_MASK): Likewise.
7537 (I386_DR_VACANT): Likewise.
7538 (I386_DR_LOCAL_ENABLE): Likewise.
7539 (I386_DR_GLOBAL_ENABLE): Likewise.
7540 (I386_DR_DISABLE): Likewise.
7541 (I386_DR_SET_RW_LEN): Likewise.
7542 (I386_DR_GET_RW_LEN): Likewise.
7543 (I386_DR_WATCH_HIT): Likewise.
7544 (i386_wp_op_t): Likewise.
7545 (i386_show_dr): Likewise.
7546 (i386_length_and_rw_bits): Likewise.
7547 (i386_insert_aligned_watchpoint): Likewise.
7548 (i386_remove_aligned_watchpoint): Likewise.
7549 (i386_handle_nonaligned_watchpoint): Likewise.
7550 i386_update_inferior_debug_regs(): Likewise.
7551 (i386_dr_insert_watchpoint): Likewise.
7552 (i386_dr_remove_watchpoint): Likewise.
7553 (i386_dr_region_ok_for_watchpoint): Likewise.
7554 (i386_dr_stopped_data_address): Likewise.
7555 (i386_dr_stopped_by_watchpoint): Likewise.
7556
8f26655c
GB
75572014-06-19 Gary Benson <gbenson@redhat.com>
7558
7559 * i386-low.c (i386_dr_show): Renamed to
7560 i386_show_dr and made static. All uses updated.
7561 (i386_dr_length_and_rw_bits): Renamed to
7562 i386_length_and_rw_bits and made static.
7563 All uses updated.
7564 (i386_dr_insert_aligned_watchpoint): Renamed to
7565 i386_insert_aligned_watchpoint and made static.
7566 All uses updated.
7567 (i386_dr_remove_aligned_watchpoint): Renamed to
7568 i386_remove_aligned_watchpoint and made static.
7569 All uses updated.
7570 (i386_dr_update_inferior_debug_regs): Renamed to
7571 i386_update_inferior_debug_regs and made static.
7572 All uses updated.
7573
b9228891
GB
75742014-06-18 Gary Benson <gbenson@redhat.com>
7575
5171def3
GB
7576 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7577 (i386_dr_low_can_set_control): Likewise.
7578 (i386_get_debug_register_length): Likewise.
7579 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7580 (i386_dr_low_can_set_control): Likewise.
7581 (i386_get_debug_register_length): Likewise.
7582
75832014-06-17 Gary Benson <gbenson@redhat.com>
7584
b9228891
GB
7585 * i386-low.h (i386-dregs.h): New include.
7586 (DR_FIRSTADDR): Now in i386-dregs.h.
7587 (DR_LASTADDR): Likewise.
7588 (DR_NADDR): Likewise.
7589 (DR_STATUS): Likewise.
7590 (DR_CONTROL): Likewise.
7591 (i386_debug_reg_state): Likewise.
7592 (i386_dr_insert_watchpoint): Likewise.
7593 (i386_dr_remove_watchpoint): Likewise.
7594 (i386_dr_region_ok_for_watchpoint): Likewise.
7595 (i386_dr_stopped_data_address): Likewise.
7596 (i386_dr_stopped_by_watchpoint): Likewise.
7597 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7598
4be83cc2
GB
75992014-06-18 Gary Benson <gbenson@redhat.com>
7600
7601 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7602 i386_dr_insert_watchpoint.
7603 (i386_low_remove_watchpoint): Renamed to
7604 i386_dr_remove_watchpoint.
7605 (i386_low_region_ok_for_watchpoint): Renamed to
7606 i386_dr_region_ok_for_watchpoint.
7607 (i386_low_stopped_data_address): Renamed to
7608 i386_dr_stopped_data_address.
7609 (i386_low_stopped_by_watchpoint): Renamed to
7610 i386_dr_stopped_by_watchpoint.
7611 * i386-low.c (i386_show_dr): Renamed to
7612 i386_dr_show and made nonstatic. All uses updated.
7613 (i386_length_and_rw_bits): Renamed to
7614 i386_dr_length_and_rw_bits and made nonstatic.
7615 All uses updated.
7616 (i386_insert_aligned_watchpoint): Renamed to
7617 i386_dr_insert_aligned_watchpoint and made nonstatic.
7618 All uses updated.
7619 (i386_remove_aligned_watchpoint): Renamed to
7620 i386_dr_remove_aligned_watchpoint and made nonstatic.
7621 All uses updated.
7622 (i386_update_inferior_debug_regs): Renamed to
7623 i386_dr_update_inferior_debug_regs and made nonstatic.
7624 All uses updated.
7625 (i386_low_insert_watchpoint): Renamed to
7626 i386_dr_insert_watchpoint. All uses updated.
7627 (i386_low_remove_watchpoint): Renamed to
7628 i386_dr_remove_watchpoint. All uses updated.
7629 (i386_low_region_ok_for_watchpoint): Renamed to
7630 i386_dr_region_ok_for_watchpoint. All uses updated.
7631 (i386_low_stopped_data_address): Renamed to
7632 i386_dr_stopped_data_address. All uses updated.
7633 (i386_low_stopped_by_watchpoint): Renamed to
7634 i386_dr_stopped_by_watchpoint. All uses updated.
7635
131aa0d4
GB
76362014-06-18 Gary Benson <gbenson@redhat.com>
7637
7638 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7639 (i386_dr_low_can_set_control): Likewise.
7640 (i386_insert_aligned_watchpoint): New check.
7641
d9305f7f
GB
76422014-06-18 Gary Benson <gbenson@redhat.com>
7643
7644 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7645 Renamed to state.
7646
e927c9fc
GB
76472014-06-18 Gary Benson <gbenson@redhat.com>
7648
7649 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7650 instead of fatal and error.
7651 (i386_handle_nonaligned_watchpoint): Likewise.
7652
1b6d4134
GB
76532014-06-18 Gary Benson <gbenson@redhat.com>
7654
7655 * i386-low.c (i386_get_debug_register_length): New macro.
7656 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7657 (i386_show_dr): Use debug_printf instead of fprintf. Use
7658 phex to format values.
7659
6e62758f
GB
76602014-06-18 Gary Benson <gbenson@redhat.com>
7661
7662 * i386-low.h: Comment changes.
7663 * i386-low.c: Likewise.
7664
fc6e2f03
GB
76652014-06-18 Gary Benson <gbenson@redhat.com>
7666
7667 * i386-low.c: Whitespace changes.
7668
f9d1eeed
TT
76692014-06-12 Tom Tromey <tromey@redhat.com>
7670
7671 * utils.c (freeargv): Remove.
7672
0b04e523
TT
76732014-06-12 Tom Tromey <tromey@redhat.com>
7674
7675 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7676 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7677 (parse_debug_format_options): Likewise.
7678 (gdbserver_usage): Likewise.
7679 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7680 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7681 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7682 against libiberty.
7683 ($(LIBGNU)): Depend on libiberty.
7684 (all-lib): Recurse into all subdirs.
7685 (install-only): Invoke "install" target in subdirs.
7686 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7687 targets.
7688 * configure: Rebuild.
7689 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7690 for vasprintf, vsnprintf, or gettimeofday.
7691 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7692 srv_tgtobj.
7693
270c9937
JB
76942014-06-05 Joel Brobecker <brobecker@adacore.com>
7695
7696 * development.sh: Delete.
7697 * Makefile.in (config.status): Adjust dependency on development.sh.
7698 * configure.ac: Adjust development.sh source call.
7699 * configure: Regenerate.
7700
0a261ed8
PA
77012014-06-02 Pedro Alves <palves@redhat.com>
7702
7703 * ax.c (gdb_free_agent_expr): New function.
7704 * ax.h (gdb_free_agent_expr): New declaration.
7705 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7706 list.
7707 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7708 static.
7709 (clear_breakpoint_conditions_and_commands): New function.
7710 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7711 (clear_breakpoint_conditions_and_commands): New declaration.
7712
e9dae05e
RR
77132014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7714
7715 * linux-aarch64-low.c (asm/ptrace.h): Include.
7716
5876f503
JK
77172014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7718
7719 Fix TLS access for -static -pthread.
7720 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7721 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7722 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7723
802e8e6d
PA
77242014-05-20 Pedro Alves <palves@redhat.com>
7725
7726 * linux-aarch64-low.c (aarch64_insert_point)
7727 (aarch64_remove_point): No longer check whether the type is
7728 supported here. Adjust to new interface.
7729 (the_low_target): Install aarch64_supports_z_point_type as
7730 supports_z_point_type method.
7731 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7732 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7733 instead of a Z packet char. Adjust.
7734 (arm_supports_z_point_type): New function.
7735 (arm_insert_point, arm_remove_point): Adjust to new interface.
7736 (the_low_target): Install arm_supports_z_point_type.
7737 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7738 (cris_insert_point, cris_remove_point): Adjust to new interface.
7739 Don't check whether the type is supported here.
7740 (the_low_target): Install cris_supports_z_point_type.
7741 * linux-low.c (linux_supports_z_point_type): New function.
7742 (linux_insert_point, linux_remove_point): Adjust to new interface.
7743 * linux-low.h (struct linux_target_ops) <insert_point,
7744 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7745 raw_breakpoint pointer parameter.
7746 <supports_z_point_type>: New method.
7747 * linux-mips-low.c (mips_supports_z_point_type): New function.
7748 (mips_insert_point, mips_remove_point): Adjust to new interface.
7749 Use mips_supports_z_point_type.
7750 (the_low_target): Install mips_supports_z_point_type.
7751 * linux-ppc-low.c (the_low_target): Install NULL as
7752 supports_z_point_type method.
7753 * linux-s390-low.c (the_low_target): Install NULL as
7754 supports_z_point_type method.
7755 * linux-sparc-low.c (the_low_target): Install NULL as
7756 supports_z_point_type method.
7757 * linux-x86-low.c (x86_supports_z_point_type): New function.
7758 (x86_insert_point): Adjust to new insert_point interface. Use
7759 insert_memory_breakpoint. Adjust to new
7760 i386_low_insert_watchpoint interface.
7761 (x86_remove_point): Adjust to remove_point interface. Use
7762 remove_memory_breakpoint. Adjust to new
7763 i386_low_remove_watchpoint interface.
7764 (the_low_target): Install x86_supports_z_point_type.
7765 * lynx-low.c (lynx_target_ops): Install NULL as
7766 supports_z_point_type callback.
7767 * nto-low.c (nto_supports_z_point_type): New.
7768 (nto_insert_point, nto_remove_point): Adjust to new interface.
7769 (nto_target_ops): Install nto_supports_z_point_type.
7770 * mem-break.c: Adjust intro comment.
7771 (struct raw_breakpoint) <raw_type, size>: New fields.
7772 <inserted>: Update comment.
7773 <shlib_disabled>: Delete field.
7774 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7775 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7776 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7777 (raw_bkpt_type_to_target_hw_bp_type): New function.
7778 (find_enabled_raw_code_breakpoint_at): New function.
7779 (find_raw_breakpoint_at): New type and size parameters. Use them.
7780 (insert_memory_breakpoint): New function, based off
7781 set_raw_breakpoint_at.
7782 (remove_memory_breakpoint): New function.
7783 (set_raw_breakpoint_at): Reimplement.
7784 (set_breakpoint): New, based on set_breakpoint_at.
7785 (set_breakpoint_at): Reimplement.
7786 (delete_raw_breakpoint): Go through the_target->remove_point
7787 instead of assuming memory breakpoints.
7788 (find_gdb_breakpoint_at): Delete.
7789 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7790 (find_gdb_breakpoint): New function.
7791 (set_gdb_breakpoint_at): Delete.
7792 (z_type_supported): New function.
7793 (set_gdb_breakpoint_1): New function, loosely based off
7794 set_gdb_breakpoint_at.
7795 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7796 (delete_gdb_breakpoint_at): Delete.
7797 (delete_gdb_breakpoint_1): New function, loosely based off
7798 delete_gdb_breakpoint_at.
7799 (delete_gdb_breakpoint): New function.
7800 (clear_gdb_breakpoint_conditions): Rename to ...
7801 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7802 breakpoint.
7803 (add_condition_to_breakpoint): Make static.
7804 (add_breakpoint_condition): Take a struct breakpoint pointer
7805 instead of an address. Adjust.
7806 (gdb_condition_true_at_breakpoint): Rename to ...
7807 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7808 z_type parameter.
7809 (gdb_condition_true_at_breakpoint): Reimplement.
7810 (add_breakpoint_commands): Take a struct breakpoint pointer
7811 instead of an address. Adjust.
7812 (gdb_no_commands_at_breakpoint): Rename to ...
7813 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7814 parameter. Return true if no breakpoint was found. Change debug
7815 output.
7816 (gdb_no_commands_at_breakpoint): Reimplement.
7817 (run_breakpoint_commands): Rename to ...
7818 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7819 and change return type to boolean.
7820 (run_breakpoint_commands): New function.
7821 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7822 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7823 breakpoint. Go through the_target->remove_point instead of
7824 assuming memory breakpoint.
7825 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7826 software and hardware breakpoints.
7827 (reinsert_raw_breakpoint): Go through the_target->insert_point
7828 instead of assuming memory breakpoint.
7829 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7830 software and hardware breakpoints.
7831 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7832 Check both software and hardware breakpoints.
7833 (validate_inserted_breakpoint): Assert the breakpoint is a
7834 software breakpoint. Set the inserted flag to -1 instead of
7835 setting shlib_disabled.
7836 (delete_disabled_breakpoints): Adjust.
7837 (validate_breakpoints): Only validate software breakpoints.
7838 Adjust to inserted flag change.
7839 (check_mem_read, check_mem_write): Skip breakpoint types other
7840 than software breakpoints. Adjust to inserted flag change.
7841 * mem-break.h (enum raw_bkpt_type): New enum.
7842 (raw_breakpoint, struct process_info): Forward declare.
7843 (Z_packet_to_target_hw_bp_type): Delete declaration.
7844 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7845 (set_gdb_breakpoint, delete_gdb_breakpoint)
7846 (clear_breakpoint_conditions): New declarations.
7847 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7848 (breakpoint_inserted_here): Update comment.
7849 (add_breakpoint_condition, add_breakpoint_commands): Replace
7850 address parameter with a breakpoint pointer parameter.
7851 (gdb_breakpoint_here): Update comment.
7852 (delete_gdb_breakpoint_at): Delete.
7853 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7854 * server.c (process_point_options): Take a struct breakpoint
7855 pointer instead of an address. Adjust.
7856 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7857 delete_gdb_breakpoint.
7858 * spu-low.c (spu_target_ops): Install NULL as
7859 supports_z_point_type method.
7860 * target.h: Include mem-break.h.
7861 (struct target_ops) <prepare_to_access_memory>: Update comment.
7862 <supports_z_point_type>: New field.
7863 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7864 instead of a char. Also take a raw breakpoint pointer.
7865 * win32-arm-low.c (the_low_target): Install NULL as
7866 supports_z_point_type.
7867 * win32-i386-low.c (i386_supports_z_point_type): New function.
7868 (i386_insert_point, i386_remove_point): Adjust to new interface.
7869 (the_low_target): Install i386_supports_z_point_type.
7870 * win32-low.c (win32_supports_z_point_type): New function.
7871 (win32_insert_point, win32_remove_point): Adjust to new interface.
7872 (win32_target_ops): Install win32_supports_z_point_type.
7873 * win32-low.h (struct win32_target_ops):
7874 <supports_z_point_type>: New method.
7875 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7876 instead of a char. Also take a raw breakpoint pointer.
7877
932539e3
PA
78782014-05-20 Pedro Alves <palves@redhat.com>
7879
7880 * mem-break.h: Include break-common.h.
7881 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7882 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7883 (Z_packet_to_target_hw_bp_type): New declaration.
7884 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7885 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7886 (Z_PACKET_ACCESS_WP): Delete macros.
7887 (Z_packet_to_hw_type): Delete function.
7888 * i386-low.h: Don't include break-common.h here.
7889 (Z_packet_to_hw_type): Delete declaration.
7890 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7891 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7892 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7893 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7894 * linux-aarch64-low.c: Don't include break-common.h here.
7895 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7896 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7897 (Z_packet_to_target_hw_bp_type): Delete function.
7898 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7899 function.
7900 (mips_insert_point, mips_remove_point): Use
7901 Z_packet_to_target_hw_bp_type.
7902
4ff0d3d8
PA
79032014-05-20 Pedro Alves <palves@redhat.com>
7904
7905 * linux-aarch64-low.c: Include break-common.h.
7906 (enum target_point_type): Delete.
7907 (Z_packet_to_point_type): Rename to ...
7908 (Z_packet_to_target_hw_bp_type): ... this, and return a
7909 target_hw_bp_type instead.
7910 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7911 instead of an enum target_point_type.
7912 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7913 breakpoint type.
7914 (aarch64_dr_state_insert_one_point)
7915 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7916 (aarch64_handle_aligned_watchpoint)
7917 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7918 Take an enum target_hw_bp_type instead of an enum
7919 target_point_type.
7920 (aarch64_supports_z_point_type): New function.
7921 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7922 use Z_packet_to_target_hw_bp_type.
7923
786dc519
JB
79242014-05-20 Joel Brobecker <brobecker@adacore.com>
7925
7926 * configure.ac: Only use -Werror by default when DEVELOPMENT
7927 is true.
7928 * configure: Regenerate.
7929
9e0aa64f
JK
79302014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7931
7932 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7933 * linux-x86-low.c (X86_64_USER_REGS): New.
7934 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7935
2b577b92
YQ
79362014-04-28 Yao Qi <yao@codesourcery.com>
7937
7938 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7939 name.
7940
94611da2
PA
79412014-04-25 Pedro Alves <palves@redhat.com>
7942
7943 PR server/16255
7944 * linux-low.c (linux_attach_fail_reason_string): New function.
7945 (linux_attach_lwp): Delete.
7946 (linux_attach_lwp_1): Rename to ...
7947 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7948 argument. Remove "initial" parameter. Return int instead of
7949 void. Don't error or warn here.
7950 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7951 failure to attach to the tgid. Call warning when failing to
7952 attach to an lwp.
7953 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7954 argument. Remove "initial" parameter. Return int instead of
7955 void. Don't error or warn here.
7956 (linux_attach_fail_reason_string): New declaration.
7957 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7958 interface change. Use linux_attach_fail_reason_string.
7959
01f9f808
MS
79602014-04-24 Michael Sturm <michael.sturm@mintel.com>
7961 Walfred Tedeschi <walfred.tedeschi@intel.com>
7962
7963 * Makefile.in: Added rules to handle new files
7964 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7965 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7966 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7967 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7968 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7969 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7970 x32-avx512-linux.o.
7971 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7972 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7973 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7974 i386/x32-avx512.xml.
7975 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7976 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7977 i386/x32-avx512-linux.xml.
7978 * i387-fp.c (num_avx512_k_registers): New constant for number
7979 of K registers.
7980 (num_avx512_zmmh_low_registers): New constant for number of
7981 lower ZMM registers (0-15).
7982 (num_avx512_zmmh_high_registers): New constant for number of
7983 higher ZMM registers (16-31).
7984 (num_avx512_ymmh_registers): New contant for number of higher
7985 YMM registers (ymm16-31 added by avx521 on x86_64).
7986 (num_avx512_xmm_registers): New constant for number of higher
7987 XMM registers (xmm16-31 added by AVX512 on x86_64).
7988 (struct i387_xsave): Add space for AVX512 registers.
7989 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7990 Add code to handle AVX512 registers.
7991 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7992 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7993 prototypei from generated file.
7994 (tdesc_amd64_avx512_linux): Likewise.
7995 (init_registers_x32_avx512_linux): Likewise.
7996 (tdesc_x32_avx512_linux): Likewise.
7997 (init_registers_i386_avx512_linux): Likewise.
7998 (tdesc_i386_avx512_linux): Likewise.
7999 (x86_64_regmap): Add AVX512 registers.
8000 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8001 mask.
8002 (initialize_low_arch): Add code to initialize AVX512 registers.
8003
51aa91f9
PA
80042014-04-23 Pedro Alves <palves@redhat.com>
8005
8006 * mem-break.c (find_gdb_breakpoint_at): Make static.
8007 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8008
a4165e94
PA
80092014-04-23 Pedro Alves <palves@redhat.com>
8010
8011 * i386-low.c: Don't include break-common.h here.
8012 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8013 prototype to take target_hw_bp_type as argument instead of a Z
8014 packet char.
8015 * i386-low.h: Include break-common.h here.
8016 (Z_packet_to_hw_type): Declare.
8017 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8018 prototypes.
8019 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8020 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8021 (x86_remove_point): Convert the packet number to a
8022 target_hw_bp_type before calling i386_low_remove_watchpoint.
8023 * win32-i386-low.c (i386_insert_point): Convert the packet number
8024 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8025 (i386_remove_point): Convert the packet number to a
8026 target_hw_bp_type before calling i386_low_remove_watchpoint.
8027
b8acf843
PA
80282014-04-23 Pedro Alves <palves@redhat.com>
8029
8030 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8031
d708bcd1
PA
80322014-04-10 Pedro Alves <palves@redhat.com>
8033
8034 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8035 Check if the condition or command is NULL before checking if the
8036 breakpoint is known. On success, return true.
8037 * mem-break.h (add_breakpoint_condition): Document return.
8038 (add_breakpoint_commands): Add describing comment.
8039 * server.c (skip_to_semicolon): New function.
8040 (process_point_options): Use it.
8041
2eec7d5b
PA
80422014-04-09 Pedro Alves <palves@redhat.com>
8043
8044 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8045 to lwpid_of.
8046
fa96cb38
PA
80472014-02-27 Pedro Alves <palves@redhat.com>
8048
8049 PR 12702
8050 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8051 macros.
8052 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8053 output.
8054 (last_thread_of_process_p): Take a PID argument instead of a
8055 thread pointer.
8056 (linux_wait_for_lwp): Delete.
8057 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8058 functions.
8059 (linux_low_filter_event): New function, party factored out from
8060 linux_wait_for_event.
8061 (linux_wait_for_event): Rename to ...
8062 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8063 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8064 sigsuspend. Check for zombie leaders.
8065 (linux_wait_for_event): Reimplement as wrapper around
8066 linux_wait_for_event_filtered.
8067 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8068 a normal or signal exit is seen, it's the whole process exiting.
8069 (wait_for_sigstop): No longer a for_each_inferior callback.
8070 Rewrite on top of linux_wait_for_event_filtered.
8071 (stop_all_lwps): Call wait_for_sigstop directly.
8072 * server.c (resume, handle_target_event): Handle
8073 TARGET_WAITKIND_NO_RESUMED.
8074
d763de10
JB
80752014-02-26 Joel Brobecker <brobecker@adacore.com>
8076
8077 * win32-low.c (psapi_get_dll_name,
8078 * win32_CreateToolhelp32Snapshot): Delete.
8079 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8080 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8081 Delete.
8082 (handle_load_dll): Add function description.
8083 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8084
850a0f76
JB
80852014-02-26 Joel Brobecker <brobecker@adacore.com>
8086
8087 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8088 Add comment.
8089 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8090 base address when calling win32_add_one_solib.
8091 (handle_load_dll): Delete local variable load_addr.
8092 Remove 0x1000 offset applied to DLL base address when calling
8093 win32_add_one_solib.
8094 (handle_unload_dll): Add comment.
8095
f25b3fc3
JB
80962014-02-26 Joel Brobecker <brobecker@adacore.com>
8097
8098 * win32-low.c (win32_add_all_dlls): Renames
8099 win32_ensure_ntdll_loaded. Rewrite function documentation.
8100 Adjust implementation to always load all DLLs.
8101 Add 0x1000 offset to DLL base address when calling
8102 win32_add_one_solib.
8103 (child_initialization_done): New static global.
8104 (do_initial_child_stuff): Set child_initialization_done to
8105 zero during child initialization, and 1 after. Replace call
8106 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8107 Add comment.
8108 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8109 (handle_unload_dll): Add function documentation.
8110 (get_child_debug_event): Ignore load and unload DLL events
8111 during child initialization.
8112
d86d4aaf
DE
81132014-02-20 Doug Evans <dje@google.com>
8114
3bc32da3 8115 Remove global all_lwps.
d86d4aaf
DE
8116 * inferiors.h (ptid_of): Move here from linux-low.h.
8117 (pid_of, lwpid_of): Ditto.
8118 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8119 parameter is a struct thread_info * now.
8120 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8121 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8122 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8123 directly.
8124 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8125 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8126 * linux-arm-low.c (update_registers_callback): Update, "entry"
8127 parameter is a struct thread_info * now.
8128 Fetch lwpid from current_inferior directly.
8129 (arm_insert_point): Pass &all_threads to find_inferior instead of
8130 &all_lwps.
8131 (arm_remove_point): Ditto.
8132 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8133 (arm_prepare_to_resume): Fetch pid from thread.
8134 (arm_read_description): Fetch lwpid from current_inferior directly.
8135 * linux-low.c (all_lwps): Delete.
8136 (delete_lwp): Delete call to remove_inferior.
8137 (handle_extended_wait): Fetch lwpid from thread.
8138 (add_lwp): Don't set lwp->entry.id. Remove call to
8139 add_inferior_to_list.
8140 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8141 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8142 (kill_one_lwp_callback): Ditto.
8143 (linux_kill): Don't dereference NULL pointer.
8144 Fetch ptid,lwpid from thread.
8145 (get_detach_signal): Fetch ptid from thread.
8146 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8147 Simplify call to regcache_invalidate_thread.
8148 (delete_lwp_callback): Update, "entry" parameter is a
8149 struct thread_info * now. Fetch pid from thread.
8150 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8151 (status_pending_p_callback): Update, "entry" parameter is a
8152 struct thread_info * now. Fetch ptid from thread.
8153 (find_lwp_pid): Update, "entry" parameter is a
8154 struct thread_info * now.
8155 (linux_wait_for_lwp): Fetch pid from thread.
8156 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8157 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8158 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8159 (dequeue_one_deferred_signal): Ditto.
8160 (cancel_breakpoint): Fetch ptid from current_inferior.
8161 (linux_wait_for_event): Pass &all_threads to find_inferior,
8162 not &all_lwps. Fetch ptid, lwpid from thread.
8163 (count_events_callback): Update, "entry" parameter is a
8164 struct thread_info * now.
8165 (select_singlestep_lwp_callback): Ditto.
8166 (select_event_lwp_callback): Ditto.
8167 (cancel_breakpoints_callback): Ditto.
8168 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8169 not &all_lwps.
8170 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8171 (unsuspend_one_lwp): Update, "entry" parameter is a
8172 struct thread_info * now.
8173 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8174 not &all_lwps.
8175 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8176 Fetch lwpid from thread, not lwp.
8177 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8178 Pass &all_threads to find_inferior, not &all_lwps.
8179 (send_sigstop): Fetch lwpid from thread, not lwp.
8180 (send_sigstop_callback): Update, "entry" parameter is a
8181 struct thread_info * now.
8182 (suspend_and_send_sigstop_callback): Ditto.
8183 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8184 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8185 struct thread_info * now.
8186 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8187 from thread, lwp.
8188 (lwp_running): Update, "entry" parameter is a
8189 struct thread_info * now.
8190 (stop_all_lwps): Fetch ptid from thread.
8191 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8192 (linux_resume_one_lwp): Fetch lwpid from thread.
8193 (linux_set_resume_request): Update, "entry" parameter is a
8194 struct thread_info * now. Fetch pid, lwpid from thread.
8195 (resume_status_pending_p): Update, "entry" parameter is a
8196 struct thread_info * now.
8197 (need_step_over_p): Ditto. Fetch lwpid from thread.
8198 (start_step_over): Fetch lwpid from thread.
8199 (linux_resume_one_thread): Update, "entry" parameter is a
8200 struct thread_info * now. Fetch lwpid from thread.
8201 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8202 (proceed_one_lwp): Update, "entry" parameter is a
8203 struct thread_info * now. Fetch lwpid from thread.
8204 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8205 struct thread_info * now.
8206 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8207 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8208 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8209 directly.
8210 (regsets_store_inferior_registers): Ditto.
8211 (fetch_register, store_register): Ditto.
8212 (linux_read_memory, linux_write_memory): Ditto.
8213 (linux_request_interrupt): Ditto.
8214 (linux_read_auxv): Ditto.
8215 (linux_xfer_siginfo): Ditto.
8216 (linux_qxfer_spu): Ditto.
8217 (linux_qxfer_libraries_svr4): Ditto.
8218 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8219 moved to inferiors.h.
8220 (get_lwp): Delete.
8221 (get_thread_lwp): Update.
8222 (struct lwp_info): Delete member "entry". Simplify comment for
8223 member "thread".
8224 (all_lwps): Delete.
8225 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8226 current_inferior directly.
8227 (update_watch_registers_callback): Update, "entry" parameter is a
8228 struct thread_info * now. Fetch pid from thread.
8229 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8230 (mips_insert_point): Fetch lwpid from current_inferior.
8231 Pass &all_threads to find_inferior, not &all_lwps.
8232 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8233 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8234 directly.
8235 (mips_stopped_data_address): Ditto.
8236 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8237 directly.
8238 * linux-tile-low.c (tile_arch_setup): Ditto.
8239 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8240 (update_debug_registers_callback): Update, "entry" parameter is a
8241 struct thread_info * now. Fetch pid from thread.
8242 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8243 Pass &all_threads to find_inferior, not &all_lwps.
8244 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8245 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8246 Pass &all_threads to find_inferior, not &all_lwps.
8247 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8248 (i386_dr_low_get_status): Ditto.
8249 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8250 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8251 (x86_linux_read_description): Ditto.
8252 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8253
3b8361aa
DE
82542014-02-20 Doug Evans <dje@google.com>
8255
8256 * inferiors.c (get_first_inferior): Fix buglet.
8257
f7667f0d
DE
82582014-02-19 Doug Evans <dje@google.com>
8259
8260 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8261 * inferiors.c (add_thread): Change result type to struct thread_info *.
8262 All callers updated.
8263 (add_lwp): Call add_thread here instead of in callers.
8264 All callers updated.
8265 * linux-low.h (get_lwp_thread): Rewrite.
8266 (struct lwp_info): New member "thread".
8267
b3312d80
DE
82682014-02-19 Doug Evans <dje@google.com>
8269
8270 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8271 All callers updated.
8272
ecc6f45c
DE
82732014-02-19 Doug Evans <dje@google.com>
8274
8275 * inferiors.c (add_thread): Fix whitespace.
8276
649ebbca
DE
82772014-02-19 Doug Evans <dje@google.com>
8278
8279 * dll.c (clear_dlls): Replace accessing list implemention details
8280 with API function.
8281 * gdbthread.h (get_first_thread): Declare.
8282 * inferiors.c (for_each_inferior_with_data): New function.
8283 (get_first_thread): New function.
8284 (find_thread_ptid): Simplify.
8285 (get_first_inferior): New function.
8286 (clear_list): Delete.
8287 (one_inferior_p): New function.
8288 (clear_inferior_list): New function.
8289 (clear_inferiors): Update.
8290 * inferiors.h (for_each_inferior_with_data): Declare.
8291 (clear_inferior_list): Declare.
8292 (one_inferior_p): Declare.
8293 (get_first_inferior): Declare.
8294 * linux-low.c (linux_wait_for_event): Replace accessing list
8295 implemention details with API function.
8296 * server.c (target_running): Ditto.
8297 (accumulate_file_name_length): New function.
8298 (emit_dll_description): New function.
8299 (handle_qxfer_libraries): Replace accessing list implemention
8300 details with API function.
8301 (handle_qxfer_threads_worker): New function.
8302 (handle_qxfer_threads_proper): Replace accessing list implemention
8303 details with API function.
8304 (handle_query): Ditto.
8305 (visit_actioned_threads_callback_ftype): New typedef.
8306 (visit_actioned_threads_data): New struct.
8307 (visit_actioned_threads): Rewrite to be find_inferior callback.
8308 (resume): Call find_inferior.
8309 (handle_status): Replace accessing list implemention
8310 details with API function.
8311 (process_serial_event): Replace accessing list implemention details
8312 with API function.
8313 * target.c (set_desired_inferior): Replace accessing list implemention
8314 details with API function.
8315 * tracepoint.c (same_process_p): New function.
8316 (gdb_agent_about_to_close): Replace accessing list implemention
8317 details with API function.
8318 * win32-low.c (child_delete_thread): Replace accessing list
8319 implemention details with API function.
8320 (match_dll_by_basename): New function.
8321 (dll_is_loaded_by_basename): New function.
8322 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8323 details call to dll_is_loaded_by_basename.
8324
80894984
DE
83252014-02-19 Doug Evans <dje@google.com>
8326
8327 * dll.h (struct dll_info): Add comment.
8328 * gdbthread.h (struct thread_info): Add comment.
8329 (current_ptid): Simplify.
8330 * inferiors.c (add_process): Update.
8331 (remove_process): Update.
8332 * inferiors.h (struct process_info): Rename member "head" to "entry".
8333 * linux-low.c (delete_lwp): Update.
8334 (add_lwp): Update.
8335 (last_thread_of_process_p): Update.
8336 (kill_one_lwp_callback, linux_kill): Update.
8337 (status_pending_p_callback): Update.
8338 (wait_for_sigstop): Update. Simplify read of ptid.
8339 (start_step_over): Update.
8340 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8341 (get_lwp_thread): Update.
8342 (struct lwp_info): Rename member "head" to "entry".
8343 * regcache.h (inferior_list_entry): Delete.
8344 * server.c (kill_inferior_callback): Update.
8345 (detach_or_kill_inferior_callback): Update.
8346 (print_started_pid): Update.
8347 (print_attached_pid): Update.
8348 (process_serial_event): Simplify read of ptid.
8349 * thread-db.c (thread_db_create_event): Update.
8350 (thread_db_get_tls_address): Update.
8351 * win32-low.c (current_inferior_ptid): Simplify.
8352
46917d26
TT
83532014-02-19 Tom Tromey <tromey@redhat.com>
8354
8355 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8356 argument.
8357 (target_supports_btrace): Update.
8358
0759a81e
YQ
83592014-02-14 Yao Qi <yao@codesourcery.com>
8360
8361 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8362 (rsp-low-ipa.o): New target.
8363
a7191e8b
TT
83642014-02-12 Tom Tromey <tromey@redhat.com>
8365
8366 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8367 convert_ascii_to_int.
8368 * regcache.c (registers_to_string): Likewise.
8369 * remote-utils.c (decode_M_packet): Likewise.
8370 * server.c (process_serial_event): Likewise.
8371
ff0e980e
TT
83722014-02-12 Tom Tromey <tromey@redhat.com>
8373
8374 * server.c (handle_query, handle_v_run): Use hex2bin, not
8375 unhexify.
8376 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8377
e9371aff
TT
83782014-02-12 Tom Tromey <tromey@redhat.com>
8379
8380 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8381 convert_int_to_ascii.
8382 * regcache.c (registers_to_string, collect_register_as_string):
8383 Likewise.
8384 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8385 Likewise.
8386 * server.c (process_serial_event): Likewise.
8387 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8388 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8389
971dc0b8
TT
83902014-02-12 Tom Tromey <tromey@redhat.com>
8391
8392 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8393 bin2hex, not hexify.
8394 * tracepoint.c (cmd_qtstatus): Likewise.
8395
0a822afb
TT
83962014-02-12 Tom Tromey <tromey@redhat.com>
8397
8398 * remote-utils.c (monitor_output): Pass explicit length to
8399 hexify.
8400
9c3d6531
TT
84012014-02-12 Tom Tromey <tromey@redhat.com>
8402
8403 * tracepoint.c: Include rsp-low.h.
8404 * server.c: Include rsp-low.h.
8405 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8406 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8407 declare.
8408 * remote-utils.c: Include rsp-low.h.
8409 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8410 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8411 (convert_int_to_ascii, convert_ascii_to_int): Move to
8412 common/rsp-low.c.
8413 * regcache.c: Include rsp-low.h.
8414 * ax.c: Include rsp-low.h.
8415 * Makefile.in (SFILES): Add common/rsp-low.c.
8416 (OBS): Add rsp-low.o.
8417 (rsp-low.o): New target.
8418
01fd3ea5
TT
84192014-02-12 Tom Tromey <tromey@redhat.com>
8420
8421 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8422 Include print-utils.h.
8423 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8424 (plongest, thirty_two, phex_nz): Remove.
8425 * Makefile.in (SFILES): Add common/print-utils.c.
8426 (OBS): Add print-utils.o.
8427 (print-utils-ipa.o): New target.
8428 (print-utils.o): New target.
8429 (IPA_OBJS): Add print-utils-ipa.o.
8430
e99dc820
TT
84312014-02-06 Tom Tromey <tromey@redhat.com>
8432
8433 * Makefile.in (SFILES): Fix indentation.
8434
ee1e2d4f
DE
84352014-02-05 Doug Evans <dje@google.com>
8436
8437 * linux-low.c (linux_wait_for_event): Improve comment.
8438 (linux_wait_1): Keep current_inferior in sync with event_child.
8439
f5a02773
DE
84402014-01-22 Doug Evans <dje@google.com>
8441
8442 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8443
87ce2a04
DE
84442014-01-22 Doug Evans <dje@google.com>
8445
8446 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8447 * configure: Regenerate.
8448 * config.in: Regenerate.
8449 * Makefile.in (SFILES): Add debug.c.
8450 (OBS): Add debug.o.
8451 * debug.c: New file.
8452 * debug.h: New file.
8453 * linux-aarch64-low.c (*): Update all debugging printfs to use
8454 debug_printf instead of fprintf.
8455 * linux-arm-low.c (*): Ditto.
8456 * linux-cris-low.c (*): Ditto.
8457 * linux-crisv32-low.c (*): Ditto.
8458 * linux-m32r-low.c (*): Ditto.
8459 * linux-sparc-low.c (*): Ditto.
8460 * linux-x86.c (*): Ditto.
8461 * linux-low.c (*): Ditto.
8462 (linux_wait_1): Add calls to debug_enter, debug_exit.
8463 (linux_wait): Remove redundant debugging printf.
8464 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8465 (linux_resume, unstop_all_lwps): Ditto.
8466 * mem-break.c (*): Update all debugging printfs to use
8467 debug_printf instead of fprintf.
8468 * remote-utils.c (*): Ditto.
8469 * thread-db.c (*): Ditto.
8470 * server.c #include <ctype.h>, "gdb_vecs.h".
8471 (debug_threads): Moved to debug.c.
8472 (*): Update all debugging printfs to use debug_printf instead of
8473 fprintf.
8474 (start_inferior): Replace call to fflush with call to debug_flush.
8475 (monitor_show_help): Mention set debug-format.
8476 (parse_debug_format_options): New function.
8477 (handle_monitor_command): Handle "monitor set debug-format".
8478 (gdbserver_usage): Mention --debug-format.
8479 (main): Parse --debug-format.
8480 * server.h (debug_threads): Declaration moved to debug.h.
8481 #include "debug.h".
8482 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8483 trace_debug_1 that uses debug_printf.
8484 (tracepoint_look_up_symbols): Update all debugging printfs to use
8485 debug_printf instead of fprintf.
8486
e671835b
BS
84872014-01-20 Baruch Siach <baruch@tkos.co.il>
8488
8489 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8490 sys/ptrace.h.
8491
b5737fa9
PA
84922014-01-17 Pedro Alves <palves@redhat.com>
8493
ea38d2a9 8494 PR build/16445
c7faa97a
PA
8495 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8496 defined after including gdb_proc_service.h.
b5737fa9 8497
40ed484e
DE
84982014-01-16 Doug Evans <dje@google.com>
8499
8500 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8501 (match_dll): Use it.
8502
969c39fb
MM
85032014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8504
8505 * target.h (target_ops) <read_btrace>: Change parameters and
8506 return type to allow error reporting.
8507 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8508 trace reading errors on.
8509 * linux-low.c (linux_low_read_btrace): Pass trace reading
8510 errors on.
8511 (linux_low_disable_btrace): New.
8512
ab7f45ba
DE
85132014-01-15 Doug Evans <dje@google.com>
8514
8515 * inferiors.c (thread_id_to_gdb_id): Delete.
8516 * inferiors.h (thread_id_to_gdb_id): Delete.
8517
66af0f44
EZ
85182014-01-13 Eli Zaretskii <eliz@gnu.org>
8519
8520 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8521 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8522 versions.
8523
9939e131
PA
85242014-01-08 Pedro Alves <palves@redhat.com>
8525
8526 * server.c (handle_status): Don't discard previous queued stop
8527 replies or thread's pending status here.
8528 (main) <disconnection>: Do it here instead.
8529
b7ea362b
PA
85302014-01-08 Pedro Alves <palves@redhat.com>
8531
8532 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8533 * server.c (visit_actioned_threads, handle_pending_status): New
8534 function.
8535 (handle_v_cont): Factor out parts to ...
8536 (resume): ... this new function. If in all-stop, and a thread
8537 being resumed has a pending status, report it without actually
8538 resuming.
8539 (myresume): Adjust to use the new 'resume' function.
8540 (clear_pending_status_callback, set_pending_status_callback)
8541 (find_status_pending_thread_callback): New functions.
8542 (handle_status): Handle the case of multiple threads having
8543 interesting statuses to report. Report threads' real last signal
8544 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8545 with an interesting thread to report the status for, instead of
8546 always reporting the status of the first thread.
8547
28498c42
JB
85482014-01-01 Joel Brobecker <brobecker@adacore.com>
8549
8550 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8551 * gdbreplay.c (gdbreplay_version): Likewise.
8552
f45c82da
YZ
85532013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8554
8555 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8556 iov.iov_len with the real length in use.
8557
379a5e2d
JB
85582013-12-13 Joel Brobecker <brobecker@adacore.com>
8559
8560 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8561 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8562 for all targets that use win32-low.c.
8563 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8564 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8565
4210d83e
PA
85662013-12-13 Pedro Alves <palves@redhat.com>
8567
8568 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8569 if equal to TARGET_WAITKIND_LOADED.
8570 * win32-low.c (cached_status): New static global.
8571 (win32_wait): Add declaration.
8572 (do_initial_child_stuff): Flush all initial pending debug events
8573 up to the initial breakpoint.
8574 (win32_wait): If CACHED_STATUS was set, return that instead
8575 of doing a real wait. Remove the code resuming the execution
8576 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8577 during the initial phase. Also remove the code changing
8578 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8579 TARGET_WAITKIND_STOPPED.
8580
e7f0d979
YQ
85812013-12-11 Yao Qi <yao@codesourcery.com>
8582
8583 * notif.c (handle_notif_ack): Return 0 if no notification
8584 matches.
8585
ebcf782c
DE
85862013-11-20 Doug Evans <dje@google.com>
8587
8588 * linux-low.c (linux_set_resume_request): Fix comment.
8589
20ad9378
DE
85902013-11-20 Doug Evans <dje@google.com>
8591
8592 * linux-low.c (resume_status_pending_p): Tweak comment.
8593
a196ebeb
WT
85942013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8595
8596 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8597 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8598 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8599 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8600 (srv_amd64_regobj): Add amd64-mpx.o.
8601 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8602 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8603 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8604 * i387-fp.c (num_pl_bnd_register) Added constant.
8605 (num_pl_bnd_cfg_registers) Added constant.
8606 (struct i387_xsave) Added reserved area and MPX fields.
8607 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8608 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8609 function.
8610 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8611 (init_registers_amd64_mpx_linux): Declare new function.
8612 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8613 (x86_64_regmap): Add MPX registers.
8614 (x86_linux_read_description): Add MPX case.
8615 (initialize_low_arch): Initialize MPX targets.
8616
0080a2f6
TT
86172013-11-18 Tom Tromey <tromey@redhat.com>
8618
8619 * configure: Rebuild.
8620 * configure.ac: Don't check for stdlib.h.
8621 * gdbreplay.c: Unconditionally include stdlib.h.
8622
2978b111
TT
86232013-11-18 Tom Tromey <tromey@redhat.com>
8624
8625 * config.in: Rebuild.
8626 * configure: Rebuild.
8627 * configure.ac: Don't use AC_HEADER_DIRENT.
8628
a3d08894
TT
86292013-11-18 Tom Tromey <tromey@redhat.com>
8630
8631 * server.h: Don't check HAVE_STRING_H.
8632 * gdbreplay.c: Don't check HAVE_STRING_H.
8633 * configure: Rebuild.
8634
0a5dd17d
TT
86352013-11-18 Tom Tromey <tromey@redhat.com>
8636
8637 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8638 LIBGNU.
8639
1bd2f0ba
TT
86402013-11-08 Tom Tromey <tromey@redhat.com>
8641
8642 * configure, config.in: Rebuild.
8643 * configure.ac: Remove unused configury.
8644
3266f10b
TT
86452013-11-08 Tom Tromey <tromey@redhat.com>
8646
8647 * acinclude.m4: Include common.m4, codeset.m4.
8648 * configure, config.in: Rebuild.
8649 * configure.ac: Use GDB_AC_COMMON.
8650
6682d959
AA
86512013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8652
8653 * linux-s390-low.c (HWCAP_S390_TE): New define.
8654 (s390_arch_setup): Consider the TE field in the HWCAP for
8655 determining 'have_regset_tdb'.
8656
fd0a4d76
SDJ
86572013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8658
8659 PR gdb/16014
8660 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8661 call to sizeof.
8662
1a3d890b
PA
86632013-10-02 Pedro Alves <palves@redhat.com>
8664
8665 * server.c (process_serial_event): Don't output "GDBserver
8666 exiting" if GDB is connected through stdio.
8667 * target.c (mywait): Likewise, be silent if GDB is connected
8668 through stdio.
8669
97ad4581
JB
86702013-10-01 Joel Brobecker <brobecker@adacore.com>
8671
8672 * lynx-low.c (lynx_add_threads_after_attach): New function.
8673 (lynx_attach): Remove call to add_thread. Add call to
8674 lynx_add_threads_after_attach instead.
8675
5b4e221c
MF
86762013-09-28 Mike Frysinger <vapier@gentoo.org>
8677
8678 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8679 * config.in, configure: Regenerated.
8680
ee47b2f8
YQ
86812013-09-18 Yao Qi <yao@codesourcery.com>
8682
8683 PR server/15959
8684 * server.c (start_inferior): Clear 'resume_info'.
8685
d6707650 86862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8687
d6707650
JW
8688 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8689 for each register.
8690
9243dd0e 86912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8692
9243dd0e
JW
8693 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8694 linux-tile-low.o to srv_tgtobj.
8695
c623a6ef
WN
86962013-09-16 Will Newton <will.newton@linaro.org>
8697
8698 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8699 out regs.
8700
fb71d39e
PA
87012013-09-06 Pedro Alves <palves@redhat.com>
8702
8703 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8704 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8705 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8706 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8707 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8708 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8709
8e7e9910
PA
87102013-09-06 Pedro Alves <palves@redhat.com>
8711
8712 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8713 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8714
7c3a12ca
PA
87152013-09-06 Pedro Alves <palves@redhat.com>
8716
8717 * linux-amd64-ipa.c: Include tracepoint.h.
8718 * linux-i386-ipa.c: Include tracepoint.h.
8719
8eb3d7b6
RW
87202013-09-06 Ricard Wanderlof <ricardw@axis.com>
8721
8722 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8723 (ps_get_thread_area): New function.
8724
eddddb9d
RW
87252013-09-06 Ricard Wanderlof <ricardw@axis.com>
8726
8727 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8728 (initialize_low_arch): Call init_registers_crisv32 rather than
8729 init_register_crisv32.
8730
533b0600
PA
87312013-09-05 Pedro Alves <palves@redhat.com>
8732
8733 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8734 to ...
8735 * hostio.h: ... this new file.
8736 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8737 win32-low.c: Include hostio.h.
8738
0ce3d3b5
PA
87392013-09-05 Pedro Alves <palves@redhat.com>
8740
8741 * server.h (gdb_client_data, handler_func, callback_handler_func)
8742 (delete_file_handler, add_file_handler, append_callback_event)
8743 (delete_callback_event, start_event_loop, initialize_event_loop):
8744 Move to event-loop.h and include it.
8745 * event-loop.h: New file.
8746
799cdc37
PA
87472013-09-05 Pedro Alves <palves@redhat.com>
8748
8749 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8750 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8751 (loaded_dll, unloaded_dll): Move to ...
8752 * dll.h: ... this new file.
8753 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8754
6a6bbd9d
PA
87552013-09-05 Pedro Alves <palves@redhat.com>
8756
8757 * server.h (current_process, get_thread_process, all_processes)
8758 (add_inferior_to_list, for_each_inferior, current_inferior)
8759 (remove_inferior, add_process, remove_process, find_process_pid)
8760 (have_started_inferiors_p, have_attached_inferiors_p)
8761 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8762 (clear_inferiors, find_inferior, find_inferior_id)
8763 (inferior_target_data, set_inferior_target_data)
8764 (inferior_regcache_data, set_inferior_regcache_data): Move to
8765 inferiors.h, and include it.
8766 * inferiors.h: New file.
8767
f699aaba
PA
87682013-09-05 Pedro Alves <palves@redhat.com>
8769
8770 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8771 Move ...
72f4393d 8772 * ax.h: ... here.
f699aaba 8773
c144c7a0
PA
87742013-09-05 Pedro Alves <palves@redhat.com>
8775
8776 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8777 tracepoint.h.
8778 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8779 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8780 (handle_tracepoint_general_set, handle_tracepoint_query)
8781 (tracepoint_finished_step, tracepoint_was_hit)
8782 (release_while_stepping_state_list, current_traceframe)
8783 (in_readonly_region, traceframe_read_mem)
8784 (fetch_traceframe_registers, traceframe_read_sdata)
8785 (traceframe_read_info, struct fast_tpoint_collect_status)
8786 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8787 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8788 (supply_fast_tracepoint_registers)
8789 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8790 (ipa_tdesc, claim_trampoline_space)
8791 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8792 (agent_mem_read, agent_get_trace_state_variable_value)
8793 (agent_set_trace_state_variable_value, agent_tsv_read)
8794 (agent_mem_read_string, get_raw_reg_func_addr)
8795 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8796 * tracepoint.h: ... this new file.
8797
ff42e6ab
PA
87982013-09-05 Pedro Alves <palves@redhat.com>
8799
8800 * server.h (perror_with_name, error, fatal, warning, paddress)
8801 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8802 include it.
8803 * utils.h: New file.
8804
541af0f4
PA
88052013-09-05 Pedro Alves <palves@redhat.com>
8806
8807 * server.h (remote_debug, noack_mode, transport_is_reliable)
8808 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8809 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8810 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8811 (write_enn, initialize_async_io, enable_async_io)
8812 (disable_async_io, check_remote_input_interrupt_request)
8813 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8814 (dead_thread_notify, prepare_resume_reply)
8815 (decode_address_to_semicolon, decode_address, decode_m_packet)
8816 (decode_M_packet, decode_X_packet, decode_xfer_write)
8817 (decode_search_memory_packet, unhexify, hexify)
8818 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8819 (look_up_one_symbol, relocate_instruction)
8820 (monitor_output): Move to remote-utils.h, and include it.
8821 * remote-utils.h: New file.
8822
eebdf26b
PA
88232013-09-05 Pedro Alves <palves@redhat.com>
8824
8825 * server.h (_): Delete.
8826
3aafd2ff
PA
88272013-09-02 Pedro Alves <palves@redhat.com>
8828
8829 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8830 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8831 allocated.
8832 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8833
cee83bcb
PM
88342013-09-02 Pierre Muller <muller@sourceware.org>
8835
8836 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8837 or WriteProcessMemory complete successfully and handle
8838 ERROR_PARTIAL_COPY error.
8839
9a13b2fa
PA
88402013-09-02 Pedro Alves <palves@redhat.com>
8841
8842 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8843 error instead of EIO.
8844
602e3198
JK
88452013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8846
8847 PR server/15604
8848 * linux-low.c: Include filestuff.h.
8849 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8850 * lynx-low.c: Include filestuff.h.
8851 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8852 * server.c: Include filestuff.h.
8853 (main): Call notice_open_fds.
8854 * spu-low.c: Include filestuff.h.
8855 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8856
96d7229d
LM
88572013-08-22 Luis Machado <lgustavo@codesourcery.com>
8858
8859 * Makefile.in: Explain why ../target and ../nat are not
8860 listed as include file search paths.
8861 (linux-waitpid.o): New object file rule.
8862 * configure.srv (srv_native_linux_obj): New variable.
8863 Replace all occurrences of linux native object files with
8864 $srv_native_linux_obj.
8865 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8866 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8867 (linux_enable_event_reporting): Remove declaration.
8868 (my_waitpid): Moved to common/linux-waitpid.c.
8869 (linux_wait_for_event): Pass ptid when calling
8870 linux_enable_event_reporting.
8871 (linux_supports_tracefork_flag): Remove.
8872 (linux_enable_event_reporting): Likewise.
8873 (linux_tracefork_grandchild): Remove.
8874 (STACK_SIZE): Moved to common/linux-ptrace.c.
8875 (linux_tracefork_child): Remove.
8876 (linux_test_for_tracefork): Remove.
8877 (linux_look_up_symbols): Call linux_supports_traceclone.
8878 (initialize_low): Remove call to linux_test_for_tracefork.
8879 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8880 common/linux-ptrace.h.
8881 (PTRACE_TYPE_ARG4): Likewise.
8882 Include linux-ptrace.h.
8883
32940073
PA
88842013-08-21 Pedro Alves <palves@redhat.com>
8885
8886 * config.in: Renegerate.
8887
33b60d58 88882013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8889
33b60d58
LM
8890 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8891 (SFILES): Remove $(srcdir)/common/target-common.c and
8892 add $(srcdir)/target/waitstatus.c.
8893 (OBS): Remove target-common.o and add waitstatus.o.
8894 (server_h): Remove $(srcdir)/../common/target-common.h and
8895 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8896 and $(srcdir)/../target/waitstatus.h.
8897 (target-common.o): Remove.
8898 (waitstatus.o): New target object file.
8899 * target.h: Do not include target-common.h and
8900 include target/resume.h, target/wait.h and
8901 target/waitstatus.h.
8902
b8e1b30e
LM
89032013-08-13 Luis Machado <lgustavo@codesourcery.com>
8904
8905 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8906 to PTRACE_TYPE_ARG3.
8907 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8908 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8909 PTRACE_TYPE_ARG4.
8910 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8911 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8912
7a60ad40
YQ
89132013-07-27 Jie Zhang <jie@codesourcery.com>
8914 Daniel Jacobowitz <dan@codesourcery.com>
8915 Yao Qi <yao@codesourcery.com>
8916
8917 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8918 (mips-linux-watch.o): New rule.
8919 (mips_linux_watch_h): New variable.
8920 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8921 srv_tgtobj.
8922 * linux-mips-low.c: Include mips-linux-watch.h.
8923 (struct arch_process_info, struct arch_lwp_info): New.
8924 (update_watch_registers_callback): New function.
8925 (mips_linux_new_process, mips_linux_new_thread) New functions.
8926 (mips_linux_prepare_to_resume, mips_insert_point): New
8927 functions.
8928 (mips_remove_point, mips_stopped_by_watchpoint): New
8929 functions.
8930 (rsp_bp_type_to_target_hw_bp_type): New function.
8931 (mips_stopped_data_address): New function.
8932 (the_low_target): Add watchpoint support functions.
8933
de6f69ad
YQ
89342013-07-27 Yao Qi <yao@codesourcery.com>
8935
8936 * i386-low.c: Include break-common.h.
8937 (enum target_hw_bp_type): Remove.
8938
3360c0bf
LM
89392013-07-24 Luis Machado <lgustavo@codesourcery.com>
8940
8941 * Makefile.in (SFILES): /common/target-common.c.
8942 (OBS): Add target-common.o.
8943 (server_h): Add $(srcdir)/../common/target-common.h.
8944 (target-common.o): New target.
8945 * server.c (queue_stop_reply_callback): Free
8946 status string after use.
8947 * target.c (target_waitstatus_to_string): Remove.
8948 * target.h: Include target-common.h.
8949 (resume_kind): Likewise.
8950 (target_waitkind): Likewise.
8951 (target_waitstatus): Likewise.
8952 (TARGET_WNOHANG): Likewise.
8953
bd885420
YQ
89542013-07-04 Yao Qi <yao@codesourcery.com>
8955
8956 * Makefile.in (host_alias): Use @host_noncanonical@.
8957 (target_alias): Use @target_noncanonical@.
8958 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8959 ACX_NONCANONICAL_HOST.
8960 * configure: Regenerated.
8961
8962 Revert:
8963 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8964
8965 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8966 * configure: Rebuild.
8967 * Makefile.in (version_host, version_target): Get from configure.
8968 (version.c): Use $(version_host) and $(version_target).
8969
17ef446e
PA
89702013-07-03 Pedro Alves <palves@redhat.com>
8971
8972 * Makefile.in (config.status): Depend on development.sh.
8973 * acinclude.m4: Include libmcheck.m4.
8974 * configure: Regenerate.
8975
7a9a7487
MG
89762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8977
8978 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8979 attribute inside the parentheses.
8980 (winapi_DebugSetProcessKillOnExit): Ditto.
8981 (winapi_DebugBreakProcess): Ditto.
8982 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 8983
49b64de6
MG
89842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8985
8986 * notif.h (notif_event): Add a dummy member to avoid compiler
8987 errors.
8988
d5749ee7
PA
89892013-07-01 Pedro Alves <palves@redhat.com>
8990
8991 * hostio.c (HOSTIO_PATH_MAX): Define.
8992 (require_filename, handle_open, handle_unlink, handle_readlink):
8993 Use it.
8994
d8d2a3ee
PA
89952013-07-01 Pedro Alves <palves@redhat.com>
8996
8997 * server.h: Include "pathmax.h".
8998 * linux-low.c: Don't include sys/param.h.
8999 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9000 MAXPATHLEN.
9001 * win32-low.c: Don't include sys/param.h.
9002 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9003
bc7dea8d
PA
90042013-07-01 Pedro Alves <palves@redhat.com>
9005
9006 * event-loop.c: Don't check HAVE_UNISTD_H before including
9007 <unistd.h>.
9008 * gdbreplay.c: Likewise.
9009 * remote-utils.c: Likewise.
9010 * server.c: Likewise.
9011 * configure.ac: Don't check for unistd.h.
9012 * configure: Regenerate.
9013
d6c2da54
TT
90142013-06-28 Tom Tromey <tromey@redhat.com>
9015
9016 * Makefile.in (version.c): Use version.in, not
9017 common/version.in.
9018
257b6bec
MG
90192013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9020
9021 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9022 * configure: Rebuild.
9023 * Makefile.in (version_host, version_target): Get from configure.
9024 (version.c): Use $(version_host) and $(version_target).
9025
86ebe149
DK
90262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9027
9028 Fix trace-status to output user name without trailing colon.
9029 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9030
f30aa5af
DK
90312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9032
9033 Fix trace-status to output proper start-time and stop-time.
9034 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9035 output start time and stop time in hex as gdb expects.
9036
28a93511
YQ
90372013-06-26 Pedro Alves <pedro@codesourcery.com>
9038
9039 * tracepoint.c (build_traceframe_info_xml): Output trace state
9040 variables present in the trace buffer.
9041
01208463
TT
90422013-06-24 Tom Tromey <tromey@redhat.com>
9043
9044 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9045 create-version.sh.
9046 (version.o): Remove.
9047 * gdbreplay.c: Include version.h.
9048 (version, host_name): Don't declare.
9049 * server.h: Include version.h.
9050 (version, host_name): Don't declare.
9051
760256f9
PA
90522013-06-12 Pedro Alves <palves@redhat.com>
9053
9054 * linux-x86-low.c (linux_is_elf64): Delete global.
9055 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9056 with local linux_pid_exe_is_elf_64_file use.
9057
030031ee
PA
90582013-06-11 Pedro Alves <palves@redhat.com>
9059
9060 * linux-low.c (regset_disabled, disable_regset): New functions.
9061 (regsets_fetch_inferior_registers)
9062 (regsets_store_inferior_registers): Use them.
9063 (initialize_regsets_info); Don't allocate the disabled_regsets
9064 array here.
9065 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9066 comment.
9067
5da6eb0a
PA
90682013-06-11 Pedro Alves <palves@redhat.com>
9069
9070 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9071 xmalloc.
9072
7e5aaa09
PA
90732013-06-11 Pedro Alves <palves@redhat.com>
9074
9075 * linux-x86-low.c (initialize_low_arch): Call
9076 init_registers_x32_avx_linux.
9077
d878444c
JK
90782013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9079
9080 Fix compatibility with Android Bionic.
9081 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9082 it is not empty.
9083
3aee8918
PA
90842013-06-07 Pedro Alves <palves@redhat.com>
9085
5f2b57b5 9086 PR server/14823
3aee8918
PA
9087 * Makefile.in (OBS): Add tdesc.o.
9088 (IPA_OBJS): Add tdesc-ipa.o.
9089 (tdesc-ipa.o): New rule.
9090 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9091 interface.
9092 * linux-low.c (new_inferior): Delete.
9093 (disabled_regsets, num_regsets): Delete.
9094 (linux_add_process): Adjust to set the new per-process
9095 new_inferior flag.
9096 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9097 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9098 was a stop. When calling arch_setup, switch the current inferior
9099 to the thread that got an event.
9100 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9101 (regsets_fetch_inferior_registers)
9102 (regsets_store_inferior_registers): New regsets_info parameter.
9103 Adjust to use it.
9104 (linux_register_in_regsets): New regs_info parameter. Adjust to
9105 use it.
9106 (register_addr, fetch_register, store_register): New usrregs_info
9107 parameter. Adjust to use it.
9108 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9109 parameter regs_info. Adjust to use it.
9110 (linux_fetch_registers): Get the current inferior's regs_info, and
9111 adjust to use it.
9112 (linux_store_registers): Ditto.
9113 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9114 (initialize_low): Don't initialize the target_regsets here. Call
9115 initialize_low_arch.
9116 * linux-low.h (target_regsets): Delete declaration.
9117 (struct regsets_info): New.
9118 (struct usrregs_info): New.
9119 (struct regs_info): New.
9120 (struct process_info_private) <new_inferior>: New field.
9121 (struct linux_target_ops): Delete the num_regs, regmap, and
9122 regset_bitmap fields. New field regs_info.
9123 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9124 * i387-fp.c (num_xmm_registers): Delete.
9125 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9126 calls to new interface.
9127 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9128 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9129 Infer the number of xmm registers from the regcache's target
9130 description.
9131 * i387-fp.h (num_xmm_registers): Delete.
9132 * inferiors.c (add_thread): Don't install the thread's regcache
9133 here.
9134 * proc-service.c (gregset_info): Fetch the current inferior's
9135 regs_info. Adjust to use it.
9136 * regcache.c: Include tdesc.h.
9137 (register_bytes, reg_defs, num_registers)
9138 (gdbserver_expedite_regs): Delete.
9139 (get_thread_regcache): If the thread doesn't have a regcache yet,
9140 create one, instead of aborting gdbserver.
9141 (regcache_invalidate_one): Rename to ...
9142 (regcache_invalidate_thread): ... this.
9143 (regcache_invalidate_one): New.
9144 (regcache_invalidate): Only invalidate registers of the current
9145 process.
9146 (init_register_cache): Add target_desc parameter, and use it.
9147 (new_register_cache): Ditto. Assert the target description has a
9148 non zero registers_size.
9149 (regcache_cpy): Add assertions. Adjust.
9150 (realloc_register_cache, set_register_cache): Delete.
9151 (registers_to_string, registers_from_string): Adjust.
9152 (find_register_by_name, find_regno, find_register_by_number)
9153 (register_cache_size): Add target_desc parameter, and use it.
9154 (free_register_cache_thread, free_register_cache_thread_one)
9155 (regcache_release, register_cache_size): New.
9156 (register_size): Add target_desc parameter, and use it.
9157 (register_data, supply_register, supply_register_zeroed)
9158 (supply_regblock, supply_register_by_name, collect_register)
9159 (collect_register_as_string, collect_register_by_name): Adjust.
9160 * regcache.h (struct target_desc): Forward declare.
9161 (struct regcache) <tdesc>: New field.
9162 (init_register_cache, new_register_cache): Add target_desc
9163 parameter.
9164 (regcache_invalidate_thread): Declare.
9165 (regcache_invalidate_one): Delete declaration.
9166 (regcache_release): Declare.
9167 (find_register_by_number, register_cache_size, register_size)
9168 (find_regno): Add target_desc parameter.
9169 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9170 declarations.
9171 * remote-utils.c: Include tdesc.h.
9172 (outreg, prepare_resume_reply): Adjust.
9173 * server.c: Include tdesc.h.
9174 (gdbserver_xmltarget): Delete declaration.
9175 (get_features_xml, process_serial_event): Adjust.
9176 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9177 declare.
9178 (struct process_info) <tdesc>: New field.
9179 (ipa_tdesc): Declare.
9180 * tdesc.c: New file.
9181 * tdesc.h: New file.
9182 * tracepoint.c: Include tdesc.h.
9183 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9184 (get_context_regcache): Adjust to pass ipa_tdesc down.
9185 (do_action_at_tracepoint): Adjust to get the register cache size
9186 from the context regcache's description.
9187 (traceframe_walk_blocks): Adjust to get the register cache size
9188 from the current trace frame's description.
9189 (traceframe_get_pc): Adjust to get current trace frame's
9190 description and pass it down.
9191 (gdb_collect): Adjust to get the register cache size from the
9192 IPA's description.
9193 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9194 (gdbserver_xmltarget): Delete.
9195 (initialize_low_tracepoint): Set the ipa's target description.
9196 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9197 (initialize_low_tracepoint): Set the ipa's target description.
9198 * linux-x86-low.c: Include tdesc.h.
9199 [__x86_64__] (is_64bit_tdesc): New.
9200 (ps_get_thread_area, x86_get_thread_area): Use it.
9201 (i386_cannot_store_register): Rename to ...
9202 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9203 (i386_cannot_fetch_register): Rename to ...
9204 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9205 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9206 to new interface.
9207 (target_regsets): Rename to ...
9208 (x86_regsets): ... this.
9209 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9210 interface.
9211 (x86_siginfo_fixup): Use is_64bit_tdesc.
9212 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9213 (tdesc_x32_avx_linux, tdesc_x32_linux)
9214 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9215 Declare.
9216 (x86_linux_update_xmltarget): Delete.
9217 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9218 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9219 (AMD64_LINUX_USER64_CS): New.
9220 (x86_linux_read_description): New, based on
9221 x86_linux_update_xmltarget.
9222 (same_process_callback): New.
9223 (x86_arch_setup_process_callback): New.
9224 (x86_linux_update_xmltarget): New.
9225 (x86_regsets_info): New.
9226 (amd64_linux_regs_info): New.
9227 (i386_linux_usrregs_info): New.
9228 (i386_linux_regs_info): New.
9229 (x86_linux_regs_info): New.
9230 (x86_arch_setup): Reimplement.
9231 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9232 (x86_emit_ops): Ditto.
9233 (the_low_target): Adjust. Install x86_linux_regs_info,
9234 x86_cannot_fetch_register, and x86_cannot_store_register.
9235 (initialize_low_arch): New.
9236 * linux-ia64-low.c (tdesc_ia64): Declare.
9237 (ia64_fetch_register): Adjust.
9238 (ia64_usrregs_info, regs_info): New globals.
9239 (ia64_regs_info): New function.
9240 (the_low_target): Adjust.
9241 (initialize_low_arch): New function.
9242 * linux-sparc-low.c (tdesc_sparc64): Declare.
9243 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9244 Adjust.
9245 (sparc_arch_setup): New function.
9246 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9247 (the_low_target): Adjust.
9248 (initialize_low_arch): New function.
9249 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9250 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9251 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9252 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9253 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9254 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9255 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9256 (tdesc_powerpc_isa205_vsx64l): Declare.
9257 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9258 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9259 (ppc_set_pc, ppc_get_hwcap): Adjust.
9260 (ppc_usrregs_info): Forward declare.
9261 (!__powerpc64__) ppc_regmap_adjusted: New global.
9262 (ppc_arch_setup): Adjust to the current process'es target
9263 description.
9264 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9265 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9266 (ppc_store_evrregset): Adjust.
9267 (target_regsets): Rename to ...
9268 (ppc_regsets): ... this, and make static.
9269 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9270 (ppc_regs_info): New function.
9271 (the_low_target): Adjust.
9272 (initialize_low_arch): New function.
9273 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9274 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9275 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9276 (tdesc_s390x_linux64v2): Declare.
9277 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9278 (s390_fill_gregset, s390_store_last_break): Adjust.
9279 (target_regsets): Rename to ...
9280 (s390_regsets): ... this, and make static.
9281 (s390_get_pc, s390_set_pc): Adjust.
9282 (s390_get_hwcap): New target_desc parameter, and use it.
9283 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9284 (s390_arch_setup): Adjust to set the current process'es target
9285 description. Don't adjust the regmap.
9286 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9287 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9288 (regs_info_3264): New globals.
9289 (s390_regs_info): New function.
9290 (the_low_target): Adjust.
9291 (initialize_low_arch): New function.
9292 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9293 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9294 [__mips64] (init_registers_mips_linux)
9295 (init_registers_mips_dsp_linux): Delete defines.
9296 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9297 (have_dsp): New global.
9298 (mips_read_description): New, based on mips_arch_setup.
9299 (mips_arch_setup): Reimplement.
9300 (get_usrregs_info): New function.
9301 (mips_cannot_fetch_register, mips_cannot_store_register)
9302 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9303 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9304 (target_regsets): Rename to ...
9305 (mips_regsets): ... this, and make static.
9306 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9307 (dsp_regs_info, regs_info): New globals.
9308 (mips_regs_info): New function.
9309 (the_low_target): Adjust.
9310 (initialize_low_arch): New function.
9311 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9312 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9313 Declare.
9314 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9315 (arm_read_description): New, with bits factored from
9316 arm_arch_setup.
9317 (arm_arch_setup): Reimplement.
9318 (target_regsets): Rename to ...
9319 (arm_regsets): ... this, and make static.
9320 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9321 (arm_regs_info): New function.
9322 (the_low_target): Adjust.
9323 (initialize_low_arch): New function.
9324 * linux-m68k-low.c (tdesc_m68k): Declare.
9325 (target_regsets): Rename to ...
9326 (m68k_regsets): ... this, and make static.
9327 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9328 (m68k_regs_info): New function.
9329 (m68k_arch_setup): New function.
9330 (the_low_target): Adjust.
9331 (initialize_low_arch): New function.
9332 * linux-sh-low.c (tdesc_sharch): Declare.
9333 (target_regsets): Rename to ...
9334 (sh_regsets): ... this, and make static.
9335 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9336 (sh_regs_info, sh_arch_setup): New functions.
9337 (the_low_target): Adjust.
9338 (initialize_low_arch): New function.
9339 * linux-bfin-low.c (tdesc_bfin): Declare.
9340 (bfin_arch_setup): New function.
9341 (bfin_usrregs_info, regs_info): New globals.
9342 (bfin_regs_info): New function.
9343 (the_low_target): Adjust.
9344 (initialize_low_arch): New function.
9345 * linux-cris-low.c (tdesc_cris): Declare.
9346 (cris_arch_setup): New function.
9347 (cris_usrregs_info, regs_info): New globals.
9348 (cris_regs_info): New function.
9349 (the_low_target): Adjust.
9350 (initialize_low_arch): New function.
9351 * linux-cris-low.c (tdesc_crisv32): Declare.
9352 (cris_arch_setup): New function.
9353 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9354 (cris_regs_info): New function.
9355 (the_low_target): Adjust.
9356 (initialize_low_arch): New function.
9357 * linux-m32r-low.c (tdesc_m32r): Declare.
9358 (m32r_arch_setup): New function.
9359 (m32r_usrregs_info, regs_info): New globals.
9360 (m32r_regs_info): Adjust.
9361 (initialize_low_arch): New function.
9362 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9363 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9364 (tic6x_usrregs_info): Forward declare.
9365 (tic6x_read_description): New function, based on ...
9366 (tic6x_arch_setup): ... this. Reimplement.
9367 (target_regsets): Rename to ...
9368 (tic6x_regsets): ... this, and make static.
9369 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9370 (tic6x_regs_info): New function.
9371 (the_low_target): Adjust.
9372 (initialize_low_arch): New function.
9373 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9374 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9375 (target_regsets): Rename to ...
9376 (xtensa_regsets): ... this, and make static.
9377 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9378 globals.
9379 (xtensa_arch_setup, xtensa_regs_info): New functions.
9380 (the_low_target): Adjust.
9381 (initialize_low_arch): New function.
9382 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9383 (nios2_arch_setup): Set the current process'es tdesc.
9384 (target_regsets): Rename to ...
9385 (nios2_regsets): ... this.
9386 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9387 (nios2_regs_info): New function.
9388 (the_low_target): Adjust.
9389 (initialize_low_arch): New function.
a261b8f5
PA
9390 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9391 (aarch64_arch_setup): Set the current process'es tdesc.
9392 (target_regsets): Rename to ...
9393 (aarch64_regsets): ... this.
9394 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9395 (aarch64_regs_info): New function.
9396 (the_low_target): Adjust.
9397 (initialize_low_arch): New function.
3aee8918
PA
9398 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9399 globals.
9400 (target_regsets): Rename to ...
9401 (tile_regsets): ... this.
9402 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9403 (tile_regs_info): New function.
9404 (tile_arch_setup): Set the current process'es tdesc.
9405 (the_low_target): Adjust.
9406 (initialize_low_arch): New function.
9407 * spu-low.c (tdesc_spu): Declare.
9408 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9409 * win32-arm-low.c (tdesc_arm): Declare.
9410 (arm_arch_setup): New function.
9411 (the_low_target): Install arm_arch_setup instead of
9412 init_registers_arm.
9413 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9414 (init_windows_x86): Rename to ...
9415 (i386_arch_setup): ... this. Set `win32_tdesc'.
9416 (the_low_target): Adjust.
9417 * win32-low.c (win32_tdesc): New global.
9418 (child_add_thread): Don't create the thread cache here.
9419 (do_initial_child_stuff): Set the new process'es tdesc.
9420 * win32-low.h (struct target_desc): Forward declare.
9421 (win32_tdesc): Declare.
9422 * lynx-i386-low.c (tdesc_i386): Declare global.
9423 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9424 * lynx-low.c (lynx_tdesc): New global.
9425 (lynx_add_process): Set the new process'es tdesc.
9426 * lynx-low.h (struct target_desc): Forward declare.
9427 (lynx_tdesc): Declare global.
9428 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9429 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9430 * nto-low.c (nto_tdesc): New global.
9431 (do_attach): Set the new process'es tdesc.
9432 * nto-low.h (struct target_desc): Forward declare.
9433 (nto_tdesc): Declare.
9434 * nto-x86-low.c (tdesc_i386): Declare.
9435 (nto_x86_arch_setup): Set `nto_tdesc'.
9436
b1fbec62
GB
94372013-06-04 Gary Benson <gbenson@redhat.com>
9438
9439 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9440 to qSupported response when appropriate.
9441 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9442 with nonzero-length annex.
9443 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9444 arguments supplied in annex.
9445
d1ec4ce7
DE
94462013-05-31 Doug Evans <dje@google.com>
9447
ac44adcb 9448 PR server/15594
d1ec4ce7
DE
9449 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9450 64 bits in 64-cross-32 environment.
9451
9b25f2d3
PA
94522013-05-28 Pedro Alves <palves@redhat.com>
9453
9454 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9455 (aarch64-without-fpu.c): Delete rule.
9456 * configure.srv (aarch64*-*-linux*): Remove references to
9457 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9458 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9459 declaration.
9460
6740dc9c
PA
94612013-05-24 Pedro Alves <palves@redhat.com>
9462
9463 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9464 instead of strchr/decode_address. Error if the range isn't split
9465 with a ','. Don't assume there's be a ':' in the action.
9466
c2d6af84
PA
94672013-05-23 Yao Qi <yao@codesourcery.com>
9468 Pedro Alves <palves@redhat.com>
9469
9470 * linux-low.c (lwp_in_step_range): New function.
9471 (linux_wait_1): If the thread was range stepping and stopped
9472 outside the stepping range, report the stop to GDB. Otherwise,
9473 continue stepping. Add range stepping debug output.
9474 (linux_set_resume_request): Copy the step range from the resume
9475 request to the lwp.
9476 (linux_supports_range_stepping): New.
9477 (linux_target_ops) <supports_range_stepping>: Set to
9478 linux_supports_range_stepping.
9479 * linux-low.h (struct linux_target_ops)
9480 <supports_range_stepping>: New field.
9481 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9482 * linux-x86-low.c (x86_supports_range_stepping): New.
9483 (the_low_target) <supports_range_stepping>: Set to
9484 x86_supports_range_stepping.
9485 * server.c (handle_v_cont): Handle 'r' action.
9486 (handle_v_requests): Append ";r" if the target supports range
9487 stepping.
9488 * target.h (struct thread_resume) <step_range_start,
9489 step_range_end>: New fields.
9490 (struct target_ops) <supports_range_stepping>:
9491 New field.
9492 (target_supports_range_stepping): New macro.
9493
58794e1a
JB
94942013-05-17 Joel Brobecker <brobecker@adacore.com>
9495
9496 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9497 confusion in comment.
9498
d631c5a7
JB
94992013-05-17 Joel Brobecker <brobecker@adacore.com>
9500
9501 * lynx-low.c (struct process_info_private): New type.
9502 (lynx_add_process): New function.
9503 (lynx_create_inferior, lynx_attach): Replace calls to
9504 add_process by calls to lynx_add_process.
9505 (lynx_resume): If PTID is null, then try using
9506 current_process()->private->last_wait_event_ptid.
9507 Add comments.
9508 (lynx_clear_inferiors): Delete. The contents of that function
9509 has been inlined in lynx_mourn;
9510 (lynx_wait_1): Save the ptid in the process's private data.
9511 (lynx_mourn): Free the process' private data. Replace call
9512 to lynx_clear_inferiors by call to clear_inferiors.
9513
96f7a20f
YQ
95142013-05-17 Yao Qi <yao@codesourcery.com>
9515
9516 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9517 the right place.
9518
db0dfaa0
LM
95192013-05-16 Luis Machado <lgustavo@codesourcery.com>
9520
9521 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9522 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9523 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9524 PT_TEXT_END_ADDR guards. Update comments.
9525 (linux_target_op) <read_offsets>: Conditionally define to
9526 linux_read_offsets if the target is UCLIBC and if it defines
9527 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9528
68f5f838
SL
95292013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9530 Andrew Jenner <andrew@codesourcery.com>
9531
9532 * Makefile.in (SFILES): Add linux-nios2-low.c.
9533 (clean): Add action to delete nios2-linux.c.
9534 (nios2-linux.c): New rule.
9535 * configure.srv: Add nios2*-*-linux*.
9536 * linux-nios2-low.c: New.
9537
1ebff1fd
HAQ
95382013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9539
9540 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9541
f6150862
HZ
95422013-04-25 Hui Zhu <hui@codesourcery.com>
9543
9544 PR gdb/15186
f6150862
HZ
9545 * ax.c (ax_printf): Add fflush.
9546
614c279d
TT
95472013-04-22 Tom Tromey <tromey@redhat.com>
9548
9549 * Makefile.in (SFILES): Add filestuff.c.
9550 (OBS): Add filestuff.o.
9551 (filestuff.o): New target.
9552 * config.in, configure: Rebuild.
9553 * configure.ac: Check for fdwalk, pipe2.
9554
7d4e5717
PA
95552013-04-17 Pedro Alves <palves@redhat.com>
9556
9557 * configure.ac (USE_THREAD_DB): Delete variable.
9558 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9559 Don't AC_SUBST USE_THREAD_DB.
9560 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9561 * config.in, configure: Regenerate.
9562
d5c93e41
PA
95632013-04-16 Pedro Alves <palves@redhat.com>
9564
9565 * linux-low.h (struct lwp_info) <thread_known>: Move under
9566 the USE_THREAD_DB #ifdef.
9567
04f5fe89
PA
95682013-04-16 Pedro Alves <palves@redhat.com>
9569
9570 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9571 (linux-low.o): Delete rule.
9572 * linux-low.h: Always include "gdb_thread_db.h" instead of
9573 conditionally including thread_db.h.
9574 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9575 HAVE_THREAD_DB_H.
9576
480b27bf
JK
95772013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9578
9579 * Makefile.in (install-only): Fix make install regression.
9580
43662968
JK
95812013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9582
9583 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9584 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9585 installation.
9586 * gdbserver.1: Remove.
9587
3e74e146
PA
95882013-03-22 Pedro Alves <palves@redhat.com>
9589
9590 * linux-low.c (handle_extended_wait): Don't call
9591 linux_enable_event_reporting.
9592
a8347a2a
TT
95932013-03-15 Tony Theodore <tonyt@logyst.com>
9594
9595 PR build/9098:
9596 * Makefile.in (SHELL): Use @SHELL@.
9597
eeb56fa7
SDJ
95982013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9599
9600 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9601 compiler warning.
9602
4fa7e2ff
JB
96032013-03-13 Joel Brobecker <brobecker@adacore.com>
9604
9605 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9606 Remove extraneous NULL element.
9607
8ddb1965
YQ
96082013-03-13 Yao Qi <yao@codesourcery.com>
9609
9610 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9611 'V' block in trace frame.
9612
9accd112
MM
96132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9614
9615 * target.h (struct target_ops): Add btrace ops.
9616 (target_supports_btrace): New macro.
9617 (target_enable_btrace): New macro.
9618 (target_disable_btrace): New macro.
9619 (target_read_btrace): New macro.
9620 * gdbthread.h (struct thread_info): Add btrace field.
9621 * server.c: Include btrace-common.h.
9622 (handle_btrace_general_set): New function.
9623 (handle_btrace_enable): New function.
9624 (handle_btrace_disable): New function.
9625 (handle_general_set): Call handle_btrace_general_set.
9626 (handle_qxfer_btrace): New function.
9627 (struct qxfer qxfer_packets[]): Add btrace entry.
9628 * inferiors.c (remove_thread): Disable btrace.
9629 * linux-low: Include linux-btrace.h.
9630 (linux_low_enable_btrace): New function.
9631 (linux_low_read_btrace): New function.
9632 (linux_target_ops): Add btrace ops.
9633 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9634 Add srv_linux_btrace=yes.
9635 (x86_64-*-linux*): Add linux-btrace.o.
9636 Add srv_linux_btrace=yes.
9637 * configure.ac: Define HAVE_LINUX_BTRACE.
9638 * config.in: Regenerated.
9639 * configure: Regenerated.
9640
5cc22e4c
MM
96412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9642
9643 * server.c (handle_qxfer): Preserve error message if -3 is
9644 returned.
9645 (qxfer): Document the -3 return value.
9646
7c97f91e
MM
96472013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9648
9649 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9650 (linux_btrace_h): New variable.
9651 (linux-btrace.o): New rule.
9652
be9a119c 96532013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9654 Hafiz Abid Qadeer <abidh@codesourcery.com>
9655
9656 * tracepoint.c (trace_buffer_size): New global.
9657 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9658 (init_trace_buffer): Change to one-argument function. Allocate
9659 trace buffer memory.
9660 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9661 handle QTBuffer:size packet.
9662 (cmd_bigqtbuffer_size): New function.
9663 (initialize_tracepoint): Call init_trace_buffer with
9664 DEFAULT_TRACE_BUFFER_SIZE.
9665 * server.c (handle_query): Add QTBuffer:size in the
9666 supported packets.
9667
e64f7499
YQ
96682013-03-07 Yao Qi <yao@codesourcery.com>
9669
9670 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9671 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9672 of -1.
9673 (cmd_qtsp): Adjust condition. Do post increment.
9674 Set cur_action and cur_step_action back to 0.
9675
f0ae6fc3
PA
96762013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9677
9678 PR server/15236
9679 * linux-low.c (linux_write_memory): Return early success if LEN is
9680 zero.
9681
b5b0b0af
CV
96822013-03-05 Corinna Vinschen <vinschen@redhat.de>
9683
334ad4a8 9684 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9685
589bc927
TT
96862013-02-28 Tom Tromey <tromey@redhat.com>
9687
9688 * configure.ac: Invoke AC_SYS_LARGEFILE.
9689 * configure, config.in: Rebuild.
9690
dfe07582
CV
96912013-02-28 Corinna Vinschen <vinschen@redhat.com>
9692
9693 * win32-low.c: Throughout, fix format strings and casts of
9694 printf-like functions to avoid type related warnings on all
9695 platforms.
9696 (get_child_debug_event): Print dwDebugEventCode as hex since
9697 that's how it's usually documented.
9698
736cd585
YQ
96992013-02-28 Yao Qi <yao@codesourcery.com>
9700
9701 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9702 pulongest.
9703
e1f58301
JW
97042013-02-27 Jiong Wang <jiwang@tilera.com>
9705
9706 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9707 (reg-tilegx32.c): New rule.
9708 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9709 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9710 different register info initializer according to elf class.
9711 (init_registers_tilgx32): New function. The tilegx32 register info
9712 initializer.
9713 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9714 (tile_store_gregset): Likewise.
9715
d171ca78
YQ
97162013-02-27 Yao Qi <yao@codesourcery.com>
9717
9718 * server.c (process_point_options): Print debug message when
9719 debug_threads is true.
9720
282bbdf3
YQ
97212013-02-26 Yao Qi <yao@codesourcery.com>
9722
9723 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9724
aca22551
PA
97252013-02-19 Pedro Alves <palves@redhat.com>
9726 Kai Tietz <ktietz@redhat.com>
9727
9728 PR gdb/15161
9729
9730 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9731 instead of strtoul to extract address from packet.
9732 (process_serial_event) <'z'>: Likewise.
9733
4f3cee1c
YQ
97342013-02-18 Yao Qi <yao@codesourcery.com>
9735
9736 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9737
8e1d55a3
PA
97382013-02-14 Pedro Alves <palves@redhat.com>
9739
9740 Plug memory leak.
9741
9742 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9743 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9744
458820da
PA
97452013-02-14 Pedro Alves <palves@redhat.com>
9746
9747 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9748
baea0dae
PA
97492013-02-14 Pedro Alves <palves@redhat.com>
9750
9751 * tracepoint.c (save_string): Delete.
9752 (add_tracepoint_action): Use savestring instead of save_string.
9753
0b1afbb3
PA
97542013-02-12 Pedro Alves <palves@redhat.com>
9755
9756 * linux-xtensa-low.c: Ditto.
9757 * xtensa-xtregs.c: Ditto.
9758
8a4ac37e
PA
97592013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9760
9761 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9762 thread_db.
9763
148de6bb
MS
97642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9765
9766 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9767 aarch64_num_wp_regs and aarch64_num_bp_regs to
9768 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9769
55fac6e0
MS
97702013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9771
9772 * linux-aarch64-low.c (ps_get_thread_area): Replace
9773 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9774
176eb98c
MS
97752013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9776 Marcus Shawcroft <marcus.shawcroft@arm.com>
9777 Nigel Stephens <nigel.stephens@arm.com>
9778 Yufeng Zhang <yufeng.zhang@arm.com>
9779
9780 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9781 (aarch64.c, aarch64-without-fpu.c): New targets.
9782 * configure.srv (aarch64*-*-linux*): New.
9783 * linux-aarch64-low.c: New file.
9784
56f7af9c
MS
97852013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9786
43aaf8b6 9787 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9788 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9789 (dequeue_one_deferred_signal, linux_resume_one_thread)
9790 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9791 (linux_tracefork_grandchild, linux_test_for_tracefork)
9792 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9793 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9794 where the argument is 0.
9795
60f662b0
YQ
97962013-01-25 Yao Qi <yao@codesourcery.com>
9797
9798 * event-loop.c: Include "queue.h".
9799 (gdb_event_p): New typedef.
9800 (struct gdb_event) <next_event>: Remove.
9801 (event_queue): Change to QUEUE(gdb_event_p).
9802 (async_queue_event): Remove.
9803 (gdb_event_xfree): New.
9804 (initialize_event_loop): New.
9805 (process_event): Use API from QUEUE.
9806 (wait_for_event): Likewise.
9807 * server.c (main): Call initialize_event_loop.
9808 * server.h (initialize_event_loop): Declare.
9809
5ae4861a
YQ
98102013-01-18 Yao Qi <yao@codesourcery.com>
9811
9812 * ax.h (struct eval_agent_expr_context): New.
9813 (gdb_eval_agent_expr): Update declaration.
9814 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9815 TFRAME. Add new argument CTX.
9816 * server.h (struct eval_agent_expr_context): Declare.
9817 (agent_mem_read, agent_tsv_read): Update declaration.
9818 (agent_mem_read_string): Likewise.
9819 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9820 (add_traceframe_block): Add new argument TPOINT.
9821 Increase TPOINT->traceframe_usage.
9822 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9823 eval_tracepoint_agent_expr.
9824 (condition_true_at_tracepoint): Likewise.
9825 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9826 (agent_mem_read_string, agent_tsv_read): Likewise.
9827
85e00e85
YQ
98282013-01-16 Yao Qi <yao@codesourcery.com>
9829
9830 * linux-low.c (linux_resume_one_lwp): Don't check
9831 'lwp->bp_reinsert != 0'.
9832
4039cf45
JB
98332013-01-07 Joel Brobecker <brobecker@adacore.com>
9834 Pedro Alves <palves@redhat.com>
9835
9836 * lynx-low.c (ptrace_request_to_str): Define a temporary
9837 macro and use it to simplify this function's implementation.
9838
9044dee2
JB
98392013-01-07 Joel Brobecker <brobecker@adacore.com>
9840
9841 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9842 sets errno.
9843
e6352c8f
JB
98442013-01-07 Joel Brobecker <brobecker@adacore.com>
9845
9846 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9847
50681a27
JB
98482013-01-07 Joel Brobecker <brobecker@adacore.com>
9849
9850 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9851
3f6e77ef
JB
98522013-01-07 Joel Brobecker <brobecker@adacore.com>
9853
9854 * lynx-low.c (lynx_resume): Use the resume_info parameter
9855 to determine the ptid for the lynx_ptrace call, unless
9856 it is equal to minus_one_ptid, in which case we use the
9857 ptid of the current_inferior.
9858 (lynx_wait_1): After having received a thread create/exit
9859 event, resume the inferior's execution using the signaling
9860 thread's ptid, rather than the old ptid.
9861
7fda33ae
JB
98622013-01-07 Joel Brobecker <brobecker@adacore.com>
9863
9864 * lynx-low.c (lynx_resume): Delete variable ret.
9865
b9786c74
JB
98662013-01-01 Joel Brobecker <brobecker@adacore.com>
9867
9868 * gdbreplay.c (gdbreplay_version): Update copyright year.
9869 * server.c (gdbserver_version): Likewise.
9870
8b93d60f
JB
98712012-12-17 Joel Brobecker <brobecker@adacore.com>
9872
9873 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9874 new thread.
9875
037335a7
JB
98762012-12-17 Joel Brobecker <brobecker@adacore.com>
9877
9878 * lynx-low.c (ptrace_request_to_str): Add handling for
9879 PTRACE_GETTRACESIG.
9880
52d4cbd8
JB
98812012-12-17 Joel Brobecker <brobecker@adacore.com>
9882
9883 * lynx-low.c (lynx_attach): Delete variable new_process.
9884
ab8f6ca9
JB
98852012-12-17 Joel Brobecker <brobecker@adacore.com>
9886
9887 * lynx-low.c (lynx_create_inferior): Delete variable
9888 new_process.
9889
78cbc024
JB
98902012-12-17 Joel Brobecker <brobecker@adacore.com>
9891
9892 * lynx-low.c (ptrace_request_to_str): Do not handle
9893 PTRACE_GETTHREADLIST if this macro does not exist.
9894
14a00470
YQ
98952012-12-15 Yao Qi <yao@codesourcery.com>
9896
9897 * Makefile.in (OBS): Add notif.o.
9898 * notif.c, notif.h: New.
9899 * server.c: Include "notif.h".
9900 (struct vstop_notif) <next>: Remove.
9901 <base>: New field.
9902 (queue_stop_reply): Update.
9903 (push_event, send_next_stop_reply): Remove.
9904 (discard_queued_stop_replies): Update.
9905 (notif_stop): New variable.
9906 (handle_v_stopped): Remove.
9907 (handle_v_requests): Don't call handle_v_stopped. Call
9908 handle_ack_notif instead.
9909 (queue_stop_reply_callback): Call notif_event_enque instead
9910 of queue_stop_reply.
9911 (handle_status): Don't call send_next_stop_reply, call
9912 notif_write_event instead.
9913 (kill_inferior_callback): Likewise.
9914 (detach_or_kill_inferior_callback): Likewise.
9915 (main): Call initialize_notif.
9916 (process_serial_event): Call QUEUE_is_empty.
9917 (handle_target_event): Call notif_push instead of push event.
9918 * server.h (push_event): Remove declaration.
9919
61c125b9
TT
99202012-12-10 Tom Tromey <tromey@redhat.com>
9921
9922 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9923 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9924 macros.
9925 (.c.o): Rewrite.
9926 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9927 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9928 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9929 (amd64-linux-ipa.o, ax.o): Rewrite.
9930 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9931 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9932 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9933 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9934 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9935 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9936 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9937 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9938 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9939 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9940 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9941 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9942 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9943 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9944 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9945 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9946 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9947 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9948 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9949 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9950 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9951 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9952 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9953 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9954 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9955 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9956 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9957 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9958 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9959 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9960 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9961 (reg-tilegx.o): Remove.
9962 (all_object_files): New macro.
9963 Include .deps files.
9964 * aclocal.m4, configure: Rebuild.
9965 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9966 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9967 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9968
e90e9ad9
TT
99692012-12-05 Tom Tromey <tromey@redhat.com>
9970
9971 PR gdb/14917:
9972 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9973
02d403bf 99742012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
9975
9976 * configure.ac: Check for linux/perf_event.h.
9977 * config.in: Regenerated.
9978 * configure: Regenerated.
9979
0270a750
PA
99802012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9981
9982 * hostio.c (handle_readlink): Decrease buffer size
9983 parameter passed to readlink by one byte.
9984
8c29b58e
YQ
99852012-11-26 Yao Qi <yao@codesourcery.com>
9986
9987 * configure.ac (build_warnings): Append '-Wempty-body'.
9988 * configure: Regenerated.
9989 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9990 body.
9991
8bdce1ff
PM
99922012-11-15 Pierre Muller <muller@sourceware.org>
9993
9994 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9995 * config.in: Regenerate.
9996 * configure: Regenerate.
9997 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9998 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9999 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10000 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10001 header.
10002 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10003 instead of <sys/wait.h> header.
10004 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10005
02d403bf 100062012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10007
10008 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10009 (various make rules): Remove -DGDBSERVER
10010
fbd5db48
YQ
100112012-11-09 Yao Qi <yao@codesourcery.com>
10012
10013 * spu-low.c (current_ptid): Move it to ..
10014 * gdbthread.h: ... here. New.
10015 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10016 * server.c (myresume, process_serial_event): Likewise.
10017 * thread-db.c (thread_db_find_new_threads): Likewise.
10018 * tracepoint.c (run_inferior_command): Likewise.
10019
b3dc46ff
AB
100202012-10-01 Andrew Burgess <aburgess@broadcom.com>
10021
10022 * server.c (handle_search_memory_1): Include access length in
10023 warning message.
10024
07c04788
HPN
100252012-09-05 Michael Brandt <michael.brandt@axis.com>
10026
10027 * linux-crisv32-low.c: Fix compile errors.
10028
918d227b
YQ
100292012-09-04 Yao Qi <yao@codesourcery.com>
10030
10031 * tracepoint.c (cmd_qtsv): Adjust debug message.
10032 Don't check CUR_TPOINT.
10033
18c1b81a
YQ
100342012-08-28 Yao Qi <yao@codesourcery.com>
10035
10036 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10037 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10038 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10039 Remove declarations of xmalloc, xreallloc, xstrdup and
10040 freeargv.
10041 * Makefile.in (libiberty_h): New.
10042 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10043 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10044
dc82f37b
YQ
100452012-08-23 Yao Qi <yao@codesourcery.com>
10046
10047 * server.h: Remove declaration of 'xsnprintf'.
10048
406b1477
KS
100492012-08-22 Keith Seitz <keiths@redhat.com>
10050
10051 * server.h: Include build-gnulib-gbserver/config.h.
10052 * gdbreplay.c: Likewise.
10053
e6712ff1
DE
100542012-08-08 Doug Evans <dje@google.com>
10055
10056 * Makefile.in (SFILES): Add gdb_vecs.c.
10057 (OBS): Add gdb_vecs.o.
10058 (gdb_vecs_h, host_defs_h): New variables.
10059 (thread-db.o): Add $(gdb_vecs_h) dependency.
10060 (gdb_vecs.o): New rule.
10061 * thread-db.c: #include "gdb_vecs.h".
10062 (thread_db_load_search): Use a vector to iterate over path elements.
10063 Handle text appearing after "$pdir".
10064
10065 * configure.ac: Add check for strstr.
10066 * config.in: Regenerate.
10067 * configure: Regenerate.
10068
7c3270ae
UW
100692012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10070
10071 * hostio.c (handle_pread): If pread fails, fall back to attempting
10072 lseek/read.
10073 (handle_pwrite): Likewise for pwrite.
10074
b62e2b27
UW
100752012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10076
10077 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10078 between unsupported TYPE and unimplementable ADDR/LEN combination.
10079 (arm_insert_point): Act on new return value.
10080
78a99e91
PA
100812012-07-31 Pedro Alves <palves@redhat.com>
10082
10083 * server.c (process_point_options): Only skip tokens if we find
10084 one that is unrecognized. Don't treat 'X' specially while
10085 skipping unrecognized tokens.
10086
fcf303ab
UW
100872012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10088
10089 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10090 to 4-byte-align HW breakpoint addresses for Thumb.
10091
7255706c
YQ
100922012-07-27 Yao Qi <yao@codesourcery.com>
10093
10094 PR remote/14161.
10095
10096 * server.h: Declare gdb_agent_about_to_close.
10097 * target.c (kill_inferior): Include "agent.h".
10098 New. Send command 'kill'.
10099 * target.h (kill_inferior): Removed macro.
10100 * tracepoint.c (gdb_agent_about_to_close): New.
10101 (gdb_agent_helper_thread): Handle command 'close'.
10102 Wait endlessly until the inferior stops.
10103 Install gdb_agent_remove_socket to atexit hook.
10104 (agent_socket_name): New static variable.
10105 (gdb_agent_socket_init): Replace local variable 'name' with
10106 'agent_socket_name'.
10107 (gdb_agent_remove_socket): New.
10108
5a3f286f
YQ
101092012-07-27 Yao Qi <yao@codesourcery.com>
10110
10111 * server.c (process_point_options): Stop at 'X' when parsing.
10112
961bd387
ME
101132012-07-19 Michael Eager <eager@eagercon.com>
10114
a261b8f5 10115 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10116 to hw_execute.
10117 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10118 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10119 hardware breakpoint.
10120
aa7c7447
JK
101212012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10122
10123 * gdbserver/linux-low.c (initialize_low): Call
10124 linux_ptrace_init_warnings.
10125
7f216e7c
DE
101262012-07-02 Doug Evans <dje@google.com>
10127
10128 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10129 pointer to int.
10130
d3ce09f5
SS
101312012-07-02 Stan Shebs <stan@codesourcery.com>
10132
10133 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10134 (ax.o): Add it to build rule.
10135 (ax-ipa.o): Ditto.
10136 (OBS): Add format.o.
10137 (IPA_OBS): Add format.o.
10138 * server.c (handle_query): Claim support for breakpoint commands.
10139 (process_point_options): Add command case.
10140 (process_serial_event): Leave running if there are printfs in
10141 effect.
10142 * mem-break.h (any_persistent_commands): Declare.
10143 (add_breakpoint_commands): Declare.
10144 (gdb_no_commands_at_breakpoint): Declare.
10145 (run_breakpoint_commands): Declare.
10146 * mem-break.c (struct point_command_list): New struct.
10147 (struct breakpoint): New field command_list.
10148 (any_persistent_commands): New function.
10149 (add_commands_to_breakpoint): New function.
10150 (add_breakpoint_commands): New function.
10151 (gdb_no_commands_at_breakpoint): New function.
10152 (run_breakpoint_commands): New function.
10153 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10154 locally.
10155 * ax.c: Include format.h.
10156 (ax_printf): New function.
10157 (gdb_eval_agent_expr): Add printf opcode.
10158
2f8f6aed
YQ
101592012-06-13 Yao Qi <yao@codesourcery.com>
10160
10161 * server.c (start_inferior): Remove duplicated writes to fields
10162 'last_resume_kind' and 'last_status' of 'current_inferior'.
10163
0c9070b3
YQ
101642012-06-12 Yao Qi <yao@codesourcery.com>
10165 Pedro Alves <palves@redhat.com>
10166
10167 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10168 comment.
10169 * server.c (handle_v_cont): Extend comment.
10170
c52daf70
YQ
101712012-06-11 Yao Qi <yao@codesourcery.com>
10172
10173 * linux-low.c (linux_attach): Add 'static'.
10174
d38bbb0a
YQ
101752012-06-06 Yao Qi <yao@codesourcery.com>
10176
10177 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10178
89dc0afd
JK
101792012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10180
10181 Fix gcc -flto compilation warning.
10182 * server.c (main): Make variable multi_mode and attach volatile.
10183
75f62ce7
TJB
101842012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10185
10186 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10187 if the platform doesn't know about it.
10188
65f479b6
PA
101892012-05-30 Jeff Kenton <jkenton@tilera.com>
10190
10191 * Makefile.in (SFILES): Add linux-tile-low.c.
10192 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10193 * configure.srv: Handle tilegx-*-linux*.
10194 * linux-tile-low.c: New file.
10195
0c5bf5a9
JK
101962012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10197
10198 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10199
a493e3e2
PA
102002012-05-24 Pedro Alves <palves@redhat.com>
10201
10202 PR gdb/7205
10203
43aaf8b6 10204 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10205
2ea28649
PA
102062012-05-24 Pedro Alves <palves@redhat.com>
10207
10208 PR gdb/7205
10209
10210 Replace target_signal with gdb_signal throughout.
10211
8d409d16
MR
102122012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10213
10214 * linux-low.c (linux_store_registers): Avoid the copying sequence
10215 when no data has been retrieved by ptrace.
10216
23512c01
MGD
102172012-05-22 Will Deacon <will.deacon@arm.com>
10218
10219 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10220 Include asm/ptrace.h.
10221 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10222 already defined.
10223
4934b29e
MR
102242012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10225
10226 * linux-low.c (linux_store_registers): Don't re-retrieve data
10227 with ptrace that has already been obtained from /proc. Always
10228 copy any data retrieved with ptrace to the buffer supplied.
10229
bde24c0a
PA
102302012-05-11 Yao Qi <yao@codesourcery.com>
10231 Pedro Alves <palves@redhat.com>
10232
10233 * linux-low.c (enum stopping_threads_kind): New.
10234 (stopping_threads): Change type to `enum stopping_threads_kind'.
10235 (handle_extended_wait): If stopping and suspending threads, leave
10236 the new_lwp suspended too.
10237 (linux_wait_for_event): Adjust.
10238 (stop_all_lwps): Set `stopping_threads' to
10239 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10240 whether we're suspending threads or just stopping them. Assert no
10241 recursion happens.
10242
623b6bdf
YQ
102432012-04-29 Yao Qi <yao@codesourcery.com>
10244
10245 * server.h: Move some code to ...
10246 * gdbthread.h: ... here. New.
10247 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10248 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10249 (nto-low.o, win32-low.o): Likewise.
10250 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10251 * regcache.c, remote-utils.c, server.c: Likewise.
10252 * target.c, tracepoint.c, win32-low.c: Likewise.
10253
f15f9948
TJB
102542012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10255
10256 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10257 (PTRACE_ARG4_TYPE): Likewise.
10258 (PTRACE_XFER_TYPE): Likewise.
10259 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10260 ptrace to PTRACE_ARG3_TYPE.
10261 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10262 (PTRACE_ARG4_TYPE): Likewise.
10263 (PTRACE_XFER_TYPE): Likewise.
10264 (linux_detach_one_lwp): Cast fourth argument of
10265 ptrace to long then PTRACE_ARG4_TYPE.
10266 (regsets_fetch_inferior_registers): Cast third argument of
10267 ptrace to long then PTRACE_ARG3_TYPE.
10268 (regsets_store_inferior_registers): Likewise.
10269
38ea300a
PA
102702012-04-20 Pedro Alves <palves@redhat.com>
10271
10272 * configure: Regenerate.
10273
c971b7fa
PA
102742012-04-19 Pedro Alves <palves@redhat.com>
10275
43aaf8b6 10276 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10277 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10278 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10279 (all, install-only, uninstall, clean-info, all-lib, clean): No
10280 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10281 (maintainer-clean realclean distclean): Use subdir_do.
10282 (subdir_do): New.
10283 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10284 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10285 * acinclude.m4: Include acx_configure_dir.m4.
10286 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10287 calls. Call AC_PROG_RANLIB. Configure gnulib using
10288 ACX_CONFIGURE_DIR.
10289 (GNULIB): New.
10290 (GNULIB_STDINT_H): Adjust.
10291 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10292 * gdbreplay.c: Include build-gnulib/config.h.
10293 * server.h: Likewise.
10294 * aclocal.m4: Regenerate.
10295 * config.in: Regenerate.
10296 * configure: Regenerate.
c971b7fa 10297
809277f8
PA
102982012-04-19 Pedro Alves <palves@redhat.com>
10299
10300 * Makefile.in (LIBGNU, INCGNU): Adjust.
10301 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10302 (all, install-only, uninstall, clean-info, all-lib, clean)
10303 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10304 * configure.ac: Adjust AC_OUTPUT output.
10305 * aclocal.m4: Regenerate.
10306 * configure: Regenerate.
10307
fd9bb8b8
PA
103082012-04-19 Pedro Alves <palves@redhat.com>
10309
10310 * Makefile.in (generated_files): New.
10311 (server_h): Remove the explicit dependency on config.h, and depend
10312 on $generated_files.
10313
1c298c66
PA
103142012-04-19 Pedro Alves <palves@redhat.com>
10315
10316 * Makefile.in (INCGNU): Add -Ignulib.
10317
57c4b50b
PA
103182012-04-19 Pedro Alves <palves@redhat.com>
10319
10320 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10321 (INCGNU): ... this, and spell out -I here.
10322 (GNULIB_LIB): Rename to ...
10323 (LIBGNU): ... this.
10324 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10325
1030e047
PA
103262012-04-19 Pedro Alves <palves@redhat.com>
10327
10328 * config.in: Regenerate.
10329
447d4319
PA
103302012-04-19 Pedro Alves <palves@redhat.com>
10331
10332 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10333 * server.h (memmem): Remove declaration.
10334 * config.in: Regenerate.
10335 * configure: Regenerate.
10336
aad9eab9
YQ
103372012-04-19 Yao Qi <yao@codesourcery.com>
10338
10339 * Makefile.in (SFILES): Add common/vec.c.
10340 (OBS): Add vec.o.
10341 (vec.o): New rule.
10342
3e10640f
YQ
103432012-04-19 Yao Qi <yao@codesourcery.com>
10344
10345 * remote-utils.c (prepare_resume_reply): Replace with macro
10346 target_core_of_thread.
10347 * server.c (handle_qxfer_threads_proper): Likewise.
10348 * target.h (traget_core_of_thread): New macro.
10349
71622373
PA
103502012-04-18 Pedro Alves <palves@redhat.com>
10351
10352 * aclocal.m4: Regenerate.
10353 * configure: Regenerate.
10354
80d26939
YQ
103552012-04-16 Yao Qi <yao@codesourcery.com>
10356
10357 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10358 duplicated on address.
10359
42476b70
YQ
103602012-04-16 Yao Qi <yao@codesourcery.com>
10361
10362 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10363 (struct tracepoint_action_ops) <send>: New field.
10364 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10365 (agent_expr_send, x_tracepoint_action_send): New.
10366 (l_tracepoint_action_send): New.
10367 (cmd_qtdp): Download and install tracepoint
10368 according to `use_agent'.
10369 (run_inferior_command): Add one more parameter `len'.
10370 Update callers.
10371 (tracepoint_send_agent): New.
10372 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10373
7bc83639
YQ
103742012-04-16 Yao Qi <yao@codesourcery.com>
10375
10376 * tracepoint.c (download_tracepoints): Moved to ...
10377 (cmd_qtstart): ... here.
10378
5f18041e
YQ
103792012-04-14 Yao Qi <yao@codesourcery.com>
10380
10381 * tracepoint.c: Include inttypes.h.
10382 (struct collect_memory_action): Use sized types.
10383 (struct tracepoint): Likewise.
10384 (cmd_qtdp, stop_tracing): Update print specifiers.
10385 (cmd_qtp, response_tracepoint): Likewise.
10386 (collect_data_at_tracepoint): Likewise.
10387 (collect_data_at_step): Likewise.
10388
55a8c076
YQ
103892012-04-14 Yao Qi <yao@codesourcery.com>
10390
10391 Import gnulib module inttypes.
10392 * aclocal.m4, config.in, configure: Regenerated.
10393
dc750257
YQ
103942012-04-14 Yao Qi <yao@codesourcery.com>
10395
10396 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10397 Makefile and config.status at last.
10398
0ab5faf9
YQ
103992012-04-13 Yao Qi <yao@codesourcery.com>
10400
10401 * tracepoint.c: Include stdint.h unconditionally.
10402
18f5fd81
TJB
104032012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10404
10405 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10406 on BFD_HAVE_SYS_PROCFS_TYPE.
10407 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10408 * configure: Regenerate.
10409 * config.in: Likewise.
10410
4d47af5c
L
104112012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10412
10413 * Makefile.in (clean): Also remove x32.c x32-linux.c
10414 x32-avx.c x32-avx-linux.c.
10415 (x32.o): New target.
10416 (x32.c): Likewise.
10417 (x32-linux.o): Likewise.
10418 (x32-linux.c): Likewise.
10419 (x32-avx.o): Likewise.
10420 (x32-avx.c): Likewise.
10421 (x32-avx-linux.o): Likewise.
10422 (x32-avx-linux.c): Likewise.
10423
10424 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10425 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10426 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10427 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10428 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10429 i386/x32-avx-linux.xml.
10430
10431 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10432 (init_registers_x32_avx_linux): Likwise.
10433 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10434 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10435
ecedbe58
PA
104362012-04-13 Pedro Alves <palves@redhat.com>
10437
10438 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10439 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10440 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10441 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10442 the sub-make.
10443
c92b5177
L
104442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10445
10446 * linux-x86-low.c (compat_x32_clock_t): New.
10447 (compat_x32_siginfo_t): Likewise.
10448 (compat_x32_siginfo_from_siginfo): Likewise.
10449 (siginfo_from_compat_x32_siginfo): Likewise.
10450 (linux_is_elf64): Likewise.
10451 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10452 and siginfo_from_compat_x32_siginfo for x32.
10453 (x86_arch_setup): Set linux_is_elf64.
10454
214d508e
L
104552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10456
10457 PR gdb/13969
10458 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10459 e_machine field.
10460 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10461 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10462 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10463 compatible with process.
10464
c9a1864a
YQ
104652012-04-12 Yao Qi <yao@codesourcery.com>
10466
10467 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10468 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10469 (install-only, install-info, clean): Handle sub dir gnulib.
10470 (all-lib, am--refresh): New targets.
10471 (memmem.o): Remove target.
10472 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10473 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10474 (AC_REPLACE_FUNCS): Remove memmem.
10475 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10476 (AC_OUTPUT): Generate Makefile in gnulib/.
10477 * aclocal.m4, config.in, configure: Regenerated.
10478
367ba2c2
MR
104792012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10480
10481 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10482
9d236627
PA
104832012-04-05 Pedro Alves <palves@redhat.com>
10484
10485 -Werror=strict-aliasing
10486
10487 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10488 pointer.
10489
111217b3
PA
104902012-04-04 Pedro Alves <palves@redhat.com>
10491
10492 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10493 (sparc_store_gregset_from_stack, sparc_store_gregset)
10494 (sparc_breakpoint_at): Fix formatting.
10495
8365dcf5
TJB
104962012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10497
10498 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10499 are available.
10500 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10501 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10502 * config.in: Regenerate.
10503 * configure: Likewise.
10504
689cc2ae
PA
105052012-03-29 Pedro Alves <palves@redhat.com>
10506
10507 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10508 Correct ptrace arguments.
10509
c14dfd32
PA
105102012-03-28 Pedro Alves <palves@redhat.com>
10511
10512 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10513 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10514 (IA64_FR1_REGNUM): New defines.
10515 (ia64_fetch_register): New.
10516 (the_low_target): Install it.
10517 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10518 field.
10519 * linux-low.c (linux_fetch_registers): Try the
10520 the_low_target.fetch_register hook first.
10521
10522 * linux-arm-low.c (the_low_target): Adjust.
10523 * linux-bfin-low.c (the_low_target): Adjust.
10524 * linux-cris-low.c (the_low_target): Adjust.
10525 * linux-crisv32-low.c (the_low_target): Adjust.
10526 * linux-m32r-low.c (the_low_target): Adjust.
10527 * linux-m68k-low.c (the_low_target): Adjust.
10528 * linux-mips-low.c (the_low_target): Adjust.
10529 * linux-ppc-low.c (the_low_target): Adjust.
10530 * linux-s390-low.c (the_low_target): Adjust.
10531 * linux-sh-low.c (the_low_target): Adjust.
10532 * linux-sparc-low.c (the_low_target): Adjust.
10533 * linux-tic6x-low.c (the_low_target): Adjust.
10534 * linux-x86-low.c (the_low_target): Adjust.
10535 * linux-xtensa-low.c (the_low_target): Adjust.
10536
63c88e13
PA
105372012-03-26 Pedro Alves <palves@redhat.com>
10538
10539 * server.c (handle_qxfer_libraries): Don't bail early if
10540 the_target->qxfer_libraries_svr4 is not NULL.
10541
fb723180
PA
105422012-03-26 Pedro Alves <palves@redhat.com>
10543
10544 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10545
0afae3cf
PA
105462012-03-23 Pedro Alves <palves@redhat.com>
10547
10548 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10549 "library-list-svr4" element's start tag when the the DSO list is
10550 empty.
10551
485f1ee4
PA
105522012-03-23 Pedro Alves <palves@redhat.com>
10553
10554 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10555 a variable whose type size is the same as the inferior's pointer
10556 size.
10557
a5362b9a
TS
105582012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10559
10560 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10561 struct siginfo.
10562 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10563 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10564 * linux-low.h: Include <signal.h>.
10565 (struct siginfo): Remove forward declaration.
10566 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10567 struct siginfo.
10568
d226c142
MF
105692012-03-21 Mike Frysinger <vapier@gentoo.org>
10570
10571 * .gitignore: Ignore more files.
10572
122f36ef
PA
105732012-03-19 Pedro Alves <palves@redhat.com>
10574 Jan Kratochvil <jan.kratochvil@redhat.com>
10575
10576 * server.c (cont_thread, general_thread): Add describing comments.
10577 (start_inferior): Clear `cont_thread'.
10578 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10579 of a process.
10580
fc3e5175
YQ
105812012-03-15 Yao Qi <yao@codesourcery.com>
10582
10583 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10584 handling to ...
10585 (cmd_qtdp): ... here.
10586
8d0d92cd
YQ
105872012-03-15 Yao Qi <yao@codesourcery.com>
10588
10589 * tracepoint.c (struct tracepoint_action_ops): New.
10590 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10591 (m_tracepoint_action_download): New.
10592 (r_tracepoint_action_download): New.
10593 (x_tracepoint_action_download): New.
10594 (l_tracepoint_action_download): New.
10595 (add_tracepoint_action): Install `action->ops' according type.
10596 (download_tracepoint_1): Move code `download' function pointer
10597 of various tracepoint_action_ops.
10598
87b0bb13
JK
105992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10600
10601 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10602 linux_ptrace_attach_warnings.
10603
5f572dec
JK
106042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10605
10606 * Makefile.in (linux-ptrace.o): New.
10607 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10608 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10609 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10610 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10611 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10612 of these targets.
10613 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10614
f4647387
YQ
106152012-03-08 Yao Qi <yao@codesourcery.com>
10616 Pedro Alves <palves@redhat.com>
10617
10618 Fix PR server/13392.
10619 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10620 offset of JMP insn.
10621 * tracepoint.c (remove_tracepoint): New.
10622 (cmd_qtdp): Call remove_tracepoint when failed to install.
10623
9b224c5e
PA
106242012-03-07 Pedro Alves <palves@redhat.com>
10625
10626 * linux-low.c (get_detach_signal): New.
10627 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10628 Pass on pending signals to PTRACE_DETACH. Check the result of the
10629 ptrace call.
10630 * server.c (program_signals, program_signals_p): New.
10631 (handle_general_set): Handle QProgramSignals.
10632 * server.h (program_signals, program_signals_p): Declare.
10633
e237a7e2
JK
106342012-03-05 Pedro Alves <palves@redhat.com>
10635 Jan Kratochvil <jan.kratochvil@redhat.com>
10636
10637 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10638 New comment why.
10639
5808517f
YQ
106402012-03-03 Yao Qi <yao@codesourcery.com>
10641
10642 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10643 agent_look_up_symbols.
10644
58b4daa5
YQ
106452012-03-03 Yao Qi <yao@codesourcery.com>
10646
10647 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10648 (linux-x86-low.o): Likewise.
10649 * server.h: Remove in_process_agent_loaded.
10650 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10651 common/agent.c.
10652 Update callers.
10653
8ffcbaaf
YQ
106542012-03-03 Yao Qi <yao@codesourcery.com>
10655
10656 * tracepoint.c (gdb_agent_capability): New global.
10657 (in_process_agent_loaded_ust): Renamed to
10658 `in_process_agent_supports_ust'.
10659 Update callers.
10660 (in_process_agent_supports_ust): Call agent_capability_check.
10661 (clear_installed_tracepoints): Assert that agent supports
10662 agent.
10663
d1feda86
YQ
106642012-03-03 Yao Qi <yao@codesourcery.com>
10665
10666 * linux-low.c (linux_supports_agent): New.
10667 (linux_target_ops): Initialize field `supports_agent' with
10668 linux_supports_agent.
10669 * target.h (struct target_ops) <supports_agent>: New.
10670 (target_supports_agent): New macro.
10671 * server.c (handle_general_set): Handle packet 'QAgent'.
10672 (handle_query): Send `QAgent+'.
10673 * Makefile.in (server.o): Depends on agent.h.
10674
2fa291ac
YQ
106752012-03-03 Yao Qi <yao@codesourcery.com>
10676
10677 * Makefile.in (OBS): Add agent.o.
10678 Add new rule for agent.o.
10679 Track dependence of tracepoint.c on agent.h.
10680 * tracepoint.c (run_inferior_command_1):
10681 (run_inferior_command): Call agent_run_command.
10682 (gdb_ust_connect_sync_socket): Deleted. Move it to
10683 common/agent.c.
10684 (resume_thread, stop_thread): Likewise.
10685 (gdb_ust_socket_init): Renamed to ...
10686 (gdb_agent_socket_init): ... New.
10687 (gdb_ust_thread): Renamed to ...
10688 (gdb_agent_helper_thread): ... New.
10689 (gdb_ust_init): Move some code to ...
10690 (gdb_agent_init): ... here. New.
10691 [HAVE_UST]: Call gdb_ust_init.
10692 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10693 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10694 * config.in, configure: Regenerated.
10695
05044653
PA
106962012-03-02 Pedro Alves <palves@redhat.com>
10697
10698 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10699 * linux-low.c (struct simple_pid_list): New.
10700 (stopped_pids): New a struct simple_pid_list pointer.
10701 (add_to_pid_list, pull_pid_from_list): New.
10702 (handle_extended_wait): Don't assume the first signal new children
10703 report is SIGSTOP. Adjust call to pull_pid_from_list.
10704 (linux_wait_for_lwp): Adjust.
10705
8d00225b
YQ
107062012-03-02 Yao Qi <yao@codesourcery.com>
10707
10708 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10709 debug log.
10710
19560ba5
YQ
107112012-03-02 Yao Qi <yao@codesourcery.com>
10712
10713 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10714 `stop_pc' and `tpoint'. Update caller.
10715
1faeff08
MR
107162012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10717
10718 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10719 * linux-low.c (use_linux_regsets): New macro.
10720 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10721 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10722 (linux_register_in_regsets): New function.
10723 (usr_fetch_inferior_registers): Skip registers covered by
10724 regsets.
10725 (usr_store_inferior_registers): Likewise.
10726 (usr_fetch_inferior_registers): New macro.
10727 (usr_store_inferior_registers): Likewise.
10728 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10729 (linux_store_registers): Likewise.
10730 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10731 prototype.
10732 (init_registers_mips64_dsp_linux): Likewise.
10733 (init_registers_mips_linux): New macro.
10734 (init_registers_mips_dsp_linux): Likewise.
10735 (mips_dsp_num_regs): Likewise.
10736 (DSP_BASE, DSP_CONTROL): New fallback macros.
10737 (mips_base_regs): New macro.
10738 (mips_regmap): Use it. Fix the size.
10739 (mips_dsp_regmap): New variable.
10740 (mips_dsp_regset_bitmap): Likewise.
10741 (mips_arch_setup): New function.
10742 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10743 than mips_regmap.
10744 (mips_cannot_store_register): Likewise.
10745 (the_low_target): Update .arch_setup, .num_regs and .regmap
10746 initializers. Add .regset_bitmap initializer.
10747 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10748 initializer.
10749 * linux-bfin-low.c (the_low_target): Likewise.
10750 * linux-cris-low.c (the_low_target): Likewise.
10751 * linux-crisv32-low.c (the_low_target): Likewise.
10752 * linux-ia64-low.c (the_low_target): Likewise.
10753 * linux-m32r-low.c (the_low_target): Likewise.
10754 * linux-m68k-low.c (the_low_target): Likewise.
10755 * linux-ppc-low.c (the_low_target): Likewise.
10756 * linux-s390-low.c (the_low_target): Likewise.
10757 * linux-sh-low.c (the_low_target): Likewise.
10758 * linux-sparc-low.c (the_low_target): Likewise.
10759 * linux-tic6x-low.c (the_low_target): Likewise.
10760 * linux-x86-low.c (the_low_target): Likewise.
10761 * linux-xtensa-low.c (the_low_target): Likewise.
10762 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10763 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10764 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10765 srv_xmlfiles.
10766 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10767 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10768
c03e6ccc
YQ
107692012-02-29 Yao Qi <yao@codesourcery.com>
10770 Pedro Alves <palves@redhat.com>
10771
10772 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10773 `step_over_finished' is true.
10774
644cebc9
PA
107752012-02-27 Pedro Alves <palves@redhat.com>
10776
10777 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10778 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10779
c14d7ab2
PA
107802012-02-27 Pedro Alves <palves@redhat.com>
10781
10782 PR server/9684
10783 * linux-low.c (pid_is_stopped): New.
10784 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10785
412c89dd
LM
107862012-02-25 Luis Machado <lgustavo@codesourcery.com>
10787
10788 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10789 of conditions.
10790
b745defe
MR
107912012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10792
10793 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10794
9f3a5c85
LM
107952012-02-24 Luis Machado <lgustavo@codesourcery>
10796
10797 * server.c (handle_query): Advertise support for target-side
10798 breakpoint condition evaluation.
10799 (process_point_options): New function.
10800 (process_serial_event): When inserting a breakpoint, check for
10801 a target-side condition that should be evaluated.
10802
10803 * mem-break.c: Include regcache.h and ax.h.
10804 (point_cond_list_t): New data structure.
10805 (breakpoint) <cond_list>: New field.
10806 (find_gdb_breakpoint_at): Make non-static.
10807 (delete_gdb_breakpoint_at): Clear any target-side
10808 conditions.
10809 (clear_gdb_breakpoint_conditions): New function.
10810 (add_condition_to_breakpoint): Likewise.
10811 (add_breakpoint_condition): Likewise.
10812 (gdb_condition_true_at_breakpoint): Likewise.
10813 (gdb_breakpoint_here): Return result directly instead
10814 of going through a local variable.
10815
10816 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10817 (clear_gdb_breakpoint_conditions): Likewise.
10818 (add_breakpoint_condition): Likewise.
10819 (gdb_condition_true_at_breakpoint): Likewise.
10820
10821 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10822 (need_step_over_p): Take target-side breakpoint condition into
10823 consideration.
10824
5e1dc496
LM
108252012-02-24 Luis Machado <lgustavo@codesourcery>
10826
10827 * server.h: Include tracepoint.h.
10828 (agent_mem_read, agent_get_trace_state_variable_value,
10829 agent_set_trace_state_variable_value,
10830 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10831 get_set_tsv_func_addr): New prototypes.
10832
10833 * ax.h: New include file.
10834 * ax.c: New source file.
10835
10836 * tracepoint.c: Include ax.h.
10837 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10838 agent_expr, eval_result_type): Move to ax.h.
10839 (parse_agent_expr): Rename to ...
10840 (gdb_parse_agent_expr): ... this, make it non-static and move
10841 to ax.h.
10842 (unparse_agent_expr) Rename to ...
10843 (gdb_unparse_agent_expr): ... this, make it non-static and move
10844 to ax.h.
10845 (eval_agent_expr): Rename to ...
10846 (eval_tracepoint_agent_expr): ... this.
10847 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10848 forward declarations.
10849 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10850 (agent_get_trace_state_variable_value): New function.
10851 (agent_set_trace_state_variable_value): New function.
10852 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10853 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10854 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10855 (condition_true_at_tracepoint): Likewise.
10856 (parse_agent_expr): Rename to ...
10857 (gdb_parse_agent_expr): ... this and move to ax.c.
10858 (unparse_agent_expr): Rename to ...
10859 (gdb_unparse_agent_expr): ... this and move to ax.c.
10860 (gdb_agent_op_name): Move to ax.c.
10861 (eval_agent_expr): Rename to ...
10862 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10863 and move to ax.c.
10864 (eval_tracepoint_agent_expr): New function.
10865 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10866 non-static.
5e1dc496
LM
10867 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10868 ax.c.
10869 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10870 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10871 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10872 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10873 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10874 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10875 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10876 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10877 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10878 (compile_bytecodes): Remove forward declaration.
10879 (is_goto_target): Move to ax.c.
10880 (compile_bytecodes): Move to ax.c and call
10881 agent_get_trace_state_variable_value (...) and
10882 agent_set_trace_state_variable_value (...).
10883
10884 * Makefile.in: Update ax.c and IPA dependencies.
10885
277e4e52
PA
108862012-02-24 Pedro Alves <palves@redhat.com>
10887
10888 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10889 (cmd_bigqtbuffer_circular): ... this. Only handle
10890 'QTBuffer:circular:'.
10891 (handle_tracepoint_general_set): Adjust.
10892
bf4c19f7
YQ
108932012-02-16 Yao Qi <yao@codesourcery.com>
10894
10895 * inferiors.c: Move code to ...
10896 * dll.c: .... here. New.
10897 * server.h: Declare clear_dlls.
10898 * Makefile.in (SFILES): Add dll.c.
10899 (OBS): Add dll.o
10900 (dll.o): New rule.
10901
d73f2619
YQ
109022012-02-11 Yao Qi <yao@codesourcery.com>
10903
10904 * server.c: (handle_monitor_command): Add a new parameter
10905 `own_buf'.
10906 (handle_query): Update caller.
10907
f8255c2a
JB
109082012-02-09 Joel Brobecker <brobecker@adacore.com>
10909
10910 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10911 * configure, config.in: Regenerate.
10912 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10913 is not defined.
10914
da84f473
PA
109152012-02-02 Pedro Alves <palves@redhat.com>
10916
10917 Try SIGKILL first, then PTRACE_KILL.
10918 * linux-low.c (linux_kill_one_lwp): New.
10919 (linux_kill_one_lwp): Rename to ...
10920 (kill_one_lwp_callback): ... this. Use the new
10921 linux_kill_one_lwp.
10922
e886a173
PA
109232012-02-02 Pedro Alves <palves@redhat.com>
10924
10925 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10926 inferior.
10927
be07f1a2
PA
109282012-01-27 Pedro Alves <palves@redhat.com>
10929
10930 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10931 (elf_64_file_p): Make static.
10932 (linux_pid_exe_is_elf_64_file): New.
10933 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10934 Delete declarations.
10935 (linux_pid_exe_is_elf_64_file): Declare.
10936 * linux-x86-low.c (x86_arch_setup): Use
10937 linux_pid_exe_is_elf_64_file.
10938
d8301ad1
JK
109392012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10940
10941 * linux-low.c (linux_wait_for_event_1): Rename to ...
10942 (linux_wait_for_event): ... here and merge it with former
10943 linux_wait_for_event - new variable wait_ptid, use it.
10944 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10945
01b17894
PA
109462012-01-23 Pedro Alves <palves@redhat.com>
10947
10948 * server.c (main): Avoid yet another case of infinite loop while
10949 detaching/killing after a longjmp.
10950
e825046f
JK
109512012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10952
10953 Code cleanup.
10954 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10955
b9e7b9c3
UW
109562012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10957
10958 * hostio.c (handle_readlink): New function.
10959 (handle_vFile): Call it to handle "vFile:readlink" packets.
10960
901f9912
UW
109612012-01-20 Pedro Alves <palves@redhat.com>
10962 Ulrich Weigand <ulrich.weigand@linaro.org>
10963
10964 * server.c (handle_v_requests): Only support vAttach and vRun to
10965 start multiple processes when in extended protocol mode.
10966
fc1ab1a0
PA
109672012-01-17 Pedro Alves <palves@redhat.com>
10968
10969 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10970 memalign plus mprotect to allocate the scratch buffer.
10971
7d5d4e98
PA
109722012-01-13 Pedro Alves <palves@redhat.com>
10973
10974 * server.c (attach_inferior): Clear `cont_thread'.
10975
f128d5e9
PA
109762012-01-13 Pedro Alves <palves@redhat.com>
10977
10978 * server.c (main): Avoid infinite loop while detaching/killing
10979 after a longjmp.
10980
06db92f0
DE
109812012-01-09 Doug Evans <dje@google.com>
10982
10983 * server.c (start_inferior): Set last_ptid in --wrapper case.
10984
32d92999
YQ
109852012-01-06 Yao Qi <yao@codesourcery.com>
10986
10987 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10988 defined.
10989 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10990
5e0a92a9
YQ
109912012-01-04 Yao Qi <yao@codesourcery.com>
10992
10993 * tracepoint.c (cmd_qtdp): Print debug message
10994 for static tracepoint.
10995
ae639e8c
YQ
109962012-01-04 Yao Qi <yao@codesourcery.com>
10997
10998 * tracepoint.c (trace_vdebug): Differentiate debug message
10999 between gdbserver and IPA.
11000
f72429c5
YQ
110012012-01-03 Yao Qi <yao@codesourcery.com>
11002
11003 * tracepoint.c (tracepoint_was_hit): Don't collect for
11004 static tracepoint.
11005
12c3e59c
JB
110062012-01-02 Joel Brobecker <brobecker@adacore.com>
11007
11008 * terminal.h: Reformat copyright header.
11009
67827812
JB
110102012-01-02 Joel Brobecker <brobecker@adacore.com>
11011
11012 * server.c (gdbserver_version): Update copyright year.
11013 * gdbreplay.c (gdbreplay_version): Likewise.
11014
3e52c33d
JK
110152011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11016
11017 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11018
11019 Revert:
11020 2011-12-18 Hui Zhu <teawater@gmail.com>
11021 * linux-low.c (linux_create_inferior): Save return value to ret.
11022
66f1260e
HZ
110232011-12-18 Hui Zhu <teawater@gmail.com>
11024
11025 * linux-low.c (linux_create_inferior): Save return value to ret.
11026
e77616d7
DE
110272011-12-16 Doug Evans <dje@google.com>
11028
e7b06c57
DE
11029 * linux-low.c (linux_create_inferior): If stdio connection,
11030 redirect stdin from /dev/null, stdout to stderr.
11031 * remote-utils.c (remote_is_stdio): New static global.
11032 (remote_connection_is_stdio): New function.
11033 (remote_prepare): Handle stdio connection.
11034 (remote_open): Ditto.
11035 (remote_close): Don't close stdin for stdio connections.
11036 (read_prim,write_prim): New functions. Replace all calls to
11037 read/write to these.
11038 * server.c (main): Watch for "-" argument. Move call to
11039 remote_prepare before start_inferior.
11040 * server.h (STDIO_CONNECTION_NAME): New macro.
11041 (remote_connection_is_stdio): Declare.
11042
e77616d7
DE
11043 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11044 in debugging output.
11045
82067193
YQ
110462011-12-15 Yao Qi <yao@codesourcery.com>
11047
11048 * tracepoint.c: Include sys/syscall.h.
11049 (gdb_ust_thread): Remove preprocessor conditional.
11050
82bfbe7e
PA
110512011-12-14 Pedro Alves <pedro@codesourcery.com>
11052
11053 * linux-low.c (linux_detach_one_lwp): Call
11054 the_low_target.prepare_to_resume before detaching.
11055
712c6575
YQ
110562011-12-14 Yao Qi <yao@codesourcery.com>
11057
11058 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11059 of write.
11060
d54d1edf
YQ
110612011-12-14 Yao Qi <yao@codesourcery.com>
11062
11063 * i386-low.c (i386_low_stopped_data_address): Initialize local
11064 variable `control'.
11065
6210a125
PA
110662011-12-13 Pedro Alves <pedro@codesourcery.com>
11067
11068 PR remote/13492
11069
11070 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11071 DR_CONTROL unless necessary. Extend comments.
11072 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11073 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11074
2ece8244
YQ
110752011-12-13 Yao Qi <yao@codesourcery.com>
11076
11077 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11078 macros.
11079 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11080
784867a5
JK
110812011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11082
11083 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11084 Print new debug message for such case.
11085
6bf36717
JK
110862011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11087
11088 Fix overlapping memcpy.
11089 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11090 the read_inferior_memory transfer.
11091 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11092 write_inferior_memory transfer.
11093 (set_fast_tracepoint_jump): New variable buf. Use it for the
11094 read_inferior_memory and write_inferior_memory transfers.
11095 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11096 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11097 Use it for the write_inferior_memory transfer.
11098 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11099 buffers.
11100
50275556
MR
111012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11102
11103 * linux-low.c (fetch_register, store_register): Make code
11104 consistent, fix formatting.
11105
7325beb4
MR
111062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11107
11108 * linux-low.c (usr_store_inferior_registers): Factor out code
11109 to handle individual registers into...
11110 (store_register): ... this new function.
11111
c642a434
UW
111122011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11113
11114 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11115 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11116 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11117 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11118 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11119 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11120 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11121 (srv_xmlfiles): Add new XML files.
11122
11123 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11124 and <sys/uio.h>.
11125 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11126 (init_registers_s390_linux32v1): Add prototype.
11127 (init_registers_s390_linux32v2): Likewise.
11128 (init_registers_s390_linux64v1): Likewise.
11129 (init_registers_s390_linux64v2): Likewise.
11130 (init_registers_s390x_linux64v1): Likewise.
11131 (init_registers_s390x_linux64v2): Likewise.
11132 (s390_num_regs): Increment to 52.
11133 (s390_regmap): Add orig_r2 register.
11134 (s390_num_regs_3264): Increment to 68.
11135 (s390_regmap_3264): Add orig_r2 register.
11136 (s390_collect_ptrace_register): Handle orig_r2 register.
11137 (s390_supply_ptrace_register): Likewise.
11138 (s390_fill_last_break): New function.
11139 (s390_store_last_break): Likewise.
11140 (s390_fill_system_call): New function.
11141 (s390_store_system_call): Likewise.
11142 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11143 register sets.
11144 (s390_check_regset): New function.
11145 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11146 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11147 Update target_regsets for available register sets.
11148
2268b414
JK
111492011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11150 Jan Kratochvil <jan.kratochvil@redhat.com>
11151
11152 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11153 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11154 New.
11155 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11156 * linux-low.h (struct process_info_private): New member r_debug.
11157 * server.c (handle_qxfer_libraries): Call
11158 the_target->qxfer_libraries_svr4.
11159 (handle_qxfer_libraries_svr4): New function.
11160 (qxfer_packets): New entry "libraries-svr4".
11161 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11162 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11163 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11164 PACKET_qXfer_libraries_svr4.
11165
d6db1fab
UW
111662011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11167
11168 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11169 PSW address/mask between 8-byte and 16-byte formats.
11170 (s390_supply_ptrace_register): Likewise.
11171 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11172 basic addressing mode bit.
11173
242f5f1c
SS
111742011-11-24 Stan Shebs <stan@codesourcery.com>
11175
11176 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11177
f196051f
SS
111782011-11-17 Stan Shebs <stan@codesourcery.com>
11179
11180 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11181 (tracing_start_time): New global.
11182 (tracing_stop_time): New global.
11183 (tracing_user_name): New global.
11184 (tracing_notes): New global.
11185 (tracing_stop_note): New global.
11186 (cmd_qtstart): Set traceframe_usage, start_time.
11187 (stop_tracing): Set stop_time.
11188 (cmd_qtstatus): Report additional status.
11189 (cmd_qtp): New function.
11190 (handle_tracepoint_query): Call it.
11191 (cmd_qtnotes): New function.
11192 (handle_tracepoint_general_set): Call it.
11193 (get_timestamp): Rename from tsv_get_timestamp.
11194
405f8e94
SS
111952011-11-14 Stan Shebs <stan@codesourcery.com>
11196 Kwok Cheung Yeung <kcy@codesourcery.com>
11197
11198 * linux-x86-low.c (small_jump_insn): New.
11199 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11200 trampoline and error message, build a trampoline and issue a small
11201 jump instruction to it.
11202 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11203 trampoline and error message.
11204 (x86_get_min_fast_tracepoint_insn_len): New.
11205 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11206 * linux-low.h (struct linux_target_ops): Add arguments to
11207 install_fast_tracepoint_jump_pad operation, add new operation.
11208 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11209 arguments.
11210 (linux_get_min_fast_tracepoint_insn_len): New function.
11211 (linux_target_op): Add new operation.
11212 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11213 (gdb_trampoline_buffer_end): Ditto.
11214 (gdb_trampoline_buffer_error): Ditto.
11215 (struct ipa_sym_addresses): Add fields for new IPA variables.
11216 (symbol_list): Add entries for new IPA variables.
11217 (struct tracepoint): Add fields to hold the address range of the
11218 trampoline used by the tracepoint.
11219 (trampoline_buffer_head): New static variable.
11220 (trampoline_buffer_tail): Ditto.
11221 (claim_trampoline_space): New function.
11222 (have_fast_tracepoint_trampoline_buffer): New function.
11223 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11224 structure.
11225 (install_fast_tracepoint): Ditto, also add error buffer argument.
11226 (cmd_qtminftpilen): New function.
11227 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11228 (fast_tracepoint_from_trampoline_address): New function.
11229 (fast_tracepoint_collecting): Handle trampoline as part of jump
11230 pad space.
11231 (set_trampoline_buffer_space): New function.
11232 (initialize_tracepoint): Initialize new IPA variables.
11233 * target.h (struct target_ops): Add arguments to
11234 install_fast_tracepoint_jump_pad operation, add new
11235 get_min_fast_tracepoint_insn_len operation.
11236 (target_get_min_fast_tracepoint_insn_len): New.
11237 (install_fast_tracepoint_jump_pad): Add arguments.
11238 * server.h (IPA_BUFSIZ): Define.
11239 * linux-i386-ipa.c: Include extra header files.
11240 (initialize_fast_tracepoint_trampoline_buffer): New function.
11241 (initialize_low_tracepoint): Call it.
11242 * server.h (set_trampoline_buffer_space): Declare.
11243 (claim_trampoline_space): Ditto.
11244 (have_fast_tracepoint_trampoline_buffer): Ditto.
11245
1e4d1764
YQ
112462011-11-14 Yao Qi <yao@codesourcery.com>
11247
11248 * server.c (handle_query): Handle InstallInTrace for qSupported.
11249 * tracepoint.c (add_tracepoint): Sort list.
11250 (install_tracepoint, download_tracepoint): New.
11251 (cmd_qtdp): Call them to install and download tracepoints.
11252 (sort_tracepoints): Removed.
11253 (cmd_qtstart): Update.
11254
5c73ff4e
YQ
112552011-11-14 Yao Qi <yao@codesourcery.com>
11256
11257 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11258 * mem-break.h: Declare.
11259 * tracepoint.c (cmd_qtstart): Move some code to ...
11260 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11261 New.
11262 (download_tracepoints): Move some code to ...
11263 (download_tracepoint_1): ... here. New.
11264
86a30030
YQ
112652011-11-08 Yao Qi <yao@codesourcery.com>
11266
11267 * remote-utils.c (relocate_instruction): A comment fix.
11268
8d26e50c
JB
112692011-11-07 Joel Brobecker <brobecker@adacore.com>
11270
11271 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11272 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11273 dr_status_mirror and dr_control_mirror from debug_reg_state.
11274 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11275 (i386_initial_stuff): Remove use of deleted globals.
11276 (i386_get_thread_context, i386_set_thread_context,
11277 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11278 from debug_reg_state.
11279
a59306a3
YQ
112802011-11-05 Yao Qi <yao@codesourcery.com>
11281
11282 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11283 address as TPOINT's.
11284
3065dfb6
SS
112852011-11-02 Stan Shebs <stan@codesourcery.com>
11286
11287 * tracepoint.c (agent_mem_read_string): New function.
11288 (eval_agent_expr): Call it for tracenz.
11289 * server.c (handle_query): Report support for tracenz.
11290
fd0d8c7c
YQ
112912011-11-02 Yao Qi <yao@codesourcery.com>
11292
11293 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11294
609086b1
YQ
112952011-11-02 Yao Qi <yao@codesourcery.com>
11296
11297 * target.h: Fix a typo in comment.
11298
b9fd1791
PA
112992011-10-31 Pedro Alves <pedro@codesourcery.com>
11300
11301 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11302 clobber the breakpoints' shadows with fast tracepoint jumps.
11303 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11304 * target.c (write_inferior_memory): Also pass MYADDR down to
11305 check_mem_write.
11306
03583c20
UW
113072011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11308
11309 * configure.ac: Check support for personality routine.
11310 * configure: Regenerate.
11311 * config.in: Likewise.
11312 * linux-low.c: Include <sys/personality.h>.
11313 Define ADDR_NO_RANDOMIZE if necessary.
11314 (linux_create_inferior): Disable address space randomization when
11315 forking inferior, if requested.
11316 (linux_supports_disable_randomization): New function.
11317 (linux_target_ops): Install it.
11318 * server.h (disable_randomization): Declare.
11319 * server.c (disable_randomization): New global variable.
11320 (handle_general_set): Handle QDisableRandomization.
11321 (handle_query): Likewise for qSupported.
11322 (main): Support --disable-randomization and --no-disable-randomization
11323 command line arguments.
11324 * target.h (struct target_ops): Add supports_disable_randomization.
11325 (target_supports_disable_randomization): New macro.
11326
723b724b
MF
113272011-09-29 Mike Frysinger <vapier@gentoo.org>
11328
11329 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11330 ifdef check.
11331 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11332 [!PT_GETDSBT] (target_loadmap): New definition.
11333 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11334 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11335 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11336 and PT_GETDSBT to LINUX_LOADMAP.
11337 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11338 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11339
55329a5c 113402011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11341
11342 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11343 (arm_linux_hwbp_cap): New static variable.
11344 (arm_linux_get_hwbp_cap): Replace by ...
11345 (arm_linux_init_hwbp_cap): ... this new function.
11346 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11347 (arm_linux_get_hw_watchpoint_count): Likewise.
11348 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11349 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11350 (arm_prepare_to_resume): Use perror_with_name instead of error.
11351
55329a5c 113522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11353
11354 * linux-arm-low.c: Include <signal.h>.
11355 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11356 (struct arm_linux_hwbp_cap): New data type.
11357 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11358 (struct arm_linux_hw_breakpoint): New data type.
11359 (MAX_BPTS, MAX_WPTS): Define.
11360 (struct arch_process_info, struct arch_lwp_info): New data types.
11361 (arm_linux_get_hwbp_cap): New function.
11362 (arm_linux_get_hw_breakpoint_count): Likewise.
11363 (arm_linux_get_hw_watchpoint_count): Likewise.
11364 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11365 (arm_hwbp_control_initialize): Likewise.
11366 (arm_hwbp_control_is_enabled): Likewise.
11367 (arm_hwbp_control_is_initialized): Likewise.
11368 (arm_hwbp_control_disable): Likewise.
11369 (arm_linux_hw_breakpoint_equal): Likewise.
11370 (arm_linux_hw_point_initialize): Likewise.
11371 (struct update_registers_data): New data structure.
11372 (update_registers_callback: New function.
11373 (arm_insert_point): Likewise.
11374 (arm_remove_point): Likewise.
11375 (arm_stopped_by_watchpoint): Likewise.
11376 (arm_stopped_data_address): Likewise.
11377 (arm_new_process): Likewise.
11378 (arm_new_thread): Likewise.
11379 (arm_prepare_to_resume): Likewise.
11380 (the_low_target): Register arm_insert_point, arm_remove_point,
11381 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11382 arm_new_thread, and arm_prepare_to_resume.
11383
6b9801d4
SS
113842011-09-15 Stan Shebs <stan@codesourcery.com>
11385
11386 * server.h (struct emit_ops): Add compare-goto fields.
11387 * tracepoint.c (gdb_agent_op_sizes): New table.
11388 (emit_eq_goto): New function.
11389 (emit_ne_goto): New function.
11390 (emit_lt_goto): New function.
11391 (emit_le_goto): New function.
11392 (emit_gt_goto): New function.
11393 (emit_ge_goto): New function.
11394 (is_goto_target): New function.
11395 (compile_bytecodes): Recognize special cases of compare-goto
11396 combinations and call specialized emitters for them.
11397 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11398 (amd64_emit_ne_goto): New function.
11399 (amd64_emit_lt_goto): New function.
11400 (amd64_emit_le_goto): New function.
11401 (amd64_emit_gt_goto): New function.
11402 (amd64_emit_ge_goto): New function.
11403 (amd64_emit_ops): Add the new functions.
11404 (i386_emit_eq_goto): New function.
11405 (i386_emit_ne_goto): New function.
11406 (i386_emit_lt_goto): New function.
11407 (i386_emit_le_goto): New function.
11408 (i386_emit_gt_goto): New function.
11409 (i386_emit_ge_goto): New function.
11410 (i386_emit_ops): Add the new functions.
11411
bf15cbda
SS
114122011-09-08 Stan Shebs <stan@codesourcery.com>
11413
11414 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11415 (i386_emit_epilogue): Restore %ebx.
11416
943ca1dd
JZ
114172011-08-31 Jie Zhang <jzhang918@gmail.com>
11418
11419 * server.c (step_thread): Remove definition.
11420 (process_serial_event): Don't handle Hs.
11421 * server.h (step_thread): Remove declaration.
11422 * target.c (set_desired_inferior): Remove use of step_thread.
11423
e3deef73
LM
114242011-08-24 Luis Machado <lgustavo@codesourcery.com>
11425
11426 * linux-low.c: Include linux-procfs.h.
11427 (linux_attach_lwp_1): Update comments.
11428 (linux_attach): Scan for existing threads when attaching to a
11429 process that is the tgid.
11430 * Makefile.in: Update dependencies.
11431
13da1c97
LM
114322011-08-24 Luis Machado <lgustavo@codesourcery.com>
11433
11434 * configure.srv: Add linux-procfs.o dependencies.
11435
881127c9
YQ
114362011-08-14 Yao Qi <yao@codesourcery.com>
11437
11438 * target.h (struct target_ops): Fix indent.
11439 * win32-low.c (win32_target_ops): Fix comment.
11440
58dbd541
YQ
114412011-08-14 Andrew Jenner <andrew@codesourcery.com>
11442 Yao Qi <yao@codesourcery.com>
11443
11444 * Makefile.in (clean): Remove tic6x-*.c files.
11445 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11446 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11447 (tic6x-c64xp-linux.c): Likewise.
11448 * configure.srv: Add support for tic6x-*-uclinux.
11449 * linux-tic6x-low.c: New.
11450 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11451
78d85199
YQ
114522011-08-14 Andrew Stubbs <ams@codesourcery.com>
11453 Yao Qi <yao@codesourcery.com>
11454
11455 * target.h (struct target_ops): Add read_loadmap.
11456 * linux-low.c (struct target_loadseg): New type.
11457 (struct target_loadmap): New type.
11458 (linux_read_loadmap): New function.
11459 (linux_target_ops): Add linux_read_loadmap.
11460 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11461 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11462 to NULL.
78d85199 11463
a959a88d
EZ
114642011-08-05 Eli Zaretskii <eliz@gnu.org>
11465
11466 * win32-low.c: Include <stdint.h>.
11467
1ced966e
PA
114682011-07-22 Pedro Alves <pedro@codesourcery.com>
11469
11470 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11471 to the inferior here.
11472 (i386_remove_aligned_watchpoint): Ditto.
11473 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11474 fit part of the watchpoint in the debug registers.
11475 (i386_update_inferior_debug_regs): New.
11476 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11477 registers, and only update the inferior on success.
11478 (i386_low_remove_watchpoint): Ditto.
11479
d26e3629
KY
114802011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11481
11482 * linux-low.c (compare_ints, unique, list_threads, show_process,
11483 linux_core_of_thread): Delete.
11484 (linux_target_ops): Change linux_core_of_thread to
11485 linux_common_core_of_thread.
11486 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11487 * utils.c (malloc_failure): Change type of argument.
11488 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11489 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11490 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11491 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11492 (IPA_OBJS): Add common-utils-ipa.o.
11493 (ptid_h, linux_osdata_h): New macros.
11494 (server_h): Add common/common-utils.h, common/xml-utils.h,
11495 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11496 common/ptid.h.
11497 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11498 ptid.o, buffer.o): New rules.
11499 (linux-low.o): Add common/linux-osdata.h as a dependency.
11500 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11501 * configure.ac: Add AC_HEADER_DIRENT check.
11502 * config.in: Regenerate.
11503 * configure: Regenerate.
11504 * remote-utils.c (xml_escape_text): Delete.
11505 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11506 buffer_xml_printf): Move to common/buffer.c.
11507 * server.c (main): Remove call to initialize_inferiors.
11508 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11509 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11510 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11511 internal_error, gdb_assert, gdb_assert_fail): Delete.
11512 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11513 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11514 common/buffer.h.
11515 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11516 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11517 initialize_inferiors): Delete.
11518
2275a1a7
PA
115192011-07-20 Pedro Alves <pedro@codesourcery.com>
11520
11521 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11522 symbol error.
11523
0a5b1e09
PA
115242011-05-31 Pedro Alves <pedro@codesourcery.com>
11525
11526 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11527 assertion.
11528 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11529
6938fd34
YQ
115302011-05-26 Yao Qi <yao@codesourcery.com>
11531
11532 * Makefile.in (thread-db.o): Track dependence to
11533 common/gdb_thread_db.h.
11534 * thread-db.c: include gdb_thread_db.h from right place.
11535
b481f9e0
TT
115362011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11537
11538 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11539 __FILE__ and __LINE__ to internal_error.
11540
98a5dd13
DE
115412011-05-13 Doug Evans <dje@google.com>
11542
11543 * thread-db.c (try_thread_db_load_from_sdir): New function.
11544 (try_thread_db_load_from_dir): New function.
11545 (thread_db_load_search): Handle $sdir, ignore $pdir.
11546 Remove trying of system directories if search of
11547 libthread-db-search-path fails, that is now done via $sdir.
11548
d248b706
KY
115492011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11550
11551 * server.c (handle_query): Add EnableDisableTracepoints to the list
11552 of supported features.
43aaf8b6 11553 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11554 tracepoints.
43aaf8b6
PA
11555 (cmd_qtenable_disable): New.
11556 (cmd_qtstart): Install tracepoints even if disabled.
11557 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11558 receiving a QTEnable or QTDisable packet.
11559 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11560 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11561 tracepoints.
11562 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11563
84e578fb
DE
115642011-05-10 Doug Evans <dje@google.com>
11565
11566 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11567
71f55dd8
DE
115682011-05-04 Doug Evans <dje@google.com>
11569
11570 * linux-low.c (linux_join): Skip process lookup.
11571 * spu-low.c (spu_join): Ditto.
11572 * server.c (join_inferiors_callback): Delete.
11573 (process_serial_event): For 'D' packet (detach) call join_inferior
11574 directly.
11575
4d393d60
JM
115762011-05-04 Joseph Myers <joseph@codesourcery.com>
11577
11578 * README: Don't mention xscale*-*-linux*.
11579 * configure.srv (xscale*-*-linux*): Don't handle target.
11580
b00ad6ff
NF
115812011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11582
11583 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11584 casting pointers.
11585 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11586 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11587 (i386_emit_void_call_2): Likewise.
11588
af96c192
YQ
115892011-04-26 Yao Qi <yao@codesourcery.com>
11590
43aaf8b6
PA
11591 * linux-low.c: Move common macros to linux-ptrace.h.
11592 Include linux-ptrace.h.
af96c192
YQ
11593 * Makefile.in (linux_ptrace_h): New.
11594 (linux-low.o): Depends on linux-ptrace.h.
11595
03f2bd59
JK
115962011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11597
11598 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11599 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11600 (remote_prepare): New function with most of the TCP code from ...
11601 (remote_open): ... here. Detect PORT here unconditionally. Move also
11602 setting transport_is_reliable.
11603 * server.c (run_once): New variable.
11604 (gdbserver_usage): Document it.
11605 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11606 the first run if RUN_ONCE.
11607 * server.h (run_once, remote_prepare): New declarations.
11608
7a9dd1b2
TT
116092011-04-19 Tom Tromey <tromey@redhat.com>
11610
11611 * win32-low.c (handle_load_dll): Remove duplicate "the".
11612
81239425
PM
116132011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11614
11615 Remove support for old Cygwin 1.5 versions.
11616 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11617 function to avoid warning.
11618 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11619 warning.
11620
9e0627f1
PM
116212011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11622
11623 * gdbserver/server.h (Macro _): Define it if not available.
11624
588eebee
MS
116252011-03-14 Michael Snyder <msnyder@vmware.com>
11626
348af9f7 11627 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11628
43f70d4c
JB
116292011-03-10 Joel Brobecker <brobecker@adacore.com>
11630
11631 * Makefile.in (maintainer-clean realclean distclean): Remove
11632 "make ... subdir_do" command.
11633
348af9f7
MS
116342011-03-10 Michael Snyder <msnyder@vmware.com>
11635
11636 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11637
11638 * server.c (handle_v_run): Free alloced buffer on early return.
11639
e637a4f5
YQ
116402011-03-09 Yao Qi <yao@codesourcery.com>
11641
11642 Revert:
11643 2011-03-04 Yao Qi <yao@codesourcery.com>
11644
11645 * Makefile.in: Remove GNU make feature --directory.
11646
11647 2011-03-05 Yao Qi <yao@codesourcery.com>
11648
11649 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11650 (subdir_do): New make target. Copied from gdb/Makefile.
11651 (maintainer-clean, realclean, distclean, clean): Call corresponding
11652 make targets in common/Makefile.
11653
11654 2011-02-11 Yao Qi <yao@codesourcery.com>
11655
11656 * configure.ac: Call AC_PROG_RANLIB.
11657 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11658 * configure: Regenerate.
11659
e6edda56
JK
116602011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11661
11662 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11663
e5141119
JB
116642011-03-06 Yao Qi <yao@codesourcery.com>
11665
11666 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11667
64794aa4
JB
116682011-03-05 Yao Qi <yao@codesourcery.com>
11669
11670 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11671 (subdir_do): New make target. Copied from gdb/Makefile.
11672 (maintainer-clean, realclean, distclean, clean): Call corresponding
11673 make targets in common/Makefile.
11674
7a762829
YQ
116752011-03-04 Yao Qi <yao@codesourcery.com>
11676
11677 * Makefile.in: Remove GNU make feature --directory.
11678
348af9f7
MS
116792011-03-04 Michael Snyder <msnyder@vmware.com>
11680
11681 * server.c (queue_stop_reply): Call xmalloc not malloc.
11682
116832011-03-02 Michael Snyder <msnyder@vmware.com>
11684
11685 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11686
9f72fee2
MS
116872011-02-28 Michael Snyder <msnyder@vmware.com>
11688
588eebee
MS
11689 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11690 (cmd_qtframe): Ditto.
11691 (cmd_qtbuffer): Ditto.
11692 (cmd_bigqtbuffer): Ditto.
11693
9f72fee2
MS
11694 * utils.c (decimal2str): Initialize 'width' to nine, then
11695 don't mess with it.
11696
8040bd49
UW
116972011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11698
11699 * hostio.c (require_data): Free *data, not data.
11700
7e52cbd0
JK
117012011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11702
11703 * hostio.c (require_data): Use free, not xfree.
11704
9130f83e
MS
117052011-02-27 Michael Snyder <msnyder@vmware.com>
11706
4b812f4e
MS
11707 * server.c (handle_query): Discard unused value.
11708
9130f83e
MS
11709 * hostio.c (require_data): Free malloc memory before returning
11710 error.
11711
69d37113
MS
117122011-02-26 Michael Snyder <msnyder@vmware.com>
11713
11714 * linux-low.c (list_threads): Call closedir for dirent.
11715
35f5825a
MS
117162011-02-27 Michael Snyder <msnyder@vmware.com>
11717
2a589cef
MS
11718 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11719 a case statement falls through.
11720
0adea5f7
MS
11721 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11722
35f5825a
MS
11723 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11724 in comparison.
11725
238f1c74
MS
117262011-02-26 Michael Snyder <msnyder@vmware.com>
11727
11728 * utils.c (decimal2str): Eliminate dead code and dead param.
11729 (pulongest): Drop dead param from call to decimal2str.
11730 (plongest): Ditto.
11731
633ff500
JB
117322011-02-24 Joel Brobecker <brobecker@adacore.com>
11733
11734 Revert the following patch (not approved yet):
11735 2011-02-21 Hui Zhu <teawater@gmail.com>
11736 * tracepoint.c (tp_printf): New function.
11737 (eval_agent_expr): Handle gdb_agent_op_printf.
11738
f9c6ff72
HZ
117392011-02-21 Hui Zhu <teawater@gmail.com>
11740
11741 * tracepoint.c (tp_printf): New function.
11742 (eval_agent_expr): Handle gdb_agent_op_printf.
11743
94d5e490
TT
117442011-02-18 Tom Tromey <tromey@redhat.com>
11745
11746 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11747 (tracepoint.o): Likewise.
11748 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11749 (gdb_agent_op_names): Likewise.
11750
c7f96d2b
TT
117512011-02-18 Tom Tromey <tromey@redhat.com>
11752
11753 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11754 gdb_agent_op_rot>: New constants.
11755 (gdb_agent_op_names): Add pick and roll.
11756 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11757 cases.
11758
0feedb2c
JK
117592011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11760
11761 * aclocal.m4: Regenerated with aclocal-1.11.1.
11762
b3b9301e
PA
117632011-02-14 Pedro Alves <pedro@codesourcery.com>
11764
11765 * server.c (handle_qxfer_traceframe_info): New.
11766 (qxfer_packets): Register "traceframe-info".
11767 (handle_query): Report support for qXfer:traceframe-info:read+.
11768 * tracepoint.c (match_blocktype): New.
11769 (traceframe_find_block_type): Rename to ...
11770 (traceframe_walk_blocks): ... this. Add callback filter argument,
11771 and use it.
11772 (traceframe_find_block_type): New, reimplemented on top of
11773 traceframe_walk_blocks.
11774 (build_traceframe_info_xml): New.
11775 (traceframe_read_info): New.
11776 * server.h (traceframe_read_info): Declare.
11777
4f3e6fb7
YQ
117782011-02-11 Yao Qi <yao@codesourcery.com>
11779
11780 * configure.ac: Call AC_PROG_RANLIB.
11781 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11782 * configure: Regenerate.
11783
764880b7
PA
117842011-02-07 Pedro Alves <pedro@codesourcery.com>
11785
11786 * server.c (gdb_read_memory): Change return semantics to allow
11787 partial transfers.
11788 (handle_search_memory_1): Adjust.
11789 (process_serial_event) <'m' packet>: Handle partial transfers.
11790 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11791
1c79eb8a
PA
117922011-01-28 Pedro Alves <pedro@codesourcery.com>
11793
11794 * regcache.c (init_register_cache): Initialize
11795 regcache->register_status.
11796 (free_register_cache): Release regcache->register_status.
11797 (regcache_cpy): Copy register_status.
11798 (registers_to_string): Print 'x's for unavailable registers.
11799 (supply_register): Mark the register's status valid or
11800 unavailable, depending on whether a buffer was passed in or not.
11801 (supply_register_zeroed): New.
11802 (supply_regblock): Mark the registers' status valid or
11803 unavailable, depending on whether a buffer was passed in or not.
11804 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11805 (struct regcache): New `register_status' field.
11806 (supply_register_zeroed): Declare.
11807 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11808 supply_register_zeroed, rather than passing a NULL buffer to
11809 supply_register.
11810 * tracepoint.c (fetch_traceframe_registers): Update comment.
11811
85724a0e
PA
118122011-01-28 Pedro Alves <pedro@codesourcery.com>
11813
11814 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11815 buffer explicit.
11816
d08aafef
PA
118172011-01-25 Pedro Alves <pedro@codesourcery.com>
11818
11819 * server.h (decode_xfer_write): Change prototype.
11820 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11821 and don't extract the annex here.
11822 * server.c (decode_xfer_read): Remove `annex' parameter,
11823 and don't extract the annex here.
11824 (decode_xfer): New.
11825 (struct qxfer): New.
11826 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11827 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11828 (handle_qxfer_statictrace): New functions, abstracted out from
11829 handle_query, and made to use the struct qxfer interface.
11830 (handle_threads_qxfer_proper): Rename to ...
11831 (handle_qxfer_threads_proper): ... this.
11832 (handle_threads_qxfer): Rename to ...
11833 (handle_qxfer_threads): ... this. Adjust.
11834 (qxfer_packets): New array.
11835 (handle_qxfer): New function.
11836 (handle_query): Use handle_qxfer.
11837
493e2a69
MS
118382011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11839
11840 * gdbreplay.c: Shorten lines of >= 80 columns.
11841 * linux-low.c: Ditto.
11842 * linux-ppc-low.c: Ditto.
11843 * linux-s390-low.c: Ditto.
11844 * linux-sparc-low.c: Ditto.
11845 * linux-x86-low.c: Ditto.
11846 * linux-xtensa-low.c: Ditto.
11847 * mem-break.c: Ditto.
11848 * nto-low.c: Ditto.
11849 * regcache.h: Ditto.
11850 * remote-utils.c: Ditto.
11851 * server.c: Ditto.
11852 * server.h: Ditto.
11853 * thread-db.c: Ditto.
11854 * tracepoint.c: Ditto.
11855 * utils.c: Ditto.
11856 * win32-low.h: Ditto.
11857
44944448
JB
118582011-01-05 Joel Brobecker <brobecker@adacore.com>
11859
11860 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11861 update.
11862
71ce852c
JB
118632011-01-01 Joel Brobecker <brobecker@adacore.com>
11864
11865 * server.c (gdbserver_version): Update copyright year in version
11866 output.
11867 * gdbreplay.c (gdbreplay_version): Ditto.
11868
eb826dc6
MF
118692010-12-29 Jie Zhang <jie.zhang@analog.com>
11870
11871 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11872 * linux-bfin-low.c: New file.
11873 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11874 PT_DATA_ADDR for BFIN targets.
11875 * Makefile.in (SFILES): Add linux-bfin-low.c.
11876 (clean): Remove reg-bfin.c.
11877 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11878 * README: Mention supported Blackfin targets.
11879
39ab222a
MF
118802010-12-23 Mike Frysinger <vapier@gentoo.org>
11881
11882 * .gitignore: New file.
11883
a1f2ce7d
MF
118842010-11-16 Mike Frysinger <vapier@gentoo.org>
11885
11886 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11887
f474844c
JZ
118882010-10-22 Jie Zhang <jie@codesourcery.com>
11889
11890 * Makefile.in: Add FLAGS_TO_PASS variable.
11891 (install): Remove dependency of install-only and recursively
11892 invoke make for install-only.
11893
f1048712
DE
118942010-10-04 Doug Evans <dje@google.com>
11895
11896 * Makefile.in (uninstall): Use $(DESTDIR).
11897
b53a1623
PA
118982010-09-24 Pedro Alves <pedro@codesourcery.com>
11899
e6ee044d
PA
11900 PR gdb/11842
11901
b53a1623
PA
11902 * linux-x86-low.c (compat_siginfo_from_siginfo)
11903 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11904 si_code is < 0. Check for si_code == SI_TIMER before checking for
11905 si_code < 0.
11906
fa1bd1e4
JB
119072010-09-13 Joel Brobecker <brobecker@adacore.com>
11908
11909 * lynx-i386-low.c: New file.
11910 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11911
47fac8f8
JB
119122010-09-13 Joel Brobecker <brobecker@adacore.com>
11913
11914 * lynx-low.c (ptrace_request_to_str): Remove handling for
11915 request values that have been removed in LynxOS 5.x.
11916
1adfc54d
JB
119172010-09-13 Joel Brobecker <brobecker@adacore.com>
11918
11919 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11920 <ptrace.h>
11921
c2a66c29
NS
119222010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11923
11924 * configure.ac: Add --enable-inprocess-agent option.
11925 * configure: Rebuilt.
11926
32fcada3
YQ
119272010-09-06 Yao Qi <yao@codesourcery.com>
11928
11929 * linux-low.c (linux_kill): Remove unused variable.
11930 (linux_stabilize_threads): Likewise.
11931 * server.c (start_inferior): Likewise.
11932 (queue_stop_reply_callback): Likewise.
11933 * tracepoint.c (do_action_at_tracepoint): Likewise.
11934
0cccb683
YQ
119352010-09-06 Yao Qi <yao@codesourcery.com>
11936
11937 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11938 on return.
11939
423ec54c
JK
119402010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11941
11942 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11943
12ac6819
PA
119442010-09-06 Pedro Alves <pedro@codesourcery.com>
11945
11946 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11947 "$(IPA_DEPFILES)".
11948
8ed54b31
JB
119492010-09-01 Joel Brobecker <brobecker@adacore.com>
11950
11951 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11952 gdbserver/lynx-ppc-low.c: New files.
11953 * Makefile.in (lynx_low_h): New variable.
11954 (lynx-low.o, lynx-ppc-low.o): New rules.
11955 * configure.ac: On LynxOS, link with -lnetinet.
11956 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11957 * configure: regenerate.
11958
bb0116a4
JB
119592010-09-01 Joel Brobecker <brobecker@adacore.com>
11960
11961 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11962 * configure.ac: Add check for vasprintf and vsnprintf.
11963 * configure, config.in: Regenerate.
11964 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11965
a778ab81 119662010-09-01 Joel Brobecker <brobecker@adacore.com>
11967
11968 * gdbreplay.c: Move include of alloca.h up, next to include of
11969 malloc.h.
11970 * server.h: Add include of malloc.h.
11971 * mem-break.c: Remove include of malloc.h.
11972 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11973
8b034a19 119742010-09-01 Joel Brobecker <brobecker@adacore.com>
11975
11976 * Makefile.in (memmem.o): Build with -Wno-error.
11977
119782010-09-01 Joel Brobecker <brobecker@adacore.com>
11979
11980 * utils.c (xsnprintf): Make non-static.
11981 * server.h: Add xsnprintf declaration.
11982 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11983 replace calls to snprintf by calls to xsnprintf throughout.
11984
119852010-09-01 Joel Brobecker <brobecker@adacore.com>
11986
11987 * configure.ac: Add configure check for alloca.
11988 * configure, config.in: Regenerate.
11989 * server.h: Include alloca.h if it exists.
11990 * gdbreplay.c: Include alloca.h if it exists.
11991
1a981360
PA
119922010-08-28 Pedro Alves <pedro@codesourcery.com>
11993
11994 * linux-low.c (__SIGRTMIN): Define if not already defined.
11995 (linux_create_inferior): Check for __ANDROID__ rather than
11996 __SIGRTMIN.
11997 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11998 are already deferred.
11999 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12000 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12001 stopped and already has a pending signal to report.
12002 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12003 a pending signal to report or is moving out of a jump pad.
12004 (linux_init_signals): Check for __ANDROID__ rather than
12005 __SIGRTMIN.
12006
b4d51a55
PA
120072010-08-28 Pedro Alves <pedro@codesourcery.com>
12008
12009 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12010 debug_threads check. Avoid a linear search when not doing debug
12011 output.
12012
ec48365d
PA
120132010-08-27 Pedro Alves <pedro@codesourcery.com>
12014
12015 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12016 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12017 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12018 (process_event): Change local fd's type to gdb_fildes_t.
12019 (create_file_handler): Adjust prototype.
12020 (delete_file_handler): Adjust prototype.
12021 (handle_file_event): Adjust prototype. Use pfildes.
12022 (create_file_event): Adjsut prototype.
12023 * remote-utils.c (remote_desc, listen_desc): Change type to
12024 gdb_fildes_t.
12025 * server.h: New gdb_fildes_t typedef.
12026 [USE_WIN32API]: Include winsock2.h.
12027 (delete_file_handler, add_file_handler): Adjust prototypes.
12028 (pfildes): Declare.
12029 * utils.c (pfildes): New.
12030
854d88f0
PA
120312010-08-27 Pedro Alves <pedro@codesourcery.com>
12032
12033 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12034 * configure: Regenerate.
12035
0146f85b
PA
120362010-08-27 Pedro Alves <pedro@codesourcery.com>
12037
12038 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12039 (linux_done_accessing_memory): ... this.
12040 (linux_target_ops): Adjust.
12041 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12042 * nto-low.c (nto_target_ops): Adjust comment.
12043 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12044 * spu-low.c (spu_target_ops): Adjust comment.
12045 * target.h (target_ops): Rename unprepare_to_access_memory field
12046 to done_accessing_memory.
12047 (unprepare_to_access_memory): Rename to ...
12048 (done_accessing_memory): ... this.
12049
90d74c30
PA
120502010-08-26 Pedro Alves <pedro@codesourcery.com>
12051
12052 * linux-low.c (linux_prepare_to_access_memory): New.
12053 (linux_unprepare_to_access_memory): New.
12054 (linux_target_ops): Install them.
12055 * server.c (read_memory): Rename to ...
12056 (gdb_read_memory): ... this. Use
12057 prepare_to_access_memory/prepare_to_access_memory.
12058 (write_memory): Rename to ...
12059 (gdb_write_memory): ... this. Use
12060 prepare_to_access_memory/prepare_to_access_memory.
12061 (handle_search_memory_1): Adjust.
12062 (process_serial_event): Adjust.
12063 * target.h (struct target_ops): New fields
12064 prepare_to_access_memory and unprepare_to_access_memory.
12065 (prepare_to_access_memory, unprepare_to_access_memory): New.
12066 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12067 prepare_to_access_memory/prepare_to_access_memory.
12068 * nto-low.c (nto_target_ops): Adjust.
12069 * spu-low.c (spu_target_ops): Adjust.
12070 * win32-low.c (win32_target_ops): Adjust.
12071
fd467969
PA
120722010-08-26 Pedro Alves <pedro@codesourcery.com>
12073
12074 * Makefile.in (WARN_CFLAGS): Get it from configure.
12075 (WERROR_CFLAGS): New.
12076 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12077 * configure.ac: Introduce --enable-werror, which adds -Werror to
12078 the compiler command line. Enabled by default. Disable with
12079 --disable-werror. Add -Wdeclaration-after-statement
12080 Wpointer-arith and -Wformat-nonliteral to warning flags.
12081 * configure: Regenerate.
12082
331e2f5f
PA
120832010-08-26 Pedro Alves <pedro@codesourcery.com>
12084
12085 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12086
e581f2b4
PA
120872010-08-26 Pedro Alves <pedro@codesourcery.com>
12088
12089 * gdbreplay.c (remote_error): New.
12090 (gdbchar): New.
12091 (expect): Use gdbchar. Check for error reading from GDB.
12092 Clarify sync error output.
12093 (play): Check for errors writing to GDB.
12094 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12095 * remote-utils.c (getpkt): Check for errors writing to the remote
12096 descriptor.
12097
3c11dd79
PA
120982010-08-25 Pedro Alves <pedro@codesourcery.com>
12099
12100 * linux-low.c (linux_wait_1): Move non-debugging code out of
12101 `debug_threads' control.
12102
d20a8ad9
PA
121032010-08-25 Pedro Alves <pedro@codesourcery.com>
12104
12105 * linux-low.c (linux_wait_1): Don't set last_status here.
12106 * server.c (push_event, queue_stop_reply_callback): Assert we're
12107 not pushing a TARGET_WAITKIND_IGNORE event.
12108 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12109 (myresume, handle_target_event): Set the thread's last_resume_kind
12110 and last_status from the target returned status.
12111
964e4306
PA
121122010-08-25 Pedro Alves <pedro@codesourcery.com>
12113
12114 PR threads/10729
12115
12116 * linux-x86-low.c (update_debug_registers_callback): New.
12117 (i386_dr_low_set_addr): Use it.
12118 (i386_dr_low_get_addr): New.
12119 (i386_dr_low_set_control): Use update_debug_registers_callback.
12120 (i386_dr_low_get_control): New.
12121 (i386_dr_low_get_status): Adjust.
12122 * linux-low.c (linux_stop_lwp): New.
12123 * linux-low.h (linux_stop_lwp): Declare.
12124
12125 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12126 argument instead of a i386_debug_reg_state.
12127 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12128 a i386_debug_reg_state.
12129 (i386_insert_aligned_watchpoint): Adjust.
12130 (i386_remove_aligned_watchpoint): Adjust.
12131 (i386_low_stopped_data_address): Read the debug registers from the
12132 inferior instead of from the mirrors.
12133 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12134 (i386_dr_low_get_addr): Declare.
12135 (i386_dr_low_get_control): Declare.
12136 (i386_dr_low_get_status): Change prototype.
12137
12138 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12139 (i386_dr_low_get_addr): New.
12140 (i386_dr_low_get_control): New.
12141 (i386_dr_low_get_status): Adjust prototype. Return
12142 dr_status_mirror.
12143 (i386_initial_stuff): Clear dr_status_mirror and
12144 dr_control_mirror.
12145 (i386_get_thread_context): Adjust.
12146 (i386_set_thread_context): Adjust.
12147 (i386_thread_added): Adjust.
12148
5f21a75b
PA
121492010-08-24 Pedro Alves <pedro@codesourcery.com>
12150
12151 * linux-low.h (linux_thread_area): Delete declaration.
12152
3e4c1235
TS
121532010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12154
12155 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12156 after its termination.
12157
1971b033
PA
121582010-08-09 Pedro Alves <pedro@codesourcery.com>
12159
12160 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12161 (gdb_wants_all_stopped): Delete.
12162 (linux_wait_1): Don't call them.
12163 * server.c (handle_v_cont): Tag all threads as want-stopped.
12164 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12165 stopped as "client-wants-stopped".
12166
310444ac
PA
121672010-07-31 Pedro Alves <pedro@codesourcery.com>
12168
12169 * Makefile.in (signals_h): New.
12170 (server_h): Depend on it.
12171 (server.o): Don't depend on $(signals_def).
12172 (signals.o): Depend on $(signals_def).
12173
a19cae16
JK
121742010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12175
12176 * Makefile.in (signals_def): New.
12177 (server_h): Append include/gdb/signals.h and signals_def.
12178 (server.o): Append signals_def.
12179
30d50328
JK
121802010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12181
12182 * server.c (handle_target_event): Use target_signal_to_host for
12183 resume_info.sig initialization.
12184 * target.h (struct thread_resume) <sig>: New comment.
12185
5c3216e2
OS
121862010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12187
c6f46ca0
OS
12188 * server.c (handle_query): strcpy() the returned string from paddress()
12189 instead of sprintf().
5c3216e2
OS
12190 * utils.c (paddress): Return phex_nz().
12191
6bd31874
JB
121922010-07-07 Joel Brobecker <brobecker@adacore.com>
12193
12194 * server.c (handle_v_cont): Call mourn_inferior if process
12195 just exited.
12196 (myresume): Likewise.
12197
0fb4aa4b
PA
121982010-07-01 Pedro Alves <pedro@codesourcery.com>
12199
12200 Static tracepoints, and integration with UST.
12201
12202 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12203 * mem-break.c (uninsert_all_breakpoints)
12204 (reinsert_all_breakpoints): New.
12205 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12206 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12207 (gdb_agent_ust_loaded, helper_thread_id)
12208 (gdb_agent_helper_thread_id): New macros.
12209 (struct ipa_sym_addresses): Add addr_ust_loaded,
12210 addr_helper_thread_id, addr_cmd_buf.
12211 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12212 (in_process_agent_loaded_ust): New.
12213 (write_e_ust_not_loaded): New.
12214 (maybe_write_ipa_ust_not_loaded): New.
12215 (struct collect_static_trace_data_action): New.
12216 (enum tracepoint_type) <static_tracepoint>: New.
12217 (struct tracepoint) <handle>: Mention static tracepoints.
12218 (struct static_tracepoint_ctx): New.
12219 (CMD_BUF_SIZE): New.
12220 (add_tracepoint_action): Handle static tracepoint actions.
12221 (unprobe_marker_at): New.
12222 (clear_installed_tracepoints): Handle static tracepoints.
12223 (cmd_qtdp): Handle static tracepoints.
12224 (probe_marker_at): New.
12225 (cmd_qtstart): Handle static tracepoints.
12226 (response_tracepoint): Handle static tracepoints.
12227 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12228 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12229 (get_context_regcache): Handle static tracepoints.
12230 (do_action_at_tracepoint): Handle static tracepoint actions.
12231 (traceframe_find_block_type): Handle static trace data blocks.
12232 (traceframe_read_sdata): New.
12233 (download_tracepoints): Download static tracepoint actions.
12234 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12235 (GDB_PROBE_NAME): New.
12236 (ust_ops): New.
12237 (GET_UST_SYM): New.
12238 (USTF): New.
12239 (dlsym_ust): New.
12240 (ust_marker_to_static_tracepoint): New.
12241 (gdb_probe): New.
12242 (collect_ust_data_at_tracepoint): New.
12243 (gdb_ust_probe): New.
12244 (UNIX_PATH_MAX, SOCK_DIR): New.
12245 (gdb_ust_connect_sync_socket): New.
12246 (resume_thread, stop_thread): New.
12247 (run_inferior_command): New.
12248 (init_named_socket): New.
12249 (gdb_ust_socket_init): New.
12250 (cstr_to_hexstr): New.
12251 (next_st): New.
12252 (first_marker, next_marker): New.
12253 (response_ust_marker): New.
12254 (cmd_qtfstm, cmd_qtsstm): New.
12255 (unprobe_marker_at, probe_marker_at): New.
12256 (cmd_qtstmat, gdb_ust_thread): New.
12257 (gdb_ust_init): New.
12258 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12259 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12260 (ST_REGENTRY): New.
12261 (x86_64_st_collect_regmap): New.
12262 (X86_64_NUM_ST_COLLECT_GREGS): New.
12263 (AMD64_RIP_REGNUM): New.
12264 (supply_static_tracepoint_registers): New.
12265 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12266 (ST_REGENTRY): New.
12267 (i386_st_collect_regmap): New.
12268 (i386_NUM_ST_COLLECT_GREGS): New.
12269 (supply_static_tracepoint_registers): New.
12270 * server.c (handle_query): Handle qXfer:statictrace:read.
12271 <qSupported>: Report support for StaticTracepoints, and
12272 qXfer:statictrace:read features.
12273 * server.h (traceframe_read_sdata)
12274 (supply_static_tracepoint_registers): Declare.
12275 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12276 (unpack_varlen_hex): Include in IPA build.
12277 * Makefile.in (ustlibs, ustinc): New.
12278 (IPA_OBJS): Add remote-utils-ipa.o.
12279 ($(IPA_LIB)): Link -ldl and -lpthread.
12280 (UST_CFLAGS): New.
12281 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12282 * config.in, configure: Regenerate.
12283
9e4344e5
PA
122842010-06-20 Ian Lance Taylor <iant@google.com>
12285 Pedro Alves <pedro@codesourcery.com>
12286
12287 * linux-x86-low.c (always_true): Delete.
12288 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12289 trying to fool the compiler with always_true.
12290
c6beb2cb
PA
122912010-06-20 Pedro Alves <pedro@codesourcery.com>
12292
12293 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12294 conditions in gdbserver.
12295
d2ed6730
UW
122962010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12297
12298 * spu-low.c (spu_read_memory): Wrap around local store limit.
12299 (spu_write_memory): Likewise.
12300
4e29fb54
PA
123012010-06-15 Pedro Alves <pedro@codesourcery.com>
12302
12303 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12304 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12305 LONGEST uses.
12306 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12307 uses.
12308 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12309 uses with LONGEST uses.
12310
6a271cae
PA
123112010-06-14 Stan Shebs <stan@codesourcery.com>
12312 Pedro Alves <pedro@codesourcery.com>
12313
12314 Bytecode compiler.
12315
12316 * linux-x86-low.c: Include limits.h.
12317 (add_insns): New.
12318 (always_true): New.
12319 (EMIT_ASM): New.
12320 (EMIT_ASM32): New.
12321 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12322 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12323 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12324 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12325 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12326 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12327 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12328 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12329 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12330 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12331 (amd64_emit_void_call_2): New.
12332 (amd64_emit_ops): New.
12333 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12334 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12335 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12336 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12337 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12338 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12339 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12340 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12341 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12342 (i386_emit_stack_adjust, i386_emit_int_call_1)
12343 (i386_emit_void_call_2): New.
12344 (i386_emit_ops): New.
12345 (x86_emit_ops): New.
12346 (the_low_target): Install x86_emit_ops.
12347 * server.h (struct emit_ops): New.
12348 (get_raw_reg_func_addr): Declare.
12349 (current_insn_ptr, emit_error): Declare.
12350 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12351 (set_trace_state_variable_value): New defines.
12352 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12353 addr_get_trace_state_variable_value and
12354 addr_set_trace_state_variable_value.
12355 (symbol_list): New fields for get_raw_reg,
12356 get_trace_state_variable_value and set_trace_state_variable_value.
12357 (condfn): New typedef.
12358 (struct tracepoint): New field `compiled_cond'.
12359 (do_action_at_tracepoint): Clear compiled_cond.
12360 (get_trace_state_variable_value, set_trace_state_variable_value):
12361 Export in the IPA.
12362 (condition_true_at_tracepoint): If there's a compiled condition,
12363 run that.
12364 (current_insn_ptr, emit_error): New globals.
12365 (struct bytecode_address): New.
12366 (get_raw_reg_func_addr): New.
12367 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12368 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12369 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12370 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12371 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12372 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12373 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12374 (compile_tracepoint_condition, compile_bytecodes): New.
12375 * target.h (emit_ops): Forward declare.
12376 (struct target_ops): New field emit_ops.
12377 (target_emit_ops): New.
12378 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12379 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12380 * linux-low.c (linux_emit_ops): New.
12381 (linux_target_ops): Install it.
12382 * linux-low.h (struct linux_target_ops): New field emit_ops.
12383
92b72907
UW
123842010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12385
12386 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12387 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12388
fa593d66
PA
123892010-06-01 Pedro Alves <pedro@codesourcery.com>
12390 Stan Shebs <stan@codesourcery.com>
12391
12392 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12393 (all): Depend on $(extra_libraries).
12394 (install-only): Install the IPA.
12395 (IPA_OBJS, IPA_LIB): New.
12396 (clean): Remove the IPA lib.
12397 (IPAGENT_CFLAGS): New.
12398 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12399 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12400 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12401 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12402 * configure.ac: Check for atomic builtins support in the compiler.
12403 (IPA_DEPFILES, extra_libraries): Define.
12404 * configure.srv (ipa_obj): Add description.
12405 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12406 (i[34567]86-*-linux*): Set ipa_obj.
12407 (x86_64-*-linux*): Set ipa_obj.
12408 * linux-low.c (stabilizing_threads): New.
12409 (supports_fast_tracepoints): New.
12410 (linux_detach): Stabilize threads before detaching.
12411 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12412 the lwp is either not stabilizing, or is moving out of a jump pad.
12413 (linux_fast_tracepoint_collecting): New.
12414 (maybe_move_out_of_jump_pad): New.
12415 (enqueue_one_deferred_signal): New.
12416 (dequeue_one_deferred_signal): New.
12417 (linux_wait_for_event_1): If moving out of a jump pad, defer
12418 pending signals to later.
12419 (linux_stabilize_threads): New.
12420 (linux_wait_1): Check if threads need moving out of jump pads, and
12421 do it if so.
12422 (stuck_in_jump_pad_callback): New.
12423 (move_out_of_jump_pad_callback): New.
12424 (lwp_running): New.
12425 (linux_resume_one_lwp): Handle moving out of jump pads.
12426 (linux_set_resume_request): Dequeue deferred signals.
12427 (need_step_over_p): Also step over fast tracepoint jumps.
12428 (start_step_over): Also uninsert fast tracepoint jumps.
12429 (finish_step_over): Also reinsert fast tracepoint jumps.
12430 (linux_install_fast_tracepoint_jump): New.
12431 (linux_target_ops): Install linux_stabilize_threads and
12432 linux_install_fast_tracepoint_jump_pad.
12433 * linux-low.h (linux_target_ops) <get_thread_area,
12434 install_fast_tracepoint_jump_pad>: New fields.
12435 (struct lwp_info) <collecting_fast_tracepoint,
12436 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12437 (linux_get_thread_area): Declare.
12438 * linux-x86-low.c (jump_insn): New.
12439 (x86_get_thread_area): New.
12440 (append_insns): New.
12441 (push_opcode): New.
12442 (amd64_install_fast_tracepoint_jump_pad): New.
12443 (i386_install_fast_tracepoint_jump_pad): New.
12444 (x86_install_fast_tracepoint_jump_pad): New.
12445 (the_low_target): Install x86_get_thread_area and
12446 x86_install_fast_tracepoint_jump_pad.
12447 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12448 (struct fast_tracepoint_jump): New.
12449 (fast_tracepoint_jump_insn): New.
12450 (fast_tracepoint_jump_shadow): New.
12451 (find_fast_tracepoint_jump_at): New.
12452 (fast_tracepoint_jump_here): New.
12453 (delete_fast_tracepoint_jump): New.
12454 (set_fast_tracepoint_jump): New.
12455 (uninsert_fast_tracepoint_jumps_at): New.
12456 (reinsert_fast_tracepoint_jumps_at): New.
12457 (set_breakpoint_at): Use write_inferior_memory.
12458 (uninsert_raw_breakpoint): Use write_inferior_memory.
12459 (check_mem_read): Mask out fast tracepoint jumps.
12460 (check_mem_write): Mask out fast tracepoint jumps.
12461 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12462 (set_fast_tracepoint_jump): Declare.
12463 (delete_fast_tracepoint_jump)
12464 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12465 (reinsert_fast_tracepoint_jumps_at): Declare.
12466 * regcache.c: Don't compile many functions when building the
12467 in-process agent library.
12468 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12469 the register buffer in the heap.
12470 (free_register_cache): If the register buffer isn't owned by the
12471 regcache, don't free it.
12472 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12473 pre-existing register caches.
12474 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12475 type.
12476 (convert_ascii_to_int): : Constify `from' parameter type.
12477 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12478 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12479 the needed buffer in-place.
12480 (relocate_instruction): New.
12481 * server.c (handle_query) <qSymbols>: If the target supports
12482 tracepoints, give it a chance of looking up symbols. Report
12483 support for fast tracepoints.
12484 (handle_status): Stabilize threads.
12485 (process_serial_event): Adjust.
12486 * server.h (struct fast_tracepoint_jump): Forward declare.
12487 (struct process_info) <fast_tracepoint_jumps>: New field.
12488 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12489 (decode_X_packet, decode_M_packet): Adjust.
12490 (relocate_instruction): Declare.
12491 (in_process_agent_loaded): Declare.
12492 (tracepoint_look_up_symbols): Declare.
12493 (struct fast_tpoint_collect_status): Declare.
12494 (fast_tracepoint_collecting): Declare.
12495 (force_unlock_trace_buffer): Declare.
12496 (handle_tracepoint_bkpts): Declare.
12497 (initialize_low_tracepoint)
12498 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12499 * target.h (struct target_ops) <stabilize_threads,
12500 install_fast_tracepoint_jump_pad>: New fields.
12501 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12502 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12503 [HAVE_STDINT_H]: Include stdint.h.
12504 (trace_debug_1): Rename to ...
12505 (trace_vdebug): ... this.
12506 (trace_debug): Rename to ...
12507 (trace_debug_1): ... this. Add `level' parameter.
12508 (trace_debug): New.
12509 (ATTR_USED, ATTR_NOINLINE): New.
12510 (IP_AGENT_EXPORT): New.
12511 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12512 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12513 (about_to_request_buffer_space, trace_buffer_is_full)
12514 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12515 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12516 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12517 (traceframe_write_count, traceframes_created)
12518 (trace_state_variables)
12519 New renaming defines.
12520 (struct ipa_sym_addresses): New.
12521 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12522 (symbol_list): New.
12523 (ipa_sym_addrs): New.
12524 (all_tracepoint_symbols_looked_up): New.
12525 (in_process_agent_loaded): New.
12526 (write_e_ipa_not_loaded): New.
12527 (maybe_write_ipa_not_loaded): New.
12528 (tracepoint_look_up_symbols): New.
12529 (debug_threads) [IN_PROCESS_AGENT]: New.
12530 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12531 (UNKNOWN_SIDE_EFFECTS): New.
12532 (stop_tracing): New.
12533 (flush_trace_buffer): New.
12534 (stop_tracing_bkpt): New.
12535 (flush_trace_buffer_bkpt): New.
12536 (read_inferior_integer): New.
12537 (read_inferior_uinteger): New.
12538 (read_inferior_data_pointer): New.
12539 (write_inferior_data_pointer): New.
12540 (write_inferior_integer): New.
12541 (write_inferior_uinteger): New.
12542 (struct collect_static_trace_data_action): Delete.
12543 (enum tracepoint_type): New.
12544 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12545 <actions_str, step_actions, step_actions_str>: Only include in
12546 GDBserver.
fa593d66
PA
12547 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12548 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12549 (tracepoints): Use IP_AGENT_EXPORT.
12550 (last_tracepoint): Don't include in the IPA.
12551 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12552 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12553 (alloced_trace_state_variables): New.
12554 (trace_state_variables): Use IP_AGENT_EXPORT.
12555 (traceframe_t): Delete unused variable.
12556 (circular_trace_buffer): Don't include in the IPA.
12557 (trace_buffer_start): Delete.
12558 (struct trace_buffer_control): New.
12559 (trace_buffer_free): Delete.
12560 (struct ipa_trace_buffer_control): New.
12561 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12562 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12563 New.
12564 (trace_buffer_ctrl): New.
12565 (TRACE_BUFFER_CTRL_CURR): New.
12566 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12567 Reimplement as macros.
12568 (trace_buffer_wrap): Delete.
12569 (traceframe_write_count, traceframe_read_count)
12570 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12571 (struct tracepoint_hit_ctx) <type>: New field.
12572 (struct fast_tracepoint_ctx): New.
12573 (memory_barrier): New.
12574 (cmpxchg): New.
12575 (record_tracepoint_error): Update atomically in the IPA.
12576 (clear_inferior_trace_buffer): New.
12577 (about_to_request_buffer_space): New.
12578 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12579 updating the same buffer.
12580 (add_tracepoint): Default the tracepoint's type to trap
12581 tracepoint, and orig_size to -1.
12582 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12583 internal variables.
12584 (create_trace_state_variable): New parameter `gdb'. Handle it.
12585 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12586 (cmd_qtdp): Handle fast tracepoints.
12587 (cmd_qtdv): Adjust.
12588 (max_jump_pad_size): New.
12589 (gdb_jump_pad_head): New.
12590 (get_jump_space_head): New.
12591 (claim_jump_space): New.
12592 (sort_tracepoints): New.
12593 (MAX_JUMP_SIZE): New.
12594 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12595 IPA.
12596 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12597 support. Upload fast traceframes, and delete internal IPA
12598 breakpoints.
12599 (stop_tracing_handler): New.
12600 (flush_trace_buffer_handler): New.
12601 (cmd_qtstop): Upload fast tracepoints.
12602 (response_tracepoint): Handle fast tracepoints.
12603 (tracepoint_finished_step): Upload fast traceframes. Set the
12604 tracepoint hit context's tracepoint type.
12605 (handle_tracepoint_bkpts): New.
12606 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12607 type. Add comment about fast tracepoints.
12608 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12609 non-existing action_str field.
12610 (get_context_regcache): Handle fast tracepoints.
12611 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12612 to the regcache.
12613 (fast_tracepoint_from_jump_pad_address): New.
12614 (fast_tracepoint_from_ipa_tpoint_address): New.
12615 (collecting_t): New.
12616 (force_unlock_trace_buffer): New.
12617 (fast_tracepoint_collecting): New.
12618 (collecting): New.
12619 (gdb_collect): New.
12620 (write_inferior_data_ptr): New.
12621 (target_tp_heap): New.
12622 (target_malloc): New.
12623 (download_agent_expr): New.
12624 (UALIGN): New.
12625 (download_tracepoints): New.
12626 (download_trace_state_variables): New.
12627 (upload_fast_traceframes): New.
12628 (IPA_FIRST_TRACEFRAME): New.
12629 (IPA_NEXT_TRACEFRAME_1): New.
12630 (IPA_NEXT_TRACEFRAME): New.
12631 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12632 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12633 (gdb_jump_pad_buffer_end): New.
12634 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12635 (initialize_tracepoint): Adjust.
12636 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12637 buffer. Initialize the low module.
12638 * utils.c (PREFIX, TOOLNAME): New.
12639 (malloc_failure): Use PREFIX.
12640 (error): In the IPA, an error causes an exit.
12641 (fatal, warning): Use PREFIX.
12642 (internal_error): Use TOOLNAME.
12643 (NUMCELLS): Increase to 10.
12644 * configure, config.in: Regenerate.
12645
d149dd1d
PA
126462010-06-01 Pedro Alves <pedro@codesourcery.com>
12647
12648 * server.c (handle_query) <qSupported>: Do two passes over the
12649 qSupported string to avoid nesting strtok.
12650
f6528abd
JK
126512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12652
12653 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12654 (CDEPS): New.
12655 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12656 -Wl,--dynamic-list.
12657 * configure: Regenerate.
12658 * proc-service.list: New.
12659
ca2a87a0
JK
126602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12661
12662 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12663 New comment.
12664
363a6e9f
OS
126652010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12666
12667 * gdbreplay.c (remote_open): Check error return from socket() call by
12668 its equality to -1 not by it being negative.
12669 * remote-utils.c (remote_open): Likewise.
12670
d23b6cb1
PA
126712010-05-23 Pedro Alves <pedro@codesourcery.com>
12672
12673 * config.h: Regenerate.
12674
28d3cf85
MK
126752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12676
12677 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12678 doesn't provide PTRACE_GET_THREAD_AREA.
12679
fea36a59
MK
126802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12681
12682 * linux-m68k-low.c: Include <asm/ptrace.h>
12683 (ps_get_thread_area): Implement.
12684
24b066ba
DE
126852010-05-03 Doug Evans <dje@google.com>
12686
12687 * event-loop.c (struct callback_event): New struct.
12688 (callback_list): New global.
12689 (append_callback_event, delete_callback_event): New functions.
12690 (process_callback): New function.
12691 (start_event_loop): Call it.
12692 * remote-utils.c (NOT_SCHEDULED): Define.
12693 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12694 moved out of readchar.
12695 (readchar): Rewrite. Call reschedule before returning.
12696 (reset_readchar): New function.
12697 (remote_close): Call it.
12698 (process_remaining, reschedule): New functions.
12699 * server.h (callback_handler_func): New typedef.
12700 (append_callback_event, delete_callback_event): Declare.
12701
9836d6ea
PA
127022010-05-03 Pedro Alves <pedro@codesourcery.com>
12703
12704 * proc-service.c (ps_pglobal_lookup): Use
12705 thread_db_look_up_one_symbol.
12706 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12707 parameter. Use it instead of all_symbols_looked_up.
12708 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12709 field.
12710 (all_symbols_looked_up): Don't declare.
12711 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12712 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12713 field.
12714 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12715 Set all_symbols_looked_up here.
12716 (thread_db_look_up_one_symbol): New.
12717 (thread_db_get_tls_address): Adjust.
12718 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12719 thread_db object on the heap, and tentatively set it in the
12720 process structure.
12721 (thread_db_init): Don't set all_symbols_looked_up here.
12722 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12723
7984d532
PA
127242010-05-03 Pedro Alves <pedro@codesourcery.com>
12725
12726 * linux-low.c (linux_kill, linux_detach): Adjust.
12727 (status_pending_p_callback): Remove redundant statement. Check
12728 for !TARGET_WAITIKIND_IGNORE, instead of
12729 TARGET_WAITKIND_STOPPED.
12730 (handle_tracepoints): Make sure LWP is locked. Adjust.
12731 (linux_wait_for_event_1): Adjust.
12732 (linux_cancel_breakpoints): New.
12733 (unsuspend_one_lwp): New.
12734 (unsuspend_all_lwps): New.
12735 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12736 (send_sigstop_callback): Change return type to int, add new
12737 `except' parameter and handle it.
12738 (suspend_and_send_sigstop_callback): New.
12739 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12740 pass them down. If SUSPEND, also increment the lwp's suspend
12741 count.
12742 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12743 (need_step_over_p): Don't consider suspended LWPs.
12744 (start_step_over): Adjust.
12745 (proceed_one_lwp): Change return type to int, add new `except'
12746 parameter and handle it.
12747 (unsuspend_and_proceed_one_lwp): New.
12748 (proceed_all_lwps): Use find_inferior instead of
12749 for_each_inferior.
12750 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12751 also decrement the suspend count of LWPs. Pass `except' down,
12752 instead of hacking its suspend count.
12753 (linux_pause_all): Add `freeze' parameter. Adjust.
12754 (linux_unpause_all): New.
12755 (linux_target_ops): Install linux_unpause_all.
12756 * server.c (handle_status): Adjust.
12757 * target.h (struct target_ops): New fields `unpause_all' and
12758 `cancel_breakpoints'. Add new parameter to `pause_all'.
12759 (pause_all): Add new `freeze' parameter.
12760 (unpause_all): New.
12761 (cancel_breakpoints): New.
12762 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12763 cancel breakpoints.
12764 (cmd_qtstart): Pause threads.
12765 (stop_tracing): Pause threads, and cancel breakpoints.
12766 * win32-low.c (win32_target_ops): Adjust.
12767
e471f25b
PA
127682010-05-03 Pedro Alves <pedro@codesourcery.com>
12769
12770 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12771 the inferior right away from here...
12772 (linux_wait_1): ... to here, and adjust to check the thread's
12773 last_resume_kind instead of the lwp's step or stop_expected flags.
12774
1915ef4f
PA
127752010-05-02 Pedro Alves <pedro@codesourcery.com>
12776
12777 * README: Use consistent `GDB' and `GDBserver' spellings.
12778
f9e39928
PA
127792010-05-02 Pedro Alves <pedro@codesourcery.com>
12780
12781 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12782 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12783 (linux_detach_one_lwp): Assume the lwp is stopped.
12784 (any_thread_of): Delete.
12785 (linux_detach): Stop all lwps here. Don't blindly delete all
12786 breakpoints.
12787 (delete_lwp_callback): New.
12788 (linux_mourn): Delete all lwps of the process that is gone.
12789 (linux_wait_1): Don't delete the last lwp of the process here.
12790 * mem-break.h (mark_breakpoints_out): Declare.
12791 * mem-break.c (mark_breakpoints_out): New.
12792 (free_all_breakpoints): Use it.
12793 * server.c (handle_target_event): If the process is gone, mark
12794 breakpoints out.
12795 * thread-db.c (struct thread_db) <create_bp>: New field.
12796 (thread_db_enable_reporting): Fix prototype. Store a thread event
12797 breakpoint reference in the thread_db struct.
12798 (thread_db_load_search): Clear the thread_db object.
12799 (try_thread_db_load_1): Ditto.
12800 (switch_to_process): New.
12801 (disable_thread_event_reporting): Use it.
12802 (remove_thread_event_breakpoints): New.
12803 (thread_db_detach, thread_db_mourn): Use it.
12804
1e7fc18c
PA
128052010-05-01 Pedro Alves <pedro@codesourcery.com>
12806
12807 * linux-low.c (linux_enable_event_reporting): New.
12808 (linux_wait_for_event_1, handle_extended_wait): Use it.
12809
02fc4de7
PA
128102010-04-30 Pedro Alves <pedro@codesourcery.com>
12811
12812 * linux-low.c (linux_kill_one_lwp, linux_kill)
12813 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12814 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12815 SIGSTOP even if the LWP is stopped.
12816 (send_sigstop_callback): New.
12817 (stop_all_lwps): Use send_sigstop_callback instead.
12818 (linux_resume_one_thread): Adjust.
12819 (proceed_one_lwp): Still proceed an LWP that the client has
12820 requested to stop, if we haven't reported it as stopped yet. Make
12821 sure that LWPs the client want stopped, have a pending SIGSTOP.
12822
bc3b5632
DE
128232010-04-26 Doug Evans <dje@google.com>
12824
ae1ada35
DE
12825 * server.c (handle_general_set): Make static.
12826
bc3b5632
DE
12827 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12828 Print received char after testing for error/eof instead of before.
12829 (input_interrupt): Tweak comment.
12830
65730243
DE
128312010-04-23 Doug Evans <dje@google.com>
12832
12833 * server.c (start_inferior): Print inferior argv if --debug.
12834
a8ae7dc0
AR
128352010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12836
12837 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12838 * nto-x86-low.c: Include server.h
12839
1c07cc19
PM
128402010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12841
12842 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12843 be consistent with other sources of this directory.
12844 (init_registers_amd64): Correct name of source file of this function
12845 in the comment.
12846
e0a61e09
PM
128472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12848
12849 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12850 64-bit executables.
12851
54709339
PM
128522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12853
12854 * win32-i386-low.c: Add 64-bit support.
12855 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12856 (init_registers_amd64): Declare.
12857 (mappings): Add 64-bit version of array.
12858 (init_windows_x86): New function.
12859 (the_low_target): Change init_arch field to init_windows_x86.
12860
e8f0053d
PM
128612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12862
12863 * win32-low.c: Adapt to support also 64-bit architecture.
12864 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12865 (get_image_name): Use SIZE_T type for local variable `done'.
12866 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12867 (toolhelp_get_dll_name): Idem.
12868 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12869 Use uintptr_t typecast to avoid warning.
12870 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12871 (handle_exception): Use phex_nz to avoid warning.
12872 (win32_wait): Remove unused local variable `process'.
12873
c481e77e
PM
128742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12875
12876 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12877 `amd64-avx.o'.
12878
12ea4b69
PM
128792010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12880
12881 * configure.ac: Use `ws2_32' library for srv_mingw.
12882 * configure: Regenerate.
12883 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12884 * remote-utils.c: Likewise.
12885
f6d1620c
L
128862010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12887
12888 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12889 if __x86_64__ is defined.
12890
8e642873
PM
128912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12892
12893 * configure: Regenerate.
12894
711e434b
PM
128952010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12896
12897 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12898 * target.h (target_ops): New get_tib_address field.
12899 * win32-low.h (win32_thread_info): Add thread_local_base field.
12900 * win32-low.c (child_add_thread): Add tlb argument.
12901 Set thread_local_base field to TLB.
12902 (get_child_debug_event): Adapt to child_add_thread change.
12903 (win32_get_tib_address): New function.
12904 (win32_target_ops): Set get_tib_address field to
12905 win32_get_tib_address.
12906 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12907
505106cd
PA
129082010-04-12 Pedro Alves <pedro@codesourcery.com>
12909
505106cd
PA
12910 * linux-low.c (linux_mourn): Also remove the process.
12911 * server.c (handle_target_event): Don't remove the process here.
12912 * nto-low.c (nto_mourn): New.
12913 (nto_target_ops): Install it.
12914 * spu-low.c (spu_mourn): New.
12915 (spu_target_ops): Install it.
12916 * win32-low.c (win32_mourn): New.
12917 (win32_target_ops): Install it.
12918
e8470a06
PA
129192010-04-12 Pedro Alves <pedro@codesourcery.com>
12920
12921 * server.h (buffer_xml_printf): Remove redundant `;'.
12922
45ba0d02
PA
129232010-04-12 Pedro Alves <pedro@codesourcery.com>
12924
12925 * regcache.c (set_register_cache): Invalidate regcaches before
12926 changing the register cache layout.
12927 (regcache_invalidate_one): Allow a NULL regcache.
12928 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12929 regcaches before changing the register cache layout or the target
12930 regsets.
12931
59e04013
L
129322010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12933
12934 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12935 variable warning on Linux/x86-64.
12936
8336d594
PA
129372010-04-11 Pedro Alves <pedro@codesourcery.com>
12938
12939 GDBserver disconnected tracing support.
12940
12941 * linux-low.c (linux_remove_process): Delete.
12942 (add_lwp): Don't set last_resume_kind here.
12943 (linux_kill): Use `mourn'.
12944 (linux_detach): Use `thread_db_detach', and `mourn'.
12945 (linux_mourn): New.
12946 (linux_attach_lwp_1): Adjust comment.
12947 (linux_attach): last_resume_kind moved the thread_info; adjust.
12948 (status_pending_p_callback): Adjust.
12949 (linux_wait_for_event_1): Adjust.
12950 (count_events_callback, select_singlestep_lwp_callback)
12951 (select_event_lwp_callback, cancel_breakpoints_callback)
12952 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12953 (proceed_one_lwp): Adjust.
12954 (linux_async): Add debug output.
12955 (linux_thread_stopped): New.
12956 (linux_pause_all): New.
12957 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12958 linux_pause_all.
12959 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12960 (thread_db_free): Delete declaration.
12961 (thread_db_detach, thread_db_mourn): Declare.
12962 * thread-db.c (thread_db_init): Use thread_db_mourn.
12963 (thread_db_free): Delete, split in two.
12964 (disable_thread_event_reporting): New.
12965 (thread_db_detach): New.
12966 (thread_db_mourn): New.
12967
12968 * server.h (struct thread_info) <last_resume_kind>: New field.
12969 <attached>: Add comment.
12970 <gdb_detached>: New field.
12971 (handler_func): Change return type to int.
12972 (handle_serial_event, handle_target_event): Ditto.
12973 (gdb_connected): Declare.
12974 (tracing): Delete.
12975 (disconnected_tracing): Declare.
12976 (stop_tracing): Declare.
12977
12978 * server.c (handle_query) <qSupported>: Report support for
12979 disconnected tracing.
12980 (queue_stop_reply_callback): Account for running threads.
12981 (gdb_wants_thread_stopped): New.
12982 (gdb_wants_all_threads_stopped): New.
12983 (gdb_reattached_process): New.
12984 (handle_status): Clear the `gdb_detached' flag of all processes.
12985 In all-stop, stop all threads.
12986 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12987 (process_serial_event): If the remote connection breaks, or if an
12988 exit was forced with "monitor exit", force an event loop exit.
12989 Handle disconnected tracing on detach.
12990 (handle_serial_event): Adjust.
12991 (handle_target_event): If GDB isn't connected, forward events back
12992 to the inferior, unless the last process exited, in which case,
12993 exit gdbserver. Adjust interface.
12994
12995 * remote-utils.c (remote_open): Don't block in accept. Instead
12996 register an event loop source on the listen socket file
12997 descriptor. Refactor bits into ...
12998 (listen_desc): ... this new global.
12999 (gdb_connected): ... this new function.
13000 (enable_async_notification): ... this new function.
13001 (handle_accept_event): ... this new function.
13002 (remote_close): Clear remote_desc.
13003
13004 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13005
13006 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13007 New fields.
13008 (mourn_inferior): Define.
13009 (target_process_qsupported): Avoid the dangling else problem.
13010 (thread_stopped): Define.
13011 (pause_all): Define.
13012 (target_waitstatus_to_string): Declare.
13013 * target.c (target_waitstatus_to_string): New.
13014
13015 * tracepoint.c (tracing): Make extern.
13016 (disconnected_tracing): New.
13017 (stop_tracing): Make extern. Handle tracing stops due to GDB
13018 disconnecting.
13019 (cmd_qtdisconnected): New.
13020 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13021 (handle_tracepoint_general_set): Handle QTDisconnected.
13022
13023 * event-loop.c (event_handler_func): Change return type to int.
13024 (process_event): Bail out if the event handler wants the event
13025 loop to stop.
13026 (handle_file_event): Ditto.
13027 (start_event_loop): Bail out if the event handler wants the event
13028 loop to stop.
13029
13030 * nto-low.c (nto_target_ops): Adjust.
13031 * spu-low.c (spu_wait): Don't remove the process here.
13032 (spu_target_ops): Adjust.
13033 * win32-low.c (win32_wait): Don't remove the process here.
13034 (win32_target_ops): Adjust.
13035
5d267c4c
PA
130362010-04-11 Pedro Alves <pedro@codesourcery.com>
13037
13038 * regcache.c (realloc_register_cache): Invalidate inferior's
13039 regcache before recreating it.
13040
623ccd72
PA
130412010-04-09 Pedro Alves <pedro@codesourcery.com>
13042
13043 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13044
219f2f23
PA
130452010-04-09 Stan Shebs <stan@codesourcery.com>
13046 Pedro Alves <pedro@codesourcery.com>
13047
13048 * server.h (LONGEST): New.
13049 (struct thread_info) <while_stepping>: New field.
13050 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13051 Declare.
13052 (initialize_tracepoint, handle_tracepoint_general_set)
13053 (handle_tracepoint_query, tracepoint_finished_step)
13054 (tracepoint_was_hit, release_while_stepping_state_list):
13055 (current_traceframe): Declare.
13056 * server.c (handle_general_set): Handle tracepoint packets.
13057 (read_memory): New.
13058 (write_memory): New.
13059 (handle_search_memory_1): Use read_memory.
13060 (handle_query): Report support for conditional tracepoints, trace
13061 state variables, and tracepoint sources. Handle tracepoint
13062 queries.
13063 (main): Initialize the tracepoints module.
13064 (process_serial_event): Handle traceframe reads/writes.
13065
13066 * linux-low.c (handle_tracepoints): New.
13067 (linux_wait_1): Call it.
13068 (linux_resume_one_lwp): Handle while-stepping.
13069 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13070 (linux_target_ops): Install them.
13071 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13072 New field.
13073 * linux-x86-low.c (x86_supports_tracepoints): New.
13074 (the_low_target). Install it.
13075
13076 * mem-break.h (delete_breakpoint): Declare.
13077 * mem-break.c (delete_breakpoint): Make external.
13078
13079 * target.h (struct target_ops): Add `supports_tracepoints',
13080 `read_pc', and `write_pc' fields.
13081 (target_supports_tracepoints): Define.
13082 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13083 (phex_nz): New.
13084
13085 * regcache.h (struct regcache) <registers_owned>: New field.
13086 (init_register_cache, regcache_cpy): Declare.
13087 (regcache_read_pc, regcache_write_pc): Declare.
13088 (register_cache_size): Declare.
13089 (supply_regblock): Declare.
13090 * regcache.c (init_register_cache): New.
13091 (new_register_cache): Use it.
13092 (regcache_cpy): New.
13093 (register_cache_size): New.
13094 (supply_regblock): New.
13095 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13096
219f2f23
PA
13097 * tracepoint.c: New.
13098
13099 * Makefile.in (OBS): Add tracepoint.o.
13100 (tracepoint.o): New rule.
13101
3a13a53b
L
131022010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13103
13104 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13105 (i386-mmx.o): New.
13106 (i386-mmx.c): Likewise.
13107 (i386-mmx-linux.o): Likewise.
13108 (i386-mmx-linux.c): Likewise.
13109
13110 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13111 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13112 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13113 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13114
13115 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13116 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13117 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13118
1570b33e
L
131192010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13120
13121 * Makefile.in (clean): Updated.
13122 (i386-avx.o): New.
13123 (i386-avx.c): Likewise.
13124 (i386-avx-linux.o): Likewise.
13125 (i386-avx-linux.c): Likewise.
13126 (amd64-avx.o): Likewise.
13127 (amd64-avx.c): Likewise.
13128 (amd64-avx-linux.o): Likewise.
13129 (amd64-avx-linux.c): Likewise.
13130
13131 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13132 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13133 (srv_amd64_regobj): Add amd64-avx.o.
13134 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13135 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13136 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13137 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13138 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13139 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13140 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13141
13142 * i387-fp.c: Include "i386-xstate.h".
13143 (i387_xsave): New.
13144 (i387_cache_to_xsave): Likewise.
13145 (i387_xsave_to_cache): Likewise.
13146 (x86_xcr0): Likewise.
13147
13148 * i387-fp.h (i387_cache_to_xsave): Likewise.
13149 (i387_xsave_to_cache): Likewise.
13150 (x86_xcr0): Likewise.
13151
13152 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13153 * linux-crisv32-low.c (target_regsets): Likewise.
13154 * linux-m68k-low.c (target_regsets): Likewise.
13155 * linux-mips-low.c (target_regsets): Likewise.
13156 * linux-ppc-low.c (target_regsets): Likewise.
13157 * linux-s390-low.c (target_regsets): Likewise.
13158 * linux-sh-low.c (target_regsets): Likewise.
13159 * linux-sparc-low.c (target_regsets): Likewise.
13160 * linux-xtensa-low.c (target_regsets): Likewise.
13161
13162 * linux-low.c: Include <sys/uio.h>.
13163 (regsets_fetch_inferior_registers): Support nt_type.
13164 (regsets_store_inferior_registers): Likewise.
13165 (linux_process_qsupported): New.
13166 (linux_target_ops): Add linux_process_qsupported.
13167
13168 * linux-low.h (regset_info): Add nt_type.
13169 (linux_target_ops): Add process_qsupported.
13170
13171 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13172 and <sys/uio.h>.
13173 (init_registers_i386_avx_linux): New.
13174 (init_registers_amd64_avx_linux): Likewise.
13175 (xmltarget_i386_linux_no_xml): Likewise.
13176 (xmltarget_amd64_linux_no_xml): Likewise.
13177 (PTRACE_GETREGSET): Likewise.
13178 (PTRACE_SETREGSET): Likewise.
13179 (x86_fill_xstateregset): Likewise.
13180 (x86_store_xstateregset): Likewise.
13181 (use_xml): Likewise.
13182 (x86_linux_update_xmltarget): Likewise.
13183 (x86_linux_process_qsupported): Likewise.
13184 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13185 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13186 init_registers_i386_linux here. Call
13187 x86_linux_update_xmltarget.
13188 (the_low_target): Add x86_linux_process_qsupported.
13189
13190 * server.c (handle_query): Call target_process_qsupported.
13191
13192 * target.h (target_ops): Add process_qsupported.
13193 (target_process_qsupported): New.
13194
fc7238bb
PA
131952010-04-03 Pedro Alves <pedro@codesourcery.com>
13196
13197 * inferiors.c (add_thread): Set last_status kind to
13198 TARGET_WAITKIND_IGNORE.
13199 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13200 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13201 (linux_wait_1): Move `thread' local definition to block that uses
13202 it. Don't NULL initialize `event_child'.
13203 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13204 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13205 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13206
bdabb078
PA
132072010-04-01 Pedro Alves <pedro@codesourcery.com>
13208
13209 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13210 an extended waitstatus, or by a watchpoint.
13211 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13212 thread was stepping or has been stopped by a watchpoint.
13213
d3bbe7a0
PA
132142010-04-01 Pedro Alves <pedro@codesourcery.com>
13215
13216 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13217 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13218 of another, then delete the previous, and validate all
13219 breakpoints.
13220 (validate_inserted_breakpoint): New.
13221 (delete_disabled_breakpoints): New.
13222 (validate_breakpoints): New.
13223 (check_mem_read): Validate breakpoints before trusting their
13224 shadow. Delete disabled breakpoints.
13225 (check_mem_write): Validate breakpoints before trusting they
13226 should be inserted. Delete disabled breakpoints.
13227 * mem-break.h (validate_breakpoints):
13228 * server.c (handle_query): Validate breakpoints when we see a
13229 qSymbol query.
13230
8b07ae33
PA
132312010-04-01 Pedro Alves <pedro@codesourcery.com>
13232
13233 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13234 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13235 if we could tell there's a GDB breakpoint at stop_pc.
13236 (need_step_over_p): Don't do a step over if we find a GDB
13237 breakpoint at the resume PC.
13238
13239 * mem-break.c (struct raw_breakpoint): New.
13240 (enum bkpt_type): New type `gdb_breakpoint'.
13241 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13242 fields. New field `raw'.
13243 (find_raw_breakpoint_at): New.
13244 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13245 breakpoint instead.
13246 (set_breakpoint_at): Adjust.
13247 (delete_raw_breakpoint): New.
13248 (release_breakpoint): New.
13249 (delete_breakpoint): Rename to...
13250 (delete_breakpoint_1): ... this. Add proc parameter. Use
13251 release_breakpoint. Return ENOENT.
13252 (delete_breakpoint): Reimplement.
13253 (find_breakpoint_at): Delete.
13254 (find_gdb_breakpoint_at): New.
13255 (delete_breakpoint_at): Delete.
13256 (set_gdb_breakpoint_at): New.
13257 (delete_gdb_breakpoint_at): New.
13258 (gdb_breakpoint_here): New.
13259 (set_reinsert_breakpoint): Use release_breakpoint.
13260 (uninsert_breakpoint): Rename to ...
13261 (uninsert_raw_breakpoint): ... this.
13262 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13263 (reinsert_raw_breakpoint): Change parameter type to
13264 raw_breakpoint.
13265 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13266 instead.
13267 (check_breakpoints): Adjust. Use release_breakpoint.
13268 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13269 (breakpoint_inserted_here): Ditto.
13270 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13271 Don't trust the breakpoint's shadow if it is not inserted.
13272 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13273 (delete_all_breakpoints): Adjust.
13274 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13275 use delete_breakpoint_1.
13276
13277 * mem-break.h (breakpoints_supported): Delete declaration.
13278 (set_gdb_breakpoint_at): Declare.
13279 (gdb_breakpoint_here): Declare.
13280 (delete_breakpoint_at): Delete.
13281 (delete_gdb_breakpoint_at): Declare.
13282
13283 * server.h (struct raw_breakpoint): Forward declare.
13284 (struct process_info): New field `raw_breakpoints'.
13285
13286 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13287 breakpoints.
13288
6bf5e0ba
PA
132892010-03-24 Pedro Alves <pedro@codesourcery.com>
13290
13291 * linux-low.c (status_pending_p_callback): Fix comment.
13292 (linux_wait_for_event_1): Move most of the internal breakpoint
13293 handling from here...
13294 (linux_wait_1): ... to here.
13295 (count_events_callback): New.
13296 (select_singlestep_lwp_callback): New.
13297 (select_event_lwp_callback): New.
13298 (cancel_breakpoints_callback): New.
13299 (select_event_lwp): New.
13300 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13301 priority to all LWPs that have had events that should be reported
13302 to the client. Cancel breakpoints when about to reporting the
13303 event to the client, not while stopping lwps. No longer cancel
13304 finished single-steps here.
13305 (cancel_finished_single_step): Delete.
13306 (cancel_finished_single_steps): Delete.
13307
414a389f
PA
133082010-03-24 Pedro Alves <pedro@codesourcery.com>
13309
13310 * mem-break.c (enum bkpt_type): New.
13311 (struct breakpoint): New field `type'.
13312 (set_breakpoint_at): Change return type to struct breakpoint
13313 pointer. Set type to `other_breakpoint' by default.
13314 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13315 in the breakpoint list.
13316 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13317 (reinsert_breakpoint): Rename to ...
13318 (reinsert_raw_breakpoint): ... this.
13319 (reinsert_breakpoints_at): Adjust.
13320 * mem-break.h (struct breakpoint): Declare.
13321 (set_breakpoint_at): Change return type to struct breakpoint
13322 pointer.
13323
2280c721
PA
133242010-03-24 Pedro Alves <pedro@codesourcery.com>
13325
13326 * server.c (handle_query): Assign, not compare.
13327
d50171e4
PA
133282010-03-24 Pedro Alves <pedro@codesourcery.com>
13329
13330 Teach linux gdbserver to step-over-breakpoints.
13331
13332 * linux-low.c (can_hardware_single_step): New.
13333 (supports_breakpoints): New.
13334 (handle_extended_wait): If stopping threads, read the stop pc of
13335 the new cloned LWP.
13336 (get_pc): New.
13337 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13338 low target doesn't support retrieving the PC.
13339 (add_lwp): Set last_resume_kind to resume_continue.
13340 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13341 (linux_attach): Don't clear stop_expected. Set the lwp's
13342 last_resume_kind to resume_stop.
13343 (linux_detach_one_lwp): Don't check for removed breakpoints.
13344 (check_removed_breakpoint): Delete.
13345 (status_pending_p): Rename to ...
13346 (status_pending_p_callback): ... this. Don't check for removed
13347 breakpoints. Don't consider threads that are stopped from GDB's
13348 perspective.
13349 (linux_wait_for_lwp): Always read the stop_pc here.
13350 (cancel_breakpoint): New.
13351 (step_over_bkpt): New global.
13352 (linux_wait_for_event_1): Implement stepping over breakpoints.
13353 (gdb_wants_lwp_stopped): New.
13354 (gdb_wants_all_stopped): New.
13355 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13356 single-step traps here. Store the thread's last reported target
13357 wait status.
13358 (send_sigstop): Don't clear stop_expected. Always set it,
13359 instead.
13360 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13361 (cancel_finished_single_step): New.
13362 (cancel_finished_single_steps): New.
13363 (wait_for_sigstop): Don't cancel finished single-step traps here.
13364 (linux_resume_one_lwp): Don't check for removed breakpoints.
13365 Don't set `step' on non-hardware step archs.
13366 (linux_set_resume_request): Ignore resume_stop requests if already
13367 stopping or stopped. Set the lwp's last_resume_kind.
13368 (resume_status_pending_p): Don't check for removed breakpoints.
13369 (need_step_over_p): New.
13370 (start_step_over): New.
13371 (finish_step_over): New.
13372 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13373 requests. Clear the thread's last reported target waitstatus.
13374 Don't use the `suspended' flag. Don't consider pending breakpoints.
13375 (linux_resume): Start a step-over if necessary.
13376 (proceed_one_lwp): New.
13377 (proceed_all_lwps): New.
13378 (unstop_all_lwps): New.
13379 * linux-low.h (struct lwp_info): Rewrite comment for the
13380 `suspended' flag. Add the `stop_pc' field. Delete the
13381 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13382 Add `'last_resume_kind' and `need_step_over' fields.
13383 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13384 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13385 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13386 (set_raw_breakpoint_at): New.
13387 (set_breakpoint_at): Rewrite to use it.
13388 (reinsert_breakpoint_handler): Delete.
13389 (set_reinsert_breakpoint): New.
13390 (reinsert_breakpoint_by_bp): Delete.
13391 (delete_reinsert_breakpoints): New.
13392 (uninsert_breakpoint): Rewrite.
13393 (uninsert_breakpoints_at): New.
13394 (reinsert_breakpoint): Rewrite.
13395 (reinsert_breakpoints_at): New.
13396 (check_breakpoints): Rewrite.
13397 (breakpoint_here): New.
13398 (breakpoint_inserted_here): New.
13399 (check_mem_read): Adjust.
13400 * mem-break.h (breakpoints_supported, breakpoint_here)
13401 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13402 (reinsert_breakpoint_by_bp): Delete declaration.
13403 (delete_reinsert_breakpoints): Declare.
13404 (reinsert_breakpoint): Delete declaration.
13405 (reinsert_breakpoints_at): Declare.
13406 (uninsert_breakpoint): Delete declaration.
13407 (uninsert_breakpoints_at): Declare.
13408 (check_breakpoints): Adjust prototype.
13409 * server.h: Adjust include order.
13410 (struct thread_info): Declare here. Add a `last_status' field.
13411
30ba68cb
MS
134122010-03-23 Michael Snyder <msnyder@vmware.com>
13413
13414 * server.c (crc32): New function.
13415 (handle_query): Add handling for 'qCRC:' request.
13416
b9a881c2
PA
134172010-03-23 Pedro Alves <pedro@codesourcery.com>
13418
13419 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13420 lwp had been stopped by a watchpoint.
13421
e92d13d5
PA
134222010-03-16 Pedro Alves <pedro@codesourcery.com>
13423
13424 * server.h (internal_error): Declare.
13425 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13426 * utils.c (internal_error): New function.
13427
64daa791
AS
134282010-03-15 Andreas Schwab <schwab@redhat.com>
13429
13430 * configure.srv: Fix typo setting srv_regobj.
13431
f52cd8cd
PA
134322010-03-15 Pedro Alves <pedro@codesourcery.com>
13433
13434 * linux-low.c (fetch_register): Avoid passing a non string literal
13435 format to `error'.
13436 (usr_store_inferior_registers): Ditto.
13437
93ae6fdc
PA
134382010-03-14 Pedro Alves <pedro@codesourcery.com>
13439
13440 * linux-low.c (linux_write_memory): Bail out early if peeking
13441 memory failed.
13442
c3adc08c
PA
134432010-03-14 Pedro Alves <pedro@codesourcery.com>
13444
13445 * linux-low.h (struct lwp_info): New fields
13446 `stopped_by_watchpoint' and `stopped_data_address'.
13447 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13448 here, and cache them in the lwp object.
13449 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13450 directly.
13451 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13452 field.
13453 (linux_stopped_by_watchpoint): Rewrite.
13454 (linux_stopped_data_address): Rewrite.
13455
bce522a2
PA
134562010-03-06 Simo Melenius <simo.melenius@iki.fi>
13457
13458 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13459 switching the current inferior, not before.
13460
90884b2b
L
134612010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13462
13463 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13464 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13465 i386-linux.c and amd64-linux.c.
13466 (reg-i386.o): Removed.
13467 (reg-i386.c): Likewise.
13468 (reg-i386-linux.o): Likewise.
13469 (reg-i386-linux.c): Likewise.
13470 (reg-x86-64.o): Likewise.
13471 (reg-x86-64.c): Likewise.
13472 (reg-x86-64-linux.o): Likewise.
13473 (reg-x86-64-linux.c): Likewise.
13474 (i386.o): New.
13475 (i386.c): Likewise.
13476 (i386-linux.o): Likewise.
13477 (i386-linux.c): Likewise.
13478 (amd64.o): Likewise.
13479 (amd64.c): Likewise.
13480 (amd64-linux.o): Likewise.
13481 (amd64-linux.c): Likewise.
13482
13483 * configure.srv (srv_i386_regobj): New.
13484 (srv_i386_linux_regobj): Likewise.
13485 (srv_amd64_regobj): Likewise.
13486 (srv_amd64_linux_regobj): Likewise.
13487 (srv_i386_32bit_xmlfiles): Likewise.
13488 (srv_i386_64bit_xmlfiles): Likewise.
13489 (srv_i386_xmlfiles): Likewise.
13490 (srv_amd64_xmlfiles): Likewise.
13491 (srv_i386_linux_xmlfiles): Likewise.
13492 (srv_amd64_linux_xmlfiles): Likewise.
13493 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13494 srv_xmlfiles to $srv_i386_xmlfiles.
13495 (i[34567]86-*-mingw32ce*): Likewise.
13496 (i[34567]86-*-mingw*): Likewise.
13497 (i[34567]86-*-nto*): Likewise.
13498 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13499 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13500 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13501 (x86_64-*-linux*): Likewise.
13502
13503 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13504 (init_registers_amd64_linux): New.
13505 (x86_arch_setup): Replace init_registers_x86_64_linux with
13506 init_registers_amd64_linux.
13507
193f13e6
MK
135082010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13509
13510 * configure.ac: Check for libdl. If it is not available link against
13511 static libthread_db.
13512 * configure: Regenerate.
13513
85d721b8
PA
135142010-02-22 Pedro Alves <pedro@codesourcery.com>
13515
13516 PR9605
13517
13518 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13519 handing a read watchpoint.
13520 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13521
6076632b
DE
135222010-02-12 Doug Evans <dje@google.com>
13523
13524 * linux-low.c (linux_supports_tracefork_flag): Document.
13525 (linux_look_up_symbols): Add comment.
13526
3327ccf7
L
135272010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13528
13529 * regcache.c (supply_register): Clear regcache if buf is NULL.
13530
0718675c 135312010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13532 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13533
13534 * inferiors.c (find_inferior): Add function documentation.
13535 (unloaded_dll): Handle the case where the unloaded dll has not
13536 been previously registered in the dll list.
13537
177321bd
DJ
135382010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13539
13540 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13541 (thumb2_breakpoint): New.
13542 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13543
2b009048
DJ
135442010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13545
13546 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13547 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13548 breakpoints.
13549
3be029c7
PA
135502010-01-21 Pedro Alves <pedro@codesourcery.com>
13551
13552 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13553
18f5de3b
JK
135542010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13555
13556 * linux-s390-low.c (s390_collect_ptrace_register)
13557 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13558
3743bb4f
DE
135592010-01-21 Doug Evans <dje@google.com>
13560
14ce3065
DE
13561 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13562 (PTRACE_ARG4_TYPE): New macro.
13563 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13564 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13565 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13566 (usr_store_inferior_registers): Ditto.
13567 (linux_read_memory, linux_write_memory): Ditto.
13568 (linux_test_for_tracefork): Ditto.
13569
3743bb4f
DE
13570 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13571 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13572
8b315be5
PA
135732010-01-21 Pedro Alves <pedro@codesourcery.com>
13574
13575 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13576 target.
13577
85492558
PA
135782010-01-21 Pedro Alves <pedro@codesourcery.com>
13579
13580 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13581 prototype to take a regcache. Adjust.
13582
442ea881
PA
135832010-01-20 Pedro Alves <pedro@codesourcery.com>
13584
13585 * regcache.h (struct thread_info): Forward declare.
13586 (struct regcache): New.
13587 (new_register_cache): Adjust prototype.
13588 (get_thread_regcache): Declare.
13589 (free_register_cache): Adjust prototype.
13590 (registers_to_string, registers_from_string): Ditto.
13591 (supply_register, supply_register_by_name, collect_register)
13592 (collect_register_as_string, collect_register_by_name): Ditto.
13593 * regcache.c (struct inferior_regcache_data): Delete.
13594 (get_regcache): Rename to ...
13595 (get_thread_regcache): ... this. Adjust. Switch inferior before
13596 fetching registers.
13597 (regcache_invalidate_one): Adjust.
13598 (regcache_invalidate): Fix prototype.
13599 (new_register_cache): Return the new register cache.
13600 (free_register_cache): Change prototype.
13601 (realloc_register_cache): Adjust.
13602 (registers_to_string): Change prototype to take a regcache. Adjust.
13603 (registers_from_string): Ditto.
13604 (register_data): Ditto.
13605 (supply_register): Ditto.
13606 (supply_register_by_name): Ditto.
13607 (collect_register): Ditto.
13608 (collect_register_as_string): Ditto.
13609 (collect_register_by_name): Ditto.
13610 * server.c (process_serial_event): Adjust.
13611 * linux-low.h (regset_fill_func, regset_store_func): Change
13612 prototype.
13613 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13614 Change prototype.
13615 * linux-low.c (get_stop_pc): Adjust.
13616 (check_removed_breakpoint): Adjust.
13617 (linux_wait_for_event): Adjust.
13618 (linux_resume_one_lwp): Adjust.
13619 (fetch_register): Add regcache parameter. Adjust.
13620 (usr_store_inferior_registers): Ditto.
13621 (regsets_fetch_inferior_registers): Ditto.
13622 (regsets_store_inferior_registers): Ditto.
13623 (linux_fetch_registers, linux_store_registers): Ditto.
13624 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13625 regcache. Adjust.
43aaf8b6
PA
13626 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13627 Ditto.
442ea881
PA
13628 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13629 prototype to take a regcache.
13630 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13631 * remote-utils.c (convert_ascii_to_int, outreg)
13632 (prepare_resume_reply): Change prototype to take a regcache.
13633 Adjust.
13634 * target.h (struct target_ops) <fetch_registers, store_registers>:
13635 Change prototype to take a regcache.
13636 (fetch_inferior_registers, store_inferior_registers): Change
13637 prototype to take a regcache. Adjust.
13638 * proc-service.c (ps_lgetregs): Adjust.
13639 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13640 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13641 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13642 take a regcache. Adjust.
13643 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13644 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13645 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13646 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13647 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13648 (cris_cannot_fetch_register):
13649 (cris_breakpoint_at): Change prototype to take a regcache.
13650 Adjust.
13651 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13652 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13653 to take a regcache. Adjust.
13654 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13655 Adjust.
13656 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13657 take a regcache. Adjust.
13658 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13659 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13660 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13661 * linux-mips-low.c (mips_get_pc):
13662 (mips_set_pc): Change prototype to take a regcache. Adjust.
13663 (mips_reinsert_addr): Adjust.
13664 (mips_collect_register): Change prototype to take a regcache.
13665 Adjust.
13666 (mips_supply_register):
13667 (mips_collect_register_32bit, mips_supply_register_32bit)
13668 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13669 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13670 * linux-ppc-low.c (ppc_supply_ptrace_register)
13671 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13672 (parse_spufs_run): Adjust.
13673 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13674 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13675 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13676 take a regcache. Adjust.
13677 * linux-s390-low.c (s390_collect_ptrace_register)
13678 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13679 (s390_set_pc): Change prototype to take a regcache. Adjust.
13680 (s390_arch_setup): Adjust.
13681 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13682 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13683 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13684 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13685 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13686 regcache. Adjust.
13687 (sparc_breakpoint_at): Adjust.
13688 * linux-xtensa-low.c (xtensa_fill_gregset):
13689 (xtensa_store_gregset):
13690 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13691 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13692 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13693 prototype to take a regcache. Adjust.
13694 * win32-arm-low.c (arm_fetch_inferior_register)
13695 (arm_store_inferior_register): Change prototype to take a
13696 regcache. Adjust.
13697 * win32-i386-low.c (i386_fetch_inferior_register)
13698 (i386_store_inferior_register): Change prototype to take a
13699 regcache. Adjust.
13700 * win32-low.c (child_fetch_inferior_registers)
13701 (child_store_inferior_registers): Change prototype to take a
13702 regcache. Adjust.
13703 (win32_wait): Adjust.
13704 (win32_fetch_inferior_registers): Change prototype to take a
13705 regcache. Adjust.
13706 (win32_store_inferior_registers): Adjust.
13707 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13708 store_inferior_register>: Change prototype to take a regcache.
13709
60c3d7b0
DE
137102010-01-20 Doug Evans <dje@google.com>
13711
13712 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13713 #ifdef.
13714 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13715 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13716
dc146f7c
VP
137172010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13718
13719 * linux-low.c (linux_core_of_thread): New.
13720 (compare_ints, show_process, list_threads): New.
13721 (linux_qxfer_osdata): Report threads and cores.
13722 (linux_target_op): Register linux_core_of_thread.
13723 * remote-utils.c (prepare_resume_reply): Report the core.
13724 (buffer_xml_printf): Support %d specifier.
13725 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13726 New.
13727 (handle_query): Handle qXfer:threads. Announce availability
13728 thereof.
13729 * target.h (struct target_ops): New field core_of_thread.
13730
7803799a
UW
137312010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13732
13733 * Makefile.in (clean): Remove new generated files.
13734 (reg-s390.o, reg-s390.c): Remove rules.
13735 (reg-s390x.o, reg-s390x.c): Likewise.
13736 (s390-linux32.o, s390-linux32.c): Add rules.
13737 (s390-linux64.o, s390-linux64.c): Likewise.
13738 (s390x-linux64.o, s390x-linux64.c): Likewise.
13739 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13740 * linux-s390-low.c: Include <elf.h>.
13741 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13742 (init_registers_s390): Remove prototype.
13743 (init_registers_s390x): Likewise.
13744 (init_registers_s390_linux32): Add prototype.
13745 (init_registers_s390_linux64): Likewise.
13746 (init_registers_s390x_linux64): Likewise.
13747 (s390_num_regs_3264): New define.
13748 (s390_regmap_3264): New global variable.
13749 (s390_cannot_fetch_register): Remove obsolete check.
13750 (s390_cannot_store_register): Likewise.
13751 (s390_collect_ptrace_register): Handle upper/lower register halves.
13752 (s390_supply_ptrace_register): Likewise.
13753 (s390_fill_gregset): Update to register number changes.
13754 (s390_get_hwcap): New routine.
13755 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13756 Install appropriate regmap and register set.
13757
6e7ffa39
JB
137582010-01-01 Joel Brobecker <brobecker@adacore.com>
13759
13760 * server.c (gdbserver_version): Update copyright year to 2010.
13761 * gdbreplay.c (gdbreplay_version): Likewise.
13762
957f3f49
DE
137632009-12-28 Doug Evans <dje@google.com>
13764
13765 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13766 elf/external.h. Include <elf.h> instead but only if necessary.
13767
ca5c370d
PA
137682009-12-28 Pedro Alves <pedro@codesourcery.com>
13769
13770 * linux-low.c (linux_remove_process): Remove `detaching'
13771 parameter. Don't release/detach from thread_db here.
13772 (linux_kill): Release/detach from thread_db here, ...
13773 (linux_detach): ... and here, before actually detaching.
13774 (linux_wait_1): ... and here, when a process exits.
13775 * thread-db.c (any_thread_of): New.
13776 (thread_db_free): Switch the current inferior to a thread of the
13777 passed in process.
13778
4ee62156
DE
137792009-12-21 Doug Evans <dje@google.com>
13780
d90e6a88
DE
13781 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13782
c5f62d5f
DE
13783 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13784 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13785 warning ifndef __NR_tkill. Move setting of errno there too.
13786 Delete unnecessary resetting of errno after syscall.
13787 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13788
10e86dd7
DE
13789 * configure.ac: Check for dladdr.
13790 * config.in: Regenerate.
13791 * configure: Regenerate.
13792 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13793 (try_thread_db_load): Update.
13794
4ee62156
DE
13795 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13796
00f515da
DE
137972009-12-18 Doug Evans <dje@google.com>
13798
e9464885
DE
13799 * event-loop.c: Include unistd.h if it exists.
13800
07d4f67e
DE
13801 * linux-low.c (my_waitpid): Move definition away from being in
13802 between linux_tracefork_child/linux_test_for_tracefork.
13803
00f515da
DE
13804 * gdb_proc_service.h (psaddr_t): Fix type.
13805 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13806 signature to match glibc.
13807
1de1badb
DE
138082009-12-16 Doug Evans <dje@google.com>
13809
13810 * linux-low.c (linux_read_memory): Fix argument to read.
13811
aeeb81d1
PA
138122009-11-26 Pedro Alves <pedro@codesourcery.com>
13813
13814 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13815 events, don't leave current_inferior pointing at null.
13816
10357975
PA
138172009-11-26 Pedro Alves <pedro@codesourcery.com>
13818
13819 * win32-low.c (LOG): Delete.
13820 (OUTMSG): Output to stderr.
13821 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13822 on compile time LOG macro.
13823 (win32_wait): Fix debug output.
13824
cf6e3471
PA
138252009-11-26 Pedro Alves <pedro@codesourcery.com>
13826
13827 * win32-low.c (win32_add_one_solib): If the dll name is
13828 "ntdll.dll", prepend the system directory to the dll path.
13829
0c85e18e
MK
138302009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13831
13832 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13833
9ac544ce 138342009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13835 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13836
13837 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13838 * configure.ac: Check for __mcoldfire__ and set
13839 gdb_cv_m68k_is_coldfire.
13840 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13841 reg-cf.o and reg-m68k.o.
13842 * configure: Regenerated.
13843
fd7dd3e6
PA
138442009-11-16 Pedro Alves <pedro@codesourcery.com>
13845
13846 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13847 Pass it to thread_db_free.
13848 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13849 proper `detaching' argument to linux_remove_process.
13850 * linux-low.h (thread_db_free): Add `detaching' parameter.
13851 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13852 to thread_db_free.
13853 (thread_db_free): Add `detaching' parameter. Only
13854 call td_ta_clear_event if detaching from process.
13855
75aa492e
MK
138562009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13857
13858 * thread-db.c (thread_db_free): Fix typo.
13859
21e1bee4
PP
138602009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13861
13862 PR gdb/10838
13863 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13864
8838b45e
NS
138652009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13866
13867 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13868 with an i686 compiler.
13869 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13870 needed.
13871 * configure: Rebuilt.
13872
8a35fb51
SL
138732009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13874
13875 PR gdb/10783
13876
13877 * server.c (handle_search_memory_1): Correct read_addr initialization
13878 in loop for searching subsequent chunks.
13879
96f15937
PP
138802009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13881
13882 * configure.ac: New --with-libthread-db option.
13883 * thread-db.c: Allow direct dependence on libthread_db.
13884 (thread_db_free): Adjust.
13885 * config.in: Regenerate.
13886 * configure: Likewise.
889bf7c5 13887
5f7d1694
PP
138882009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13889
13890 PR gdb/10757
13891 * thread-db.c (attach_thread): New function.
13892 (maybe_attach_thread): Return success/failure.
13893 (find_new_threads_callback): Adjust.
889bf7c5
PA
13894 (thread_db_find_new_threads): Loop until no new threads.
13895
88e3b899
PA
138962009-10-13 Pedro Alves <pedro@codesourcery.com>
13897
13898 * proc-service.c (ps_lgetregs): Formatting.
13899
cdbfd419
PP
139002009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13901
13902 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13903 * configure.ac: Adjust.
13904 * linux-low.h (struct process_info_private): Move members to struct
13905 thread_db.
13906 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13907 * linux-low.c (linux_remove_process): Adjust.
13908 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13909 * server.c (handle_query): Move code ...
13910 (handle_monitor_command): ... here. New function.
13911 * target.h (struct target_ops): New member.
13912 * thread-db.c (struct thread_db): New.
13913 (libthread_db_search_path): New variable.
13914 (thread_db_create_event, thread_db_enable_reporting)
13915 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13916 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13917 (try_thread_db_load_1, dladdr_to_soname): New functions.
13918 (try_thread_db_load, thread_db_load_search): New functions.
13919 (thread_db_init): Search for libthread_db.
13920 (thread_db_free): New function.
13921 (thread_db_handle_monitor_command): Likewise.
13922 * config.in: Regenerate.
13923 * configure: Regenerate.
889bf7c5 13924
4168d2d6
UW
139252009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13926
13927 * spu-low.c (spu_kill): Wait for inferior to terminate.
13928 Call clear_inferiors.
13929 (spu_detach): Call clear_inferiors.
13930
81ecdfbb
RW
139312009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13932
13933 * aclocal.m4: Regenerate.
13934 * config.in: Likewise.
13935 * configure: Likewise.
13936
0b9ff2c0
UW
139372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13938
13939 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13940 (parse_spufs_run): New function.
13941 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13942 (ppc_breakpoint_at): Handle SPU breakpoints.
13943
efcbbd14
UW
139442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13945
13946 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13947 (SPUFS_MAGIC): Define.
13948 (spu_enumerate_spu_ids): New function.
13949 (linux_qxfer_spu): New function.
13950 (linux_target_ops): Install linux_qxfer_spu.
13951
f4d9bade
UW
139522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13953
13954 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13955 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13956 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13957 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13958 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13959 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13960 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13961 (init_registers_powerpc_cell32l): Add prototype.
13962 (init_registers_powerpc_cell64l): Likewise.
13963 (ppc_arch_setup): Detect Cell/B.E. architecture.
13964
96e946ca
RW
139652009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13966
13967 * Makefile.in (datarootdir): New variable.
13968
58d6951d
DJ
139692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13970
13971 * linux-low.c (linux_write_memory): Update debugging output.
13972 * Makefile.in (clean): Add new descriptions.
13973 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13974 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13975 * configure.srv: Add new files for arm*-*-linux*.
13976 * linux-arm-low.c: Add new declarations.
13977 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13978 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13979 (HWCAP_VFPv3D16): New.
13980 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13981 instead of __IWMMXT__.
13982 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13983 (arm_arch_setup): New.
13984 (target_regsets): Remove #ifdef. Add VFP regset.
13985 (the_low_target): Use arm_arch_setup.
13986
12b42a12
DJ
139872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13988
13989 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13990 the main thread again.
13991
ac8c974e
AR
139922009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13993
13994 Adding Neutrino gdbserver.
13995 * configure: Regenerated.
13996 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13997 * configure.srv (i[34567]86-*-nto*): New target.
13998 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13999 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14000 (nto_comctrl) [__QNX__]: New function.
14001 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14002
4424e0c3 140032009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14004
14005 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14006 srv_tgtobj.
14007
912cf4ba
PA
140082009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14009 Pedro Alves <pedro@codesourcery.com>
14010
14011 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14012 don't support CONTEXT_EXTENDED_REGISTERS.
14013 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14014 (the_low_target): Install them.
14015 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14016 failing with ERROR_PIPE_NOT_CONNECTED.
14017
aa5ca48f
DE
140182009-06-30 Doug Evans <dje@google.com>
14019 Pierre Muller <muller@ics.u-strasbg.fr>
14020
14021 Add h/w watchpoint support to x86-linux, win32-i386.
14022 * Makefile.in (SFILES): Add i386-low.c
14023 (i386_low_h): Define.
14024 (i386-low.o): Add dependencies.
14025 (linux-x86-low.o): Add i386-low.h dependency.
14026 (win32-i386-low.o): Ditto.
14027 * i386-low.c: New file.
14028 * i386-low.h: New file.
14029 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14030 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14031 * linux-low.c (linux_add_process): Initialize arch_private.
14032 (linux_remove_process): Free arch_private.
14033 (add_lwp): Initialize arch_private.
14034 (delete_lwp): Free arch_private.
14035 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14036 provided.
14037 * linux-low.h (process_info_private): New member arch_private.
14038 (lwp_info): New member arch_private.
14039 (linux_target_ops): New members new_process, new_thread,
14040 prepare_to_resume.
14041 (ptid_of): New macro.
14042 * linux-x86-low.c: Include stddef.h, i386-low.h.
14043 (arch_process_info): New struct.
14044 (arch_lwp_info): New struct.
14045 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14046 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14047 (i386_dr_low_get_status): New function.
14048 (x86_insert_point, x86_remove_point): New functions.
14049 (x86_stopped_by_watchpoint): New function.
14050 (x86_stopped_data_address): New function.
14051 (x86_linux_new_process, x86_linux_new_thread): New functions.
14052 (x86_linux_prepare_to_resume): New function.
14053 (the_low_target): Add entries for insert_point, remove_point,
14054 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14055 prepare_to_resume.
14056 * server.c (debug_hw_points): New global.
14057 (monitor_show_help): Document set debug-hw-points.
14058 (handle_query): Process "set debug-hw-points".
14059 * server.h (debug_hw_points): Declare.
14060 (paddress): Declare.
14061 * utils.c (NUMCELLS, CELLSIZE): New macros.
14062 (get_sell, xsnprintf, paddress): New functions.
14063 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14064 remove_point, stopped_by_watchpoint, stopped_data_address.
14065 * win32-i386-low.c: Include i386-low.h.
14066 (debug_reg_state): Replaces dr.
14067 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14068 (i386_dr_low_get_status): New function.
14069 (i386_insert_point, i386_remove_point): New functions.
14070 (i386_stopped_by_watchpoint): New function.
14071 (i386_stopped_data_address): New function.
14072 (i386_initial_stuff): Update.
14073 (get_thread_context,set_thread_context,i386_thread_added): Update.
14074 (the_low_target): Add entries for insert_point,
14075 remove_point, stopped_by_watchpoint, stopped_data_address.
14076 * win32-low.c (win32_insert_watchpoint): New function.
14077 (win32_remove_watchpoint): New function.
14078 (win32_stopped_by_watchpoint): New function.
14079 (win32_stopped_data_address): New function.
14080 (win32_target_ops): Add entries for insert_watchpoint,
14081 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14082 * win32-low.h (win32_target_ops): New members insert_point,
14083 remove_point, stopped_by_watchpoint, stopped_data_address.
14084
d993e290
PA
140852009-06-25 Pedro Alves <pedro@codesourcery.com>
14086
14087 * server.c (process_serial_event): Re-return unsupported, not
14088 error, if the type isn't recognized. Re-allow supporting only
14089 insert or remove packets. Also call require_running for
14090 breakpoints. Add missing break statement to default case. Tidy.
14091 * target.h (struct target_ops): Rename insert_watchpoint to
14092 insert_point, and remove_watchpoint to remove_point.
14093
14094 * linux-low.h (struct linux_target_ops): Likewise.
14095 * linux-low.c (linux_insert_watchpoint): Rename to ...
14096 (linux_insert_point): ... this. Adjust.
14097 (linux_remove_watchpoint): Rename to ...
14098 (linux_remove_point): ... this. Adjust.
14099 (linux_target_ops): Adjust.
14100 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14101 (cris_insert_point): ... this.
14102 (cris_remove_watchpoint): Rename to ...
14103 (cris_remove_point): ... this.
14104 (the_low_target): Adjust.
14105
0f54c268
PM
141062009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14107
14108 * server.c (handle_v_kill): Pass signal_pid to
14109 kill_inferior if multi_process is zero.
14110
c6314022
AR
141112009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14112
14113 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14114 * target.h (target_ops): Comment for *_watchpoint to make it clear
14115 the functions can get types '0' and '1'.
14116
4463ce24
AR
141172009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14118
14119 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14120 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14121 * regcache.c (get_regcache): Likewise.
14122 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14123 * win32-low.c (child_fetch_inferior_registers): Remove check for
14124 regno 0.
14125
cf8fd78b
PA
141262009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14127 Pedro Alves <pedro@codesourcery.com>
14128
14129 * target.h (struct target_ops) <supports_multi_process>: New
14130 callback.
14131 (target_supports_multi_process): New.
14132 * server.c (handle_query): Even if GDB reports support, only
14133 enable multi-process if the target also supports it. Report
14134 multi-process support only if the target backend supports it.
14135 * linux-low.c (linux_supports_multi_process): New function.
14136 (linux_target_ops): Install it as target_supports_multi_process
14137 callback.
14138
47c0c975
DE
141392009-05-24 Doug Evans <dje@google.com>
14140
e09875d4
DE
14141 Global renaming of find_thread_pid to find_thread_ptid.
14142 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14143 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14144 All callers updated.
14145
e27d73f6
DE
14146 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14147 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14148 directly.
14149
47c0c975
DE
14150 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14151 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14152 (linux_resume_one_lwp): Ditto.
14153
2acc282a
DE
141542009-05-23 Doug Evans <dje@google.com>
14155
14156 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14157 from struct inferior_list_entry * to struct lwp_info *.
14158 All callers updated.
14159
9f1036c1
DE
141602009-05-13 Doug Evans <dje@google.com>
14161
14162 * linux-x86-low.c: Don't include assert.h.
14163 (x86_siginfo_fixup): Use fatal, not assert.
14164 (x86_arch_setup): Fix comment.
14165
d0722149
DE
141662009-05-12 Doug Evans <dje@google.com>
14167
14168 Biarch support for i386/amd64 gdbserver.
14169 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14170 Add linux-x86-low.c.
14171 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14172 (linux-x86-low.o): Add.
14173 * linux-x86-64-low.c: Delete.
14174 * linux-i386-low.c: Delete.
14175 * linux-x86-low.c: New file.
14176 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14177 linux-x86-low.o.
14178 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14179 linux-x86-low.o.
14180 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14181 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14182 (linux_child_pid_to_exec_file): New function.
14183 (elf_64_header_p, elf_64_file_p): New functions.
14184 (siginfo_fixup): New function.
14185 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14186 give target a chance to convert layout.
14187 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14188 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14189
fdeb2a12
DE
141902009-05-07 Doug Evans <dje@google.com>
14191
14192 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14193 (regsets_store_inferior_registers): Ditto.
14194
a6dbe5df
PA
141952009-05-06 Pedro Alves <pedro@codesourcery.com>
14196
14197 PR server/10048
14198
14199 * linux-low.c (must_set_ptrace_flags): Delete.
14200 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14201 of the global.
14202 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14203 `lwp->must_set_ptrace_flags' instead.
ba42693b 14204 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14205 (linux_wait_1): ... not here.
14206
5091eb23
DE
142072009-04-30 Doug Evans <dje@google.com>
14208
9f767825
DE
14209 * inferiors.c (started_inferior_callback): New function.
14210 (attached_inferior_callback): New function.
14211 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14212 * server.c (print_started_pid, print_attached_pid): New functions.
14213 (detach_or_kill_for_exit): New function.
14214 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14215 * server.h (have_started_inferiors_p): Declare.
14216 (have_attached_inferiors_p): Declare.
14217
5091eb23
DE
14218 * inferiors.c (remove_process): Fix memory leak, free process.
14219 * linux-low.c (linux_remove_process): New function.
14220 (linux_kill): Call it instead of remove_process.
14221 (linux_detach, linux_wait_1): Ditto.
14222
155c8968
PA
142232009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14224
14225 * configure.srv: Add x86 Windows CE target.
14226
7fe519cb
UW
142272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14228
14229 * inferiors.c (get_thread_process): Make global.
14230 * server.h (get_thread_process): Add prototype.
14231 * thread-db.c (find_one_thread): Use get_thread_process
14232 instead of current_process.
14233 (thread_db_get_tls_address): Do not crash if called when
14234 thread layer is not yet initialized.
14235
5472f405
UW
142362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14237
14238 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14239 * spu-low.c (current_tid): Rename to ...
14240 (current_ptid): ... this.
14241 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14242 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14243 ptid_get_lwp (current_ptid) instead of current_tid.
14244 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14245 instead of current_tid. Use find_process_pid to verify pid
14246 argument is valid. Pass proper argument to remove_process.
14247 (spu_thread_alive): Compare current_ptid instead of current_tid.
14248 (spu_resume): Likewise.
14249
55ac2b99
PA
142502009-04-02 Pedro Alves <pedro@codesourcery.com>
14251
14252 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14253 variable.
14254
95954743
PA
142552009-04-01 Pedro Alves <pedro@codesourcery.com>
14256
14257 Implement the multiprocess extensions, and add linux multiprocess
14258 support.
14259
14260 * server.h (ULONGEST): Declare.
14261 (struct ptid, ptid_t): New.
14262 (minus_one_ptid, null_ptid): Declare.
14263 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14264 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14265 (struct inferior_list_entry): Change `id' type from unsigned from
14266 to ptid_t.
14267 (struct sym_cache, struct breakpoint, struct
14268 process_info_private): Forward declare.
14269 (struct process_info): Declare.
14270 (current_process): Declare.
14271 (all_processes): Declare.
14272 (initialize_inferiors): Declare.
14273 (add_thread): Adjust to use ptid_t.
14274 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14275 (add_process, remove_process, find_thread_pid): Declare.
14276 (find_inferior_id): Adjust to use ptid_t.
14277 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14278 (multi_process): Declare.
14279 (push_event): Adjust to use ptid_t.
14280 (read_ptid, write_ptid): Declare.
14281 (prepare_resume_reply): Adjust to use ptid_t.
14282 (clear_symbol_cache): Declare.
14283 * inferiors.c (all_processes): New.
14284 (null_ptid, minus_one_ptid): New.
14285 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14286 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14287 (add_thread): Change unsigned long to ptid. Remove gdb_id
14288 parameter. Adjust.
14289 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14290 (gdb_id_to_thread): Rename to ...
14291 (find_thread_pid): ... this. Change unsigned long to ptid.
14292 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14293 (loaded_dll, pull_pid_from_list): Adjust.
14294 (add_process, remove_process, find_process_pid)
14295 (get_thread_process, current_process, initialize_inferiors): New.
14296 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14297 (struct target_waitstatus) <related_pid>: Ditto.
14298 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14299 return type to int.
14300 (struct target_ops) <join>: Add `pid' argument.
14301 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14302 (struct target_ops) <wait>: Add `ptid' field. Change return type
14303 to ptid.
14304 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14305 (mywait): Add `ptid' argument. Change return type to ptid_t.
14306 (target_pid_to_str): Declare.
14307 * target.c (set_desired_inferior): Adjust to use ptids.
14308 (mywait): Add new `ptid' argument. Adjust.
14309 (target_pid_to_str): New.
14310 * mem-break.h (free_all_breakpoints): Declare.
14311 * mem-break.c (breakpoints): Delelete.
14312 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14313 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14314 to use per-process breakpoint list.
14315 (free_all_breakpoints): New.
14316 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14317 (symbol_cache, all_symbols_looked_up): Delete.
14318 (hexchars): New.
14319 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14320 read_ptid): New.
14321 (prepare_resume_reply): Change ptid argument's type from unsigned
14322 long to ptid_t. Adjust. Implement W;process and X;process.
14323 (free_sym_cache, clear_symbol_cache): New.
14324 (look_up_one_symbol): Adjust to per-process symbol cache. *
14325 * server.c (cont_thread, general_thread, step_thread): Change type
14326 to ptid_t.
14327 (attached): Delete.
14328 (multi_process): New.
14329 (last_ptid): Change type to ptid_t.
14330 (struct vstop_notif) <ptid>: Change type to ptid_t.
14331 (queue_stop_reply, push_event): Change `ptid' argument's type to
14332 ptid_t.
14333 (discard_queued_stop_replies): Add `pid' argument.
14334 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14335 changes. Don't reference the `attached' global.
14336 (attach_inferior): Adjust to mywait interface changes.
14337 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14338 features. Handle and report "multiprocess+". Handle
14339 "qAttached:PID".
14340 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14341 changes.
14342 (handle_v_kill): New.
14343 (handle_v_stopped): Adjust to use target_pid_to_str.
14344 (handle_v_requests): Allow multiple attaches and runs when
14345 multiprocess extensions are in effect. Handle "vKill".
14346 (myresume): Adjust to use ptids.
14347 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14348 (handle_status): Adjust to discard_queued_stop_replies interface
14349 change.
14350 (first_thread_of, kill_inferior_callback)
14351 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14352 (main): Call initialize_inferiors. Adjust to use ptids, killing
14353 and detaching from all inferiors. Handle multiprocess packet
14354 variants.
14355 * linux-low.h: Include gdb_proc_service.h.
14356 (struct process_info_private): New.
14357 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14358 <lwpid_of>: Use ptid_get_lwp.
14359 (get_lwp_thread): Adjust.
14360 (struct lwp_info): Add `dead' member.
14361 (find_lwp_pid): Declare.
14362 * linux-low.c (thread_db_active): Delete.
14363 (new_inferior): Adjust comment.
14364 (inferior_pid): Delete.
14365 (linux_add_process): New.
14366 (handle_extended_wait): Adjust.
14367 (add_lwp): Change unsigned long to ptid.
14368 (linux_create_inferior): Add process to processes table. Adjust
14369 to use ptids. Don't set new_inferior here.
14370 (linux_attach_lwp): Rename to ...
14371 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14372 it. Adjust to use ptids.
14373 (linux_attach_lwp): New.
14374 (linux_attach): Add process to processes table. Don't set
14375 new_inferior here.
14376 (struct counter): New.
14377 (second_thread_of_pid_p, last_thread_of_process_p): New.
14378 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14379 multiple processes.
14380 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14381 processes. Remove process from process table.
14382 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14383 to multiple processes.
14384 (any_thread_of): New.
14385 (linux_detach): Add `pid' argument, and handle it. Remove process
14386 from processes table.
14387 (linux_join): Add `pid' argument. Handle it.
14388 (linux_thread_alive): Change unsighed long argument to ptid_t.
14389 Consider dead lwps as not being alive.
14390 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14391 threads we're not interested in.
14392 (same_lwp, find_lwp_pid): New.
14393 (linux_wait_for_lwp): Change `pid' argument's type from int to
14394 ptid_t. Adjust.
14395 (linux_wait_for_event): Rename to ...
14396 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14397 from int to ptid_t. Adjust.
14398 (linux_wait_for_event): New.
14399 (linux_wait_1): Add `ptid' argument. Change return type to
14400 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14401 that exit from the process table.
14402 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14403 Adjust.
14404 (mark_lwp_dead): New.
14405 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14406 stopping all threads, mark its main lwp as dead.
14407 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14408 ptids.
14409 (fetch_register, usr_store_inferior_registers)
14410 (regsets_fetch_inferior_registers)
14411 (regsets_store_inferior_registers, linux_read_memory)
14412 (linux_write_memory): Inline `inferior_pid'.
14413 (linux_look_up_symbols): Adjust to use per-process
14414 `thread_db_active'.
14415 (linux_request_interrupt): Adjust to use ptids.
14416 (linux_read_auxv): Inline `inferior_pid'.
14417 (initialize_low): Don't reference thread_db_active.
14418 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14419 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14420 (ps_getpid): Return the pid of the current inferior.
14421 * thread-db.c (proc_handle, thread_agent): Delete.
14422 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14423 per-process data.
14424 (find_one_thread): Change argument type to ptid_t. Adjust to
14425 per-process data.
14426 (maybe_attach_thread): Adjust to per-process data and ptids.
14427 (thread_db_find_new_threads): Ditto.
14428 (thread_db_init): Ditto.
14429 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14430 processes table. Adjust to use ptids.
14431 (spu_kill, spu_detach): Adjust interface. Remove process from
14432 processes table.
14433 (spu_join, spu_thread_alive): Adjust interface.
14434 (spu_wait): Adjust interface. Remove process from processes
14435 table. Adjust to use ptids.
14436 * win32-low.c (current_inferior_tid): Delete.
14437 (current_inferior_ptid): New.
14438 (debug_event_ptid): New.
14439 (thread_rec): Take a ptid. Adjust.
14440 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14441 (child_delete_thread): Ditto.
14442 (do_initial_child_stuff): Add `attached' argument. Add process to
14443 processes table.
14444 (child_fetch_inferior_registers, child_store_inferior_registers):
14445 Adjust.
14446 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14447 (win32_attach): Pass 1 to do_initial_child_stuff.
14448 (win32_kill): Adjust interface. Remove process from processes
14449 table.
14450 (win32_detach): Ditto.
14451 (win32_join): Adjust interface.
14452 (win32_thread_alive): Take a ptid.
14453 (win32_resume): Adjust to use ptids.
14454 (get_child_debug_event): Ditto.
14455 (win32_wait): Adjust interface. Remove exiting process from
14456 processes table.
14457
bd99dc85
PA
144582009-04-01 Pedro Alves <pedro@codesourcery.com>
14459
14460 Non-stop mode support.
14461
14462 * server.h (non_stop): Declare.
14463 (gdb_client_data, handler_func): Declare.
14464 (delete_file_handler, add_file_handler, start_event_loop):
14465 Declare.
14466 (handle_serial_event, handle_target_event, push_event)
14467 (putpkt_notif): Declare.
14468 * target.h (enum resume_kind): New.
14469 (struct thread_resume): Replace `step' field by `kind' field.
14470 (TARGET_WNOHANG): Define.
14471 (struct target_ops) <wait>: Add `options' argument.
14472 <supports_non_stop, async, start_non_stop>: New fields.
14473 (target_supports_non_stop, target_async): New.
14474 (start_non_stop): Declare.
14475 (mywait): Add `options' argument.
14476 * target.c (mywait): Add `options' argument. Print child exit
14477 notifications here.
14478 (start_non_stop): New.
14479 * server.c (non_stop, own_buf, mem_buf): New globals.
14480 (struct vstop_notif): New.
14481 (notif_queue): New global.
14482 (queue_stop_reply, push_event, discard_queued_stop_replies)
14483 (send_next_stop_reply): New.
14484 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14485 interface changes.
14486 (attach_inferior): In non-stop mode, don't wait for the target
14487 here.
14488 (handle_general_set): Handle QNonStop.
14489 (handle_query): When handling qC, return the current general
14490 thread, instead of the first thread of the list.
14491 (handle_query): If the backend supports non-stop mode, include
14492 QNonStop+ in the qSupported query response.
14493 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14494 and non-stop mode.
14495 (handle_v_attach, handle_v_run): Handle non-stop mode.
14496 (handle_v_stopped): New.
14497 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14498 (myresume): Adjust to use resume_kind. Handle non-stop.
14499 (queue_stop_reply_callback): New.
14500 (handle_status): Handle non-stop mode.
14501 (main): Clear non_stop flag on reconnection. Use the event-loop.
14502 Refactor serial protocol handling from here ...
14503 (process_serial_event): ... to this new function. When GDB
14504 selects any thread, select one here. In non-stop mode, wait until
14505 GDB acks all pending events before exiting.
14506 (handle_serial_event, handle_target_event): New.
14507 * remote-utils.c (remote_open): Install remote_desc in the event
14508 loop.
14509 (remote_close): Remove remote_desc from the event loop.
14510 (putpkt_binary): Rename to...
14511 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14512 (putpkt_binary): New as wrapper around putpkt_binary_1.
14513 (putpkt_notif): New.
14514 (prepare_resume_reply): In non-stop mode, don't change the
14515 general_thread.
14516 * event-loop.c: New.
14517 * Makefile.in (OBJ): Add event-loop.o.
14518 (event-loop.o): New rule.
14519
14520 * linux-low.h (pid_of): Moved here.
14521 (lwpid_of): New.
14522 (get_lwp_thread): Use lwpid_of.
14523 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14524 * linux-low.c (pid_of): Delete.
14525 (inferior_pid): Use lwpid_of.
14526 (linux_event_pipe): New.
14527 (target_is_async_p): New.
14528 (delete_lwp): New.
14529 (handle_extended_wait): Use lwpid_of.
14530 (add_lwp): Don't set lwpid field.
14531 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14532 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14533 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14534 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14535 first. Adjust to linux_wait_for_event interface changes. Use
14536 lwpid_of.
14537 (linux_detach): Don't delete the main lwp here.
14538 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14539 (status_pending_p): Don't consider explicitly suspended lwps.
14540 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14541 pointer. Add OPTIONS argument. Change return type to int. Use
14542 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14543 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14544 pointer. Add status pointer argument. Return a pid instead of a
14545 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14546 changes. In non-stop mode, don't switch to a random thread.
14547 (linux_wait): Rename to...
14548 (linux_wait_1): ... this. Add target_options argument, and handle
14549 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14550 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14551 clean exit and signal exit code. Don't stop all threads in
14552 non-stop mode. In all-stop mode, only stop all threads when
14553 reporting a stop to GDB. Handle explicit thread stop requests.
14554 (async_file_flush, async_file_mark): New.
14555 (linux_wait): New.
14556 (send_sigstop): Use lwpid_of.
14557 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14558 interface changes. In non-stop mode, don't switch to a random
14559 thread.
14560 (linux_resume_one_lwp): Use lwpid_of.
14561 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14562 (linux_resume_one_thread): ... this. Handle resume_stop. In
14563 non-stop mode, don't look for pending flag in all threads.
14564 (resume_status_pending_p): Don't consider explicitly suspended
14565 threads.
14566 (my_waitpid): Reimplement. Emulate __WALL.
14567 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14568 Use lwpid_of.
14569 (sigchld_handler, linux_supports_non_stop, linux_async)
14570 (linux_start_non_stop): New.
14571 (linux_target_ops): Register linux_supports_non_stop, linux_async
14572 and linux_start_non_stop.
14573 (initialize_low): Install SIGCHLD handler.
14574 * thread-db.c (thread_db_create_event, find_one_thread)
14575 (thread_db_get_tls_address): Use lwpid_of.
14576 * win32-low.c (win32_detach): Adjust to use resume_kind.
14577 (win32_wait): Add `options' argument.
14578 * spu-low.c (spu_resume): Adjust to use resume_kind.
14579 (spu_wait): Add `options' argument.
14580
5b1c542e
PA
145812009-04-01 Pedro Alves <pedro@codesourcery.com>
14582
14583 Decouple target code from remote protocol.
14584
14585 * target.h (enum target_waitkind): New.
14586 (struct target_waitstatus): New.
14587 (struct target_ops) <wait>: Return an unsigned long. Take a
14588 target_waitstatus pointer instead of a char pointer.
14589 (mywait): Likewise.
14590 * target.c (mywait): Change prototype to return an unsigned long.
14591 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14592 * server.h (thread_from_wait, old_thread_from_wait): Delete
14593 declarations.
14594 (prepare_resume_reply): Change prototype to take a
14595 target_waitstatus.
14596 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14597 (last_status, last_ptid): New.
14598 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14599 pid instead of a signal.
14600 (attach_inferior): Remove "status" and "signal" parameters.
14601 Adjust.
14602 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14603 not as an address.
14604 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14605 (handle_v_requests, myresume): Remove "status" and "signal"
14606 parameters. Adjust.
14607 (handle_status): New.
14608 (main): Delete local `status'. Adjust.
14609 * remote-utils.c: Include target.h.
14610 (prepare_resume_reply): Change prototype to take a
14611 target_waitstatus. Adjust.
14612
14613 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14614 interface.
14615 * spu-low.c (spu_wait): Adjust.
14616 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14617 Delete.
14618 (win32_wait): Adjust.
14619
2bd7c093
PA
146202009-04-01 Pedro Alves <pedro@codesourcery.com>
14621
14622 * target.h (struct thread_resume): Delete leave_stopped member.
14623 (struct target_ops): Add a `n' argument to the `resume' callback.
14624 * server.c (start_inferior): Adjust.
14625 (handle_v_cont, myresume): Adjust.
14626 * linux-low.c (check_removed_breakpoint): Adjust to resume
14627 interface change, and to removed leave_stopped field.
14628 (resume_ptr): Delete.
14629 (struct thread_resume_array): New.
14630 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14631 resume interface change.
14632 (linux_continue_one_thread, linux_queue_one_thread)
14633 (resume_status_pending_p): Check if the resume field is NULL
14634 instead of checking the leave_stopped member.
14635 (linux_resume): Adjust to the target resume interface change.
14636 * spu-low.c (spu_resume): Adjust to the target resume interface
14637 change.
14638 * win32-low.c (win32_detach, win32_resume): Ditto.
14639
c35fafde
PA
146402009-04-01 Pedro Alves <pedro@codesourcery.com>
14641
14642 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14643 flag.
14644 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14645 pending.
14646 (linux_continue_one_thread): Only preserve the stepping flag if
14647 there's a pending breakpoint.
14648
0a59d50b
PA
146492009-03-31 Pedro Alves <pedro@codesourcery.com>
14650
14651 * server.c (main): After the inferior having exited, call
14652 remote_close before exiting gdbserver.
14653
f04c6d38
TJB
146542009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14655
14656 Fix size of FPSCR in Power 7 processors.
14657 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14658 (PPC_FEATURE_HAS_DFP): New #define.
14659 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14660 size of the FPSCR.
14661
78e5cee6
PA
146622009-03-23 Pedro Alves <pedro@codesourcery.com>
14663
14664 * server.c (handle_query) Whitespace and formatting.
14665
1b3f6016
PA
146662009-03-22 Pedro Alves <pedro@codesourcery.com>
14667
14668 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14669 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14670 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14671 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14672 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14673 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14674 Makefile.in, configure.ac: Fix whitespace throughout.
14675 * configure: Regenerate.
14676
a07b2135
PA
146772009-03-22 Pedro Alves <pedro@codesourcery.com>
14678
14679 * inferiors.c (find_inferior): Make it safe for the callback
14680 function to delete the currently iterated inferior.
14681
67cc2626
PA
146822009-03-22 Pedro Alves <pedro@codesourcery.com>
14683
14684 * Makefile.in (linuw_low_h): Move higher.
14685 (thread-db.o): Depend on $(linux_low_h).
14686
54a0b537
PA
146872009-03-17 Pedro Alves <pedro@codesourcery.com>
14688
14689 Rename "process" to "lwp" throughout.
14690
14691 * linux-low.c (all_processes): Rename to...
14692 (all_lwps): ... this.
14693 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14694 (add_process): Rename to ...
14695 (add_lwp): ... this. Adjust.
14696 (linux_create_inferior): Adjust.
14697 (linux_attach_lwp): Adjust.
14698 (linux_attach): Adjust.
14699 (linux_kill_one_process): Rename to ...
14700 (linux_kill_one_lwp): ... this. Adjust.
14701 (linux_kill): Adjust.
14702 (linux_detach_one_process): Rename to ...
14703 (linux_detach_one_lwp): ... this. Adjust.
14704 (linux_detach): Adjust.
14705 (check_removed_breakpoint): Adjust.
14706 (status_pending_p): Adjust.
14707 (linux_wait_for_process): Rename to ...
14708 (linux_wait_for_lwp): ... this. Adjust.
14709 (linux_wait_for_event): Adjust.
14710 (send_sigstop): Adjust.
14711 (wait_for_sigstop): Adjust.
14712 (stop_all_processes): Rename to ...
14713 (stop_all_lwps): ... this.
14714 (linux_resume_one_process): Rename to ...
14715 (linux_resume_one_lwp): ... this. Adjust.
14716 (linux_set_resume_request, linux_continue_one_thread)
14717 (linux_queue_one_thread, resume_status_pending_p)
14718 (usr_store_inferior_registers, regsets_store_inferior_registers)
14719 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14720 Adjust.
14721 * linux-low.h (get_process): Rename to ...
14722 (get_lwp): ... this. Adjust.
14723 (get_thread_process): Rename to ...
14724 (get_thread_lwp): ... this. Adjust.
14725 (get_process_thread): Rename to ...
14726 (get_lwp_thread): ... this. Adjust.
14727 (struct process_info): Rename to ...
14728 (struct lwp_info): ... this.
14729 (all_processes): Rename to ...
14730 (all_lwps): ... this.
14731 * proc-service.c (ps_lgetregs): Adjust.
14732 * thread-db.c (thread_db_create_event, find_one_thread)
14733 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14734
0b16c5cf
PA
147352009-03-14 Pedro Alves <pedro@codesourcery.com>
14736
14737 * server.c (handle_query): Handle "qAttached".
14738
32de4b9d
NS
147392009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14740
14741 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14742 GPLv3, update license URL.
14743
2aecd87f
DE
147442009-03-01 Doug Evans <dje@google.com>
14745
93efd302 14746 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14747 (server_h): Add gdb_signals.h.
14748 (signals.o): Update.
14749 * server.h (target_signal_from_host,target_signal_to_host_p)
14750 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14751
86b1f9c5
PM
147522009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14753
14754 * remote-utils.c (getpkt): Also generate remote-debug
14755 information if noack_mode is set.
14756
4aa995e1
PA
147572009-02-06 Pedro Alves <pedro@codesourcery.com>
14758
14759 * server.c (handle_query): Report qXfer:siginfo:read and
14760 qXfer:siginfo:write as supported and handle them.
14761 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14762 * linux-low.c (linux_xfer_siginfo): New.
14763 (linux_target_ops): Set it.
14764
62709adf
PA
147652009-01-26 Pedro Alves <pedro@codesourcery.com>
14766
14767 * server.c (gdbserver_usage): Mention --remote-debug.
14768 (main): Accept '--remote-debug' switch.
14769
aef93bd7
DE
147702009-01-18 Doug Evans <dje@google.com>
14771
14772 * regcache.c (new_register_cache): No need to check result of xcalloc.
14773 * server.c (handle_search_memory): Back out calls to xmalloc,
14774 result is checked and error is returned to user upon failure.
14775 (handle_query): Ditto. Add more checks for result of malloc.
14776 (handle_v_cont): Check result of malloc, report error back to
14777 user upon failure.
14778 (handle_v_run): Ditto. Call freeargv.
14779 * server.h (freeargv): Declare.
14780 * utils.c (freeargv): New fn.
14781
54363045
DE
147822009-01-15 Doug Evans <dje@google.com>
14783
f626972c
DE
14784 * gdbreplay.c (perror_with_name): Make arg const char *.
14785 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14786 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14787 * utils.c (perror_with_name): Make arg const char *.
54363045 14788
18aae699
PA
147892009-01-14 Pedro Alves <pedro@codesourcery.com>
14790
14791 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14792 when handling a EXIT_PROCESS_DEBUG_EVENT.
14793
ff703abe
JB
147942009-01-06 Joel Brobecker <brobecker@adacore.com>
14795
14796 * gdbreplay.c (gdbreplay_version): Update copyright year.
14797 * server.c (gdbserver_version): Likewise.
14798
f21cc1a2 147992009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14800
14801 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14802 (handle_extended_wait): Improve comment.
0e21c1ec 14803
bca929d3
DE
148042008-12-13 Doug Evans <dje@google.com>
14805
14806 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14807 * server.h (ATTR_MALLOC): New macro.
14808 (xmalloc,xcalloc,xstrdup): Declare.
14809 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14810 * inferiors.c: Ditto.
14811 * linux-low.c: Ditto.
14812 * mem-break.c: Ditto.
14813 * regcache.c: Ditto.
14814 * remote-utils.c: Ditto.
14815 * server.c: Ditto.
14816 * target.c: Ditto.
14817 * win32-low.c: Ditto.
14818
97438e3f
DE
148192008-12-12 Doug Evans <dje@google.com>
14820
896c7fbb
DE
14821 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14822 in debugging printf.
14823
97438e3f
DE
14824 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14825
e3b886f8
DE
148262008-12-09 Doug Evans <dje@google.com>
14827
14828 * linux-low.h (struct process_info): Delete member tid, unused.
14829 * thread-db.c (find_one_thread): Update.
14830 (maybe_attach_thread): Update.
14831
07e059b5
VP
148322008-12-02 Pedro Alves <pedro@codesourcery.com>
14833
889bf7c5
PA
14834 * target.h (struct target_ops): Add qxfer_osdata member.
14835 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14836 and dirent.h.
14837 (linux_qxfer_osdata): New functions.
14838 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14839 callback.
14840 * server.c (handle_query): Handle "qXfer:osdata:read:".
14841 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14842 (buffer_xml_printf): New functions.
14843 * server.h (struct buffer): New.
14844 (buffer_grow_str, buffer_grow_str0): New macros.
14845 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14846 (buffer_xml_printf): Declare.
07e059b5 14847
4cab47ab
DE
148482008-11-24 Doug Evans <dje@google.com>
14849
14850 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14851
f142445f
DJ
148522008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * server.c (handle_v_run): Always use the supplied argument list.
14855
d0107bb6 148562008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14857
d0107bb6
BW
14858 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14859 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14860
2c4ad781
TJB
148612008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14862
14863 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14864 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14865 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14866 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14867 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14868 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14869 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14870 XML target descriptions.
14871 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14872 when inferior is running on an ISA 2.05 or later processor. Add
14873 special case to return offset for full 64-bit slot of FPSCR when
14874 in 32-bits.
14875
dfb64f85
DJ
148762008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14877
14878 * Makefile.in (SFILES, clean): Added sparc64 files.
14879 (reg-sparc64.o, reg-sparc64.c): New.
14880 * configure.srv (sparc*-*-linux*): New configuration.
14881 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14882 syscall arguments for SPARC.
14883 (regsets_store_inferior_registers): Likewise.
14884 * linux-sparc-low.c: New file.
14885
66b6e1dd
DE
148862008-10-21 Doug Evans <dje@google.com>
14887
14888 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14889 (READLINE_DIR,READLINE_DEP): Delete.
14890 (INTERNAL_CFLAGS): Update.
14891 (LINTFLAGS): Update.
14892
9b710a42
PA
148932008-10-10 Pedro Alves <pedro@codesourcery.com>
14894
14895 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14896 whole argv from the last run, not just argv[0].
14897
5822d809
PA
148982008-09-08 Pedro Alves <pedro@codesourcery.com>
14899
14900 * regcache.c (new_register_cache): Return NULL if the register
14901 cache size isn't known yet.
14902 (free_register_cache): Avoid dereferencing a NULL regcache.
14903
74aac56f
DJ
149042008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14905
14906 * configure.srv: Merge MIPS and MIPS64.
14907
400b20f5
MR
149082008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14909
14910 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14911
677c5bb1
LM
149122008-08-18 Luis Machado <luisgpm@br.ibm.com>
14913
14914 * Makefile.in: Add required vsx dependencies.
14915
14916 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14917 Declare init_registers_powerpc_vsx32l.
14918 Declare init_registers_powerpc_vsx64l.
14919 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14920 (ppc_arch_setup): Check for VSX in hwcap.
14921 (ppc_fill_vsxregset): New function.
14922 (ppc_store_vsxregset): New function.
14923 Add new VSX entry in regset_info target_regsets.
14924
14925 * configure.srv: Add new VSX dependencies.
14926
a6f3e723
SL
149272008-08-12 Pedro Alves <pedro@codesourcery.com>
14928
14929 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14930 (remote_open): Set or clear transport_is_reliable.
14931 (putpkt_binary): Don't expect acks in noack mode.
14932 (getpkt): Don't send ack/nac in noack mode.
14933 * server.c (handle_general_set): Handle QStartNoAckMode.
14934 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14935 qSupported.
14936 (main): Reset noack_mode on every connection.
14937 * server.h (noack_mode): Declare.
14938
a417dc56
RW
149392008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14940
14941 * Makefile.in (GDBREPLAY_OBS): New variable.
14942 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14943
3221518c
UW
149442008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14945 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14948 (usr_store_inferior_registers): Likewise.
14949 (regsets_store_inferior_registers): Likewise.
14950
ec56be1b
PA
149512008-07-31 Rolf Jansen <rj@surtec.com>
14952 Pedro Alves <pedro@codesourcery.com>
14953
14954 * configure.ac: Check for memmem declaration.
14955 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14956 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14957 (disable_packet_qfThreadInfo): Unconditionally compile.
14958 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14959 * configure, config.in: Regenerate.
14960
2fe5e3ff
DE
149612008-07-28 Doug Kwan <dougkwan@google.com>
14962
14963 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14964 (linux_write_memory): Remove declaration of errno.
14965
836acd6d
UW
149662008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14967
14968 * linux-low.c (handle_extended_wait): Do not use "status"
14969 variable uninitialized.
14970
aeba519e
PA
149712008-07-07 Pedro Alves <pedro@codesourcery.com>
14972
14973 * server.c (handle_v_attach): Inhibit reporting dll changes.
14974
db42f210
PA
149752008-06-27 Pedro Alves <pedro@codesourcery.com>
14976
14977 * remote-utils.c (prepare_resume_reply): If requested, don't
14978 output "thread:TID" in the T stop reply.
14979
14980 * server.c (disable_packet_vCont, disable_packet_Tthread)
14981 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14982 (handle_query): If requested, disable support for qC, qfThreadInfo
14983 and qsThreadInfo.
14984 (handle_v_requests): If requested, disable support for vCont.
14985 (gdbserver_show_disableable): New.
14986 (main): Handle --disable-packet and --disable-packet=LIST.
14987
14988 * server.h (disable_packet_vCont, disable_packet_Tthread)
14989 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14990
8e4c5421
CD
149912008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14992
14993 * server.c (gdbserver_usage): Mention --version.
14994
6e23a804
DJ
149952008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14996
14997 * Makefile.in (gdbreplay.o): New rule.
14998
90aa6a40
JM
149992008-06-06 Joseph Myers <joseph@codesourcery.com>
15000
15001 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15002 message, not gdbserver.
15003
c16158bc 150042008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15005 Nathan Sidwell <nathan@codesourcery.com>
15006 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15007
15008 * acinclude.m4: Include ../../config/acx.m4.
15009 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15010 * configure, config.in: Regenerate.
15011 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15012 * server.c (gdbserver_version): Print PKGVERSION.
15013 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15014 (main): Adjust gdbserver_usage calls.
15015 * gdbreplay.c (version, host_name): Add declarations.
15016 (gdbreplay_version, gdbreplay_usage): New.
15017 (main): Accept --version and --help options.
15018
aeb75bf5
DJ
150192008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15020
15021 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15022 (arm_breakpoint_at): Handle Thumb.
15023 (the_low_target): Add comment.
15024
76b233dd
UW
150252008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15026
15027 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15028
08388c79
DE
150292008-05-09 Doug Evans <dje@google.com>
15030
a3c83fae
DE
15031 * server.h (decode_search_memory_packet): Declare.
15032 * remote-utils.c (decode_search_memory_packet): New fn.
15033 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15034 (handle_search_memory): New fn.
15035 (handle_query): Process qSearch:memory packets.
15036
bb9c3d36
UW
150372008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15038
15039 * regcache.c (registers_length): Remove.
15040 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15041 full register packet.
15042 * regcache.h (registers_length): Remove prototype.
15043 * server.h (PBUFSIZ): Define to 16384.
15044
7284e1be
UW
150452008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15046
15047 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15048 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15049 powerpc-64l.o, and powerpc-altivec64l.o.
15050 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15051 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15052 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15053 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15054 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15055 to srv_xmlfiles.
15056
15057 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15058 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15059 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15060 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15061 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15062 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15063 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15064 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15065 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15066 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15067 (clean): Update.
15068
15069 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15070 (init_registers_powerpc_32l): ... this new prototype.
15071 (init_registers_powerpc_32): Remove, replace by ...
15072 (init_registers_powerpc_altivec32l): ... this new prototype.
15073 (init_registers_powerpc_e500): Remove, replace by ...
15074 (init_registers_powerpc_e500l): ... this new prototype.
15075 (init_registers_ppc64): Remove, replace by ...
15076 (init_registers_powerpc_64l): ... this new prototype.
15077 (init_registers_powerpc_64): Remove, replace by ...
15078 (init_registers_powerpc_altivec64l): ... this new prototype.
15079 (ppc_num_regs): Set to 73.
15080 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15081 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15082 (ppc_cannot_store_register): Handle orig_r3 and trap.
15083 (ppc_arch_setup): Update init_registers_... calls.
15084 (ppc_fill_gregset): Handle orig_r3 and trap.
15085
15086 * inferiors.c (clear_inferiors): Reset current_inferior.
15087
fdc59709
PB
150882008-04-23 Paolo Bonzini <bonzini@gnu.org>
15089
889bf7c5
PA
15090 * acinclude.m4: Add override.m4.
15091 * configure: Regenerate.
fdc59709 15092
c9b2f845
UW
150932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15094
15095 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15096 initial call to init_register_ppc64.
15097
550512b8
UW
150982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15099
43aaf8b6
PA
15100 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15101 single powerpc*-*-linux* case.
550512b8
UW
15102 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15103
b6430ec3
UW
151042008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15105
15106 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15107 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15108 from reg_xmlfiles.
15109 * linux-ppc-low.c: Include <elf.h>.
15110 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15111 (ppc_hwcap): New global variable.
15112 (ppc_regmap): Remove __SPE__ #ifdef sections.
15113 (ppc_regmap_e500): New global variable.
15114 (ppc_cannot_store_register): Update __SPE__ special case.
15115 (ppc_get_hwcap): New function.
15116 (ppc_arch_setup): Use it to determine whether inferior supports
15117 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15118 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15119 Do not access registers if target does not support AltiVec.
15120 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15121 Do not access registers if target does not support SPE.
15122 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15123
52fa2412
UW
151242008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * linux-low.c (disabled_regsets, num_regsets): New.
15127 (use_regsets_p): Delete.
15128 (linux_wait_for_process): Clear disabled_regsets.
15129 (regsets_fetch_inferior_registers): Check and set it.
15130 (regsets_store_inferior_registers): Likewise.
15131 (linux_fetch_registers, linux_store_registers): Do not use
15132 use_regsets_p.
15133 (initialize_low): Allocate disabled_regsets.
15134
e28b3332
DJ
151352008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * Makefile.in (LIBOBJS): New.
15138 (OBS): Use LIBOBJS.
15139 (memmem.o): New rule.
15140 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15141 * configure: Regenerated.
15142
4536995d
UW
151432008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15144
15145 * server.c (handle_query): Never return "unsupported" for
15146 qXfer:features:read queries.
15147
221c031f
UW
151482008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15149
15150 * server.c (get_features_xml): Fix inverted condition.
15151 (handle_query): Always support qXfer:feature:read.
15152
ccd213ac
DJ
151532008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * server.c (wrapper_argv): New.
15156 (start_inferior): Handle wrapper_argv. If set, expect an extra
15157 trap.
15158 (gdbserver_usage): Document --wrapper.
15159 (main): Parse --wrapper.
15160
6fe305f7
UW
151612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15162
15163 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15164 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15165 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15166 (ppc_set_pc): Likewise.
15167 (ppc_arch_setup): New function.
15168 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15169 of collect_register.
889bf7c5 15170 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15171
5b0a002e
UW
151722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15173
15174 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15175 instead of linux-ppc64-low.o.
15176 * linux-ppc64-low.c: Remove file.
15177 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15178 (linux-ppc64-low.o): Remove rule.
15179
15180 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15181 (init_registers_powerpc_64): Likewise.
15182 (ppc_regmap): Conditionally define depending on __powerpc64__.
15183 (ppc_cannot_store_register): Do not special-case "fpscr" when
15184 compiled on __powerpc64__.
15185 (ppc_collect_ptrace_register): New function.
15186 (ppc_supply_ptrace_register): New function.
15187 (ppc_breakpoint): Change type to "unsigned int".
15188 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15189 (the_low_target): Conditionally provide initializers for the
889bf7c5 15190 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15191 collect_ptrace_register and supply_ptrace_register members.
15192
9b4b61c8
UW
151932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15194
15195 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15196 * server.c (gdbserver_xmltarget): Define.
15197 (get_features_xml): Use it to replace "target.xml" and arch_string.
15198
15199 * configure.srv: Remove srv_xmltarget. Add XML files that were
15200 mentioned there to srv_xmlfiles instead. Remove conditional tests
15201 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15202 srv_xmlfiles and srv_regobj to include all possible choices.
15203 * configure.ac (srv_xmltarget): Remove.
15204 (srv_xmlfiles): Do not add "target.xml".
15205 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15206 checks for supplementary target information.
15207 * configure: Regenerate.
15208 * Makefile.in (XML_TARGET): Remove.
15209 (target.xml): Remove rule.
15210 (clean): Do not clean up target.xml.
15211 (.PRECIOUS): Do not mention target.xml.
15212
15213 * target.h (struct target_ops): Remove arch_string member.
15214 * linux-low.c (linux_arch_string): Remove.
15215 (linux_target_ops): Remove arch_string initializer.
15216 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15217 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15218 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15219 * spu-low.c (spu_arch_string): Remove.
15220 (spu_target_ops): Remove arch_string initializer.
15221 * win32-low.c (win32_arch_string): Remove.
15222 (win32_target_ops): Remove arch_string initializer.
15223 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15224 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15225 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15226
ee1a7ae4
UW
152272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15228
15229 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15230 by collect_ptrace_register and supply_ptrace_register hooks.
15231 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15232 instead of checking for the_low_target.left_pad_xfer.
15233 (usr_store_inferior_registers): Use collect_ptrace_register callback
15234 instead of checking for the_low_target.left_pad_xfer.
15235
15236 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15237 (s390_supply_ptrace_register): Likewise.
15238 (s390_fill_gregset): Call s390_collect_ptrace_register.
15239 (the_low_target): Update.
15240
15241 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15242 (ppc_supply_ptrace_register): Likewise.
15243 (the_low_target): Update.
15244
15245 * linux-i386-low.c (the_low_target): Update.
15246 * linux-x86-64-low.c (the_low_target): Update.
15247
d61ddec4
UW
152482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15249
15250 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15251 reg-s390.o and reg-s390x.o.
15252
15253 * linux-low.c (new_inferior): New global variable.
15254 (linux_create_inferior, linux_attach): Set it.
15255 (linux_wait_for_process): Call the_low_target.arch_setup after the
15256 target has stopped for the first time.
15257 (initialize_low): Do not call the_low_target.arch_setup.
15258
15259 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15260 (s390_set_pc): Likewise.
15261 (s390_arch_setup): New function.
15262 (the_low_target): Use s390_arch_setup as arch_setup routine.
15263
15264 * regcache.c (realloc_register_cache): New function.
15265 (set_register_cache): Call it for each existing regcache.
15266
d05b4ac3
UW
152672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15268
15269 * server.h (init_registers): Remove prototype.
15270
15271 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15272 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15273 instead of init_registers ().
15274 * linux-arm-low.c (init_registers_arm): Add prototype.
15275 (init_registers_arm_with_iwmmxt): Likewise.
15276 (the_low_target): Add initializer for arch_setup field.
15277 * linux-cris-low.c (init_registers_cris): Add prototype.
15278 (the_low_target): Add initializer for arch_setup field.
15279 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15280 (the_low_target): Add initializer for arch_setup field.
15281 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15282 (the_low_target): Add initializer for arch_setup field.
15283 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15284 (the_low_target): Add initializer for arch_setup field.
15285 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15286 (the_low_target): Add initializer for arch_setup field.
15287 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15288 (the_low_target): Add initializer for arch_setup field.
15289 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15290 (init_registers_mips64_linux): Likewise.
15291 (the_low_target): Add initializer for arch_setup field.
15292 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15293 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15294 (the_low_target): Add initializer for arch_setup field.
15295 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15296 (init_registers_powerpc_64): Likewise.
15297 (the_low_target): Add initializer for arch_setup field.
15298 * linux-s390-low.c (init_registers_s390): Add prototype.
15299 (init_registers_s390x): Likewise.
15300 (the_low_target): Add initializer for arch_setup field.
15301 * linux-sh-low.c (init_registers_sh): Add prototype.
15302 (the_low_target): Add initializer for arch_setup field.
15303 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15304 (the_low_target): Add initializer for arch_setup field.
15305 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15306 (the_low_target): Add initializer for arch_setup field.
15307
15308 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15309 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15310 instead of init_registers ().
15311 * win32-arm-low.c (init_registers_arm): Add prototype.
15312 (the_low_target): Add initializer for arch_setup field.
15313 * win32-i386-low.c (init_registers_i386): Add prototype.
15314 (the_low_target): Add initializer for arch_setup field.
15315
15316 * spu-low.c (init_registers_spu): Add prototype.
15317 (initialize_low): Call initialie_registers_spu () instead of
15318 initialize_registers ().
15319
fd96d250
PA
153202008-02-19 Pedro Alves <pedro@codesourcery.com>
15321
15322 * server.c (handle_v_requests): When handling the vRun and vAttach
15323 packets, if already debugging a process, don't kill it. Return an
15324 error instead.
15325
d41b6bb4
DJ
153262008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15327
15328 * server.c (handle_query): Correct length check.
15329
5ac588cf
PA
153302008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15331
15332 * win32-low.c (do_initial_child_stuff): Add process handle
15333 parameter. Set current_process_handle and current_process_id from the
15334 parameters. Clear globals.
15335 (win32_create_inferior): Don't set current_process_handle and
15336 current_process_id here. Instead pass them on the call to
15337 do_initial_child_stuff.
15338 (win32_attach): Likewise.
15339 (win32_clear_inferiors): New.
15340 (win32_kill): Don't close the current process handle or the
15341 current thread handle here. Instead call win32_clear_inferiors.
15342 (win32_detach): Don't open a new handle to the process. Call
15343 win32_clear_inferiors.
15344 (win32_join): Don't rely on current_process_handle; open a new
15345 handle using the process id.
15346 (win32_wait): Call win32_clear_inferiors when the inferior process
15347 has exited.
15348
ecd7ecbc
DJ
153492008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15350
15351 * server.c (monitor_show_help): Add "exit".
15352
1525d545
MG
153532008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15354
ecd7ecbc 15355 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15356 (clean): Add reg-xtensa.c.
15357 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15358 * configure.srv (xtensa*-*-linux*) New target.
15359 * linux-xtensa-low.c: New.
15360 * xtensa-xtregs.c: New.
1525d545 15361
59a016f0
PA
153622008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15363
15364 * hostio.c: Don't include errno.h.
15365 (errno_to_fileio_errno): Move to hostio-errno.
15366 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15367 error number outputting to the target->hostio_last_error callback.
15368 (hostio_packet_error): Use FILEIO_EINVAL directly.
15369 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15370 calls to hostio_error.
15371 * hostio-errno.c: New.
15372 * server.h (hostio_last_error_from_errno): Declare.
15373 * target.h (target_ops): Add hostio_last_error member.
15374 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15375 as hostio_last_error handler.
889bf7c5 15376 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15377 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15378 (wince_hostio_last_error): New functions.
15379 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15380 as hostio_last_error handler.
15381 (win32_target_ops) [!_WIN32_WCE]: Register
15382 hostio_last_error_from_errno as hostio_last_error handler.
15383 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15384 (hostio-errno.o): New rule.
15385 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15386 * configure.srv (srv_hostio_err_objs): New variable. Default to
15387 hostio-errno.o.
15388 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15389 * configure: Regenerate.
15390
2d717e4f
DJ
153912008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15394 (linux_kill, linux_detach): Clean up the process list.
15395 * remote-utils.c (remote_open): Improve port number parsing.
15396 (putpkt_binary, input_interrupt): Only send interrupts if the target
15397 is running.
15398 * server.c (extended_protocol): Make static.
15399 (attached): Define earlier.
15400 (exit_requested, response_needed, program_argv): New variables.
15401 (target_running): New.
15402 (start_inferior): Clear attached here.
15403 (attach_inferior): Set attached here.
15404 (require_running): Define.
15405 (handle_query): Use require_running and target_running. Implement
15406 "monitor exit".
15407 (handle_v_attach, handle_v_run): New.
15408 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15409 (gdbserver_usage): Update.
15410 (main): Redo argument parsing. Handle --debug and --multi. Handle
15411 --attach along with other options or after the port. Save
15412 program_argv. Support no initial program. Resynchronize
15413 communication with GDB after an error. Handle "monitor exit".
15414 Use require_running and target_running. Always allow the extended
15415 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15416 restart in extended mode.
15417 * README: Refer to the GDB manual. Update --attach usage.
15418
7407e2de
AS
154192007-12-20 Andreas Schwab <schwab@suse.de>
15420
15421 * linux-low.c (STACK_SIZE): Define.
15422 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15423 (linux_test_for_tracefork): Likewise.
15424
b65d95c5
DJ
154252007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15426
15427 * linux-low.c (linux_wait_for_event): Update messages. Do not
15428 reinsert auto-delete breakpoints.
15429 * mem-break.c (struct breakpoint): Change return type of handler to
15430 int.
15431 (set_breakpoint_at): Update handler type.
15432 (reinsert_breakpoint_handler): Return 1 instead of calling
15433 delete_breakpoint.
15434 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15435 setting a new one.
15436 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15437 * mem-break.h (set_breakpoint_at): Update handler type.
15438 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15439 * win32-low.c (auto_delete_breakpoint): New.
15440 (get_child_debug_event): Use it.
15441
4e799345
DJ
154422007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15443
15444 * configure.ac: Check for pread and pwrite.
15445 * hostio.c (handle_pread): Fall back to lseek and read.
15446 (handle_pwrite): Fall back to lseek and write.
15447 * config.in, configure: Regenerated.
15448
27524b67
DJ
154492007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15450
15451 * server.c (myresume): Add own_buf argument.
15452 (main): Update calls.
15453
a20d5e98
DJ
154542007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15457 * remote-utils.c (remote_open): Do not call disable_async_io.
15458 (block_async_io): Delete.
15459 (unblock_async_io): Make static.
15460 (initialize_async_io): New.
15461 * server.c (handle_v_cont): Handle async I/O here.
15462 (myresume): Likewise. Move other common resume tasks here...
15463 (main): ... from here. Call initialize_async_io. Disable async
15464 I/O before the main loop.
15465 * server.h (initialize_async_io): Declare.
15466 (block_async_io, unblock_async_io): Delete prototypes.
15467 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15468
b79d787e
DJ
154692007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15470
15471 * remote-utils.c (readchar): Allow binary data in received messages.
15472
d97903b2
PA
154732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15474
15475 * win32-low.c (attaching): New global.
15476 (win32_create_inferior): Clear the `attaching' global.
15477 (win32_attach): Set the `attaching' global.
15478 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15479 attaching. Only set a breakpoint at the entry point if not
15480 attaching.
15481
311de423
PA
154822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15483
15484 * server.c (main): Don't report dll events on the initial
15485 connection on attaches.
15486
6c2d16d2
PA
154872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15488
15489 * server.c (main): Relax numerical bases supported for the pid of
15490 the --attach command line argument.
15491
5ca906e6
PA
154922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15493
15494 * win32-low.c (win32_attach): Call OpenProcess before
15495 DebugActiveProcess, not after. Add last error output to error
15496 call.
15497
9c6c8194
PA
154982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15499
15500 * win32-low.c (win32_get_thread_context)
15501 (win32_set_thread_context): New functions.
15502 (thread_rec): Use win32_get_thread_context.
15503 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15504 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15505 field.
15506
4d5d1aaa
PA
155072007-12-03 Leo Zayas
15508 Pedro Alves <pedro_alves@portugalmail.pt>
15509
15510 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15511 global variables.
15512 (child_add_thread): Minor cleanup.
15513 (child_continue): Resume artificially suspended threads before
15514 calling ContinueDebugEvent.
15515 (suspend_one_thread): New.
15516 (fake_breakpoint_event): New.
15517 (get_child_debug_event): Change return type to int. Check here if
15518 gdb sent an interrupt request. If a soft interrupt was requested,
15519 fake a breakpoint event. Return 0 if there is no event to handle,
15520 and 1 otherwise.
15521 (win32_wait): Don't check here if gdb sent an interrupt request.
15522 Ensure there is a valid event to handle.
15523 (win32_request_interrupt): Add soft interruption method as last
15524 resort.
15525
c436e841
PA
155262007-12-03 Leo Zayas
15527 Pedro Alves <pedro_alves@portugalmail.pt>
15528
15529 * win32-low.h (win32_thread_info): Add descriptions to the
15530 structure members. Replace `suspend_count' counter by a
15531 `suspended' flag.
15532 * win32-low.c (thread_rec): Update condition of when to get the
15533 context from the inferior. Rely on ContextFlags being set if it
15534 has already been retrieved. Only suspend the inferior thread if
15535 we haven't already. Warn if that fails.
15536 (continue_one_thread): s/suspend_count/suspended/. Only call
15537 ResumeThread once. Warn if that fails.
15538
e7b5fa67
PA
155392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15540
15541 * win32-low.c (win32_wait): Don't read from the inferior when it
15542 has already exited.
15543
a385171d
PA
155442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15545
15546 * Makefile.in (win32_low_h): New variable.
15547 (win32-low.o): Add dependency on $(win32_low_h).
15548 (win32-arm-low.o, win32-i386-low.o): New rules.
15549
f80c84b3
DJ
155502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15551
15552 * hostio.c: Correct copyright year.
15553
a6b151f1
DJ
155542007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * Makefile.in (OBS): Add hostio.o.
15557 (hostio.o): New rule.
15558 * server.h (handle_vFile): Declare.
15559 * hostio.c: New file.
15560 * server.c (handle_v_requests): Take packet_len and new_packet_len
15561 for binary packets. Call handle_vFile.
15562 (main): Update call to handle_v_requests.
15563
f9387fc3
DJ
155642007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * linux-low.c: Include <sched.h>.
15567
51c2684e
DJ
155682007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * linux-low.c (linux_tracefork_grandchild): New.
15571 (linux_tracefork_child): Use clone.
15572 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15573
75f83163
JB
155742007-10-31 Joel Brobecker <brobecker@adacore.com>
15575
15576 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15577
da5898ce
DJ
155782007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15581
24a09b5f
DJ
155822007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * inferiors.c (change_inferior_id): Delete.
15585 (add_pid_to_list, pull_pid_from_list): New.
15586 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15587 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15588 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15589 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15590 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15591 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15592 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15593 (using_threads): Always set to 1.
15594 (handle_extended_wait): New.
15595 (add_process): Do not set TID.
15596 (linux_create_inferior): Set must_set_ptrace_flags.
15597 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15598 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15599 (linux_thread_alive): Rename TID argument to LWPID.
15600 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15601 (linux_wait_for_event): Do not use TID or check using_threads. Update
15602 call to dead_thread_notify. Call handle_extended_wait.
15603 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15604 (send_sigstop): Delete sigstop_sent.
15605 (wait_for_sigstop): Avoid TID.
15606 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15607 (linux_test_for_tracefork): New.
15608 (linux_lookup_signals): Use thread_db_active and
15609 linux_supports_tracefork_flag.
15610 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15611 * linux-low.h (get_process_thread): Avoid TID.
15612 (struct process_ifo): Move thread_known and tid to the end. Remove
15613 sigstop_sent.
15614 (linux_attach_lwp, thread_db_init): Update prototypes.
15615 * server.h (change_inferior_id): Delete prototype.
15616 (add_pid_to_list, pull_pid_from_list): New prototypes.
15617 * thread-db.c (thread_db_use_events): New.
15618 (find_first_thread): Rename to...
15619 (find_one_thread): ...this. Update callers and messages. Do not
15620 call fatal. Check thread_db_use_events. Do not call
15621 change_inferior_id or new_thread_notify.
15622 (maybe_attach_thread): Update. Do not call new_thread_notify.
15623 (thread_db_init): Set thread_db_use_events. Check use_events.
15624 * utils.c (fatal, warning): Correct message prefix.
15625
30ed0a8f
DJ
156262007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15627
15628 * Makefile.in (clean): Remove new files.
15629 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15630 (powerpc-64.o, powerpc-64.c): New rules.
15631 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15632 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15633 with SPE.
15634 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15635 SPE targets.
15636 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15637 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15638 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15639 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15640 (target_regsets): Add AltiVec and SPE register sets.
15641 * configure.ac: Check for AltiVec and SPE.
15642 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15643 (ppc_fill_vrregset, ppc_store_vrregset): New.
15644 (target_regsets): Add AltiVec register set.
15645 * configure: Regenerated.
15646
fd462a61
DJ
156472007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15648
15649 * linux-low.c (O_LARGEFILE): Define.
15650 (linux_read_memory): Use /proc/PID/mem.
15651 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15652 * configure, config.in: Regenerated.
15653
69f223ed
DJ
156542007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15655
15656 * linux-low.c (linux_wait_for_event): Do not pass signals while
15657 single-stepping.
15658
aec18585
PA
156592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15660
15661 * win32-low.c (create_process): New.
15662 (win32_create_inferior): Use create_process instead of
15663 CreateProcess. If create_process failed retry appending an ".exe"
15664 suffix. Store the GetLastError result immediatelly after
15665 create_process calls and use it on the call to error.
15666
34d86ddd
PA
156672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15668
15669 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15670
5a0e3bd0
JB
156712007-08-23 Joel Brobecker <brobecker@adacore.com>
15672
15673 * configure.ac: Switch license to GPLv3.
15674
f88c79e6
MS
156752007-08-01 Michael Snyder <msnyder@access-company.com>
15676
15677 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15678
6b3d9b83
PA
156792007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15680
15681 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15682 typedef.
15683 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15684 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15685 CloseToolhelp32Snapshot.
15686 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15687 CloseToolhelp32Snapshot.
15688
c588c53c
MS
156892007-07-27 Michael Snyder <michael.snyder@access-company.com>
15690
15691 * server.c (main): Check for inferior exit before main loop.
15692
aa0403d9
PA
156932007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15694
15695 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15696 instead of on tmp_desc.
15697
255e7678
DJ
156982007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15699 Daniel Jacobowitz <dan@codesourcery.com>
15700
15701 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15702 (add_thread): Minor cleanups.
15703 (clear_inferiors): Move lower in the file. Clear the DLL
15704 list.
15705 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15706 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15707 (xml_escape_text): New.
15708 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15709 for qSupported.
15710 (handle_v_cont): Report errors.
15711 (gdbserver_version): Update.
15712 (main): Correct size of own_buf. Do not report initial DLL events.
15713 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15714 (unloaded_dll, xml_escape_text): New.
15715 * win32-low.c (enum target_waitkind): Update comments.
15716 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15717 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15718 (win32_EnumProcessModules, win32_GetModuleInformation)
15719 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15720 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15721 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15722 (win32_Module32First, win32_Module32Next, load_toolhelp)
15723 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15724 (get_child_debug_event): Handle DLL events.
15725 (win32_wait): Likewise.
15726
0d37add9
DJ
157272007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15728
15729 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15730 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15731
45e2715e
PA
157322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15733
15734 * win32-low.c (handle_output_debug_string): Ignore event if not
15735 waiting.
15736
c5674cf1
PA
157372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15738
15739 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15740
2bbe3cc1
DJ
157412007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15742
15743 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15744
ae13219e
DJ
157452007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15746
15747 * inferiors.c (change_inferior_id): Add comment.
15748 * linux-low.c (check_removed_breakpoint): Add an early
15749 prototype. Improve debug output.
15750 (linux_attach): Doc update.
15751 (linux_detach_one_process, linux_detach): Clean up before releasing
15752 each process.
15753 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15754 * linux-low.h (struct process_info): Doc improvement.
15755 * mem-break.c (delete_all_breakpoints): New.
15756 * mem-break.h (delete_all_breakpoints): New prototype.
15757 * thread-db.c (find_first_thread): New.
15758 (thread_db_create_event): Call it instead of
15759 thread_db_find_new_threads. Clean up unused variables.
15760 (maybe_attach_thread): Remove first thread handling.
15761 (thread_db_find_new_threads): Use find_first_thread.
15762 (thread_db_get_tls_address): Likewise.
15763
4105de34
DJ
157642007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15765
15766 * thread-db.c (thread_db_find_new_threads): Add prototype.
15767 (thread_db_create_event): Check for the main thread before adding
15768 a new thread.
15769 (maybe_attach_thread): Only enable event reporting if TID == 0.
15770 (thread_db_get_tls_address): Check for new threads.
15771
2b876972
DJ
157722007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15773
15774 * linux-low.c (linux_create_inferior): Try execv before execvp.
15775 * spu-low.c (spu_create_inferior): Likewise.
15776
7a245884
DJ
157772007-06-13 Mike Frysinger <vapier@gentoo.org>
15778
15779 * linux-low.c (linux_create_inferior): Change execv to execvp.
15780 * spu-low.c (spu_create_inferior): Likewies.
15781
117ce543
DJ
157822007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15783
15784 * Makefile.in (clean): Clean new files instead of deleted ones.
15785 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15786 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15787 rules.
15788 * configure.srv: Specify XML files and new regformats for MIPS and
15789 MIPS64 GNU/Linux.
15790 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15791 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15792 an entry for the restart register.
15793 (mips_cannot_fetch_register, mips_cannot_store_register)
15794 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15795 register names to match the XML descriptions.
15796 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15797 restart register instead of $0.
15798
0e7f50da
UW
157992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15800 Markus Deuling <deuling@de.ibm.com>
15801
15802 * remote-utils.c (decode_xfer_write): New function.
15803 * server.h (decode_xfer_write): Add prototype.
15804 * server.c (handle_query): Add PACKET_LEN argument. Support
15805 qXfer:spu:read and qXfer:spu:write packets.
15806 (main): Pass packet_len to handle_query.
15807 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15808 * target.h (target_ops): Add qxfer_spu.
15809
374c1d38
UW
158102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15811
15812 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15813 accessing non-seekable spufs files.
15814
bb63802a
UW
158152007-05-16 Markus Deuling <deuling@de.ibm.com>
15816
889bf7c5 15817 * server.c (handle_query): Add reply for qC packet.
bb63802a 15818
7390519e
PA
158192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15820 Leo Zayas <lerele@champenstudios@com>
15821
15822 * server.h (check_remote_input_interrupt_request): New function.
15823 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15824 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15825 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15826 (check_remote_input_interrupt_request): New function.
15827 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15828 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15829 winapi_GenerateConsoleCtrlEvent): New typedefs.
15830 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15831 to 250 ms.
15832 (win32_wait): Check for remote interrupt request
15833 with check_remote_input_interrupt_request.
15834 (win32_request_interrupt): New function.
15835 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15836
34b34921
PA
158372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15838
15839 * win32-low.c (debug_registers_changed,
15840 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15841 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15842 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15843 (thread_rec): Get context using the low target.
15844 (child_add_thread): Call thread_added on the low target,
15845 which does the same thing.
15846 (regptr): Delete.
15847 (do_initial_child_stuff): Remove debug registers references.
15848 Set context using the low target. Resume threads after
15849 setting the contexts.
15850 (child_continue): Remove dead variable. Remove debug
15851 registers references.
15852 (child_fetch_inferior_registers): Go through the low target.
15853 (do_child_store_inferior_registers): Remove.
15854 (child_store_inferior_registers): Go through the low target.
15855 (win32_resume): Remove debug registers references.
15856 Set context using the low target.
15857 (handle_exception): Change return type to void. Don't record
15858 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15859 first chance exception.
889bf7c5 15860 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15861 goto loop. Always return after waiting for debug event.
15862 (win32_wait): Convert to switch statement. Handle spurious
15863 events.
15864
15865 * win32-i386-low.c (debug_registers_changed,
15866 debug_registers_used): New.
15867 (initial_stuff): Rename to ...
15868 (i386_initial_stuff): ... this. Clear debug registers
15869 state variables.
15870 (store_debug_registers): Delete.
15871 (i386_get_thread_context): New.
15872 (load_debug_registers): Delete.
15873 (i386_set_thread_context): New.
15874 (i386_thread_added): New.
15875 (single_step): Rename to ...
15876 (i386_single_step): ... this.
15877 (do_fetch_inferior_registers): Rename to ...
15878 (i386_fetch_inferior_register): ... this.
15879 (i386_store_inferior_register): New.
15880 (the_low_target): Adapt to new interface.
15881
15882 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15883 (arm_get_thread_context): New.
15884 (arm_set_thread_context): New.
15885 (regptr): New.
15886 (do_fetch_inferior_registers): Rename to ...
15887 (arm_fetch_inferior_register): ... this.
15888 (arm_store_inferior_register): New.
15889 (arm_wince_breakpoint): Reimplement as unsigned long.
15890 (arm_wince_breakpoint_len): Define.
15891 (the_low_target): Adapt to new interface.
15892
15893 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15894 load_debug_registers. Add get_thread_context, set_thread_context,
15895 thread_added and store_inferior_register. Rename
15896 fetch_inferior_registers to fetch_inferior_register.
15897 (regptr): Remove declaration.
15898
dd6953e1
PA
158992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15900
15901 * linux-low.c (linux_detach): Change return type to int. Return 0.
15902 * spu-low.c (spu_detach): Likewise.
15903
444d6139
PA
159042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15905
15906 * target.h (target_ops): Change return type of detach to int.
15907 Add join.
15908 (join_inferior): New.
15909 * server.c (main): Don't skip detach support on mingw32.
15910 If the inferior doesn't support detaching return error.
15911 Call join_inferior instead of using waitpid.
15912 * linux-low.c (linux_join): New.
15913 (linux_target_op): Add linux_join.
15914 * spu-low.c (spu_join): New.
15915 (spu_target_ops): Add spu_join.
15916 * win32-low.c (win32_detach): Adapt to new interface.
15917 Reopen current_process_handle before detaching. Issue a child
15918 resume before detaching.
15919 (win32_join): New.
15920 (win32_target_op): Add win32_join.
15921
1d5315fe
PA
159222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15923
15924 * win32-low.c (win32-attach): Fix return value.
15925 * target.h (target_ops): Describe ATTACH return values.
15926
bf914831
PA
159272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15928
15929 * win32-low.c (GETPROCADDRESS): Define.
15930 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15931 (winapi_DebugSetProcessKillOnExit): Likewise.
15932 (win32_create_inferior): Force usage of ansi CreateProcessA.
15933 (win32_attach): Use GETPROCADDRESS.
15934 (win32_detach): Likewise.
15935
f72f3e60
PA
159362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15937
15938 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15939
ed50f18f
PA
159402007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15941
15942 * win32-low.c: Commit leftover changes from 2007-03-29.
15943
0c2ead7e
DJ
159442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15945
15946 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15947 fields short instead of int. Add explicit padding.
15948 (i387_cache_to_fsave): Remove unnecessary casts.
15949 (i387_fsave_to_cache): Doc fix.
15950 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15951
73725ff3
DJ
159522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15953
15954 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15955 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15956
d99f33d8
PA
159572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15958
15959 * configure.srv (arm*-*-mingw32ce*): Move near the other
15960 arm targets.
15961
68070c10
PA
159622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15963
2482afc6 15964 * configure.ac: Add errno checking.
68070c10
PA
15965 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15966 sys/file.h and malloc.h.
15967 (AC_CHECK_DECLS): Add perror.
15968 (srv_mingwce): Handle.
2482afc6 15969 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
15970 win32-i386-low.o to srv_tgtobj.
15971 (i[34567]86-*-mingw*): Likewise.
15972 (arm*-*-mingw32ce*): Add case.
15973 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15974 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15975 [__MINGW32CE__] (strerror): New function.
15976 [__MINGW32CE__] (errno): Define to GetLastError.
15977 [__MINGW32CE__] (COUNTOF): New macro.
15978 (remote_open): Remove extra close call.
15979 * mem-break.c (delete_breakpoint_at): New function.
15980 * mem-break.h (delete_breakpoint_at): Declare.
15981 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15982 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15983 [USE_WIN32API] (read, write): Add char* casts.
15984 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15985 * server.h: Include wincecompat.h on Windows CE.
15986 [HAVE_ERRNO_H]: Check.
15987 (perror): Declare if not declared.
15988 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15989 (perror_with_name): Remove errno declaration.
15990 * wincecompat.h: New.
15991 * wincecompat.c: New.
15992 * win32-low.h: New.
15993 * win32-arm-low.c: New.
15994 * win32-i386-low.c: New.
15995 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15996 (OUTMSG2): Make it safe.
15997 (_T): New macro.
15998 (COUNTOF): New macro.
15999 (NUM_REGS): Get it from the low target.
16000 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16001 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16002 (thread_rec): Let low target handle debug registers.
16003 (child_add_thread): Likewise.
16004 (child_init_thread_list): Likewise.
16005 (continue_one_thread): Likewise.
16006 (regptr): New.
16007 (do_child_fetch_inferior_registers): Move to ...
16008 * win32-i386-low.c: ... here, and rename to ...
16009 (do_fetch_inferior_registers): ... this.
889bf7c5 16010 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16011 Go through the low target.
16012 (do_child_store_inferior_registers): Use regptr.
16013 (strwinerror): New function.
16014 (win32_create_inferior): Handle Windows CE.
16015 Use strwinerror instead of strerror on Windows error
16016 codes. Add program to the error output.
16017 Don't close the main thread handle on Windows CE.
16018 (win32_attach): Use coredll.dll on Windows CE.
16019 (win32_kill): Close current process and current
16020 thread handles.
16021 (win32_detach): Use coredll.dll on Windows CE.
16022 (win32_resume): Let low target handle debug registers, and
16023 step request.
16024 (handle_exception): Add/Remove initial breakpoint. Avoid
16025 non-existant WSTOPSIG on Windows CE.
16026 (win32_read_inferior_memory): Cast to remove warning.
16027 (win32_arch_string): Go through the low target.
16028 (initialize_low): Call set_breakpoint_data with the low
16029 target's breakpoint.
16030 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16031 FOP_REGNUM, mappings): Move to ...
16032 * win32-i386-low.c: ... here.
16033 * win32-low.c (win32_thread_info): Move to ...
16034 * win32-low.h: ... here.
16035 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16036 win32-arm-low.c and wincecompat.c.
16037 (all:): Add $EXEEXT.
16038 (install-only:): Likewise.
16039 (gdbserver:): Likewise.
16040 (gdbreplay:): Likewise.
16041 * config.in: Regenerate.
16042 * configure: Regenerate.
16043
41093d81
PA
160442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16045
16046 * win32-low.c: Rename typedef thread_info to
16047 win32_thread_info throughout.
16048
544afa54
PA
160492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16050
16051 * win32-i386-low.c: Rename to ...
16052 * win32-low.c: ... this.
16053 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16054 * Makefile.in: Likewise.
16055
bce7165d
PA
160562007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16057
16058 * remote-utils.c (monitor_output): Constify msg parameter.
16059 * server.h (monitor_output): Likewise.
16060 * win32-i386-low.c (handle_output_debug_string): New.
16061 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16062 handle_output_debug_string.
16063 (get_child_debug_event): Likewise.
16064
506c7aa0
DJ
160652007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16066
16067 * server.c (main): Correct strtoul check.
16068
42c81e2a
DJ
160692007-03-27 Jon Ringle <jon@ringle.org>
16070
16071 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16072
9453113a
DJ
160732007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16074
16075 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16076
64a69107
DJ
160772007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16078
16079 * terminal.h: Check HAVE_SGTTY_H.
16080
160812007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16082
16083 * remote-utils.c (remote_open): Print out the assigned port number.
16084
c74d0ad8
DJ
160852007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16086
16087 * remote-utils.c (monitor_output): New function.
16088 * server.c (debug_threads): Define here.
16089 (monitor_show_help): New function.
16090 (handle_query): Handle qRcmd.
16091 (main): Do not handle 'd' packet.
16092 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16093 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16094 of debug_threads.
16095
de7c3b4a
PA
160962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16097
16098 * Makefile.in (EXEEXT): New.
16099 (clean): Use $(EXEEXT).
16100
ef57601b
PA
161012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16102
16103 * target.h (target_ops): Rename send_signal to request_interrupt,
16104 and remove enum target_signal parameter.
16105 * linux-low.c (linux_request_interrupt): Rename from
16106 linux_send_signal, and always send SIGINT.
16107 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16108 and always send SIGINT.
16109 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16110 of send_signal.
16111 (input_interrupt): Likewise.
16112
820f2bda
PA
161132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16114
16115 * server.c (get_features_xml): Check if target implemented
16116 arch_string.
16117 * win32-i386-low.c (win32_arch_string): New.
16118 (win32_target_ops): Add win32_arch_string as arch_string member.
16119
ab39bf24
UW
161202007-02-22 Markus Deuling <deuling@de.ibm.com>
16121
16122 * spu-low.c (spu_arch_string): New.
16123 (spu_target_ops): Add spu_arch_string.
16124
61ff6e04
DJ
161252007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16126
16127 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16128 * configure.ac: Do not check for terminal.h.
16129 * configure, config.in: Regenerated.
16130
fb1e4ffc
DJ
161312007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16132
16133 * Makefile.in (OBS): Add $(XML_BUILTIN).
16134 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16135 (clean): Update.
16136 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16137 (arm-with-iwmmxt.c): New.
16138 * config.in, configure: Regenerate.
16139 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16140 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16141 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16142 (arm*-*-linux*): Add iWMMXt and regset support.
16143 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16144 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16145 (arm_store_wmmxregset, target_regsets): New.
16146 * server.c (get_features_xml): Take annex argument. Check builtin
16147 XML documents.
16148 (handle_query): Handle multiple annexes.
16149
0f48aa01
DJ
161502007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * remote-utils.c [USE_WIN32API] (read, write): Define.
16153 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16154 write.
16155
23181151
DJ
161562007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16157
16158 * linux-i386-low.c (the_low_target): Set arch_string.
16159 * linux-x86-64-low.c (the_low_target): Likewise.
16160 * linux-low.c (linux_arch_string): New.
16161 (linux_target_ops): Add it.
16162 * linux-low.h (struct linux_target_ops): Add arch_string.
16163 * server.c (write_qxfer_response): Use const void * for DATA.
16164 (get_features_xml): New.
16165 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16166 * target.h (struct target_ops): Add arch_string method.
16167
9d606399
DJ
161682007-01-03 Denis Pilat <denis.pilat@st.com>
16169 Daniel Jacobowitz <dan@codesourcery.com>
16170
16171 * linux-low.c (linux_kill): Handle being called with no threads.
16172 * win32-i386-low.c (win32_kill): Likewise.
16173 (get_child_debug_event): Clear current_process_handle.
16174
161752006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16176 Daniel Jacobowitz <dan@codesourcery.com>
16177
16178 * remote-utils.c (remote_open): Check the type of specified
16179 serial port devices before opening them.
16180 * server.c (main): Kill the inferior if an error occurs during
16181 the first remote_open.
16182
a5e13d24
DJ
161832006-12-05 Markus Deuling <deuling@de.ibm.com>
16184
16185 * README: Update supported targets.
16186
186947f7
DJ
161872006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16188
16189 * Makefile.in (clean): Remove reg-mips64.c.
16190 (reg-mips64.c, reg-mips64.o): New rules.
16191 * configure.srv: Handle mips64. Include regset support for mips.
16192 * linux-mips-low.c (union mips_register): New.
16193 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16194 (mips_breakpoint, mips_breakpoint_at): Use int.
16195 (mips_collect_register, mips_supply_register)
16196 (mips_collect_register_32bit, mips_supply_register_32bit)
16197 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16198 (mips_store_fpregset, target_regsets): New.
16199 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16200
a13e2c95
UW
162012006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16202
16203 * configure.srv: Add target "spu*-*-*".
16204 * Makefile.in (clean): Remove reg-spu.c.
16205 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16206 * spu-low.c: New file.
16207
cb7283db
DJ
162082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16209
16210 * configure.ac: Correct td_thr_tls_get_addr test.
16211 * configure: Regenerated.
16212
89be2091
DJ
162132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16214
16215 * linux-low.c (linux_wait_for_event): Reformat. Use the
16216 pass_signals array.
16217 * remote-utils.c (decode_address_to_semicolon): New.
16218 * server.c (pass_signals, handle_general_set): New.
16219 (handle_query): Mention QPassSignals for qSupported.
16220 (main): Call handle_general_set.
16221 * server.h (pass_signals, decode_address_to_semicolon): New.
16222
000ef4f0
DJ
162232006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * server.c (handle_query): Correct error handling for read_auxv.
16226
b7149293
UW
162272005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16228
16229 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16230 and srv_linux_thread_db to yes.
16231 * linux-s390-low.c (s390_fill_gregset): New function.
16232 (target_regsets): Define data structure.
16233
dae5f5cf
DJ
162342006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16235
16236 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16237 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16238 * config.in, configure: Regenerated.
16239 * inferiors.c (gdb_id_to_thread): New function.
16240 (gdb_id_to_thread_id): Use it.
16241 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16242 * linux-low.h (struct process_info): Add th member.
16243 (thread_db_get_tls_address): New prototype.
16244 * remote-utils.c (decode_address): Make non-static.
16245 * server.c (handle_query): Handle qGetTLSAddr.
16246 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16247 * target.h (struct target_ops): Add get_tls_address.
16248 * thread-db.c (maybe_attach_thread): Save the thread handle.
16249 (thread_db_get_tls_address): New.
16250
32ca6d61
DJ
162512006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16254 (linux_resume_one_process): Take a siginfo_t *. Update all
16255 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16256 (struct pending_signals): Add a siginfo_t.
16257 (linux_wait_for_process): Always set last_status.
16258 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16259 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16260 * linux-low.h (struct process_info): Add last_status.
16261
5ffff7c1
DJ
162622006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16263
16264 * remote-utils.c (try_rle): New function.
16265 (putpkt_binary): Use it.
16266
8695c747
DJ
162672006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16270 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16271 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16272 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16273 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16274 point registers.
16275
290fadea
RS
162762006-08-08 Richard Sandiford <richard@codesourcery.com>
16277
16278 * server.c (terminal_fd): New variable.
16279 (old_foreground_pgrp): Likewise.
16280 (restore_old_foreground_pgrp): New function.
16281 (start_inferior): Record the terminal file descriptor in terminal_fd
16282 and its original foreground group in old_foreground_pgrp. Register
16283 restore_old_foreground_pgrp with atexit().
16284
9f2e1e63
DJ
162852006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16286
16287 * server.c (handle_query): Correct qPart to qXfer.
16288
b80864fb
DJ
162892006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16290
16291 * configure.ac: Check for more headers which are missing on
16292 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16293 * configure.srv: Add Cygwin and mingw32.
16294 * remote-utils.c: Don't include headers unconditionally which
16295 are missing on mingw32. Include <winsock.h> for mingw32.
16296 (remote_open): Adjust for mingw32 support. Flush
16297 standard error after writing to it.
16298 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16299 (unblock_async_io, enable_async_io, disable_async_io)
16300 (readchar, getpkt): Update for Winsock support.
16301 (prepare_resume_reply): Expect a protocol signal number.
16302 * server.c: Disable <sys/wait.h> on mingw32.
16303 (start_inferior): Adjust for mingw32 support. Flush
16304 standard error after writing to it.
16305 (attach_inferior): Likewise. Use protocol signal
16306 numbers.
16307 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16308 and names.
16309 * win32-i386-low.c: New file.
16310 * Makefile.in (XM_CLIBS): Set.
16311 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16312 (win32-i386-low.o): New dependency rule.
16313 * linux-low.c (linux_wait): Use target signal numbers.
16314 * target.h (struct target_ops): Doc fix.
16315 * server.h (target_signal_to_name): New prototype.
16316 * gdbreplay.c: Don't include headers unconditionally which
16317 are missing on mingw32. Include <winsock.h> for mingw32.
16318 (remote_close, remote_open): Adjust for Winsock support.
16319 * configure, config.in: Regenerated.
16320
0876f84a
DJ
163212006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16322
16323 * server.c (decode_xfer_read, write_qxfer_response): New.
16324 (handle_query): Take a packet length argument. Handle
16325 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16326 the qSupported response.
16327 (main): Update call to handle_query.
16328
01f9e8fa
DJ
163292006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16330
16331 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16332 (putpkt_binary): Renamed from putpkt and adjusted for binary
16333 data.
16334 (putpkt): New wrapper for putpkt_binary.
16335 (readchar): Don't mask off the high bit.
16336 (decode_X_packet): New function.
16337 * server.c (main): Call putpkt_binary if a handler sets the packet
16338 length. Save the length of the incoming packet. Handle 'X'.
16339 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16340
be2a5f71
DJ
163412006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16342
16343 * server.c (handle_query): Handle qSupported.
16344
ea025f5f
DJ
163452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16346
16347 * remote-utils.c (all_symbols_looked_up): New variable.
16348 (look_up_one_symbol): Check it.
16349 * server.h (look_up_one_symbol): New declaration.
16350 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16351
9308fc88
DJ
163522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16353
16354 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16355 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16356 (PTRACE_GET_THREAD_AREA): Define.
16357 (ps_get_thread_area): New function.
16358
52fb6437
NS
163592006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16360
16361 * configure.srv (m68k*-*-uclinux*): New target.
16362 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16363 (linux_resume_one_process): Remove extraneous cast.
16364 (linux_read_offsets): New.
16365 (linux_target_op): Add linux_read_offsets on mmuless systems.
16366 * server.c (handle_query): Add qOffsets logic.
16367 * target.h (struct target_ops): Add read_offsets.
16368
21b0f40c
DJ
163692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16370
16371 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16372 (PTRACE_GET_THREAD_AREA): Define.
16373 (ps_get_thread_area): New function.
16374 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16375 (linux-x86-64-low.o): Update.
16376
0050a760
DJ
163772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16378
16379 * configure.ac: Remove checks for prfpregset_t.
16380 * gdb_proc_service.h: New file.
16381 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16382 new "gdb_proc_service.h".
16383 * proc-service.c: Likewise.
16384 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16385 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16386 * Makefile.in (gdb_proc_service_h): Updated.
16387 * configure, config.in: Regenerated.
16388
b92a518e
DJ
163892006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16390
16391 * remote-utils.c (prepare_resume_reply): Move declaration
16392 of gdb_id_from_wait to the top of the block.
16393
545587ee
DJ
163942006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16395
16396 * linux-low.c (regsets_store_inferior_registers): Read the regset
16397 from the target before filling it.
16398
9db87ebd
DJ
163992006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16400
16401 * server.c (attach_inferior): Return SIGTRAP for a successful
16402 attach.
16403
dd24457d
DJ
164042006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16405
16406 * Makefile.in (OBS): Add version.o.
16407 (STAGESTUFF): Delete.
16408 (version.o): Add dependencies.
16409 (version.c): Replace rule.
16410 (clean): Remove version.c.
16411 * server.c (gdbserver_version): New.
16412 (gdbserver_usage): Use printf.
16413 (main): Handle --version and --help.
16414 * server.h (version, host_name): Add declarations.
16415
6f0f660e
EZ
164162005-12-23 Eli Zaretskii <eliz@gnu.org>
16417
889bf7c5
PA
16418 * linux-arm-low.c:
16419 * linux-arm-low.c:
16420 * inferiors.c:
16421 * i387-fp.h:
16422 * i387-fp.c:
16423 * gdbreplay.c:
16424 * regcache.c:
16425 * proc-service.c:
16426 * mem-break.h:
16427 * mem-break.c:
16428 * linux-x86-64-low.c:
16429 * linux-sh-low.c:
16430 * linux-s390-low.c:
16431 * linux-ppc64-low.c:
16432 * linux-ppc-low.c:
16433 * linux-mips-low.c:
16434 * linux-m68k-low.c:
16435 * linux-m32r-low.c:
16436 * linux-low.h:
16437 * linux-low.c:
16438 * linux-ia64-low.c:
16439 * linux-i386-low.c:
16440 * linux-crisv32-low.c:
16441 * thread-db.c:
16442 * terminal.h:
16443 * target.h:
16444 * target.c:
16445 * server.h:
16446 * server.c:
16447 * remote-utils.c:
16448 * regcache.h:
16449 * utils.c:
16450 * Makefile.in:
16451 * configure.ac:
6f0f660e
EZ
16452 * gdbserver.1: Add (C) after Copyright. Update the FSF
16453 address.
16454
9d1fb177
DJ
164552005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16456
16457 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16458 (arm_breakpoint_at): Recognize both breakpoints.
16459 (the_low_target): Use the correct breakpoint instruction.
16460
011a70c2
DJ
164612005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16462
16463 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16464 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16465 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16466 (the_low_target): Update.
16467
7fb85e41
AS
164682005-10-25 Andreas Schwab <schwab@suse.de>
16469
16470 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16471
16472 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16473 (ia64_num_regs): Reduce to 462.
16474
3db0444b
DJ
164752005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16476
16477 * acinclude.m4: Correct quoting.
16478 * aclocal.m4: Regenerated.
16479
16480 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16481 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16482 (thread_db_init): Call thread_db_err_str.
16483 * configure.ac: Check for TD_VERSION.
16484 * config.in, configure: Regenerated.
16485
bee0189a
DJ
164862005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16487
16488 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16489
e9d25b98
DJ
164902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16491
16492 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16493 is not available. Define HAVE_PTRACE_GETREGS if it is.
16494 * config.in, configure: Regenerated.
16495 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16496 * linux-i386-low.c, linux-m68k-low.c: Update to use
16497 HAVE_PTRACE_GETREGS.
16498 * linux-low.c (regsets_fetch_inferior_registers)
16499 (regsets_store_inferior_registers): Only return 0 if we processed
16500 GENERAL_REGS.
16501 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16502 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16503
a06660f7
DJ
165042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16505
16506 * inferiors.c (struct thread_info): Add gdb_id.
16507 (add_thread): Add gdb_id argument.
16508 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16509 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16510 calls to add_thread.
16511 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16512 * server.c (handle_query): Use thread_to_gdb_id.
16513 (handle_v_cont, main): Use gdb_id_to_thread_id.
16514 * server.h (add_thread): Update prototype.
16515 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16516 prototypes.
16517
5a1f5858
DJ
165182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16519
16520 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16521 left-padded registers.
16522 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16523 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16524
e122f1f5
SE
165252005-07-01 Steve Ellcey <sje@cup.hp.com>
16526
16527 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16528 * configure: Regenerate.
16529 * config.in: Regenerate.
16530 * server.h (NEED_DECLARATION_STRERROR):
16531 Replace with !HAVE_DECL_STRERROR.
16532
d592fa2f
DJ
165332005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * linux-low.c (linux_wait, linux_send_signal): Don't test
16536 an unsigned long variable for > 0 if it could be MAX_ULONG.
16537 * server.c (myresume): Likewise.
16538 * target.c (set_desired_inferior): Likewise.
16539
ccbd4912
MK
165402005-06-13 Mark Kettenis <kettenis@gnu.org>
16541
16542 * configure.ac: Simplify and improve check for socklen_t.
16543 * configure, config.in: Regenerate.
16544
f450004a
DJ
165452005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16546
16547 * acconfig.h: Remove.
16548 * configure.ac: Add a test for socklen_t. Use three-argument
16549 AC_DEFINE throughout.
16550 * config.in: Regenerated using autoheader 2.59.
16551 * configure: Regenerated.
16552
16553 * gdbreplay.c (socklen_t): Provide a default.
16554 (remote_open): Use socklen_t.
16555 * remote-utils.c (socklen_t): Provide a default.
16556 (remote_open): Use socklen_t.
16557 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16558 unsigned char.
16559
16560 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16561 char for buffers.
16562 * linux-low.c (linux_read_memory, linux_write_memory)
16563 (linux_read_auxv): Likewise.
16564 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16565 (check_mem_write): Likewise.
16566 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16567 Likewise.
16568 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16569 (registers_from_string, register_data): Likewise.
16570 * server.c (handle_query, main): Likewise.
16571 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16572 (decode_M_packet): Likewise.
16573 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16574 * target.h (struct target_ops): Update read_memory, write_memory,
16575 and read_auxv.
16576 (read_inferior_memory, write_inferior_memory): Update.
16577 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16578 to unsigned char *.
16579 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16580 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16581 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16582 linux-s390-low.c, linux-sh-low.c: Update for changes in
16583 read_inferior_memory and the_low_target->breakpoint.
16584
eee84df1
DJ
165852005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16586
16587 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16588 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16589 * configure.srv: Add powerpc64-*-linux*.
16590 * linux-ppc64-low.c: New file.
16591
45b134e5
OF
165922005-05-23 Orjan Friberg <orjanf@axis.com>
16593
16594 * linux-cris-low.c: New file with support for CRIS.
16595 * linux-crisv32-low.c: Ditto for CRISv32.
16596 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16597 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16598 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16599 reg-crisv32.o, and reg-crisv32.c to make rules.
16600 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16601 recognized targets.
16602
48d93c75
UW
166032005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16604
16605 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16606 of sizeof (PTRACE_XFER_TYPE).
16607 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16608
e013ee27
OF
166092005-05-12 Orjan Friberg <orjanf@axis.com>
16610
889bf7c5 16611 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16612 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16613 pointers for hardware watchpoint support.
16614 * linux-low.h (struct linux_target_ops): Ditto.
16615 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16616 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16617 to linux_target_ops.
16618 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16619 reply packet.
16620 * server.c (main): Recognize 'Z' and 'z' packets.
16621
b0ded00b
UW
166222005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16623
16624 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16625 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16626 (the_low_target): Add new members.
16627
8643e2ad
DJ
166282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16629
16630 * proc-service.c (ps_lgetregs): Search all_processes instead of
16631 all_threads.
16632
fc620387
DJ
166332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16634
16635 * server.c (start_inferior): Change return type to int.
16636 (attach_inferior): Change sigptr to int *.
16637 (handle_v_cont, handle_v_requests): Change signal to int *.
16638 (main): Change signal to int.
16639
166402005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16641
16642 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16643 * configure.srv: Add m32r*-*-linux*.
16644 * linux-m32r-low.c: New file.
16645
e0e76420
DJ
166462005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16647
16648 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16649
a1928bad
DJ
166502005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16651
16652 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16653 Take unsigned long arguments for PIDs.
16654 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16655 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16656 (wait_for_sigstop, linux_resume_one_process)
16657 (regsets_fetch_inferior_registers, linux_send_signal)
16658 (linux_read_auxv): Likewise. Update the types of variables holding
16659 PIDs. Update format string specifiers.
16660 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16661 * remote-utils.c (prepare_resume_reply): Likewise.
16662 * server.c (cont_thread, general_thread, step_thread)
16663 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16664 unsigned long.
16665 (handle_query): Update format specifiers.
16666 (handle_v_cont, main): Use strtoul for thread IDs.
16667 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16668 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16669 (general_thread, step_thread, thread_from_wait)
16670 (old_thread_from_wait): Update.
16671 * target.h (struct thread_resume): Use unsigned long for THREAD.
16672 (struct target_ops): Use unsigned long for arguments to attach and
16673 thread_alive.
16674
dcdb98d2
DJ
166752005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16676
16677 * acinclude.m4: Include bfd/bfd.m4 directly.
16678 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16679 <agriffis@toolchain.org>.
16680 * aclocal.m4, configure: Regenerated.
16681
bec39cab
AC
166822005-01-07 Andrew Cagney <cagney@gnu.org>
16683
16684 * configure.ac: Rename configure.in, require autoconf 2.59.
16685 * configure: Re-generate.
16686
434c4c77
DJ
166872004-12-08 Daniel Jacobowitz <dan@debian.org>
16688
16689 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16690 LIBS when finished.
16691 * aclocal.m4: Regenerated.
16692 * configure: Regenerated.
16693
db1d3e1b
AS
166942004-11-21 Andreas Schwab <schwab@suse.de>
16695
16696 * linux-m68k-low.c (m68k_num_gregs): Define.
16697 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16698 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16699 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16700 (m68k_breakpoint_at): New. Add to the_low_target.
16701
16702 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16703 srv_linux_thread_db to yes.
16704
43360365
JB
167052004-10-20 Joel Brobecker <brobecker@gnat.com>
16706
16707 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16708 (ARCH_SET_FS): Likewise.
16709 (ARCH_GET_FS): Likewise.
16710 (ARCH_GET_GS): Likewise.
16711
fd500816
DJ
167122004-10-16 Daniel Jacobowitz <dan@debian.org>
16713
16714 * linux-i386-low.c (ps_get_thread_area): New.
16715 * linux-x86-64-low.c (ps_get_thread_area): New.
16716 * linux-low.c: Include <sys/syscall.h>.
16717 (linux_kill_one_process): Don't kill the first thread here.
16718 (linux_kill): Kill the first thread here.
16719 (kill_lwp): New function.
16720 (send_sigstop, linux_send_signal): Use it.
16721 * proc-service.c: Clean up #ifdefs.
16722 (fpregset_info): Delete.
16723 (ps_lgetregs): Update and enable implementation.
16724 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16725 implementations.
16726 * remote-utils.c (struct sym_cache, symbol_cache): New.
16727 (input_interrupt): Print a clearer message.
16728 (async_io_enabled): New variable.
16729 (enable_async_io, disable_async_io): Use it. Update comments.
16730 (look_up_one_symbol): Use the symbol cache.
16731 * thread-db.c (thread_db_look_up_symbols): New function.
16732 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16733
f6de3c42
DJ
167342004-10-16 Daniel Jacobowitz <dan@debian.org>
16735
16736 * configure.in: Test for -rdynamic.
16737 * configure: Regenerated.
16738 * Makefile (INTERNAL_LDFLAGS): New.
16739 (gdbserver, gdbreplay): Use it.
16740
2c0fc042
AC
167412004-09-02 Andrew Cagney <cagney@gnu.org>
16742
16743 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16744
075b3282
DJ
167452004-03-23 Daniel Jacobowitz <drow@mvista.com>
16746
16747 * linux-low.c (linux_wait): Clear all_processes list also.
16748
fa6a77dc
DJ
167492004-03-12 Daniel Jacobowitz <drow@mvista.com>
16750
16751 * linux-low.c: Include <errno.h>. Remove extern declaration of
16752 errno.
16753
6d782a97
DJ
167542004-03-12 Daniel Jacobowitz <drow@mvista.com>
16755
16756 * gdbreplay.c, server.h, utils.c: Update copyright years.
16757
3a7fb99b
DJ
167582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16759
16760 * server.c (main): Print child status or termination signal from
16761 variable 'signal', not 'sig'.
16762
c3e735a6
DJ
167632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16764
16765 * linux-low.c (linux_read_memory): Change return type to
16766 int. Check for and return error from ptrace().
16767 * target.c (read_inferior_memory): Change return type to int. Pass
16768 back return status from the_target->read_memory().
16769 * target.h (struct target_ops): Adapt *read_memory() prototype.
16770 Update comment.
16771 (read_inferior_memory): Adapt prototype.
16772 * server.c (main): Return an error packet if
16773 read_inferior_memory() returns an error.
16774
a59d1c82
DJ
167752004-03-04 Daniel Jacobowitz <drow@mvista.com>
16776
16777 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16778 Unify with other clean targets.
16779
dc3f8883
DJ
167802004-02-29 Daniel Jacobowitz <drow@mvista.com>
16781
16782 * server.c (handle_v_cont): Call set_desired_inferior.
16783
89a208da
DJ
167842004-02-29 Daniel Jacobowitz <drow@mvista.com>
16785
16786 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16787
62ea82f5
DJ
167882004-02-29 Daniel Jacobowitz <drow@mvista.com>
16789
16790 * linux-low.c (linux_wait): Unblock async I/O.
16791 (linux_resume): Block and enable async I/O.
16792 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16793 * server.h (block_async_io, unblock_async_io): Add prototypes.
16794
6910d122
DJ
167952004-02-29 Daniel Jacobowitz <drow@mvista.com>
16796
16797 * remote-utils.c (remote_open): Print a status notice after
16798 opening a TCP port.
16799 * server.c (attach_inferior): Print a status notice after
16800 attaching.
16801
168022004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16803
16804 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16805
c89dc5d4
DJ
168062004-02-26 Daniel Jacobowitz <drow@mvista.com>
16807
16808 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16809 error packet.
16810 * server.c, target.h: Update copyright years.
16811
4b8dad4a
RM
168122004-02-25 Roland McGrath <roland@redhat.com>
16813
16814 * target.h (struct target_ops): New member `read_auxv'.
16815 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16816 * linux-low.c (linux_read_auxv): New function.
16817 (linux_target_ops): Initialize `read_auxv' member to that.
16818
d7446758
JB
168192004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16820
16821 Committed by Jim Blandy <jimb@redhat.com>.
16822
16823 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16824 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16825 instead of GPR_SIZE to distiguish s390 and s390x targets.
16826
5544ad89
DJ
168272004-01-31 Daniel Jacobowitz <drow@mvista.com>
16828
16829 * linux-low.c: Update copyright year.
16830 (check_removed_breakpoint): Clear pending_is_breakpoint.
16831 (linux_set_resume_request, linux_queue_one_thread)
16832 (resume_status_pending_p): New functions.
16833 (linux_continue_one_thread): Use process->resume.
16834 (linux_resume): Only resume threads if there are no pending events.
16835 * linux-low.h (struct process_info): Add resume request
16836 pointer.
16837
2a68b70e
DJ
168382004-01-30 Daniel Jacobowitz <drow@mvista.com>
16839
16840 * regcache.c (new_register_cache): Clear the allocated register
16841 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16842
64386c31
DJ
168432003-10-13 Daniel Jacobowitz <drow@mvista.com>
16844
16845 * linux-low.c (linux_resume): Take a struct thread_resume *
16846 argument.
16847 (linux_wait): Update call.
16848 (resume_ptr): New static variable.
16849 (linux_continue_one_thread): Renamed from
16850 linux_continue_one_process. Use resume_ptr.
16851 (linux_resume): Use linux_continue_one_thread.
16852 * server.c (handle_v_cont, handle_v_requests): New functions.
16853 (myresume): New function.
16854 (main): Handle 'v' case.
16855 * target.h (struct thread_resume): New type.
16856 (struct target_ops): Change argument of "resume" to struct
16857 thread_resume *.
16858 (myresume): Delete macro.
16859
c938e9b0
L
168602003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16861
16862 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16863 (uninstall): Support DESTDIR.
16864
7f313d07
BC
16865Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16866
16867 * configure.srv: Add xscale*linux copy of arm*linux entry.
16868
3b2fc2ea
DJ
168692003-07-24 Daniel Jacobowitz <drow@mvista.com>
16870
16871 * linux-arm-low.c (arm_reinsert_addr): New function.
16872 (the_low_target): Add arm_reinsert_addr.
16873
1c0a559e
MK
168742003-07-08 Mark Kettenis <kettenis@gnu.org>
16875
16876 * mem-break.c: Remove whitespace at end of file.
16877
43d5792c
DJ
168782003-06-28 Daniel Jacobowitz <drow@mvista.com>
16879
16880 * configure.in: Check whether we need to prototype strerror.
16881 * server.h: Optionally prototype strerror.
16882 * gdbreplay.c (perror_with_name): Use strerror.
16883 * linux-low.c (linux_attach_lwp): Use strerror.
16884 * utils.c (perror_with_name): Use strerror.
16885 * config.in, configure: Regenerated.
16886
c8a86edf
DJ
168872003-06-28 Daniel Jacobowitz <drow@mvista.com>
16888
16889 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16890 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16891
73d37363
DJ
168922003-06-20 Daniel Jacobowitz <drow@mvista.com>
16893
16894 * Makefile.in (SFILES): Update.
16895 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16896 low-sun3.c: Remove files.
16897
6ad8ae5c
DJ
168982003-06-17 Daniel Jacobowitz <drow@mvista.com>
16899
16900 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16901 (linux_detach_one_process, linux_detach): New functions.
16902 (linux_target_ops): Add linux_detach.
16903 * server.c (main): Handle 'D' packet.
16904 * target.h (struct target_ops): Add "detach" member.
16905 (detach_inferior): Define.
16906
1581182a
MK
169072003-06-13 Mark Kettenis <kettenis@gnu.org>
16908
16909 From Kelley Cook <kelleycook@wideopenwest.com>:
16910 * configure.srv: Accept i[34567]86 variants.
16911
e5379b03
DJ
169122003-06-05 Daniel Jacobowitz <drow@mvista.com>
16913
16914 * linux-low.c (linux_wait_for_event): Correct comment typos.
16915 (linux_resume_one_process): Call check_removed_breakpoint.
16916 (linux_send_signal): New function.
16917 (linux_target_ops): Add linux_send_signal.
16918 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16919 of kill.
16920 * target.h (struct target_ops): Add send_signal.
16921
2ff29de4
JB
169222003-05-29 Jim Blandy <jimb@redhat.com>
16923
16924 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16925 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16926 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16927 away part of the register's value.
16928
254787d4
DJ
169292003-03-26 Daniel Jacobowitz <drow@mvista.com>
16930
16931 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16932 (linux_wait_for_event, linux_init_signals): Likewise.
16933
94e10508
DJ
169342003-03-17 Daniel Jacobowitz <drow@mvista.com>
16935
16936 * configure.in: Check for stdlib.h.
16937 * configure: Regenerated.
16938 * config.in: Regenerated.
16939
4c0711e0
DJ
169402003-01-04 Andreas Schwab <schwab@suse.de>
16941
16942 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16943
ef66e766
AC
169442003-01-02 Andrew Cagney <ac131313@redhat.com>
16945
16946 * Makefile.in: Remove obsolete code.
16947
a1358604
DJ
169482002-11-20 Daniel Jacobowitz <drow@mvista.com>
16949
16950 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16951 defined(PT_FPR0_HI).
16952
23ce3b1c
DJ
169532002-11-17 Stuart Hughes <seh@zee2.com>
16954
16955 * linux-arm-low.c (arm_num_regs): Increase.
16956 (arm_regmap): Include status register.
16957
169582002-11-17 Daniel Jacobowitz <drow@mvista.com>
16959
16960 * linux-low.c (register_addr): Remove incorrect -1 check.
16961
a9fa9f7d
DJ
169622002-08-29 Daniel Jacobowitz <drow@mvista.com>
16963
16964 * linux-low.c (linux_create_inferior): Call setpgid. Return
16965 the new PID.
16966 (unstopped_p, linux_signal_pid): Remove.
16967 (linux_target_ops): Remove linux_signal_pid.
16968 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16969 global instead of target method.
16970 * target.h (struct target_ops): Remove signal_pid. Update comment
16971 for create_inferior.
16972 * server.c (signal_pid): New variable.
16973 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 16974 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
16975 (attach_inferior): Set signal_pid.
16976
17574093
DJ
169772002-08-23 Daniel Jacobowitz <drow@mvista.com>
16978
16979 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16980
169812002-08-20 Jim Blandy <jimb@redhat.com>
16982
16983 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16984 default for this.
16985
169862002-08-01 Andrew Cagney <cagney@redhat.com>
16987
16988 * Makefile.in: Make chill references obsolete.
16989
169902002-07-24 Kevin Buettner <kevinb@redhat.com>
16991
16992 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16993 * configure: Regenerate.
16994 * config.in: Regenerate.
16995
169962002-07-09 David O'Brien <obrien@FreeBSD.org>
16997
16998 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16999 (perror_with_name, remote_close, remote_open, expect, play): Static.
17000
170012002-07-04 Michal Ludvig <mludvig@suse.cz>
17002
4b8dad4a 17003 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17004 byte offsets instead of an array of indexes.
17005 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17006
170072002-06-13 Daniel Jacobowitz <drow@mvista.com>
17008
17009 * regcache.c: Add comment.
17010
170112002-06-11 Daniel Jacobowitz <drow@mvista.com>
17012
17013 * thread-db.c: New file.
17014 * proc-service.c: New file.
17015 * acinclude.m4: New file.
17016 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17017 proc-service.o, and thread-db.o.
17018 (linux-low.o): Add USE_THREAD_DB.
17019 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17020 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17021 * aclocal.m4: Regenerated.
17022 * config.in: Regenerated.
17023 * configure: Regenerated.
17024 * configure.in: Check for proc_service.h, sys/procfs.h,
17025 thread_db.h, and linux/elf.h headrs.
17026 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17027 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17028 Check for -lthread_db and thread support.
17029 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17030 PowerPC, and SuperH.
17031 * i387-fp.c: Constify arguments.
17032 * i387-fp.h: Likewise.
17033 * inferiors.c: (struct thread_info): Renamed from
17034 `struct inferior_info'. Remove PID member. Use generic inferior
17035 list header. All uses updated.
17036 (inferiors, signal_pid): Removed.
17037 (all_threads): New variable.
17038 (get_thread): Define.
17039 (add_inferior_to_list): New function.
17040 (for_each_inferior): New function.
17041 (change_inferior_id): New function.
17042 (add_inferior): Removed.
17043 (remove_inferior): New function.
17044 (add_thread): New function.
17045 (free_one_thread): New function.
17046 (remove_thread): New function.
17047 (clear_inferiors): Use for_each_inferior and free_one_thread.
17048 (find_inferior): New function.
17049 (find_inferior_id): New function.
17050 (inferior_target_data): Update argument type.
17051 (set_inferior_target_data): Likewise.
17052 (inferior_regcache_data): Likewise.
17053 (set_inferior_regcache_data): Likewise.
17054 * linux-low.c (linux_bp_reinsert): Remove.
17055 (all_processes, stopping_threads, using_thrads)
17056 (struct pending_signals, debug_threads, pid_of): New.
17057 (inferior_pid): Replace with macro.
17058 (struct inferior_linux_data): Remove.
17059 (get_stop_pc, add_process): New functions.
17060 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17061 Use add_process and add_thread.
17062 (linux_attach_lwp): New function, based on old linux_attach. Use
17063 add_process and add_thread. Set stop_expected for new threads.
17064 (linux_attach): New function.
17065 (linux_kill_one_process): New function.
17066 (linux_kill): Kill all LWPs.
17067 (linux_thread_alive): Use find_inferior_id.
17068 (check_removed_breakpoints, status_pending_p): New functions.
17069 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17070 Update. Use WNOHANG. Wait for cloned processes also. Update process
17071 struct for the found process.
17072 (linux_wait_for_event): New function.
17073 (linux_wait): Use it. Support LWPs.
17074 (send_sigstop, wait_for_sigstop, stop_all_processes)
17075 (linux_resume_one_process, linux_continue_one_process): New functions.
17076 (linux_resume): Support LWPs.
17077 (REGISTER_RAW_SIZE): Remove.
17078 (fetch_register): Use register_size instead. Call supply_register.
17079 (usr_store_inferior_registers): Likewise. Call collect_register.
17080 Fix recursive case.
17081 (regsets_fetch_inferior_registers): Improve error message.
17082 (regsets_store_inferior_registers): Add debugging.
17083 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17084 (unstopped_p, linux_signal_pid): New functions.
17085 (linux_target_ops): Add linux_signal_pid.
17086 (linux_init_signals): New function.
17087 (initialize_low): Call it. Initialize using_threads.
17088 * regcache.c (inferior_regcache_data): Add valid
17089 flag.
17090 (get_regcache): Fetch registers lazily. Add fetch argument
17091 and update all callers.
17092 (regcache_invalidate_one, regcache_invalidate): New
17093 functions.
17094 (new_register_cache): Renamed from create_register_cache.
17095 Return the new regcache.
17096 (free_register_cache): Change argument to a void *.
17097 (registers_to_string, registers_from_string): Call get_regcache
17098 with fetch flag set.
17099 (register_data): Make static. Pass fetch flag to get_regcache.
17100 (supply_register): Call get_regcache with fetch flag clear.
17101 (collect_register): Call get_regcache with fetch flag set.
17102 (collect_register_as_string): New function.
17103 * regcache.h: Update.
17104 * remote-utils.c (putpkt): Flush after debug output and use
17105 stderr.
17106 Handle input interrupts while waiting for an ACK.
17107 (input_interrupt): Use signal_pid method.
17108 (getpkt): Flush after debug output and use stderr.
17109 (outreg): Use collect_register_as_string.
17110 (new_thread_notify, dead_thread_notify): New functions.
17111 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17112 and general_thread.
17113 (look_up_one_symbol): Flush after debug output.
17114 * server.c (step_thread, server_waiting): New variables.
17115 (start_inferior): Don't use signal_pid. Update call to mywait.
17116 (attach_inferior): Update call to mywait.
17117 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17118 (main): Don't fetch/store registers explicitly. Use
17119 set_desired_inferior. Support proposed ``Hs'' packet. Update
17120 calls to mywait.
17121 * server.h: Update.
17122 (struct inferior_list, struct_inferior_list_entry): New.
17123 * target.c (set_desired_inferior): New.
17124 (write_inferior_memory): Constify.
17125 (mywait): New function.
17126 * target.h: Update.
17127 (struct target_ops): New signal_pid method.
17128 (mywait): Removed macro, added prototype.
17129
17130 * linux-low.h (regset_func): Removed.
17131 (regset_fill_func, regset_store_func): New.
17132 (enum regset_type): New.
17133 (struct regset_info): Add type field. Use new operation types.
17134 (struct linux_target_ops): stop_pc renamed to get_pc.
17135 Add decr_pc_after_break and breakpoint_at.
17136 (get_process, get_thread_proess, get_process_thread)
17137 (strut process_info, all_processes, linux_attach_lwp)
17138 (thread_db_init): New.
17139
17140 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17141 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17142 (the_low_target): Add new members.
17143 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17144 (i386_store_fpxregset): Constify.
17145 (target_regsets): Add new kind identifier.
17146 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17147 (i386_set_pc): Add debugging.
17148 (i386_breakpoint_at): New function.
17149 (the_low_target): Add new members.
17150 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17151 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17152 (mips_breakpoint_at): New.
17153 (the_low_target): Add new members.
17154 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17155 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17156 (the_low_target): Add new members.
17157 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17158 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17159 (the_low_target): Add new members.
17160 * linux-x86-64-low.c (target_regsets): Add new kind
17161 identifier.
17162
171632002-05-15 Daniel Jacobowitz <drow@mvista.com>
17164
17165 From Martin Pool <mbp@samba.org>:
17166 * server.c (gdbserver_usage): New function.
17167 (main): Call it.
17168
171692002-05-14 Daniel Jacobowitz <drow@mvista.com>
17170
17171 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17172 stop_at -> stop_pc.
17173
171742002-05-04 Andrew Cagney <ac131313@redhat.com>
17175
17176 * Makefile.in: Remove obsolete code.
17177
171782002-04-24 Michal Ludvig <mludvig@suse.cz>
17179
17180 * linux-low.c (regsets_fetch_inferior_registers),
17181 (regsets_store_inferior_registers): Removed cast to int from
17182 ptrace() calls.
17183 * regcache.h: Added declaration of struct inferior_info.
17184
171852002-04-20 Daniel Jacobowitz <drow@mvista.com>
17186
17187 * inferiors.c (struct inferior_info): Add regcache_data.
17188 (add_inferior): Call create_register_cache.
17189 (clear_inferiors): Call free_register_cache.
17190 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17191 * regcache.c (struct inferior_regcache_data): New.
17192 (registers): Remove.
17193 (get_regcache): New function.
17194 (create_register_cache, free_register_cache): New functions.
17195 (set_register_cache): Don't initialize the register cache here.
17196 (registers_to_string, registers_from_string, register_data): Call
17197 get_regcache.
17198 * regcache.h: Add prototypes.
17199 * server.h: Likewise.
17200
172012002-04-20 Daniel Jacobowitz <drow@mvista.com>
17202
17203 * mem-break.c: New file.
17204 * mem-break.h: New file.
17205 * Makefile.in: Add mem-break.o rule; update server.h
17206 dependencies.
17207 * inferiors.c (struct inferior_info): Add target_data
17208 member.
17209 (clear_inferiors): Free target_data member if set.
17210 (inferior_target_data, set_inferior_target_data): New functions.
17211 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17212 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17213 * linux-low.c (linux_bp_reinsert): New variable.
17214 (struct inferior_linux_data): New.
17215 (linux_create_inferior): Use set_inferior_target_data.
17216 (linux_attach): Likewise. Call add_inferior.
17217 (linux_wait_for_one_inferior): New function.
17218 (linux_wait): Call it.
17219 (linux_write_memory): Add const.
17220 (initialize_low): Call set_breakpoint_data.
17221 * linux-low.h (struct linux_target_ops): Add breakpoint
17222 handling members.
17223 * server.c (attach_inferior): Remove extra add_inferior
17224 call.
17225 * server.h: Include mem-break.h. Update inferior.c
17226 prototypes.
17227 * target.c (read_inferior_memory)
17228 (write_inferior_memory): New functions.
17229 * target.h (read_inferior_memory)
17230 (write_inferior_memory): Change macros to prototypes.
17231 (struct target_ops): Update comments. Add const to write_memory
17232 definition.
17233
172342002-04-11 Daniel Jacobowitz <drow@mvista.com>
17235
17236 * linux-low.c (usr_store_inferior_registers): Support
17237 registers which are allowed to fail to store.
17238 * linux-low.h (linux_target_ops): Likewise.
17239 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17240 (ppc_cannot_store_register): FPSCR may not be storable.
17241
172422002-04-09 Daniel Jacobowitz <drow@mvista.com>
17243
17244 * server.h: Include <string.h> if HAVE_STRING_H.
17245 * ChangeLog: Correct paths in last ChangeLog entry.
17246
172472002-04-09 Daniel Jacobowitz <drow@mvista.com>
17248
17249 * linux-low.h: Remove obsolete prototypes.
17250 (struct linux_target_ops): New.
17251 (extern the_low_target): New.
17252 * linux-low.c (num_regs, regmap): Remove declarations.
17253 (register_addr): Use the_low_target explicitly.
17254 (fetch_register): Likewise.
17255 (usr_fetch_inferior_registers): Likewise.
17256 (usr_store_inferior_registers): Likewise.
17257 * linux-arm-low.c (num_regs): Remove.
17258 (arm_num_regs): Define.
17259 (arm_regmap): Renamed from regmap, made static.
17260 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17261 made static.
17262 (arm_cannot_store_register): Renamed from cannot_store_register,
17263 made static.
17264 (the_low_target): New.
17265 * linux-i386-low.c (num_regs): Remove.
17266 (i386_num_regs): Define.
17267 (i386_regmap): Renamed from regmap, made static.
17268 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17269 made static.
17270 (i386_cannot_store_register): Renamed from cannot_store_register,
17271 made static.
17272 (the_low_target): New.
17273 * linux-ia64-low.c (num_regs): Remove.
17274 (ia64_num_regs): Define.
17275 (ia64_regmap): Renamed from regmap, made static.
17276 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17277 made static.
17278 (ia64_cannot_store_register): Renamed from cannot_store_register,
17279 made static.
17280 (the_low_target): New.
17281 * linux-m68k-low.c (num_regs): Remove.
17282 (m68k_num_regs): Define.
17283 (m68k_regmap): Renamed from regmap, made static.
17284 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17285 made static.
17286 (m68k_cannot_store_register): Renamed from cannot_store_register,
17287 made static.
17288 (the_low_target): New.
17289 * linux-mips-low.c (num_regs): Remove.
17290 (mips_num_regs): Define.
17291 (mips_regmap): Renamed from regmap, made static.
17292 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17293 made static.
17294 (mips_cannot_store_register): Renamed from cannot_store_register,
17295 made static.
17296 (the_low_target): New.
17297 * linux-ppc-low.c (num_regs): Remove.
17298 (ppc_num_regs): Define.
17299 (ppc_regmap): Renamed from regmap, made static.
17300 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17301 made static.
17302 (ppc_cannot_store_register): Renamed from cannot_store_register,
17303 made static.
17304 (the_low_target): New.
17305 * linux-s390-low.c (num_regs): Remove.
17306 (s390_num_regs): Define.
17307 (s390_regmap): Renamed from regmap, made static.
17308 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17309 made static.
17310 (s390_cannot_store_register): Renamed from cannot_store_register,
17311 made static.
17312 (the_low_target): New.
17313 * linux-sh-low.c (num_regs): Remove.
17314 (sh_num_regs): Define.
17315 (sh_regmap): Renamed from regmap, made static.
17316 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17317 made static.
17318 (sh_cannot_store_register): Renamed from cannot_store_register,
17319 made static.
17320 (the_low_target): New.
17321 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17322 (the_low_target): New.
17323
173242002-04-09 Daniel Jacobowitz <drow@mvista.com>
17325
17326 * Makefile.in: Add stamp-h target.
17327 * configure.in: Create stamp-h.
17328 * configure: Regenerated.
17329
173302002-04-09 Daniel Jacobowitz <drow@mvista.com>
17331
17332 * inferiors.c: New file.
17333 * target.c: New file.
17334 * target.h: New file.
17335 * Makefile.in: Add target.o and inferiors.o. Update
17336 dependencies.
17337 * linux-low.c (inferior_pid): New static variable,
17338 moved from server.c.
17339 (linux_create_inferior): Renamed from create_inferior.
17340 Call add_inferior. Return 0 on success instead of a PID.
17341 (linux_attach): Renamed from myattach.
17342 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17343 (linux_thread_alive): Renamed from mythread_alive.
17344 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17345 child dies.
17346 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17347 (regsets_store_inferior_registers): Correct error message.
17348 Add missing ``return 0''.
17349 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17350 (linux_store_registers): Renamed from store_inferior_registers.
17351 (linux_read_memory): Renamed from read_inferior_memory.
17352 (linux_write_memory): Renamed from write_inferior_memory.
17353 (linux_target_ops): New structure.
17354 (initialize_low): Call set_target_ops ().
17355 * remote-utils.c (unhexify): New function.
17356 (hexify): New function.
17357 (input_interrupt): Send signals to ``signal_pid''.
17358 * server.c (inferior_pid): Remove.
17359 (start_inferior): Update create_inferior call.
17360 (attach_inferior): Call add_inferior.
17361 (handle_query): New function.
17362 (main): Call handle_query for `q' packets.
17363 * server.h: Include "target.h". Remove obsolete prototypes.
17364 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17365
173662002-04-09 Daniel Jacobowitz <drow@mvista.com>
17367
17368 * Makefile.in: Add WARN_CFLAGS. Update configury
17369 dependencies.
17370 * configure.in: Check for <string.h>
17371 * configure: Regenerate.
17372 * config.in: Regenerate.
17373 * gdbreplay.c: Include needed system headers.
17374 (remote_open): Remove strchr prototype.
17375 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17376 * regcache.c (supply_register): Change buf argument to const void *.
17377 (supply_register_by_name): Likewise.
17378 (collect_register): Change buf argument to void *.
17379 (collect_register_by_name): Likewise.
17380 * regcache.h: Add missing prototypes.
17381 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17382 * server.c (handle_query): New function.
17383 (attached): New static variable, moved out of main.
17384 (main): Quiet longjmp clobber warnings.
17385 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17386 * utils.c (error): Remove NORETURN.
17387 (fatal): Likewise.
This page took 2.064553 seconds and 4 git commands to generate.