Rename common to gdbsupport
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
268a13a5
TT
12019-07-09 Tom Tromey <tom@tromey.com>
2
3 * configure: Rebuild.
4 * configure.ac: Change common to gdbsupport.
5 * acinclude.m4: Change common to gdbsupport.
6 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
7 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
8 common to gdbsupport.
9 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
10 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
11 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
12 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
13 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
14 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
15 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
16 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
17 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
18 common to gdbsupport.
19
350fab54
AH
202019-07-04 Alan Hayward <alan.hayward@arm.com>
21
22 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
23 defines.
24 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
25
2b40fda7
AH
262019-07-04 Alan Hayward <alan.hayward@arm.com>
27
28 * configure.srv: Remove legacy xml.
29 * linux-aarch64-low.c (initialize_low_arch): Remove
30 initialize_low_tdesc call.
31 * linux-aarch64-tdesc-selftest.c: Remove file.
32 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
33 * linux-x86-low.c (initialize_low_arch): Remove
34 initialize_low_tdesc call.
35 * linux-x86-tdesc-selftest.c: Remove file.
36 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
37
7d10623d
TV
382019-06-20 Tom de Vries <tdevries@suse.de>
39
40 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
41 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
42
8d6a48df
TV
432019-06-19 Tom de Vries <tdevries@suse.de>
44
45 * debug.h (debug_write): Change return type to ssize_t.
46 * debug.c (debug_write): Same.
47
73cc7272
TT
482019-06-14 Tom Tromey <tom@tromey.com>
49
50 * configure.ac: Use new path to gnulib.
51 * configure: Rebuild.
52 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
53 to gnulib.
54
08f10e02
TT
552019-06-11 Tom Tromey <tom@tromey.com>
56
57 * Makefile.in (SFILES): Add alloc.c.
58 (OBS): Add alloc.o.
59 (IPA_OBJS): Add alloc-ipa.o.
60 (alloc-ipa.o): New target.
61 (%.o: ../%.c): New pattern rule.
62
422186a9
TT
632019-06-10 Tom Tromey <tromey@adacore.com>
64
65 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
66 end warning with a newline.
67 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
68 newline.
69 * thread-db.c (attach_thread): Don't end warning with a newline.
70 (thread_db_notice_clone): Likewise.
71 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
72 newline.
73 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
74 end warning with a newline.
75
b02f78f9
PA
762019-06-04 Pedro Alves <palves@redhat.com>
77
78 * server.c (captured_main): Use make_unique_xstrdup.
79
88ed7edb
TT
802019-06-02 Tom Tromey <tom@tromey.com>
81
82 * gdbreplay.c (fromhex): Remove.
83 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
84
33a6bc35
TT
852019-05-29 Tom Tromey <tromey@adacore.com>
86
87 * configure: Rebuild.
88
e90a813d
KB
892019-05-06 Kevin Buettner <kevinb@redhat.com>
90
91 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
92 sign extension code on 32-bit builds.
93
353ea2d1
EZ
942019-05-03 Eli Zaretskii <eliz@gnu.org>
95
96 * remote-utils.c:
97 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
98
b494cdff
TT
992019-04-19 Tom Tromey <tom@tromey.com>
100
101 * server.c (struct vstop_notif): Derive from notif_event.
102 <base>: Remove.
103 (queue_stop_reply): Update.
104 (remove_all_on_match_ptid): Change type. Rewrite.
105 (discard_queued_stop_replies): Rewrite.
106 (in_queued_stop_replies_ptid): Change type.
107 (in_queued_stop_replies): Rewrite.
108 (notif_stop): Update.
109 (queue_stop_reply_callback): Update.
110 (captured_main): Don't call initialize_notif.
111 (push_stop_notification): Update.
112 * notif.c (notif_write_event, handle_notif_ack)
113 (notif_event_enque, notif_push): Update.
114 (notif_event_xfree, initialize_notif): Remove.
115 * notif.h (struct notif_event): Include <list>, not
116 "common/queue.h".
117 (struct notif_server) <queue>: Now a std::list.
118 (notif_event_p): Remove typedef.
119 (initialize_notif): Don't declare.
120 (struct notif_event): Add virtual destructor.
121
a7e559cc
AH
1222019-04-17 Alan Hayward <alan.hayward@arm.com>
123
124 * ax.c (ax_vdebug): Call debug_printf.
125 * debug.c (debug_write): New function.
126 * debug.h (debug_write): New declaration.
127 * linux-low.c (sigchld_handler): Call debug_write.
128
aeb2e706
AH
1292019-04-17 Alan Hayward <alan.hayward@arm.com>
130
131 * debug.c (debug_set_output): New function.
132 (debug_vprintf): Send output to debug_file.
133 (debug_flush): Likewise.
134 * debug.h (debug_set_output): New declaration.
135 * server.c (handle_monitor_command): Add debug-file option.
136 (captured_main): Likewise.
137
c1bc0935
AH
1382019-04-17 Alan Hayward <alan.hayward@arm.com>
139
140 * debug.c (remote_debug): Add definition.
141 * debug.h (remote_debug): Add declaration.
142 * hostio.c (remote_debug): Remove declaration.
143 * remote-utils.c (struct ui_file): Likewise.
144 (remote_debug): Likewise.
145 * remote-utils.h (remote_debug): Likewise,
146 * server.c (remote_debug): Remove definition.
147
3f52fdbc
KB
1482019-04-10 Kevin Buettner <kevinb@redhat.com>
149
150 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
151 when using a 64-bit gdbserver.
152
b0319eaa
TT
1532019-04-09 Tom Tromey <tromey@adacore.com>
154
155 * linux-low.c (select_event_lwp): Use find_thread_in_random.
156
eedc3f4f
TT
1572019-04-08 Tom Tromey <tom@tromey.com>
158
159 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
160 throw.
161 (linux_resume_one_lwp): Likewise.
162
230d2906
TT
1632019-04-08 Tom Tromey <tom@tromey.com>
164
165 * gdbreplay.c: Update.
166 * linux-low.c: Update.
167 * server.c: Update.
168
a70b8144
TT
1692019-04-08 Tom Tromey <tom@tromey.com>
170
171 * server.c: Use C++ exception handling.
172 * linux-low.c: Use C++ exception handling.
173 * gdbreplay.c: Use C++ exception handling.
174
3d6e9d23
TT
1752019-04-08 Tom Tromey <tom@tromey.com>
176
177 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
178 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
179 (captured_main, main): Update.
180 * gdbreplay.c (main): Update.
181
0570503d
PFC
1822019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
183
184 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
185 value in argument pointer, return 1 if the entry is found and 0
186 otherwise. Move comment.
187 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
188 * linux-low.h (linux_get_auxv): Declare.
189 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
190
227a9e65
TT
1912019-04-05 Tom Tromey <tromey@adacore.com>
192
193 * server.c (gdbserver_usage): Use upper-case for metasyntactic
194 variables.
195
69f4c9cc
AH
1962019-03-28 Alan Hayward <alan.hayward@arm.com>
197
198 * linux-low.c (AT_HWCAP2): Add define if not already included.
199
974c89e0
AH
2002019-03-26 Alan Hayward <alan.hayward@arm.com>
201
202 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
203 (aarch64_arch_setup): Call linux_get_hwcap.
204 * linux-arm-low.c (arm_get_hwcap): Remove function.
205 (arm_read_description): Call linux_get_hwcap.
206 * linux-low.c (linux_get_auxv): New function.
207 (linux_get_hwcap): Likewise.
208 (linux_get_hwcap2): Likewise.
209 * linux-low.h (linux_get_hwcap): New declaration.
210 (linux_get_hwcap2): Likewise.
211 * linux-ppc-low.c (ppc_get_auxv): Remove function.
212 (ppc_arch_setup): Call linux_get_hwcap.
213 * linux-s390-low.c (s390_get_hwcap): Remove function.
214 (s390_arch_setup): Call linux_get_hwcap.
215
1ef53e6b
AH
2162019-03-22 Alan Hayward <alan.hayward@arm.com>
217 Jiong Wang <jiong.wang@arm.com>
218
219 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
220 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
221 to fail.
222 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
223
ee4fbcfa
AH
2242019-03-22 Alan Hayward <alan.hayward@arm.com>
225 Jiong Wang <jiong.wang@arm.com>
226
227 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
228 (aarch64_get_hwcap): New function.
229 (aarch64_arch_setup): Read APIA hwcap.
230
6dc0ebde
AH
2312019-03-22 Alan Hayward <alan.hayward@arm.com>
232 Jiong Wang <jiong.wang@arm.com>
233
234 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
235 (initialize_low_tracepoint): Likewise.
236 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
237 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
238 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
239 (aarch64_linux_read_description): Likewise.
240 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
241
1163a4b7
JB
2422019-03-12 John Baldwin <jhb@FreeBSD.org>
243
244 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
245 i386_create_target_description for 'segments' parameter.
246 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
247 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
248 * win32-i386-low.c (i386_arch_setup): Likewise.
249
d3a70e03
TT
2502019-03-12 Tom Tromey <tromey@adacore.com>
251
252 * linux-low.c (iterate_over_lwps): Update.
253
37991b4f
TT
2542019-03-06 Tom Tromey <tom@tromey.com>
255
256 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
257 (captured_main): Use SCOPE_EXIT.
258
45950eb6
SDJ
2592019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
260
261 * configure.srv: Use '$enable_unittest' instead of '$development'
262 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
263 case.
264
43ac54fc
TT
2652019-02-27 Tom Tromey <tromey@adacore.com>
266
267 * gdbreplay.c (logchar): Handle \r\n.
268
df0da8a2
AH
2692019-02-07 Alan Hayward <alan.hayward@arm.com>
270
271 * linux-low.c (linux_attach): Add process before lwp.
272 * server.c (attach_inferior): Check if already attached.
273
1a5c2598
TT
2742019-02-07 Tom Tromey <tom@tromey.com>
275
276 * x86-tdesc.h: Rename include guard.
277 * x86-low.h: Add include guard.
278 * wincecompat.h: Rename include guard.
279 * win32-low.h: Add include guard.
280 * utils.h: Rename include guard.
281 * tracepoint.h: Rename include guard.
282 * tdesc.h: Rename include guard.
283 * target.h: Rename include guard.
284 * server.h: Rename include guard.
285 * remote-utils.h: Rename include guard.
286 * regcache.h: Rename include guard.
287 * nto-low.h: Rename include guard.
288 * notif.h: Add include guard.
289 * mem-break.h: Rename include guard.
290 * lynx-low.h: Add include guard.
291 * linux-x86-tdesc.h: Add include guard.
292 * linux-s390-tdesc.h: Add include guard.
293 * linux-ppc-tdesc-init.h: Add include guard.
294 * linux-low.h: Add include guard.
295 * linux-aarch64-tdesc.h: Add include guard.
296 * linux-aarch32-low.h: Add include guard.
297 * inferiors.h: Rename include guard.
298 * i387-fp.h: Rename include guard.
299 * hostio.h: Rename include guard.
300 * gdbthread.h: Rename include guard.
301 * gdb_proc_service.h: Rename include guard.
302 * event-loop.h: Rename include guard.
303 * dll.h: Rename include guard.
304 * debug.h: Rename include guard.
305 * ax.h: Rename include guard.
306
956cc47c
SN
3072018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
308
309 PR gdb/23985
310 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
311 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
312
a0707f3c
TT
3132019-01-25 Tom Tromey <tom@tromey.com>
314
315 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
316
0747795c
TT
3172019-01-25 Tom Tromey <tom@tromey.com>
318
319 * win32-low.c: Fix common/ includes.
320 * win32-i386-low.c: Fix common/ includes.
321 * tracepoint.c: Fix common/ includes.
322 * thread-db.c: Fix common/ includes.
323 * target.h: Fix common/ includes.
324 * symbol.c: Fix common/ includes.
325 * spu-low.c: Fix common/ includes.
326 * server.h: Fix common/ includes.
327 * server.c: Fix common/ includes.
328 * remote-utils.c: Fix common/ includes.
329 * regcache.h: Fix common/ includes.
330 * regcache.c: Fix common/ includes.
331 * nto-x86-low.c: Fix common/ includes.
332 * notif.h: Fix common/ includes.
333 * mem-break.h: Fix common/ includes.
334 * lynx-low.c: Fix common/ includes.
335 * lynx-i386-low.c: Fix common/ includes.
336 * linux-x86-tdesc-selftest.c: Fix common/ includes.
337 * linux-x86-low.c: Fix common/ includes.
338 * linux-low.c: Fix common/ includes.
339 * inferiors.h: Fix common/ includes.
340 * i387-fp.c: Fix common/ includes.
341 * hostio.c: Fix common/ includes.
342 * hostio-errno.c: Fix common/ includes.
343 * gdbthread.h: Fix common/ includes.
344 * gdbreplay.c: Fix common/ includes.
345 * fork-child.c: Fix common/ includes.
346 * event-loop.c: Fix common/ includes.
347 * ax.c:
348 (enum gdb_agent_op): Fix common/ includes.
349
be6d4f74
TT
3502019-01-21 Tom Tromey <tom@tromey.com>
351
352 * tracepoint.c: Fix includes.
353 * remote-utils.c: Fix includes.
354 * linux-x86-low.c: Fix includes.
355
66d91b39
JB
3562019-01-01 Joel Brobecker <brobecker@adacore.com>
357
358 * gdbreplay.c (gdbreplay_version): Update copyright year in
359 version message.
360 * server.c (gdbserver_version): Likewise.
361
754e3168
AH
3622018-12-05 Alan Hayward <alan.hayward@arm.com>
363
364 * linux-low.c (add_lwp): Switch ordering.
365
d105de22
TT
3662018-11-29 Tom Tromey <tom@tromey.com>
367
368 * win32-low.c (win32_join): Take pid, not process.
369 * target.h (struct target_ops) <join>: Change argument type.
370 (join_inferior): Change argument name.
371 * spu-low.c (spu_join): Take pid, not process.
372 * server.c (handle_detach): Preserve pid before destroying
373 process.
374 * lynx-low.c (lynx_join): Take pid, not process.
375 * linux-low.c (linux_join): Take pid, not process.
376
50138245
AH
3772018-11-23 Alan Hayward <alan.hayward@arm.com>
378
379 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
380 (aarch64_cannot_fetch_register): Likewise.
381 (struct linux_target_ops): Update references.
382
64f57f3d
PFC
3832018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
384
385 * linux-ppc-low.c: Include nat/linux-ptrace.h.
386
8d619c01
EBM
3872018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
388
389 * configure.srv (ipa_ppc_linux_regobj): Add
390 powerpc-isa207-htm-vsx32l-ipa.o and
391 powerpc-isa207-htm-vsx64l-ipa.o.
392 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
393 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
394 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
395 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
396 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
397 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
398 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
399 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
400 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
401 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
402 (init_registers_powerpc_isa207_htm_vsx32l)
403 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
404 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
405 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
406 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
407 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
408 (ppc_store_tm_ctarregset): New functions.
409 (ppc_regsets): Add entries for HTM regsets.
410 (ppc_arch_setup): Set htm in features struct when needed. Set
411 sizes for the HTM regsets.
412 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
413 (initialize_low_arch): Call
414 init_registers_powerpc_isa207_htm_vsx32l and
415 init_registers_powerpc_isa207_htm_vsx64l.
416 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
417 PPC_TDESC_ISA207_HTM_VSX.
418 (initialize_low_tracepoint): Call
419 init_registers_powerpc_isa207_htm_vsx32l and
420 init_registers_powerpc_isa207_htm_vsx64l.
421
232bfb86
EBM
4222018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
423
424 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
425 rs6000/power-linux-pmu.xml to srv_xmlfiles.
426 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
427 (ppc_store_pmuregset): New functions.
428 (ppc_regsets): Add entries for ebb and pmu regsets.
429 (ppc_arch_setup): Set isa207 in features struct if the ebb and
430 pmu regsets are available. Set sizes for these regsets.
431
f2cf6173
EBM
4322018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
433
434 * configure.srv (ipa_ppc_linux_regobj): Add
435 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
436 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
437 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
438 rs6000/powerpc-isa207-vsx32l.xml, and
439 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
440 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
441 <PPC_TDESC_ISA207_VSX>: New enum value.
442 (init_registers_powerpc_isa207_vsx32l): Declare.
443 (init_registers_powerpc_isa207_vsx64l): Declare.
444 * linux-ppc-low.c (ppc_fill_tarregset): New function.
445 (ppc_store_tarregset): New function.
446 (ppc_regsets): Add entry for the TAR regset.
447 (ppc_arch_setup): Set isa207 in features struct when needed. Set
448 size for the TAR regsets.
449 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
450 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
451 and init_registers_powerpc_isa207_vsx64l.
452 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
453 (initialize_low_tracepoint): Call
454 init_registers_powerpc_isa207_vsx32l and
455 init_registers_powerpc_isa207_vsx64l.
456
7ca18ed6
EBM
4572018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
458 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
459
460 * configure.srv (ipa_ppc_linux_regobj): Add
461 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
462 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
463 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
464 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
465 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
466 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
467 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
468 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
469 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
470 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
471 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
472 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
473 (ppc_hwcap): Add comment.
474 (ppc_hwcap2): New global.
475 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
476 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
477 (ppc_regsets): Add entries for the DSCR and PPR regsets.
478 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
479 when needed. Set sizes for the the DSCR and PPR regsets.
480 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
481 (initialize_low_arch): Call
482 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
483 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
484 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
485 PPC_TDESC_ISA205_PPR_DSCR_VSX.
486 (initialize_low_tracepoint): Call
487 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
488 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
489
5c849b22
PFC
4902018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
491
492 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
493
8ecfd7bd
SDJ
4942018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
495 Simon Marchi <simark@simark.ca>
496
497 * acinclude.m4: Include "../selftest.m4".
498 * configure: Regenerate.
499 * configure.ac: Use "GDB_AC_SELFTEST".
500 * configure.srv: Use "$enable_unittests" instead of
501 "$development" when checking whether unit tests have been
502 enabled.
503 * server.c (captured_main): Update message informing that
504 selftests have been disabled.
505
96643e35
TT
5062018-10-04 Tom Tromey <tom@tromey.com>
507
508 * configure: Rebuild.
509
da4ae14a
TT
5102018-10-04 Tom Tromey <tom@tromey.com>
511
512 * server.c (handle_status): Rename inner "thread".
513 (process_serial_event): Declare "res" in 'm' case.
514 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
515 (iterate_over_lwps): Rename inner "thread".
516 (linux_qxfer_libraries_svr4): Rename inner "len".
517 * gdbthread.h (find_thread_in_random): Rename inner "thread".
518
7c619dbd
GB
5192018-10-01 Gary Benson <gbenson@redhat.com>
520
521 * gdb_proc_service.h: Moved common code to
522 common/gdb_proc_service.h.
523
3795e814
GB
5242018-10-01 Gary Benson <gbenson@redhat.com>
525
526 * gdb_proc_service.h: Synchronize comments and whitespace with
527 GDB's version of this file.
528
49b036f1
TT
5292018-09-25 Tom Tromey <tom@tromey.com>
530
531 * configure: Rebuild.
532 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
533
8ff03f0b
SM
5342018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
535
536 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
537 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
538 ($(IPA_LIB)): Sort IPA_OBJS.
539
a1cd91dc
SM
5402018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
541
542 * Makefile.in: Remove references to $(ADD_DEPS).
543
752312ba
TT
5442018-09-16 Tom Tromey <tom@tromey.com>
545
546 * remote-utils.c (remote_open): Use GNU style for metasyntactic
547 variables.
548 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
549 variables.
550
f1628857
TT
5512018-09-05 Tom Tromey <tom@tromey.com>
552
553 * configure: Rebuild.
554
ad202fcc
SM
5552018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
556
557 PR build/23399
558 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
559
d3d8724a
TT
5602018-08-27 Tom Tromey <tom@tromey.com>
561
562 PR build/23087:
563 * configure: Rebuild.
564
b4f183d2
TT
5652018-08-27 Tom Tromey <tom@tromey.com>
566
567 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
568 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
569 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
570 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
571 (s390x_emit_stack_adjust): Add casts to unsigned char.
572
4e2aa472
SM
5732018-08-22 Simon Marchi <simon.marchi@ericsson.com>
574
575 PR gdb/23374
576 PR gdb/23375
577 * server.h (struct client_state) <disable_randomization>:
578 Initialize to 1.
579
cf4088a9
SM
5802018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
581
582 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
583 variable.
584 (mips_supply_ptrace_register): Likewise.
585
a0de763e
TT
5862018-07-22 Tom Tromey <tom@tromey.com>
587
588 * configure: Rebuild.
589
b0a7723d
TT
5902018-07-22 Tom Tromey <tom@tromey.com>
591
592 * win32-low.c (win32_create_inferior): Remove unused variables.
593 * gdbreplay.c (remote_open): Remove unused variable.
594 * remote-utils.c (remote_prepare): Remove unused variable.
595 * x86-tdesc.h (X86_TDESC_H): Define.
596 (amd64_expedite_regs): Define conditionally.
597 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
598 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
599 * remote-utils.c (readchar): Remove unused variable.
600
a780ef4f
PA
6012018-07-13 Pedro Alves <palves@redhat.com>
602
603 * linux-low.c (linux_kill): Change parameter to process_info
604 pointer instead of pid. Adjust.
605 * lynx-low.c (lynx_kill): Likewise.
606 * nto-low.c (nto_kill): Likewise.
607 * spu-low.c (spu_kill): Likewise.
608 * win32-low.c (win32_kill): Likewise.
609 * server.c (handle_v_kill, kill_inferior_callback)
610 (detach_or_kill_for_exit): Adjust.
611 * target.c (kill_inferior): Change parameter to process_info
612 pointer instead of pid. Adjust.
613 * target.h (struct target_ops) <kill>: Change parameter to
614 process_info pointer instead of pid. Adjust all implementations
615 and callers.
616 (kill_inferior): Likewise.
617
ef2ddb33
PA
6182018-07-13 Pedro Alves <palves@redhat.com>
619
620 * linux-low.c (linux_detach, linux_join): Change parameter to
621 process_info pointer instead of pid. Adjust.
622 * lynx-low.c (lynx_detach, lynx_join): Likewise.
623 * nto-low.c (nto_detach): Likewise.
624 * spu-low.c (spu_detach, spu_join): Likewise.
625 * win32-low.c (win32_detach, win32_join): Likewise.
626 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
627 * target.h (struct target_ops) <detach, join>: Change parameter to
628 process_info pointer instead of pid. Adjust all implementations
629 and callers.
630 (detach_inferior, join_inferior): Rename 'pid' parameter to
631 'proc'.
632
c7ab0aef
SDJ
6332018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
634 Jan Kratochvil <jan.kratochvil@redhat.com>
635 Paul Fertser <fercerpav@gmail.com>
636 Tsutomu Seki <sekiriki@gmail.com>
637
638 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
639 (OBS): Add 'common/netstuff.o'.
640 (GDBREPLAY_OBS): Likewise.
641 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
642 (remote_open): Implement support for IPv6
643 connections.
644 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
645 and 'wspiapi.h'.
646 (handle_accept_event): Accept connections from IPv6 sources.
647 (remote_prepare): Handle IPv6-style hostnames; implement
648 support for IPv6 connections.
649 (remote_open): Implement support for printing connections from
650 IPv6 sources.
651
31445d10
PA
6522018-07-11 Pedro Alves <palves@redhat.com>
653
654 PR gdb/23377
655 * mem-break.c (any_persistent_commands): Add process_info
656 parameter and use it instead of relying on the current process.
657 Change return type to bool.
658 * mem-break.h (any_persistent_commands): Add process_info
659 parameter and change return type to bool.
660 * server.c (handle_detach): Remove require_running_or_return call.
661 Look up the process_info for the process we're about to detach.
662 If not found, return back error to GDB. Adjust
663 any_persistent_commands call to pass down a process pointer.
664
cb197132
PA
6652018-07-11 Pedro Alves <palves@redhat.com>
666
667 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
668 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
669 instead of collect_register_by_name.
670 * regcache.c (regcache_raw_get_unsigned_by_name): New.
671 * regcache.h (regcache_raw_get_unsigned_by_name): New.
672
1b919490
VB
6732018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
674 Pedro Alves <palves@redhat.com>
675
676 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
677
d7e15655
TT
6782018-07-03 Tom Tromey <tom@tromey.com>
679
680 * linux-low.c: Update.
681 * lynx-low.c: Update.
682 * mem-break.c: Update.
683 * nto-low.c: Update.
684 * remote-utils.c: Update.
685 * server.c: Update.
686 * spu-low.c: Update.
687 * target.c: Update.
688 * win32-low.c: Update.
689
26a57c92
TT
6902018-07-03 Tom Tromey <tom@tromey.com>
691
692 * server.c: Update.
693
0e998d96
TT
6942018-07-03 Tom Tromey <tom@tromey.com>
695
696 * linux-low.c: Update.
697
cc6bcb54
TT
6982018-07-03 Tom Tromey <tom@tromey.com>
699
700 * target.c: Update.
701
e38504b3
TT
7022018-07-03 Tom Tromey <tom@tromey.com>
703
704 * linux-low.c: Update.
705 * linux-mips-low.c: Update.
706 * lynx-low.c: Update.
707 * nto-low.c: Update.
708 * remote-utils.c: Update.
709 * server.c: Update.
710 * spu-low.c: Update.
711 * target.c: Update.
712 * thread-db.c: Update.
713
e99b03dc
TT
7142018-07-03 Tom Tromey <tom@tromey.com>
715
716 * linux-low.c: Update.
717 * linux-mips-low.c: Update.
718 * lynx-low.c: Update.
719 * mem-break.c: Update.
720 * nto-low.c: Update.
721 * remote-utils.c: Update.
722 * server.c: Update.
723 * spu-low.c: Update.
724 * target.c: Update.
725 * tracepoint.c: Update.
726
f2907e49
TT
7272018-07-03 Tom Tromey <tom@tromey.com>
728
729 * linux-low.c: Update.
730 * linux-ppc-low.c: Update.
731 * linux-x86-low.c: Update.
732 * proc-service.c: Update.
733 * server.c: Update.
734 * spu-low.c: Update.
735 * thread-db.c: Update.
736 * win32-low.c: Update.
737
fd79271b
TT
7382018-07-03 Tom Tromey <tom@tromey.com>
739
740 * linux-low.c: Update.
741 * lynx-low.c: Update.
742 * nto-low.c: Update.
743 * remote-utils.c: Update.
744 * spu-low.c: Update.
745 * thread-db.c: Update.
746 * win32-low.c: Update.
747
c0867626
SDJ
7482018-06-29 Joel Brobecker <brobecker@adacore.com>
749
750 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
751 parameter in call to 'amd64_create_target_description'.
752
2512d7ef
JK
7532018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
754
755 * x86-tdesc.h: Remove executable permission flag.
756
d0ac1c44
SM
7572018-06-19 Simon Marchi <simon.marchi@ericsson.com>
758
759 * configure.ac: Remove AC_PREREQ, add missing quoting.
760 * configure: Re-generate.
761 * config.in: Re-generate.
762 * aclocal.m4: Re-generate.
763
c4eb05ff
SM
7642018-06-18 Simon Marchi <simon.marchi@ericsson.com>
765
766 * tracepoint.h (current_traceframe): Remove declaration.
767
02895270
AH
7682018-06-18 Alan Hayward <alan.hayward@arm.com>
769
770 * linux-aarch64-low.c (is_sve_tdesc): New function.
771 (aarch64_sve_regs_copy_to_regcache): Likewise.
772 (aarch64_sve_regs_copy_from_regcache): Likewise.
773 (aarch64_regs_info): Add SVE checks.
774 (initialize_low_arch): Initialize SVE.
775
e9902bfc
AH
7762018-06-18 Alan Hayward <alan.hayward@arm.com>
777
778 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
779
fefa175e
AH
7802018-06-11 Alan Hayward <alan.hayward@arm.com>
781
782 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
783 (initialize_low_tracepoint): Likewise
784 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
785 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
786 param.
787 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
788 checks.
789 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
790
b91ad3ff
AH
7912018-06-11 Alan Hayward <alan.hayward@arm.com>
792
793 * server.h (PBUFSIZ): Increase size
794
f868386e
AH
7952018-06-11 Alan Hayward <alan.hayward@arm.com>
796
797 * regcache.c (regcache::raw_compare): New function.
798 * regcache.h (regcache::raw_compare): New declaration.
799
9c861883
AH
8002018-06-11 Alan Hayward <alan.hayward@arm.com>
801
802 * regcache.c (new_register_cache): Use new.
803 (free_register_cache): Use delete.
804 (register_data): Use const.
805 (supply_register): Move body inside regcache.
806 (regcache::raw_supply): New override function.
807 (collect_register): Move body inside regcache.
808 (regcache::raw_collect): New override function.
809 (regcache::get_register_status): New override function.
810 * regcache.h (struct regcache): Inherit from reg_buffer_common.
811
40591844
TT
8122018-06-09 Tom Tromey <tom@tromey.com>
813
814 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
815 declare queue.
816 (event_queue): Use std::queue.
817 (gdb_event_xfree): Remove.
818 (initialize_event_loop, process_event, wait_for_event): Update.
819
6341380d
SC
8202018-06-08 Stan Cox <scox@redhat.com>
821
822 * win32-low.c (win32_create_inferior): last_ptid and last_status
823 moved to client_state.
824
03349c93
PA
8252018-06-08 Pedro Alves <palves@redhat.com>
826
827 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
828 common/common-exceptions.o, common/common-utils.o,
829 common/errors.o, common/print-utils.o and utils.o.
830 * gdbreplay.c: Include "common-defs.h" instead of the two
831 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
832 string.h or alloca.h.
833 (perror_with_name): Delete.
834 (remote_open): Use xstrdup instead of strdup.
835 (main): Rename to ...
836 (captured_main): ... this.
837 (main): New.
838
8dcc53b3
TT
8392018-06-08 Tom Tromey <tom@tromey.com>
840
841 * linux-low.c (linux_low_read_btrace): Update.
842
c12a5089
SC
8432018-06-04 Stan Cox <scox@redhat.com>
844
845 * server.h (struct client_state): New.
846 * server.c (cont_thread, general_thread, multi_process)
847 (report_fork_events, report_vfork_events, report_exec_events)
848 (report_thread_events, swbreak_feature, hwbreak_feature)
849 (vCont_supported, disable_randomization, pass_signals)
850 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
851 Moved to client_state.
852 * remote-utils.c (remote_debug, noack_mode)
853 (transport_is_reliable): Moved to client_state.
854 * tracepoint.c (current_traceframe): Moved to client_state.
855
856 Update all callers.
857 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
858 linux-low.c, remote-utils.h, target.c: Use client_state.
859
122394f1
AH
8602018-05-31 Alan Hayward <alan.hayward@arm.com>
861
862 * configure.srv: Add new c/h file.
863
95228a0d
AH
8642018-05-31 Alan Hayward <alan.hayward@arm.com>
865
866 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
867 null VQ.
868
d8dab6c3
MR
8692018-05-25 Maciej W. Rozycki <macro@mips.com>
870
871 * gdb.arch/mips-fpregset-core.exp: New test.
872 * gdb.arch/mips-fpregset-core.c: New test source.
873
81e25b7c
EK
8742018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
875
876 PR server/23198
877 * hostio.c (require_int): Do not report overflow for integers
878 between 0xfffffff and 0x7fffffff.
879
7e947ad3
MR
8802018-05-22 Maciej W. Rozycki <macro@mips.com>
881
882 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
883 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
884 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
885 functions.
886 (the_low_target): Wire them.
887
1d75a658
PFC
8882018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
889
890 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
891 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
892 mode. Call collect_register_by_name with vscr using
893 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
894 (ppc_store_vrregset): Add and set vscr_offset variable as in
895 ppc_fill_vrregset. Call supply_register_by_name with vscr using
896 vscr_offset.
897
d078308a
PFC
8982018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
899
900 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
901 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
902 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
903
7273b5fc
PFC
9042018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
905
906 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
907 (ppc_store_vsxregset): Likewise.
908 (ppc_fill_vrregset): Likewise.
909 (ppc_store_vrregset): Likewise.
910 (ppc_fill_evrregset): Likewise.
911 (ppc_store_evrregset): Likewise.
912 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
913 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
914 needed.
915
2e077f5e
PFC
9162018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
917
918 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
919 wordsize of the inferior. Call ppc_linux_target_wordsize.
920
bd64614e
PFC
9212018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
922
923 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
924 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
925 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
926 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
927 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
928 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
929 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
930 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
931 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
932 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
933 (tdesc_powerpc_e500l): Remove.
934 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
935 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
936 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
937 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
938 linux-ppc-tdesc.h.
939 (ppc_arch_setup): Remove target description matching code. Fill a
940 ppc_linux_features struct and call ppc_linux_match_description
941 with it.
942
75d74cca
MR
9432018-05-22 Maciej W. Rozycki <macro@mips.com>
944
945 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
946 width of the requested register exceeds the width of the
947 `ptrace' data type.
948 (mips_cannot_store_register): Likewise.
949
e4439e43
MR
9502018-05-21 Maciej W. Rozycki <macro@mips.com>
951
952 * linux-mips-low.c (mips_fetch_register): New function. Update
953 preceding comment.
954 (mips_store_gregset): Supply 0 rather than $restart for $zero.
955 (the_low_target): Wire `mips_fetch_register'.
956
55271bf9
JB
9572018-05-10 Joel Brobecker <brobecker@adacore.com>
958
959 * lynx-i386-low.c (LYNXOS_178): New macro.
960 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
961 the layout on LynxOS-178.
962 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
963 handle floating point registers that are not supported by
964 LynxOS-178.
965
1a34f210
TT
9662018-05-10 Tom Tromey <tom@tromey.com>
967
968 * configure: Rebuild.
969
190852c8
JB
9702018-05-10 Joel Brobecker <brobecker@adacore.com>
971
972 PR server/23158:
973 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
974 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
975 Use it to set the expedite_regs field in the given tdesc.
976 * x86-tdesc.h: New file.
977 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
978 Adjust following the addition of the new expedite_regs parameter
979 to init_target_desc.
980 * linux-tic6x-low.c (tic6x_read_description): Likewise.
981 * linux-x86-tdesc.c: #include "x86-tdesc.h".
982 (i386_linux_read_description, amd64_linux_read_description):
983 Adjust following the addition of the new expedite_regs parameter
984 to init_target_desc.
985 * lynx-i386-low.c: #include "x86-tdesc.h".
986 (lynx_i386_arch_setup): Adjust following the addition of the new
987 expedite_regs parameter to init_target_desc.
988 * nto-x86-low.c: #include "x86-tdesc.h".
989 (nto_x86_arch_setup): Adjust following the addition of the new
990 expedite_regs parameter to init_target_desc.
991 * win32-i386-low.c: #include "x86-tdesc.h".
992 (i386_arch_setup): Adjust following the addition of the new
993 expedite_regs parameter to init_target_desc.
994
7dbac825
JB
9952018-05-10 Joel Brobecker <brobecker@adacore.com>
996
997 PR server/23158:
998 * win32-low.c (win32_create_inferior): Add call to my_wait
999 setting last_status global.
1000
906994d9
JB
10012018-05-10 Joel Brobecker <brobecker@adacore.com>
1002
1003 PR server/23158:
1004 * win32-low.c (create_process): Only call gdb_tilde_expand if
1005 inferior_cwd is not NULL.
1006
8ee22052
AB
10072018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1008
1009 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1010 registers to the cache if their values have changed.
1011 (i387_xsave_to_cache): Provide default values for x87 control
1012 registers when these features are available, but disabled.
1013 * regcache.c (supply_register_by_name_zeroed): New function.
1014 * regcache.h (supply_register_by_name_zeroed): Declare new
1015 function.
1016
aff689d3
TT
10172018-05-07 Tom Tromey <tom@tromey.com>
1018
1019 * configure: Rebuild.
1020
85e26832
TT
10212018-05-04 Tom Tromey <tom@tromey.com>
1022
1023 * configure: Rebuild.
1024
a3b60e45
JK
10252018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1026 Pedro Alves <palves@redhat.com>
1027
1028 * linux-aarch64-low.c (aarch64_stopped_data_address):
1029 Likewise.
1030
632e107b
TT
10312018-04-27 Tom Tromey <tom@tromey.com>
1032
1033 * configure: Rebuild.
1034
458412c3
TT
10352018-04-23 Tom Tromey <tom@tromey.com>
1036
1037 * configure: Rebuild.
1038
f31c089e
SM
10392018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1040
1041 * Makefile.in (depcomp): Add "..".
1042 (all_deps_files): New and use it.
1043
b319b098
AH
10442018-04-18 Alan Hayward <alan.hayward@arm.com>
1045
1046 * configure.srv (aarch64*-*-linux*): Don't include xml.
1047 (i[34567]86-*-cygwin*): Likewise.
1048 (i[34567]86-*-linux*): Likewise.
1049 (i[34567]86-*-lynxos*): Likewise.
1050 (i[34567]86-*-mingw32ce*): Likewise.
1051 (i[34567]86-*-mingw*): Likewise.
1052 (i[34567]86-*-nto*): Likewise.
1053 (tic6x-*-uclinux): Likewise.
1054 (x86_64-*-linux*): Likewise.
1055 (x86_64-*-mingw*): Likewise.
1056 (x86_64-*-cygwin*): Likewise.
1057
3b74854b
AH
10582018-04-18 Alan Hayward <alan.hayward@arm.com>
1059
1060 * tdesc.c: Remove xml parameter.
1061
e98577a9
AH
10622018-04-18 Alan Hayward <alan.hayward@arm.com>
1063
1064 * server.c (get_features_xml): Remove cast.
1065 * tdesc.c (void target_desc::accept): Fill in function.
1066 (tdesc_get_features_xml): Remove old xml creation.
1067 (print_xml_feature::visit_pre): Add xml vistor.
1068 * tdesc.h (struct target_desc): Make xmltarget mutable.
1069 (tdesc_get_features_xml): Remove declaration.
1070
d278f585
AH
10712018-04-18 Alan Hayward <alan.hayward@arm.com>
1072
1073 * tdesc.c (tdesc_architecture_name): Add new function.
1074 (tdesc_osabi_name): Likewise.
1075 (tdesc_get_features_xml): Use new functions.
1076
eee8a18d
AH
10772018-04-18 Alan Hayward <alan.hayward@arm.com>
1078
1079 * tdesc.c (tdesc_create_flags): Remove.
1080 (tdesc_add_flag): Likewise.
1081 (tdesc_named_type): Likewise.
1082 (tdesc_create_union): Likewise.
1083 (tdesc_create_struct): Likewise.
1084 (tdesc_create_vector): Likewise.
1085 (tdesc_add_bitfield): Likewise.
1086 (tdesc_add_field): Likewise.
1087 (tdesc_set_struct_size): Likewise.
1088
82ec9bc7
AH
10892018-04-18 Alan Hayward <alan.hayward@arm.com>
1090
1091 * tdesc.c (~target_desc): Remove implictly deleted items.
1092 (init_target_desc): Iterate all features.
1093 (tdesc_get_features_xml): Use vector.
1094 (tdesc_create_feature): Create feature.
1095 * tdesc.h (tdesc_feature) Remove
1096 (target_desc): Add features.
1097
ea3e7d71
AH
10982018-04-18 Alan Hayward <alan.hayward@arm.com>
1099
1100 * Makefile.in: Add common/tdesc.c
1101 * tdesc.c (init_target_desc): init all reg_defs from register
1102 vector.
1103 (tdesc_create_reg): Create tdesc_reg.
1104 * tdesc.h (tdesc_feature): Add register vector.
1105
17d08cd4
SM
11062018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1107
1108 * tdesc.h (struct target_desc) <features>: Change type to
1109 std::vector<std::string>.
1110 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1111 changes.
1112 (tdesc_get_features_xml): Likewise.
1113 (tdesc_create_feature): Likewise.
1114
5cd3e386
AH
11152018-03-26 Alan Hayward <alan.hayward@arm.com>
1116
1117 * regcache.c (find_register_by_number): Return a ref.
1118 (find_regno): Use references.
1119 (register_size): Likewise.
1120 (register_data): Likewise.
1121 * tdesc.c (target_desc::~target_desc): Remove free calls.
1122 (target_desc::operator==): Use std::vector compare.
1123 (init_target_desc): Use reference.
1124 (tdesc_create_reg): Use reg constructors.
1125 * tdesc.h (struct target_desc): Replace pointer with object.
1126
dff7492c
AH
11272018-03-23 Alan Hayward <alan.hayward@arm.com>
1128
1129 * regcache.c (find_register_by_number): Make static.
1130 (find_regno): Use find_register_by_number
1131 * regcache.h (struct reg): Remove declaration.
1132
d80e5242
AH
11332018-03-23 Alan Hayward <alan.hayward@arm.com>
1134
1135 * tdesc.c (target_desc::~target_desc): Move to here.
1136 (target_desc::operator==): Likewise.
1137 * tdesc.h (target_desc::~target_desc): Move from here.
1138 (target_desc::operator==): Likewise.
1139
f69c5afb
AA
11402018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1141
1142 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1143
ce29f843
AA
11442018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1145
1146 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1147 S390_TDESC_GS.
1148 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1149 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1150 and init_registers_s390_gs_linux64.
1151
c49bd90b
AA
11522018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1153
1154 * linux-s390-low.c (s390_fill_gs): Remove function.
1155 (s390_fill_gsbc): Remove function.
1156 (s390_regsets): Set fill functions for the guarded storage regsets
1157 to NULL.
1158
7edb9bd3
AA
11592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1160
1161 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1162 the word size. Add comment.
1163 (s390_get_wordsize): New function.
1164 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1165 pswm with it. Instead, use s390_get_wordsize to determine the
1166 word size first and derive the correct tdesc from that directly.
1167
39be3c7e
SM
11682018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1169
1170 * Makefile.in: Include silent-rules.mk.
1171 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1172 (COMPILE): Add ECHO_CXX.
1173 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1174 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1175 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1176 (version-generated.c): Add ECHO_GEN.
1177 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1178 (IPAGENT_COMPILE): Add ECHO_CXX.
1179 (%-generated.c): Add ECHO_REGDAT.
1180
3ae9ce5d
TT
11812018-03-14 Tom Tromey <tom@tromey.com>
1182
1183 PR cli/14977:
1184 * ax.c (ax_printf): Special case for NULL.
1185
e6a58aa8
SM
11862018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * linux-low.c (linux_qxfer_libraries_svr4): Use
1189 xml_escape_text_append.
1190
f6e8a41e
SM
11912018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1194
b9671caf
SM
11952018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * server.c (handle_general_set): Remove unnecessary xstrdup.
1198
e80aaf61
SM
11992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 * server.c (parse_debug_format_options): Adjust to
1202 delim_string_to_char_ptr_vec changes.
1203 * thread-db.c (thread_db_load_search): Adjust to
1204 dirnames_to_char_ptr_vec changes.
1205
b1223e78
MM
12062018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1207
1208 * target.h (target_enable_btrace, target_disable_btrace)
1209 (target_read_btrace, target_read_btrace_conf): Turn macro into
1210 inline function. Throw error if target method is not defined.
1211 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1212 check for btrace target method. Be prepared to handle exceptions
1213 from btrace target methods.
1214
81561546
SDJ
12152018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1216
1217 * server.c (captured_main): Change order of error message printed
1218 when the current working directory cannot be found.
1219
25e3c82c
SDJ
12202018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1221
1222 * server.c: Include "filenames.h" and "pathstuff.h".
1223 (program_name): Delete variable.
1224 (program_path): New anonymous class.
1225 (get_exec_wrapper): Use "program_path" instead of
1226 "program_name".
1227 (handle_v_run): Likewise.
1228 (captured_main): Likewise.
1229 (process_serial_event): Likewise.
1230
b4987c95
SDJ
12312018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1232
1233 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1234 (OBJS): Add "pathstuff.o".
1235 * server.c (current_directory): New global variable.
1236 (captured_main): Initialize "current_directory".
1237
f46cd62a
AH
12382018-02-26 Alan Hayward <alan.hayward@arm.com>
1239
1240 * tdesc.c: Use common/tdesc.h.
1241 * tdesc.h: Likewise.
1242
a543c5ca
AH
12432018-02-20 Alan Hayward <alan.hayward@arm.com>
1244 Simon Marchi <simon.marchi@ericsson.com>
1245
1246 * Makefile.in: Switch order of make rules.
1247
b5884fa7
AH
12482018-02-19 Alan Hayward <alan.hayward@arm.com>
1249
1250 * Makefile.in: Add common directory in build.
1251 * configure.ac: Add common reference.
1252 * configure: Regenerate.
1253
de6242d3
MM
12542018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1255
1256 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1257 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1258 * spu-low.c (spu_target_ops): Likewise.
1259 * win32-low.c (win32_target_ops): Likewise.
1260 * server.c (supported_btrace_packets): Report packets unconditionally.
1261 * target.h (target_ops) <supports_btrace>: Remove.
1262 (target_supports_btrace): Remove.
1263
9ee23a85
MM
12642018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1265
1266 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1267 (handle_btrace_disable): Change return type to void. Use exceptions
1268 to report errors.
1269 (handle_btrace_general_set): Catch exception and copy message to
1270 return message.
1271
8ce47547
TT
12722018-02-08 Tom Tromey <tom@tromey.com>
1273
1274 * linux-low.c (install_software_single_step_breakpoints): Use
1275 make_scoped_restore.
1276 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1277 (do_restore_current_thread_cleanup): Remove.
1278 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1279 declare.
1280
45dd3607
TT
12812018-02-08 Tom Tromey <tom@tromey.com>
1282
1283 * mem-break.c (set_raw_breakpoint_at): Use
1284 gdb::unique_xmalloc_ptr.
1285
e671cd59
PA
12862018-01-30 Pedro Alves <palves@redhat.com>
1287
1288 PR gdb/13211
1289 * target.c (target_terminal::terminal_state): Rename to ...
1290 (target_terminal::m_terminal_state): ... this.
1291
a0aad537
JC
12922018-01-19 James Clarke <jrtc27@jrtc27.com>
1293
1294 * linux-low.c (handle_extended_wait): Surround call to
1295 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1296
4d9b86e1
SM
12972018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1298
1299 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1300 linux_ptrace_attach_fail_reason_string now returning an
1301 std::string.
1302 (linux_attach): Likewise.
1303 * thread-db.c (attach_thread): Likewise.
1304
f517c180
EA
13052018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1306
1307 PR gdb/21559
1308 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1309 checking for fs_base/gs_base fields in struct user_regs_struct.
1310 * configure: Regenerate.
1311
9a70f35c
YQ
13122018-01-16 Yao Qi <yao.qi@linaro.org>
1313
1314 PR gdb/18749
1315 * linux-low.c (fetch_register): Call supply_register instead of
1316 error.
1317
605fd3c6
YQ
13182018-01-08 Yao Qi <yao.qi@linaro.org>
1319 Simon Marchi <simon.marchi@ericsson.com>
1320
1321 * Makefile.in (OBS): Remove selftest.o.
1322 * configure.ac: Set srv_selftest_objs if $development is true.
1323 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1324 * configure: Re-generated.
1325 * server.c (captured_main): Wrap variable selftest_filter with
1326 GDB_SELF_TEST.
1327
2cc05030
SM
13282018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1329
1330 * server.c (parse_debug_format_options): Return std::string.
1331 (handle_monitor_command, captured_main): Adjust.
1332
e379cee6
PA
13332018-01-05 Pedro Alves <palves@redhat.com>
1334
1335 PR gdb/18653
1336 * server.c (captured_main): Pass quiet=false to
1337 save_original_signals_state.
1338
82e1e79a
JB
13392018-01-01 Joel Brobecker <brobecker@adacore.com>
1340
1341 * gdbreplay.c (gdbreplay_version): Update copyright year in
1342 version message.
1343 * server.c (gdbserver_version): Likewise.
1344
8e481c3b
TT
13452017-12-08 Tom Tromey <tom@tromey.com>
1346
1347 * ax.c (ax_printf): Update.
1348
a8806230
YQ
13492017-12-07 Yao Qi <yao.qi@linaro.org>
1350
1351 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1352 aarch64_linux_read_description.
1353 * linux-amd64-ipa.c (idx2mask): New array.
1354 (get_ipa_tdesc): Move idx2mask out.
1355 (initialize_low_tracepoint): Initialize target descriptions.
1356 * linux-i386-ipa.c (idx2mask): New array.
1357 (get_ipa_tdesc): Move idx2mask out.
1358 (initialize_low_tracepoint): Initialize target descriptions.
1359
d4a0e8b5
SM
13602017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * tdesc.c (struct tdesc_type): Change return type.
1363 (tdesc_add_flag): Change parameter type.
1364 (tdesc_add_bitfield): Likewise.
1365 (tdesc_add_field): Likewise.
1366 (tdesc_set_struct_size): Likewise.
1367
798a7429
SM
13682017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * regcache.c (registers_to_string): Remove unused variable.
1371
c0e15c9b
SM
13722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * inferiors.c (for_each_inferior_with_data): Remove.
1375 * inferiors.h (for_each_inferior_with_data): Remove.
1376 * server.c (handle_qxfer_threads_worker): Change parameter type.
1377 (handle_qxfer_threads_proper): Use for_each_thread.
1378
f0045347
SM
13792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1380
1381 * inferiors.c (for_each_inferior): Remove.
1382 (clear_inferiors): Use for_each_thread.
1383 * inferiors.h (for_each_inferior): Remove.
1384 * linux-low.c (linux_wait_for_event_filtered): Use
1385 for_each_thread.
1386 (linux_stabilize_threads): Likewise.
1387 * regcache.c (regcache_release): Likewise.
1388 * server.c (gdb_wants_all_threads_stopped): Likewise.
1389 (clear_pending_status_callback): Remove.
1390 (handle_status): Use for_each_thread.
1391 (captured_main): Likewise.
1392 * win32-low.c (child_init_thread_list): Likewise.
1393 (win32_clear_inferiors): Likewise.
1394 (fake_breakpoint_event): Likewise.
1395
9521758b
SM
13962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * inferiors.h (find_inferior): Remove.
1399 * inferiors.c (find_inferior): Remove.
1400
8f86d7aa
SM
14012017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1402
1403 * linux-low.c (resume_status_pending_p): Update comment.
1404 (need_step_over_p): Update comment.
1405
e2b44075
SM
14062017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1407
1408 * linux-low.c (proceed_one_lwp): Return void, change parameter
1409 type.
1410 (unsuspend_and_proceed_one_lwp): Likewise.
1411 (proceed_all_lwps): Use for_each_thread.
1412 (unstop_all_lwps): Likewise.
1413
c80825ff
SM
14142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * linux-low.c (linux_resume_one_thread): Return void, take
1417 parameter directly.
1418 (linux_resume): Use for_each_thread.
1419
df3e4dbe
SM
14202017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1421
1422 * linux-low.c (send_sigstop_callback): Return void, change
1423 parameter type. Rename to...
1424 (send_sigstop): ... this.
1425 (suspend_and_send_sigstop_callback): Return void, change parameter
1426 type. Rename to...
1427 (suspend_and_send_sigstop): ... this.
1428 (stop_all_lwps): Use for_each_thread.
1429
5a6b0a41
SM
14302017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1431
1432 * linux-low.c (lwp_running): Return bool, remove unused
1433 argument.
1434 (linux_stabilize_threads): Use find_thread.
1435
39a64da5
SM
14362017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1437
1438 * linux-low.c (select_singlestep_lwp_callback): Remove.
1439 (count_events_callback): Remove.
1440 (select_event_lwp_callback): Remove.
1441 (select_event_lwp): Use find_thread/for_each_thread.
1442
a1385b7b
SM
14432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1444
1445 * linux-low.c (not_stopped_callback): Return bool, take filter
1446 argument directly.
1447 (linux_wait_for_event_filtered): Use find_thread.
1448 (linux_wait_1): Likewise.
1449
454296a2
SM
14502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1451
1452 * linux-low.c (same_lwp): Remove.
1453 (find_lwp_pid): Use find_thread.
1454
6b2a85da
SM
14552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1456
1457 * linux-low.c (delete_lwp_callback): Remove.
1458 (linux_mourn): Use for_each_thread.
1459
798a38e8
SM
14602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1461
1462 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1463 args parameter, don't check for pid.
1464 (linux_detach): Use for_each_thread.
1465
e4eb0dec
SM
14662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * linux-low.c (struct counter): Remove.
1469 (second_thread_of_pid_p): Remove.
1470 (last_thread_of_process_p): Use find_thread.
1471
83e1b6c1
SM
14722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * inferiors.c (find_inferior_in_random): Remove.
1475 * inferiors.h (find_inferior_in_random): Remove.
1476 * linux-low.c (status_pending_p_callback): Return bool, accept
1477 parameter ptid directly.
1478 (linux_wait_for_event_filtered): Use find_thread_in_random.
1479 (linux_wait_1): Likewise.
1480
8dc7b443
SM
14812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1482
1483 * inferiors.c (find_inferior_id): Remove.
1484 (find_thread_ptid): Move implemention from find_inferior_id to
1485 here.
1486 * inferiors.h (find_inferior_id): Remove.
1487 * server.c (handle_status): Use find_thread_ptid.
1488 (process_serial_event): Likewise.
1489 * thread-db.c (find_one_thread): Likewise.
1490 (thread_db_thread_handle): Likewise.
1491 * win32-low.c (thread_rec): Likewise.
1492 (child_delete_thread): Likewise.
1493 (win32_thread_alive): Likewise.
1494 (get_child_debug_event): Likewise.
1495
da25033c
SM
14962017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1497
1498 * linux-mips-low.c (update_watch_registers_callback): Return
1499 void, remove pid_p parameter, don't check for pid.
1500 (mips_insert_point, mips_remove_point): Use for_each_thread.
1501
c91bb56b
SM
15022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * lynx.low (lynx_delete_thread_callback): Remove.
1505 (lynx_mourn): Use for_each_thread.
1506
634a3254
SM
15072017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1508
1509 * regcache.c (regcache_invalidate_one): Remove.
1510 (regcache_invalidate_pid): use for_each_thread.
1511
41272101
TT
15122017-11-26 Tom Tromey <tom@tromey.com>
1513
1514 * linux-low.c (linux_create_inferior): Update.
1515
f5291a6f
UW
15162017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1517
1518 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1519
6654d750
AH
15202017-11-24 Alan Hayward <alan.hayward@arm.com>
1521
1522 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1523 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1524 * linux-aarch64-tdesc-selftest.c: New file.
1525 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1526
15272017-11-24 Alan Hayward <alan.hayward@arm.com>
1528
1529 * configure.srv: Add new file.
1530 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1531 * linux-aarch64-tdesc-selftest.c: New file.
1532 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1533
49bdb7ee
AH
15342017-11-24 Alan Hayward <alan.hayward@arm.com>
1535
1536 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1537 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1538 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1539
d6d7ce56
AH
15402017-11-24 Alan Hayward <alan.hayward@arm.com>
1541
1542 * configure.srv: Add new files.
1543 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1544 aarch64_linux_read_description.
1545 * linux-aarch64-low.c (aarch64_linux_read_description):
1546 Merge with aarch64_arch_setup.
1547 (aarch64_arch_setup): Call aarch64_linux_read_description.
1548 * linux-aarch64-tdesc.c: New file.
1549 * linux-aarch64-tdesc.h: New file.
1550
506fe5f4
YQ
15512017-11-24 Yao Qi <yao.qi@linaro.org>
1552
1553 * configure.srv: Set $srv_regobj for tic6x-linux.
1554 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1555 (tic6x_read_description): Move some code to tic6x_arch_setup.
1556 (tic6x_tdesc_test): New function.
1557 (initialize_low_arch): Call selftests::register_test.
1558
29f9a567
YQ
15592017-11-22 Yao Qi <yao.qi@linaro.org>
1560
1561 * remote-utils.c (prepare_resume_reply): Use memcpy.
1562
578290ec
SM
15632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1564
1565 * linux-low.c (kill_one_lwp_callback): Return void, take
1566 argument directly, don't filter on pid.
1567 (linux_kill): Use for_each_thread.
1568
eca55aec
SM
15692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1570
1571 * linux-low.c (need_step_over_p): Return bool, remove dummy
1572 argument.
1573 (linux_resume, proceed_all_lwps): Use find_thread.
1574
25c28b4d
SM
15752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1576
1577 * linux-low.c (resume_status_pending_p): Return bool, remove
1578 flag_p argument.
1579 (linux_resume): Use find_thread.
1580
5fdda392
SM
15812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1582
1583 * linux-low.c (struct thread_resume_array): Remove.
1584 (linux_set_resume_request): Return void, take arguments
1585 directly.
1586 (linux_resume): Use for_each_thread.
1587
fcb056a5
SM
15882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1591 return bool, remove data argument.
1592 (linux_stabilize_threads): Use find_thread.
1593
139720c5
SM
15942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * linux-low.c (unsuspend_one_lwp): Remove.
1597 (unsuspend_all_lwps): Use for_each_thread, inline code from
1598 unsuspend_one_lwp.
1599
6d1e5673
SM
16002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1601
1602 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1603 * linux-low.c (struct iterate_over_lwps_args): Remove.
1604 (iterate_over_lwps_filter): Remove.
1605 (iterate_over_lwps): Use find_thread.
1606
bbf550d5
SM
16072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1610 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1611 code from reset_lwp_ptrace_options_callback.
1612
00192f77
SM
16132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1614
1615 * linux-arm-low.c (struct update_registers_data): Remove.
1616 (update_registers_callback): Return void, take arguments
1617 directly, don't check thread's pid.
1618 (arm_insert_point, arm_remove_point): Use for_each_thread.
1619
2bee2b6c
SM
16202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * win32-low.c (continue_one_thread): Return void, take argument
1623 directly.
1624 (child_continue): Use for_each_thread.
1625
0b360f19
SM
16262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1627
1628 * win32-i386-low.c (update_debug_registers_callback): Rename
1629 to ...
1630 (update_debug_registers): ... this, return void, remove pid_p arg.
1631 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1632
f27866ba
SM
16332017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1634
1635 * inferiors.h (struct process_info): Add constructor, initialize
1636 fields..
1637 <syscalls_to_catch>: Change type to std::vector<int>.
1638 * inferiors.c (add_process): Allocate process_info with new.
1639 (remove_process): Free process_info with delete.
1640 * linux-low.c (handle_extended_wait): Adjust.
1641 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1642 * server.c (handle_general_set): Adjust.
1643
e849ea89
PA
16442017-11-16 Pedro Alves <palves@redhat.com>
1645
1646 * remote-utils.c (remote_close): Block SIGIO signals instead of
1647 uninstalling the SIGIO handler.
1648
1d0aa65c
AH
16492017-11-16 Alan Hayward <alan.hayward@arm.com>
1650
1651 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1652
3491a34c
YQ
16532017-11-16 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1656 (tic6x_store_gregset): Likewise.
1657 (tic6x_usrregs_info): Move it up.
1658
a602f924
AH
16592017-11-15 Alan Hayward <alan.hayward@arm.com>
1660
1661 * Makefile.in: Update arch rules.
1662 * configure.srv: Explicitly mark arch/ files.
1663
5616b6c3
AS
16642017-11-13 Andreas Schwab <schwab@suse.de>
1665
1666 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1667 function.
1668 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1669
d1928160
PA
16702017-11-06 Pedro Alves <palves@redhat.com>
1671
1672 * config.in, configure: Regenerate.
1673
bac608e7
SM
16742017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * target.c (struct thread_search): Remove.
1677 (thread_search_callback): Remove.
1678 (prepare_to_access_memory): Use for_each_thread instead of
1679 find_inferior. Inline code from thread_search_callback.
1680
eaddb425
SM
16812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1682
1683 * server.c (struct visit_actioned_threads_data): Remove.
1684 (visit_actioned_threads): Change prototype to take arguments
1685 directly.
1686 (resume): Use find_thread instead of find_inferior.
1687
99078d34
SM
16882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * server.c (queue_stop_reply_callback): Change prototype, return
1691 void.
1692 (find_status_pending_thread_callback): Remove.
1693 (handle_status): Replace find_inferior with find_thread and
1694 for_each_thread.
1695
cc628f3d
AH
16962017-10-25 Alan Hayward <alan.hayward@arm.com>
1697
1698 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1699 with REGNO.
1700 (aarch64_store_gregset): Likewise.
1701 (aarch64_fill_fpregset): Likewise.
1702 (aarch64_store_fpregset): Likewise.
1703
4d3bb80e
SM
17042017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1705
1706 * gdbthread.h (find_thread, for_each_thread): New functions.
1707 * inferiors.c (thread_of_pid): Remove.
1708 (find_any_thread_of_pid): Use find_thread.
1709 * linux-low.c (num_lwps): Use for_each_thread.
1710
7a7cdfa0
YQ
17112017-10-17 Yao Qi <yao.qi@linaro.org>
1712
1713 * Makefile.in: Remove one rule.
1714 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1715
e675d170
YQ
17162017-10-17 Yao Qi <yao.qi@linaro.org>
1717
1718 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1719 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1720
7eb4e0f9
YQ
17212017-10-17 Yao Qi <yao.qi@linaro.org>
1722
1723 * configure.srv: Rename arm.o with arch/arm.o.
1724
60d6cfc9
YQ
17252017-10-17 Yao Qi <yao.qi@linaro.org>
1726
1727 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1728 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1729 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1730 (arch-i386.o, arch-amd64.o): Remove rules.
1731 (arch/%.o): New rule.
1732 Update POSTCOMPILE and COMPILE.pre.
1733 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1734 * configure: Re-generated.
1735 * configure.srv: Replace arch-i386.o with arch/i386.o.
1736 Replace arch-amd64.o with arch/amd64.o.
1737
5bfda255
YQ
17382017-10-16 Yao Qi <yao.qi@linaro.org>
1739
1740 * configure: Regenerated.
1741
9c80ecd6
SM
17422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1743
1744 * inferiors.h: (struct inferior_list): Remove.
1745 (struct inferior_list_entry); Remove.
1746 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1747 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1748 get_first_inferior): Remove.
1749 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1750 find_inferior_id, find_inferior_in_random): Change signature.
1751 * inferiors.c (all_threads): Change type to
1752 std::list<thread_info *>.
1753 (get_thread): Remove macro.
1754 (find_inferior, find_inferior_id): Change signature, implement
1755 using find_thread.
1756 (find_inferior_in_random): Change signature, implement using
1757 find_thread_in_random.
1758 (for_each_inferior, for_each_inferior_with_data): Change
1759 signature, implement using for_each_thread.
1760 (add_inferior_to_list, remove_inferior): Remove.
1761 (add_thread, get_first_thread, thread_of_pid,
1762 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1763 (get_first_inferior, one_inferior_p, clear_inferior_list):
1764 Remove.
1765 (clear_inferiors, get_thread_process): Update.
1766 * gdbthread.h: Include <list>.
1767 (struct thread_info) <entry>: Remove field.
1768 <id>: New field.
1769 (all_threads): Change type to std::list<thread_info *>.
1770 (get_first_inferior): Add doc.
1771 (find_thread, for_each_thread, find_thread_in_random): New
1772 functions.
1773 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1774 * linux-arm-low.c (update_registers_callback): Update.
1775 * linux-low.c (second_thread_of_pid_p): Update.
1776 (kill_one_lwp_callback, linux_detach_lwp_callback,
1777 delete_lwp_callback, status_pending_p_callback, same_lwp,
1778 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1779 iterate_over_lwps, not_stopped_callback,
1780 resume_stopped_resumed_lwps, count_events_callback,
1781 select_singlestep_lwp_callback, select_event_lwp_callback,
1782 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1783 suspend_and_send_sigstop_callback, wait_for_sigstop,
1784 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1785 lwp_running, linux_set_resume_request, resume_status_pending_p,
1786 need_step_over_p, start_step_over, linux_resume_one_thread,
1787 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1788 reset_lwp_ptrace_options_callback): Update.
1789 * linux-mips-low.c (update_watch_registers_callback): Update.
1790 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1791 Update.
1792 (free_register_cache_thread_one): Remove.
1793 (regcache_release): Update.
1794 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1795 handle_qxfer_threads_worker): Update.
1796 (handle_query): Update, use list iterator.
1797 (visit_actioned_threads, handle_pending_status,
1798 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1799 clear_pending_status_callback, set_pending_status_callback,
1800 find_status_pending_thread_callback, handle_status,
1801 process_serial_event): Update.
1802 * target.c (thread_search_callback): Update.
1803 * thread-db.c (thread_db_get_tls_address): Update.
1804 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1805 Update.
1806 * win32-i386-low.c (update_debug_registers_callback): Update.
1807 * win32-low.c (delete_thread_info, child_delete_thread,
1808 continue_one_thread, suspend_one_thread,
1809 get_child_debug_event): Adjust.
1810
9179355e
SM
18112017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1812
1813 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1814 * inferiors.h: Include <list>.
1815 (struct process_info) <entry>: Remove field.
1816 <pid>: New field.
1817 (pid_of): Change macro to function.
1818 (ptid_of, lwpid_of): Remove macro.
1819 (all_processes): Change type to std::list<process_info *>.
1820 (ALL_PROCESSES): Remove macro.
1821 (for_each_process, find_process): New function.
1822 * inferiors.c (all_processes): Change type to
1823 std::list<process_info *>.
1824 (find_thread_process): Adjust.
1825 (add_process): Likewise.
1826 (remove_process): Likewise.
1827 (find_process_pid): Likewise.
1828 (get_first_process): Likewise.
1829 (started_inferior_callback): Remove.
1830 (have_started_inferiors_p): Adjust.
1831 (attached_inferior_callback): Remove.
1832 (have_attached_inferiors_p): Adjust.
1833 * linux-low.c (check_zombie_leaders): Likewise.
1834 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1835 (x86_linux_update_xmltarget): Adjust.
1836 * server.c (handle_query): Likewise.
1837 (gdb_reattached_process): Remove.
1838 (handle_status): Adjust.
1839 (kill_inferior_callback): Likewise.
1840 (detach_or_kill_inferior): Remove.
1841 (print_started_pid): Likewise.
1842 (print_attached_pid): Likewise.
1843 (detach_or_kill_for_exit): Update.
1844 (process_serial_event): Likewise.
1845 * linux-arm-low.c (arm_new_fork): Likewise.
1846
c9cb8905
SM
18472017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1848
1849 * dll.h: Include <list>.
1850 (struct dll_info): Add constructor.
1851 <entry>: Remove field.
1852 (all_dlls): Change type to std::list<dll_info>.
1853 * dll.c: Include <algorithm>.
1854 (get_dll): Remove macro.
1855 (all_dlls): Change type to std::list<dll_info *>.
1856 (free_one_dll): Remove.
1857 (match_dll): Likewise.
1858 (loaded_dll): Adjust.
1859 (unloaded_dll): Adjust to all_dlls type change, use
1860 std::find_if. Inline code from match_dll.
1861 (clear_dlls): Adjust to all_dlls type change.
1862 * server.c (emit_dll_description): Remove.
1863 (handle_qxfer_libraries): Adjust to all_dlls type change,
1864 integrate emit_dll_description's functionality.
1865
04ec7890
SM
18662017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1867
1868 * linux-low.h (struct linux_target_ops) <delete_process>: New
1869 field.
1870 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1871 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1872 (struct linux_target_ops): Add delete_process callback.
1873 * linux-arm-low.c (arm_delete_process): New.
1874 (struct linux_target_ops): Add delete_process callback.
1875 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1876 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1877 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1878 * linux-mips-low.c (mips_linux_delete_process): New.
1879 (struct linux_target_ops): Add delete_process callback.
1880 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1881 * linux-s390-low.c (struct linux_target_ops): Likewise.
1882 * linux-sh-low.c (struct linux_target_ops): Likewise.
1883 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1884 * linux-tile-low.c (struct linux_target_ops): Likewise.
1885 * linux-x86-low.c (x86_linux_delete_process): New.
1886 (struct linux_target_ops): Add delete_process callback.
1887 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1888
466eecee
SM
18892017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1890
1891 * linux-aarch64-low.c (the_low_target): Add thread delete
1892 callback.
1893 * linux-arm-low.c (arm_delete_thread): New function.
1894 (the_low_target): Add thread delete callback.
1895 * linux-bfin-low.c (the_low_target): Likewise.
1896 * linux-crisv32-low.c (the_low_target): Likewise.
1897 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1898 set.
1899 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1900 field.
1901 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1902 * linux-mips-low.c (mips_linux_delete_thread): New function.
1903 (the_low_target): Add thread delete callback.
1904 * linux-ppc-low.c (the_low_target): Likewise.
1905 * linux-s390-low.c (the_low_target): Likewise.
1906 * linux-sh-low.c (the_low_target): Likewise.
1907 * linux-tic6x-low.c (the_low_target): Likewise.
1908 * linux-tile-low.c (the_low_target): Likewise.
1909 * linux-x86-low.c (the_low_target): Likewise.
1910 * linux-xtensa-low.c (the_low_target): Likewise.
1911
b79f7801
YZ
19122017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1913
1914 * win32-low.c: Include "common-inferior.h".
1915
bc3b087d
SDJ
19162017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * inferiors.c (set_inferior_cwd): New function.
1919 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1920 (handle_query): Inform that QSetWorkingDir is supported.
1921 * win32-low.c (create_process): Pass the inferior's cwd to
1922 CreateProcess.
1923
d092c5a2
SDJ
19242017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1925
1926 * inferiors.c (current_inferior_cwd): New global variable.
1927 (get_inferior_cwd): New function.
1928 * inferiors.h (struct process_info) <cwd>: New field.
1929
7da0a886
SDJ
19302017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1931
1932 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1933 (OBS): Add gdb_tilde_expand.o.
1934
289a6840
SM
19352017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1936
1937 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1938 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1939
256642e8
PA
19402017-09-29 Pedro Alves <palves@redhat.com>
1941
1942 * ax.c (gdb_parse_agent_expr): Constify.
1943 * ax.h (gdb_parse_agent_expr): Constify.
1944 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1945 Constify.
1946 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1947 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1948 * remote-utils.h (read_ptid): Constify.
1949 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1950 (process_point_options, process_serial_event): Constify.
1951 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1952 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1953 (cmd_qtbuffer): Constify.
1954
5b9ca4d4
PA
19552017-09-29 Pedro Alves <palves@redhat.com>
1956
1957 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1958 fails.
1959
94c207e0
PA
19602017-09-29 Pedro Alves <palves@redhat.com>
1961
1962 * linux-low.c (handle_extended_wait): Pass parent thread instead
1963 of process to thread_db_notice_clone.
1964 * linux-low.h (thread_db_notice_clone): Replace parent process
1965 parameter with parent thread parameter.
1966 * thread-db.c (find_one_thread): Add comment.
1967 (thread_db_notice_clone): Replace parent process parameter with
1968 parent thread parameter. Temporarily switch to the parent thread.
1969
75352e28
SDJ
19702017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1971
1972 * gdbthread.h: Include "common-gdbthread.h".
1973 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1974 "if" when validating the ptid.
1975 * remote-utils.c: Include "gdbthread.h".
1976 (prepare_resume_reply): Use "switch_to_thread".
1977 * target.c (done_accessing_memory): Likewise.
1978
ad339634
AA
19792017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1980
1981 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1982 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1983 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1984 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1985 s390x-gs-linux64-ipa.o to ipa_obj.
1986 * linux-s390-low.c (HWCAP_S390_GS): New define.
1987 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1988 New functions.
1989 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1990 (s390_arch_setup): Check for guarded-storage support and choose
1991 appropriate tdesc.
1992 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1993 init_registers_s390x_gs_linux64.
1994 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1995 enum value.
1996 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1997 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1998
cc4d742f
SM
19992017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2000
2001 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2002
f6327dcb
KB
20032017-09-21 Kevin Buettner <kevinb@redhat.com>
2004
2005 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2006 (thread_db_thread_handle): Declare.
2007 * linux-low.c (linux_target_ops): Initialize thread_handle.
2008 * server.c (handle_qxfer_threads_worker): Add support for
2009 "handle" attribute.
2010 * target.h (struct target_ops): Add new function pointer,
2011 thread_handle.
2012 (target_thread_handle): Define.
2013 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2014 field in lwp.
2015 (thread_db_thread_handle): New function.
2016
86299109
KB
20172017-09-21 Kevin Buettner <kevinb@redhat.com>
2018
2019 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2020 * linux-low.h (thread_db_notice_clone): Declare.
2021 * thread-db.c (thread_db_notice_clone): New function.
2022
f557a88a
PA
20232017-09-21 Pedro Alves <palves@redhat.com>
2024
2025 * server.c (gdb_read_memory, handle_status, process_serial_event)
2026 (handle_serial_event, handle_target_event): Adjust to
2027 set_desired_thread prototype change.
2028 * target.c (set_desired_thread): Remove 'use_general' parameter
2029 and adjust.
2030 * target.h (set_desired_thread): Remove 'use_general' parameter.
2031
223ffa71
TT
20322017-09-20 Tom Tromey <tom@tromey.com>
2033
2034 * target.c (target_terminal::terminal_state): Define.
2035 (target_terminal::init): Rename from target_terminal_init.
2036 (target_terminal::inferior): Rename from
2037 target_terminal_inferior.
2038 (target_terminal::ours): Rename from target_terminal_ours.
2039 (target_terminal::ours_for_output, target_terminal::info): New.
2040
04fd3ba9
SM
20412017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2042
2043 * server.c (accumulate_file_name_length): Remove.
2044 (emit_dll_description): Adjust to std::string change.
2045 (handle_qxfer_libraries): Use std::string to hold document.
2046
5e187554
SM
20472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2048
2049 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2050 return type of xml_escape_text.
2051 * server.c (emit_dll_description): Likewise.
2052
1526853e
SM
20532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2054
2055 * server.c (captured_main): Accept argument for --selftest.
2056 Update run_tests call.
2057 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2058 when registering selftests.
2059
c4dfafab
SDJ
20602017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2061
2062 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2063 instead of "VEC" for "target_desc.reg_defs".
2064 (regcache_cpy): Likewise.
2065 (registers_to_string): Likewise.
2066 (registers_from_string): Likewise.
2067 (find_regno): Likewise.
2068 (supply_regblock): Likewise.
2069 (regcache_raw_read_unsigned): Likewise.
2070 * tdesc.c (init_target_desc): Likewise.
2071 (tdesc_create_reg): Likewise.
2072 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2073 (struct target_desc) <reg_defs>: Convert to "std::vector".
2074 (target_desc): Do not initialize "reg_defs".
2075 (~target_desc): Update code to use "std::vector" instead of "VEC"
2076 for "target_desc.reg_defs".
2077 (operator==): Likewise.
2078
124aceb4
SM
20792017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2080
2081 * inferiors.h (thread_to_gdb_id): Remove.
2082 * inferiors.c (thread_to_gdb_id): Remove.
2083 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2084 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2085 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2086 Likewise.
2087 * nto-low.c (nto_fetch_registers, nto_store_registers,
2088 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2089
96cde54f
SM
20902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2091
2092 * inferiors.h (gdb_id_to_thread_id): Remove.
2093 * inferiors.c (gdb_id_to_thread_id): Remove.
2094 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2095 removal. Move pid declaration closer to where it's used.
2096
e8ca139e
SM
20972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * server.c (handle_detach): New function.
2100 (process_serial_event): Move code out, call handle_detach.
2101
f8a4e119
SM
21022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2103
2104 * server.c (require_running): Rename to ...
2105 (require_running_or_return): ... this ...
2106 (require_running_or_break): ... and this.
2107 (handle_query, process_serial_event): Adjust.
2108
0eb0a407
SM
21092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2110
2111 * linux-low.c (linux_set_resume_request): Remove unused
2112 variables.
2113
785922a5
SM
21142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2115
2116 * server.c (first_thread_of): Remove.
2117 (process_serial_event): Replace usage of first_thread_of with
2118 find_any_thread_of_pid.
2119 * tracepoint.c (same_process_p): Remove.
2120 (gdb_agent_about_to_close): Replace usage of same_process_p with
2121 find_any_thread_of_pid.
2122 * linux-x86-low.c (same_process_callback): Remove.
2123 (x86_arch_setup_process_callback): Replace usage of
2124 same_process_callback with find_any_thread_of_pid.
2125 * thread-db.c (any_thread_of): Remove.
2126 (switch_to_process): Replace usage of any_thread_of with
2127 find_any_thread_of_pid.
2128 * inferiors.c (thread_pid_matches_callback): Remove.
2129 (find_thread_process): Adjust to use find_any_thread_of_pid.
2130
a059f00c
SDJ
21312017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2132
2133 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2134 with "!VEC_empty".
a059f00c 2135
cc397f3a
SDJ
21362017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2137
2138 * linux-low.c (handle_extended_wait): Use
2139 "allocate_target_description" instead of "XNEW".
2140 * linux-x86-low.c (initialize_low_arch): Likewise.
2141
22916b07
YQ
21422017-09-05 Yao Qi <yao.qi@linaro.org>
2143
2144 * configure.srv (srv_i386_regobj): Remove.
2145 (srv_amd64_regobj): Remove.
2146 (srv_regobj): Set it to "" for x86 non-linux targets.
2147 * linux-x86-tdesc.c (i386_linux_read_description):
2148 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2149 (init_registers_i386): Remove the declaration.
2150 (tdesc_i386): Remove the declaration.
2151 (lynx_i386_arch_setup): Call i386_create_target_description.
2152 * nto-x86-low.c: Likewise.
2153 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2154 [!__x86_64__]: include arch/i386.h.
2155 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2156
38602d55
YQ
21572017-09-05 Yao Qi <yao.qi@linaro.org>
2158
2159 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2160 i386/amd64-XXX-linux from it.
2161
44b886ff
YQ
21622017-09-05 Yao Qi <yao.qi@linaro.org>
2163
2164 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2165 false.
2166 (ipa_amd64_linux_regobj): Remove.
2167 (ipa_x32_linux_regobj): Remove.
2168
b4570e4b
YQ
21692017-09-05 Yao Qi <yao.qi@linaro.org>
2170
2171 * Makefile.in (arch-amd64.o): New rule.
2172 * configure.srv: Append arch-amd64.o.
2173 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2174 (get_ipa_tdesc): Call amd64_linux_read_description.
2175 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2176 and init_registers_amd64_XXX.
2177 * linux-x86-low.c (x86_linux_read_description): Call
2178 amd64_linux_read_description.
2179 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2180 (initialize_low_arch): Don't call init_registers_x32_XXX and
2181 init_registers_amd64_XXX.
2182 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2183 and tdesc_amd64_XXX.
2184 [__x86_64__] (amd64_tdesc_test): New function.
2185 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2186 and init_registers_amd64_XXX.
2187 * linux-x86-tdesc.c: Include arch/amd64.h.
2188 (xcr0_to_tdesc_idx): New function.
2189 (i386_linux_read_description): New function.
2190 (amd64_get_ipa_tdesc_idx): New function.
2191 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2192 (amd64_get_ipa_tdesc): Declare.
2193
d1f28ea2
YQ
21942017-09-05 Yao Qi <yao.qi@linaro.org>
2195
2196 * configure.srv (srv_i386_linux_xmlfiles): Remove
2197 i386/i386-XXX-linux.xml from it.
2198
25a93583
YQ
21992017-09-05 Yao Qi <yao.qi@linaro.org>
2200
2201 * configure.srv: Set srv_i386_linux_regobj empty if $development
2202 is false.
2203 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2204 initialize_low_tdesc.
2205 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2206 with #if initialize_low_tdesc.
2207 * linux-x86-tdesc-selftest.c: New file.
2208 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2209
5f035c07
YQ
22102017-09-05 Yao Qi <yao.qi@linaro.org>
2211
2212 * Makefile.in (arch-i386.o): New rule.
2213 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2214 (x86_64-*-linux*): Likewise.
2215 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2216 include arch/i386.h.
2217 (i386_linux_read_description): Remove code and call
2218 i386_create_target_description.
2219 * tdesc.c (allocate_target_description): New function.
2220 * tdesc.h (set_tdesc_architecture): Remove declaration.
2221 (set_tdesc_osabi): Likewise.
2222
0abe8a89
YQ
22232017-09-05 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2226 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2227 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2228 .xmltarget.
2229 * server.c (get_features_xml): Call tdesc_get_features_xml.
2230 * tdesc.c (set_tdesc_architecture): New function.
2231 (set_tdesc_osabi): New function.
2232 (tdesc_get_features_xml): New function.
2233 (tdesc_create_feature): Add an argument.
2234 * tdesc.h (struct target_desc) <features>: New field.
2235 <arch, osabi>: New field.
2236 (~target_desc): xfree features, arch, and osabi.
2237 (target_desc::oerator==): Don't compare .xmltarget.
2238 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2239 (set_tdesc_osabi): Likewise.
2240 (tdesc_get_features_xml): Likewise.
2241
0a188386
YQ
22422017-09-05 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-x86-tdesc.c: Include selftest.h.
2245 (i386_tdesc_test): New function.
2246 (initialize_low_tdesc): Call selftests::register_test.
2247 * tdesc.h: Include regdef.h.
2248 (target_desc): Override operator == and !=.
2249
f49ff000
YQ
22502017-09-05 Yao Qi <yao.qi@linaro.org>
2251
2252 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2253 (ipa_obj): Likewise.
2254 * linux-i386-ipa.c: Include common/x86-xstate.h
2255 (get_ipa_tdesc): Call i386_linux_read_description.
2256 (initialize_low_tracepoint): Don't call init_registers_XXX
2257 functions, call initialize_low_tdesc instead.
2258 * linux-x86-low.c (x86_linux_read_description): Call
2259 i386_linux_read_description.
2260 (initialize_low_arch): Don't call init_registers_i386_XXX
2261 functions, call initialize_low_tdesc.
2262 * linux-x86-tdesc.c: New file.
2263 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2264 (i386_get_ipa_tdesc_idx): Declare.
2265 (i386_get_ipa_tdesc): Declare.
2266 (initialize_low_tdesc): Declare.
2267
2b68ef2f
YQ
22682017-09-05 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2271 instead of 0.
2272
f7000548
YQ
22732017-09-05 Yao Qi <yao.qi@linaro.org>
2274
2275 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2276 * regcache.c (get_thread_regcache): Use VEC_length.
2277 (init_register_cache): Likewise.
2278 (regcache_cpy): Likewise.
2279 (registers_to_string): Iterate reg_defs via VEC_iterate.
2280 (find_regno): Likewise.
2281 (find_register_by_number): Use VEC_index.
2282 (register_size): Call find_register_by_number.
2283 (register_data): Call find_register_by_number.
2284 (supply_regblock): Use VEC_length.
2285 (regcache_raw_read_unsigned): Likewise.
2286 * tdesc.c (init_target_desc): Iterate reg_defs via
2287 VEC_iterate.
2288 (default_description): Update initializer.
2289 (copy_target_description): Don't update field num_registers.
2290 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2291 <num_registers>: Remove.
2292
50a421ac
SM
22932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2294
2295 * Makefile.in (.SECONDARY): Define target.
2296
23fdd69e
SM
22972017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * linux-low.c (linux_wait_1): Adjust.
2300 * server.c (queue_stop_reply_callback): Adjust.
2301
0a2dde4a
SDJ
23022017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2303
2304 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2305 QEnvironmentUnset and QEnvironmentReset packets.
2306 (handle_query): Inform remote that QEnvironmentHexEncoded,
2307 QEnvironmentUnset and QEnvironmentReset are supported.
2308
6afd337d
SM
23092017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2310
2311 * inferiors.h (inferior_target_data): Rename to ...
2312 (thread_target_data): ... this.
2313 (inferior_regcache_data): Rename to ...
2314 (thread_regcache_data): ... this.
2315 (set_inferior_regcache_data): Rename to ...
2316 (set_thread_regcache_data): ... this.
2317 * inferiors.c (inferior_target_data): Rename to ...
2318 (thread_target_data): ... this.
2319 (inferior_regcache_data): Rename to ...
2320 (thread_regcache_data): ... this.
2321 (set_inferior_regcache_data): Rename to ...
2322 (set_thread_regcache_data): ... this.
2323 (free_one_thread): Update.
2324 * linux-low.h (get_thread_lwp): Update.
2325 * regcache.c (get_thread_regcache): Update.
2326 (regcache_invalidate_thread): Update.
2327 (free_register_cache_thread): Update.
2328 * win32-i386-low.c (update_debug_registers_callback): Update.
2329 (win32_get_current_dr): Update.
2330 * win32-low.c (thread_rec): Update.
2331 (delete_thread_info): Update.
2332 (continue_one_thread): Update.
2333 (suspend_one_thread): Update.
2334
a160cc46
SM
23352017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * inferiors.c (set_inferior_target_data): Remove.
2338 * inferiors.h (set_inferior_target_data): Remove.
2339
6d580b63
YQ
23402017-08-18 Yao Qi <yao.qi@linaro.org>
2341
2342 * Makefile.in (OBS): Add selftest.o.
2343 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2344 * configure, config.in: Re-generated.
2345 * server.c: Include common/sefltest.h.
2346 (captured_main): Handle option --selftest.
2347
f5a29eb0
YQ
23482017-08-09 Yao Qi <yao.qi@linaro.org>
2349
2350 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2351 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2352 i386-avx-mpx.o and i386-mmx.o.
2353 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2354 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2355 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2356 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2357 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2358 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2359 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2360 i386/amd64-avx-mpx.xml.
2361
57757c2f
YQ
23622017-08-09 Yao Qi <yao.qi@linaro.org>
2363
2364 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2365 and x32-avx-avx512.o.
2366 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2367 i386/x32-avx-avx512.xml.
2368
229d26fc
SM
23692017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2370
2371 * tracepoint.h (enum class fast_tpoint_collect_result): New
2372 enumeration.
2373 (fast_tracepoint_collecting): Change return type to
2374 fast_tpoint_collect_result.
2375 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2376 * linux-low.h: Include tracepoint.h.
2377 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2378 fast_tpoint_collect_result.
2379 * linux-low.c (handle_tracepoints): Adjust.
2380 (linux_fast_tracepoint_collecting): Change return type to
2381 fast_tpoint_collect_result.
2382 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2383 linux_wait_1, stuck_in_jump_pad_callback,
2384 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2385 proceed_one_lwp): Adjust to type change.
2386
2e1e43e1
YQ
23872017-07-10 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2390
adc764e7
YQ
23912017-06-29 Yao Qi <yao.qi@linaro.org>
2392
2393 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2394 Remove.
2395 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2396
a206891a
SM
23972017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2398
2399 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2400
9a6c7d9c
SDJ
24012017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2402
2403 * linux-low.c (linux_create_inferior): Adjust code to access the
2404 environment information via 'gdb_environ' class.
2405 * lynx-low.c (lynx_create_inferior): Likewise.
2406 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2407 (get_environ): Return a pointer to 'our_environ'.
2408 (captured_main): Initialize 'our_environ'.
2409 * server.h (get_environ): Adjust prototype.
2410 * spu-low.c (spu_create_inferior): Adjust code to access the
2411 environment information via 'gdb_environ' class.
2412
ae3e2ccf
SM
24132017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2414
2415 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2416 usage of "register" keyword.
2417
3e019bdc
SM
24182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2419
2420 * configure: Re-generate.
2421
8465943a
SM
24222017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2423
2424 * configure: Re-generate.
2425
cf0dd6f0
SM
24262017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2427
2428 * Makefile.in (COMPILE.pre): Add "-x c++".
2429
9845682b
SDJ
24302017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2431
2432 * fork-child.c: Conditionally include <signal.h>.
2433
aefd8b33
SDJ
24342017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2435
2436 * server.c (handle_general_set): Handle new packet
2437 "QStartupWithShell".
2438 (handle_query): Add "QStartupWithShell" to the list of supported
2439 packets.
2440 (gdbserver_usage): Add help text explaining the
2441 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2442 options.
2443 (captured_main): Recognize and act upon the presence of the new
2444 CLI options.
2445
2090129c
SDJ
24462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2447 Pedro Alves <palves@redhat.com>
2448
2449 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2450 * configure: Regenerate.
2451 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2452 "fork-inferior.o".
2453 (i[34567]86-*-lynxos*): Likewise.
2454 (spu*-*-*): Likewise.
2455 * fork-child.c: New file.
2456 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2457 and "environ.h".
2458 (linux_ptrace_fun): New function.
2459 (linux_create_inferior): Adjust function prototype to reflect
2460 change on "target.h". Adjust function code to use
2461 "fork_inferior".
2462 (linux_request_interrupt): Delete "signal_pid".
2463 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2464 (lynx_ptrace_fun): New function.
2465 (lynx_create_inferior): Adjust function prototype to reflect
2466 change on "target.h". Adjust function code to use
2467 "fork_inferior".
2468 * nto-low.c (nto_create_inferior): Adjust function prototype and
2469 code to reflect change on "target.h". Update comments.
2470 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2471 "common-terminal.h" and "environ.h".
2472 (terminal_fd): Moved to fork-child.c.
2473 (old_foreground_pgrp): Likewise.
2474 (restore_old_foreground_pgrp): Likewise.
2475 (last_status): Make it global.
2476 (last_ptid): Likewise.
2477 (our_environ): New variable.
2478 (startup_with_shell): Likewise.
2479 (program_name): Likewise.
2480 (program_argv): Rename to...
2481 (program_args): ...this.
2482 (wrapper_argv): New variable.
2483 (start_inferior): Delete function.
2484 (get_exec_wrapper): New function.
2485 (get_exec_file): Likewise.
2486 (get_environ): Likewise.
2487 (prefork_hook): Likewise.
2488 (post_fork_inferior): Likewise.
2489 (postfork_hook): Likewise.
2490 (postfork_child_hook): Likewise.
2491 (handle_v_run): Update code to deal with arguments coming from the
2492 remote host. Update calls from "start_inferior" to
2493 "create_inferior".
2494 (captured_main): Likewise. Initialize environment variable. Call
2495 "have_job_control".
2496 * server.h (post_fork_inferior): New prototype.
2497 (get_environ): Likewise.
2498 (last_status): Declare.
2499 (last_ptid): Likewise.
2500 (signal_pid): Likewise.
2501 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2502 (spu_ptrace_fun): New function.
2503 (spu_create_inferior): Adjust function prototype to reflect change
2504 on "target.h". Adjust function code to use "fork_inferior".
2505 * target.c (target_terminal_init): New function.
2506 (target_terminal_inferior): Likewise.
2507 (target_terminal_ours): Likewise.
2508 * target.h: Include <vector>.
2509 (struct target_ops) <create_inferior>: Update prototype.
2510 (create_inferior): Update macro.
2511 * utils.c (gdb_flush_out_err): New function.
2512 * win32-low.c (win32_create_inferior): Adjust function prototype
2513 and code to reflect change on "target.h".
2514
043a4934
SDJ
25152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2516
2517 * inferiors.c (switch_to_thread): New function.
2518
15652511
SDJ
25192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2520
2521 * Makefile.in (SFILE): Add "common/job-control.c".
2522 (OBS): Add "job-control.o".
2523
21ea5acd
SDJ
25242017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2525
2526 * Makefile: Remove "@host_makefile_frag@".
2527
e13cb306
PA
25282017-05-05 Pedro Alves <palves@redhat.com>
2529
2530 * configure: Regenerate.
2531
c94fee56
SDJ
25322017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2533
2534 * configure: Regenerate.
2535
a0ff9e1a
SM
25362017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2537
2538 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2539 software_single_step change of return type to
2540 std::vector<CORE_ADDR>.
2541 * linux-low.c (install_software_single_step_breakpoints):
2542 Likewise.
2543 * linux-low.h (install_software_single_step_breakpoints):
2544 Likewise.
2545
be628ab8
SDJ
25462017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2547
2548 * remote-utils.c: Include "gdb_termios.h" instead of
2549 "terminal.h".
2550 * terminal.h: Delete file.
2551
7c5ded6a
SDJ
25522017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2553
2554 * server.c: Include <vector>.
2555 <program_argv, wrapper_argv>: Convert to std::vector.
2556 (start_inferior): Rewrite function to use C++.
2557 (handle_v_run): Likewise. Update code that calculates the argv
2558 based on the vRun packet; use C++.
2559 (captured_main): Likewise.
2560
436252de
SM
25612017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2562
2563 * server.c (handle_v_cont): Initialize thread_resume::thread
2564 with null_ptid.
2565
9bf2a700
PA
25662017-04-05 Pedro Alves <palves@redhat.com>
2567
2568 * configure: Regenerate.
2569
a121b7c1
PA
25702017-04-05 Pedro Alves <palves@redhat.com>
2571
2572 * gdbreplay.c (sync_error): Constify.
2573 * linux-x86-low.c (push_opcode): Constify.
2574
21c8a587
PA
25752017-04-05 Pedro Alves <palves@redhat.com>
2576
2577 * win32-low.c (get_child_debug_event)
2578 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2579 Report TARGET_WAITKIND_SPURIOUS instead.
2580
fb32b4f7
PA
25812017-04-05 Pedro Alves <palves@redhat.com>
2582
e79be6e5
SM
2583 * remote-utils.c (remote_prepare, remote_open): Constify.
2584 * remote-utils.h (remote_prepare, remote_open): Constify.
2585 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2586
65dd1e59
SM
25872017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2588
2589 * Makefile.in (clean): Clear .deps.
2590
8fa5b777
SM
25912017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2592
2593 * .gitignore: Remove generated files, replace with wildcard.
2594 * (clean): Replace removal of generated files with wildcard.
2595 (version.c): Replace with...
2596 (version-generated.c): ...this.
2597 (xml-builtin.c): Replace with...
2598 (xml-builtin-generated.c): ...this.
2599 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2600 (%.c: *regformats*): Replace with...
2601 (%-generated.c: *regformats*): ...this.
2602
a12e714b
MF
26032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2604
2605 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2606 (xtensa_fill_gregset): Call collect_register_by_name for
2607 threadptr register.
2608 (xtensa_store_gregset): Call supply_register_by_name for
2609 threadptr register.
2610
1a09b50a
MF
26112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2612
2613 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2614 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2615 (xtensa_store_gregset): Call supply_register for all registers in
2616 a0_regnum..a0_regnum + C0_NREGS range.
2617
1a01e7c6
SM
26182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2619
2620 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2621 (ax-ipa.o: ax.c): Remove.
2622 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2623 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2624 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2625 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2626 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2627
36bc18a8
SM
26282017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2629
2630 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2631 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2632 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2633 (errors-ipa.o: ../common/errors.c): Remove.
2634 (format-ipa.o: ../common/format.c): Remove.
2635 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2636
a8ebe3d5
SM
26372017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2638
2639 * Makefile.in (%-ipa.o: %.c): New rule.
2640 (tracepoint-ipa.o: tracepoint.c): Remove.
2641 (utils-ipa.o: utils.c): Remove.
2642 (remote-utils-ipa.o: remote-utils.c): Remove.
2643 (regcache-ipa.o: regcache.c): Remove.
2644 (i386-linux-ipa.o: i386-linux.c): Remove.
2645 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2646 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2647 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2648 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2649 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2650 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2651 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2652 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2653 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2654 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2655 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2656 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2657 (aarch64-ipa.o: aarch64.c): Remove.
2658 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2659 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2660 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2661 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2662 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2663 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2664 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2665 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2666 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2667 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2668 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2669 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2670 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2671 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2672 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2673 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2674 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2675 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2676 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2677 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2678 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2679 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2680 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2681 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2682 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2683 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2684 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2685 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2686 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2687 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2688 (tdesc-ipa.o: tdesc.c): Remove.
2689 (x32-linux-ipa.o: x32-linux.c): Remove.
2690 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2691 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2692
50cfacb7
SM
26932017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2694
2695 * Makefile.in (%.o: ../arch/%.c): New rule.
2696 (arm.o: ../arch/arm.c): Remove.
2697 (arm-linux.o: ../arch/arm-linux.c): Remove.
2698 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2699 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2700
c5a22423
SM
27012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2702
2703 * Makefile.in (%.o: ../nat/%.c): New rule.
2704 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2705 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2706 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2707 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2708 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2709 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2710 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2711 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2712 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2713 (linux-personality.o: ../nat/linux-personality.c): Remove.
2714 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2715 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2716 (x86-linux.o: ../nat/x86-linux.c): Remove.
2717 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2718 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2719
6bda016b
SM
27202017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2721
2722 * Makefile.in (%.o: ../common/%.c): New rule.
2723 (signals.o: ../common/signals.c): Remove.
2724 (print-utils.o: ../common/print-utils.c): Remove.
2725 (rsp-low.o: ../common/rsp-low.c): Remove.
2726 (common-utils.o: ../common/common-utils.c): Remove.
2727 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2728 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2729 (vec.o: ../common/vec.c): Remove.
2730 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2731 (xml-utils.o: ../common/xml-utils.c): Remove.
2732 (ptid.o: ../common/ptid.c): Remove.
2733 (buffer.o: ../common/buffer.c): Remove.
2734 (format.o: ../common/format.c): Remove.
2735 (filestuff.o: ../common/filestuff.c): Remove.
2736 (agent.o: ../common/agent.c): Remove.
2737 (errors.o: ../common/errors.c): Remove.
2738 (environ.o: ../common/environ.c): Remove.
2739 (common-debug.o: ../common/common-debug.c): Remove.
2740 (cleanups.o: ../common/cleanups.c): Remove.
2741 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2742 (fileio.o: ../common/fileio.c): Remove.
2743 (common-regcache.o: ../common/common-regcache.c): Remove.
2744 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2745 (new-op.o: ../common/new-op.c): Remove.
2746 (btrace-common.o: ../common/btrace-common.c): Remove.
2747
21122961
SM
27482017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2749
2750 * Makefile.in (%.o: ../target/%.c): New rule.
2751 (waitstatus.o: ../target/waitstatus.c): Remove.
2752
c362e621
SM
27532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2754
2755 * Makefile.in
2756 (%.c: ../regformats/%.dat,
2757 (%.c: ../regformats/arm/%.dat,
2758 (%.c: ../regformats/i386/%.dat,
2759 (%.c: ../regformats/rs6000/%.dat): New rules.
2760 (aarch64.c): Remove.
2761 (reg-arm.c): Remove.
2762 (arm-with-iwmmxt.c): Remove.
2763 (arm-with-vfpv2.c): Remove.
2764 (arm-with-vfpv3.c): Remove.
2765 (arm-with-neon.c): Remove.
2766 (reg-bfin.c): Remove.
2767 (reg-cris.c): Remove.
2768 (reg-crisv32.c): Remove.
2769 (i386.c): Remove.
2770 (i386-linux.c): Remove.
2771 (i386-avx.c): Remove.
2772 (i386-avx-linux.c): Remove.
2773 (i386-avx-avx512.c): Remove.
2774 (i386-avx-avx512-linux.c): Remove.
2775 (i386-mpx.c): Remove.
2776 (i386-mpx-linux.c): Remove.
2777 (i386-avx-mpx-avx512-pku.c): Remove.
2778 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2779 (i386-avx-mpx.c): Remove.
2780 (i386-avx-mpx-linux.c): Remove.
2781 (i386-mmx.c): Remove.
2782 (i386-mmx-linux.c): Remove.
2783 (reg-ia64.c): Remove.
2784 (reg-m32r.c): Remove.
2785 (reg-m68k.c): Remove.
2786 (reg-cf.c): Remove.
2787 (mips-linux.c): Remove.
2788 (mips-dsp-linux.c): Remove.
2789 (mips64-linux.c): Remove.
2790 (mips64-dsp-linux.c): Remove.
2791 (nios2-linux.c): Remove.
2792 (powerpc-32.c): Remove.
2793 (powerpc-32l.c): Remove.
2794 (powerpc-altivec32l.c): Remove.
2795 (powerpc-cell32l.c): Remove.
2796 (powerpc-vsx32l.c): Remove.
2797 (powerpc-isa205-32l.c): Remove.
2798 (powerpc-isa205-altivec32l.c): Remove.
2799 (powerpc-isa205-vsx32l.c): Remove.
2800 (powerpc-e500l.c): Remove.
2801 (powerpc-64l.c): Remove.
2802 (powerpc-altivec64l.c): Remove.
2803 (powerpc-cell64l.c): Remove.
2804 (powerpc-vsx64l.c): Remove.
2805 (powerpc-isa205-64l.c): Remove.
2806 (powerpc-isa205-altivec64l.c): Remove.
2807 (powerpc-isa205-vsx64l.c): Remove.
2808 (s390-linux32.c): Remove.
2809 (s390-linux32v1.c): Remove.
2810 (s390-linux32v2.c): Remove.
2811 (s390-linux64.c): Remove.
2812 (s390-linux64v1.c): Remove.
2813 (s390-linux64v2.c): Remove.
2814 (s390-te-linux64.c): Remove.
2815 (s390-vx-linux64.c): Remove.
2816 (s390-tevx-linux64.c): Remove.
2817 (s390x-linux64.c): Remove.
2818 (s390x-linux64v1.c): Remove.
2819 (s390x-linux64v2.c): Remove.
2820 (s390x-te-linux64.c): Remove.
2821 (s390x-vx-linux64.c): Remove.
2822 (s390x-tevx-linux64.c): Remove.
2823 (tic6x-c64xp-linux.c): Remove.
2824 (tic6x-c64x-linux.c): Remove.
2825 (tic6x-c62x-linux.c): Remove.
2826 (reg-sh.c): Remove.
2827 (reg-sparc64.c): Remove.
2828 (reg-spu.c): Remove.
2829 (amd64.c): Remove.
2830 (amd64-linux.c): Remove.
2831 (amd64-avx.c): Remove.
2832 (amd64-avx-linux.c): Remove.
2833 (amd64-avx-avx512.c): Remove.
2834 (amd64-avx-avx512-linux.c): Remove.
2835 (amd64-mpx.c): Remove.
2836 (amd64-mpx-linux.c): Remove.
2837 (amd64-avx-mpx-avx512-pku.c): Remove.
2838 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2839 (amd64-avx-mpx.c): Remove.
2840 (amd64-avx-mpx-linux.c): Remove.
2841 (x32.c): Remove.
2842 (x32-linux.c): Remove.
2843 (x32-avx.c): Remove.
2844 (x32-avx-linux.c): Remove.
2845 (x32-avx-avx512.c): Remove.
2846 (x32-avx-avx512-linux.c): Remove.
2847 (reg-xtensa.c): Remove.
2848 (reg-tilegx.c): Remove.
2849 (reg-tilegx32.c): Remove.
2850
1672e0d9
SDJ
28512017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2852
2853 * Makefile.in (SFILES): Add "common/environ.c".
2854 (OBJS): Add "common/environ.h".
2855
239b6d10
WT
28562017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2857
2858 * configure.ac: Check if the fs_base and gs_base members of
2859 `struct user_regs_struct' exist.
2860 * config.in: Regenerated.
2861 * configure: Likewise.
2862
694b382c
AT
28632017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2864
2865 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2866 target_read_memory.
2867 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2868 (get_next_pcs_syscall_next_pc): Likewise.
2869
7dc53023
LM
28702016-12-23 Luis Machado <lgustavo@codesourcery.com>
2871
2872 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2873 * nto-x86-low.c: Likewise.
2874
ad02e4fe
SM
28752016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2876
2877 * Makefile.in: Include disable-implicit-rules.mk.
2878
dcb07cfa
PA
28792016-11-23 Pedro Alves <palves@redhat.com>
2880
2881 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2882 (debug_vprintf): Use std::chrono::steady_clock instead of
2883 gettimeofday. Use '.' instead of ':'.
2884 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2885 (get_timestamp): Use std::chrono::steady_clock instead of
2886 gettimeofday.
2887
8629c02c
SM
28882016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2889
2890 * Makefile.in: Fix whitespace formatting.
2891
b593ecca
SM
28922016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2893
2894 * Makefile.in (SFILES, OBS): Flatten list and order
2895 alphabetically.
2896
9986ba08
PA
28972016-11-23 Pedro Alves <palves@redhat.com>
2898
2899 * event-loop.c (handle_file_event): Use warning.
2900 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2901 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2902 Use warning.
2903
4eefa7bc
PA
29042016-11-23 Pedro Alves <palves@redhat.com>
2905
2906 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2907 output.
2908 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2909 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2910 debug_printf and debug_flush for debug output.
2911 * server.c (handle_general_set): Likewise.
2912 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2913 output.
2914
5443506e
SM
29152016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2916
2917 * Makefile.in (.c.o): Replace rule with ...
2918 (%.o: %.c): ... this one.
2919
3b165252
SM
29202016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2921
2922 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2923 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2924 make.
2925 * configure.ac: Remove checks for the make program.
2926 * configure: Re-generate.
2927
0bcda685
PA
29282016-10-28 Pedro Alves <palves@redhat.com>
2929
2930 * Makefile.in (CXX_DIALECT): Get from configure.
2931 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2932 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2933 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2934 * config.in: Regenerate.
2935 * configure: Regenerate.
2936
c3805894
YQ
29372016-10-27 Yao Qi <yao.qi@linaro.org>
2938
2939 * linux-low.c (linux_supports_range_stepping): Return true if
2940 can_software_single_step return true.
2941
89342618
YQ
29422016-10-27 Yao Qi <yao.qi@linaro.org>
2943
2944 * inferiors.c (find_inferior_in_random): New function.
2945 * inferiors.h (find_inferior_in_random): Declare.
2946 * linux-low.c (linux_wait_for_event_filtered): Call
2947 find_inferior_in_random instead of find_inferior.
2948
e3652c84
YQ
29492016-10-27 Yao Qi <yao.qi@linaro.org>
2950
2951 * linux-low.c (linux_wait_1): If single-step breakpoints are
2952 inserted, remove them.
2953
5a04c4cf
PA
29542016-10-26 Pedro Alves <palves@redhat.com>
2955
2956 * linux-low.c (handle_extended_wait): Link parent/child fork
2957 threads.
2958 (linux_wait_1): Unlink them.
2959 (linux_set_resume_request): Ignore resume requests for
2960 already-resumed and unhandled fork child threads.
2961 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2962 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2963 New functions.
2964 (handle_v_requests) <vCont>: Don't call require_running.
2965 * server.h (in_queued_stop_replies): New declaration.
2966
cb93dc7f
YQ
29672016-10-24 Yao Qi <yao.qi@linaro.org>
2968
2969 PR server/20733
2970 * linux-aarch64-low.c (append_insns): Cast the return value to
2971 'uint32_t *'.
2972
a1078bea
YQ
29732016-10-10 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2976
1fb77080
SDJ
29772016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2978
2979 * target.c (target_supports_multi_process): New function, moved
2980 from...
2981 * target.h (target_supports_multi_process): ... here. Remove
2982 macro.
2983
39b5a3b9
TT
29842016-10-05 Tom Tromey <tom@tromey.com>
2985
2986 PR remote/20655:
2987 * tracepoint.c (handle_tracepoint_bkpts): Check
2988 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2989
c1d0b70a
YQ
29902016-10-05 Yao Qi <yao.qi@linaro.org>
2991
2992 * configure.srv: Update the path of arm-*.xml files.
2993
0a69eedb
YQ
29942016-10-05 Terry Guo <terry.guo@arm.com>
2995 Yao Qi <yao.qi@linaro.org>
2996
2997 * Makefile.in: Adjust the path of rules.
2998 * configure.srv: Update the path of xml files.
2999 * regformats/arm-with-iwmmxt.dat: Regenerated.
3000 * regformats/arm-with-neon.dat: Likewise.
3001 * regformats/arm-with-vfpv2.dat: Likewise.
3002 * regformats/arm-with-vfpv3.dat Likewise.
3003
17e16485
YQ
30042016-09-30 Yao Qi <yao.qi@linaro.org>
3005
3006 PR gdbserver/20627
3007 * target.c (target_stop_and_wait): Don't call
3008 target_continue_no_signal, use resume_stop instead.
3009
edeeb602
YQ
30102016-09-26 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-low.c (linux_wait_1): Call debug_exit.
3013
503b1c39
PA
30142016-09-23 Pedro Alves <palves@redhat.com>
3015
3016 * Makefile.in (SFILES): Add common/new-op.c.
3017 (OBS): Add common/new-op.o.
3018 (new-op.o): New rule.
3019
74172ecf
SM
30202016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3021
3022 * .gitinore: Ignore more files.
3023
fc6cda2e
YQ
30242016-09-21 Yao Qi <yao.qi@linaro.org>
3025
3026 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3027 23.
3028
bc1e6c81
SDJ
30292016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3030
3031 * server.c (start_inferior): Call target_mourn_inferior instead of
3032 mourn_inferior; pass ptid_t argument to it.
3033 (resume): Likewise.
3034 (handle_target_event): Likewise.
3035 * target.c (target_mourn_inferior): New function.
3036 * target.h (mourn_inferior): Delete macro.
3037
0e00e962
AA
30382016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3039
3040 * linux-low.c (lwp_is_stepping): New function.
3041
1d8cb77d
CL
30422016-09-06 Carl Love <cel@us.ibm.com>
3043
3044 * server.c (start_inferior): Fixed comment, requested comment change
3045 didn't get updated correctly. Removed reference to ptrace () call as
3046 it is only true on Linux systems.
3047
7313bced
CL
30482016-09-06 Carl Love <cel@us.ibm.com>
3049
3050 * server.c (start_inferior): Do not call
3051 function target_post_create_inferior () if the
3052 inferior process has already exited.
3053
cf6de44d
PA
30542016-09-05 Pedro Alves <palves@redhat.com>
3055
3056 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3057 (COMPILE.pre, CC_LD): Use CXX directly.
3058 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3059 * acinclude.m4: Don't include build-with-cxx.m4.
3060 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3061 * configure: Regenerate.
3062
c1da6748
AT
30632016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3064
3065 PR gdb/19495
3066 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3067 call writing data to own_buf.
3068
f2b9e3df
SDJ
30692016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3070
3071 * target.c (mywait): Call target_wait instead of
3072 the_target->wait.
3073 (target_wait): New function.
3074
049a8570
SDJ
30752016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3076
3077 * server.c (start_inferior): New variable 'ptid'. Replace calls
3078 to the_target->resume by target_continue{,_no_signal}, depending
3079 on the case.
3080 * target.c (target_stop_and_wait): Call target_continue_no_signal
3081 instead of the_target->resume.
3082 (target_continue): New function.
3083
3aa5cfa0
AT
30842016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3085
3086 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3087
754653a7
AZ
30882016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3089
3090 PR server/20491
3091 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3092 ps_prochandle.
3093 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3094 * linux-arm-low.c (ps_get_thread_area): Likewise.
3095 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3096 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3097 * linux-mips-low.c (ps_get_thread_area): Likewise.
3098 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3099 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3100 * linux-x86-low.c (ps_get_thread_area): Likewise.
3101 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3102
ed036b40
PA
31032016-08-19 Pedro Alves <palves@redhat.com>
3104
3105 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3106
c8ef42ee
PA
31072016-08-19 Pedro Alves <palves@redhat.com>
3108
3109 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3110 comment. Use memcpy instead of casting through unsigned long.
3111
9c235a72
PA
31122016-08-19 Pedro Alves <palves@redhat.com>
3113
3114 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3115 allocating around 0x80000000.
3116
201506da
PA
31172016-08-19 Pedro Alves <palves@redhat.com>
3118
3119 PR gdb/20415
3120 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3121 (x32-avx512-linux-ipa.o): New rules.
3122 * configure.ac (x86_64-*-linux*): New x32 check.
3123 * configure.srv (ipa_x32_linux_regobj): New.
3124 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3125 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3126 descriptions.
3127 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3128 descriptions.
3129 * configure: Regenerate.
3130
f348d89a
PA
31312016-08-09 Pedro Alves <palves@redhat.com>
3132
3133 PR gdb/18653
3134 * Makefile.in (OBS): Add signals-state-save-restore.o.
3135 (signals-state-save-restore.o): New rule.
3136 * config.in: Regenerate.
3137 * configure: Regenerate.
3138 * linux-low.c: Include "signals-state-save-restore.h".
3139 (linux_create_inferior): Call
3140 restore_original_signals_state.
3141 * server.c: Include "dispositions-save-restore.h".
3142 (captured_main): Call save_original_signals_state.
3143
1baf5149
PA
31442016-08-05 Pedro Alves <palves@redhat.com>
3145
3146 * configure: Regenerate.
3147
fcd4a73d
YQ
31482016-08-04 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-low.c (regsets_fetch_inferior_registers): Check
3151 errno is ESRCH or not.
3152
979659d0
YQ
31532016-08-02 Yao Qi <yao.qi@linaro.org>
3154
3155 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3156 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3157 (thread_db_load_search): Update.
3158 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3159 td_ta_set_event and td_ta_event_getmsg.
3160
6598661d
PA
31612016-07-26 Pedro Alves <palves@redhat.com>
3162
3163 PR server/20414
3164 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3165 of unsigned long for 64-bit registers and use uint32_t instead of
3166 unsigned int for 32-bit registers.
3167
9cf12d57
PA
31682016-07-26 Pedro Alves <palves@redhat.com>
3169
3170 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3171 to 'ptrace'.
3172
305450ed
TT
31732016-07-21 Tom Tromey <tom@tromey.com>
3174
3175 * configure: Rebuild.
3176
2583da7c
YQ
31772016-07-21 Yao Qi <yao.qi@linaro.org>
3178
3179 * mem-break.c (find_gdb_breakpoint): Cast bp to
3180 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3181
21536b36
YQ
31822016-07-21 Yao Qi <yao.qi@linaro.org>
3183
3184 * server.c (handle_v_requests): Support s and S actions
3185 if target_supports_software_single_step return true.
3186
8901d193
YQ
31872016-07-21 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3190 is resume_step, call maybe_hw_step.
3191 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3192 and unstop them.
3193 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3194 breakpoints or not.
3195 (proceed_one_lwp): If resume request is resume_step, install
3196 reinsert breakpoints and call maybe_hw_step.
3197
0e9a339e
YQ
31982016-07-21 Yao Qi <yao.qi@linaro.org>
3199
3200 * linux-low.c (proceed_one_lwp): Declare.
3201 (linux_resume_one_thread): Remove local variable 'step'.
3202 Lift code enqueue signal. Call proceed_one_lwp instead of
3203 linux_resume_one_lwp.
3204
4281b351
YQ
32052016-07-21 Yao Qi <yao.qi@linaro.org>
3206
3207 * linux-low.c (linux_resume_one_thread): Call
3208 enqueue_pending_signal.
3209
984a2c04
YQ
32102016-07-21 Yao Qi <yao.qi@linaro.org>
3211
3212 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3213 * inferiors.c (do_restore_current_thread_cleanup): New function.
3214 (make_cleanup_restore_current_thread): Likewise.
3215 * linux-low.c (install_software_single_step_breakpoints): Call
3216 make_cleanup_restore_current_thread. Switch current_thread to
3217 thread.
3218
bec903c9
YQ
32192016-07-21 Yao Qi <yao.qi@linaro.org>
3220
3221 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3222 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3223 (clone_one_breakpoint): Likewise.
3224 (delete_reinsert_breakpoints): Change parameter to thread.
3225 Callers updated.
3226 (has_reinsert_breakpoints): Likewise.
3227 (uninsert_reinsert_breakpoints): Likewise.
3228 (reinsert_reinsert_breakpoints): Likewise.
3229 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3230 (delete_reinsert_breakpoints): Likewise.
3231 (reinsert_reinsert_breakpoints): Likewise.
3232 (uninsert_reinsert_breakpoints): Likewise.
3233 (has_reinsert_breakpoints): Likewise.
3234
63c40ec7
YQ
32352016-07-21 Yao Qi <yao.qi@linaro.org>
3236
3237 * inferiors.c (get_thread_process): Make parameter const.
3238 * inferiors.h (get_thread_process): Update declaration.
3239 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3240 Add new parameters child_thread and parent_thread. Callers
3241 updated.
3242 * mem-break.h (clone_all_breakpoints): Update declaration.
3243
9aa76cd0
YQ
32442016-07-21 Yao Qi <yao.qi@linaro.org>
3245
3246 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3247 <command_list, handler>: Remove.
3248 (struct gdb_breakpoint): New.
3249 (struct other_breakpoint): New.
3250 (struct reinsert_breakpoint): New.
3251 (is_gdb_breakpoint): New function.
3252 (any_persistent_commands): Update command_list if
3253 is_gdb_breakpoint returns true.
3254 (set_breakpoint): Create breakpoints according to their types.
3255 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3256 (set_gdb_breakpoint_1): Likewise.
3257 (set_gdb_breakpoint): Likewise.
3258 (clear_breakpoint_conditions): Change parameter type to
3259 'struct gdb_breakpoint *'.
3260 (clear_breakpoint_commands): Likewise.
3261 (clear_breakpoint_conditions_and_commands): Likewise.
3262 (add_condition_to_breakpoint): Likewise.
3263 (add_breakpoint_condition): Likewise.
3264 (add_commands_to_breakpoint): Likewise.
3265 (check_breakpoints): Check other_breakpoint.
3266 (clone_one_breakpoint): Clone breakpopint according to its type.
3267 * mem-break.h (struct gdb_breakpoint): Declare.
3268 (set_gdb_breakpoint): Update declaration.
3269 (clear_breakpoint_conditions_and_commands): Likewise.
3270 (add_breakpoint_condition): Likewise.
3271 (add_breakpoint_commands): Likewise.
3272 * server.c (process_point_options): Change parameter type to
3273 'struct gdb_breakpoint *'.
3274
811f8301
YQ
32752016-07-21 Yao Qi <yao.qi@linaro.org>
3276
3277 * mem-break.c (set_breakpoint_at): Rename it to ...
3278 (set_breakpoint_type_at): ... it.
3279 (set_breakpoint_at): Call set_breakpoint_type_at.
3280 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3281 * mem-break.h (set_breakpoint_at): Update comments.
3282
b1c51e36
CLT
32832016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3284
3285 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3286 to buf parameter.
3287 (nios2_store_gregset): Likewise.
3288
ced2dffb
PA
32892016-07-01 Pedro Alves <palves@redhat.com>
3290 Antoine Tremblay <antoine.tremblay@ericsson.com>
3291
3292 * linux-low.c: Change interface to take the target lwp_info
3293 pointer directly and return void. Handle detaching from a zombie
3294 thread.
3295 (linux_detach_lwp_callback): New function.
3296 (linux_detach): Detach from the leader thread after detaching from
3297 the clone threads.
3298
2ac09a5b
YQ
32992016-06-28 Yao Qi <yao.qi@linaro.org>
3300
3301 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3302 for variable new_offset.
3303 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3304 (aarch64_ftrace_insn_reloc_cb): Likewise.
3305 (aarch64_ftrace_insn_reloc_tb): Likewise.
3306 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3307 PRIx64 instead of PRIx32.
3308
79e7fd4f
YQ
33092016-06-28 Yao Qi <yao.qi@linaro.org>
3310
3311 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3312 (the_low_target): Install arm_get_syscall_trapinfo.
3313
061fc021
YQ
33142016-06-28 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3317 function.
3318 (the_low_target): Install aarch64_get_syscall_trapinfo.
3319
4cc32bec
YQ
33202016-06-28 Yao Qi <yao.qi@linaro.org>
3321
3322 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3323 Callers updated.
3324 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3325 Remove parameter sysno.
3326 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3327 sysret.
3328
782c1122
AA
33292016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3330
3331 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3332 (s390_emit_ne_goto): Likewise.
3333 (s390_emit_lt_goto): Likewise.
3334 (s390_emit_le_goto): Likewise.
3335 (s390_emit_gt_goto): Likewise.
3336 (s390_emit_ge_goto): Likewise.
3337 (s390x_emit_eq_goto): Likewise.
3338 (s390x_emit_ne_goto): Likewise.
3339 (s390x_emit_lt_goto): Likewise.
3340 (s390x_emit_le_goto): Likewise.
3341 (s390x_emit_gt_goto): Likewise.
3342 (s390x_emit_ge_goto): Likewise.
3343 (s390_emit_ops_impl): Mark variable static.
3344 (s390x_emit_ops): Likewise.
3345
2e7b624b
YQ
33462016-06-17 Yao Qi <yao.qi@linaro.org>
3347
3348 * linux-low.c (handle_extended_wait): Call
3349 uninsert_reinsert_breakpoints for the parent process. Remove
3350 reinsert breakpoints from the child process. Reinsert them to
3351 the parent process when vfork is done.
3352 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3353 (reinsert_reinsert_breakpoints): New function.
3354 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3355 (reinsert_reinsert_breakpoints): Declare.
3356
8a81c5d7
YQ
33572016-06-17 Yao Qi <yao.qi@linaro.org>
3358
3359 * linux-low.c (handle_extended_wait): If the parent is doing
3360 step-over, remove the reinsert breakpoints from the forked child.
3361
f50bf8e5
YQ
33622016-06-17 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-low.c (unsuspend_all_lwps): Declare.
3365 (linux_low_filter_event): If thread exited, call finish_step_over.
3366 If step-over is finished, unsuspend other threads.
3367
8376a3cb
YQ
33682016-06-17 Yao Qi <yao.qi@linaro.org>
3369
3370 * linux-low.c (linux_resume_one_lwp_throw): Assert
3371 has_reinsert_breakpoints returns false.
3372 * mem-break.c (delete_disabled_breakpoints): Assert
3373 bp type isn't reinsert_breakpoint.
3374
f79b145d
YQ
33752016-06-17 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-low.c (maybe_hw_step): New function.
3378 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3379 (finish_step_over): Switch current_thread to lwp temporarily,
3380 and assert has_reinsert_breakpoints returns true.
3381 (proceed_one_lwp): Call maybe_hw_step.
3382 * mem-break.c (has_reinsert_breakpoints): New function.
3383 * mem-break.h (has_reinsert_breakpoints): Declare.
3384
0ae534d2
JT
33852016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3386
3387 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3388
fcdad592
YQ
33892016-05-17 Yao Qi <yao.qi@linaro.org>
3390
3391 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3392 instead of find_inferior.
3393
9e784964
YQ
33942016-05-05 Yao Qi <yao.qi@linaro.org>
3395
3396 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3397 Initialize res to zero.
3398
cf2ebb6e
YQ
33992016-05-05 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3402 to uint32_t.
3403
c1aebf87
UW
34042016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3405
3406 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3407 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3408 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3409
35fd2deb 34102016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3411 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3412
3413 * tracepoint.c (write_inferior_int8): New function.
3414 (cmd_qtenable_disable): Write enable flag using
3415 write_inferior_int8.
3416
484b3c32
YQ
34172016-04-25 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3420 (need_step_over_p): Return zero if the LWP has pending signals
3421 can be delivered on software single step target.
3422
85ba7d86
YQ
34232016-04-25 Yao Qi <yao.qi@linaro.org>
3424
3425 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3426 return instead of error.
3427
3539aa13
YQ
34282016-04-22 Yao Qi <yao.qi@linaro.org>
3429
3430 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3431 to 23.
3432
5b061e98
YQ
34332016-04-22 Yao Qi <yao.qi@linaro.org>
3434
3435 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3436 signal when stepping over breakpoint with software single
3437 step.
3438
3451269c
PA
34392016-04-21 Pedro Alves <palves@redhat.com>
3440
3441 * linux-s390-low.c (s390_collect_ptrace_register)
3442 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3443 add casts.
3444 (s390_check_regset): Use void * instead of gdb_byte *.
3445
a2358508
PA
34462016-04-20 Pedro Alves <palves@redhat.com>
3447
3448 * configure: Renegerate.
3449
6885166d
YQ
34502016-04-20 Yao Qi <yao.qi@linaro.org>
3451
3452 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3453 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3454 number 16.
3455 (arm_store_gregset): Likewise.
3456
2b863f51
WT
34572016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3458
3459 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3460 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3461 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3462 (amd64-avx-mpx-linux.c): New rules.
3463 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3464 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3465 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3466 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3467 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3468 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3469 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3470 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3471 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3472 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3473 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3474 * linux-x86-low.c (x86_linux_read_description): Add case for
3475 X86_XSTATE_AVX_MPX_MASK.
3476 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3477 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3478 init_registers_i386_avx_mpx_linux.
3479 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3480 (initialize_low_tracepoint): Call
3481 init_registers_i386_avx_mpx_linux.
3482 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3483 (initialize_low_tracepoint): Call
3484 init_registers_amd64_avx_mpx_linux.
3485 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3486 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3487 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3488 declarations.
3489
9b30624b
PA
34902016-04-18 Pedro Alves <palves@redhat.com>
3491
3492 * configure: Regenerate.
3493
45e3745e
AT
34942016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3495
3496 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3497 (aarch64_emit_sub): Likewise.
3498
2afc13ff
PA
34992016-04-12 Pedro Alves <palves@redhat.com>
3500
3501 * utils.c (prepare_to_throw_exception): Delete.
3502
6e774b13
SM
35032016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3504
3505 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3506
4dca19f8
MK
35072016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3508
3509 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3510
d0a9981f
MK
35112016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3512
3513 * linux-aarch64-ipa.c: Add <elf.h> include.
3514 * linux-ppc-ipa.c: Add <elf.h> include.
3515 * linux-s390-ipa.c: Add <elf.h> include.
3516
252db07e
MK
35172016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3518
3519 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3520 (get_raw_reg_ptr): Likewise.
3521 (get_trace_state_variable_value_ptr): Likewise.
3522 (set_trace_state_variable_value_ptr): Likewise.
3523 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3524 char *.
3525
14e2b6d9
MK
35262016-03-31 Wei-cheng Wang <cole945@gmail.com>
3527 Marcin Kościelnicki <koriakin@0x04.net>
3528
3529 PR/17221
3530 * linux-ppc-low.c (emit_insns): New function.
3531 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3532 (ppc_emit_prologue): New function.
3533 (ppc_emit_epilogue): New function.
3534 (ppc_emit_add): New function.
3535 (ppc_emit_sub): New function.
3536 (ppc_emit_mul): New function.
3537 (ppc_emit_lsh): New function.
3538 (ppc_emit_rsh_signed): New function.
3539 (ppc_emit_rsh_unsigned): New function.
3540 (ppc_emit_ext): New function.
3541 (ppc_emit_zero_ext): New function.
3542 (ppc_emit_log_not): New function.
3543 (ppc_emit_bit_and): New function.
3544 (ppc_emit_bit_or): New function.
3545 (ppc_emit_bit_xor): New function.
3546 (ppc_emit_bit_not): New function.
3547 (ppc_emit_equal): New function.
3548 (ppc_emit_less_signed): New function.
3549 (ppc_emit_less_unsigned): New function.
3550 (ppc_emit_ref): New function.
3551 (ppc_emit_const): New function.
3552 (ppc_emit_reg): New function.
3553 (ppc_emit_pop): New function.
3554 (ppc_emit_stack_flush): New function.
3555 (ppc_emit_swap): New function.
3556 (ppc_emit_stack_adjust): New function.
3557 (ppc_emit_call): New function.
3558 (ppc_emit_int_call_1): New function.
3559 (ppc_emit_void_call_2): New function.
3560 (ppc_emit_if_goto): New function.
3561 (ppc_emit_goto): New function.
3562 (ppc_emit_eq_goto): New function.
3563 (ppc_emit_ne_goto): New function.
3564 (ppc_emit_lt_goto): New function.
3565 (ppc_emit_le_goto): New function.
3566 (ppc_emit_gt_goto): New function.
3567 (ppc_emit_ge_goto): New function.
3568 (ppc_write_goto_address): New function.
3569 (ppc_emit_ops_impl): New static variable.
3570 (ppc64v1_emit_prologue): New function.
3571 (ppc64v2_emit_prologue): New function.
3572 (ppc64_emit_epilogue): New function.
3573 (ppc64_emit_add): New function.
3574 (ppc64_emit_sub): New function.
3575 (ppc64_emit_mul): New function.
3576 (ppc64_emit_lsh): New function.
3577 (ppc64_emit_rsh_signed): New function.
3578 (ppc64_emit_rsh_unsigned): New function.
3579 (ppc64_emit_ext): New function.
3580 (ppc64_emit_zero_ext): New function.
3581 (ppc64_emit_log_not): New function.
3582 (ppc64_emit_bit_and): New function.
3583 (ppc64_emit_bit_or): New function.
3584 (ppc64_emit_bit_xor): New function.
3585 (ppc64_emit_bit_not): New function.
3586 (ppc64_emit_equal): New function.
3587 (ppc64_emit_less_signed): New function.
3588 (ppc64_emit_less_unsigned): New function.
3589 (ppc64_emit_ref): New function.
3590 (ppc64_emit_const): New function.
3591 (ppc64v1_emit_reg): New function.
3592 (ppc64v2_emit_reg): New function.
3593 (ppc64_emit_pop): New function.
3594 (ppc64_emit_stack_flush): New function.
3595 (ppc64_emit_swap): New function.
3596 (ppc64v1_emit_call): New function.
3597 (ppc64v2_emit_call): New function.
3598 (ppc64v1_emit_int_call_1): New function.
3599 (ppc64v2_emit_int_call_1): New function.
3600 (ppc64v1_emit_void_call_2): New function.
3601 (ppc64v2_emit_void_call_2): New function.
3602 (ppc64_emit_if_goto): New function.
3603 (ppc64_emit_eq_goto): New function.
3604 (ppc64_emit_ne_goto): New function.
3605 (ppc64_emit_lt_goto): New function.
3606 (ppc64_emit_le_goto): New function.
3607 (ppc64_emit_gt_goto): New function.
3608 (ppc64_emit_ge_goto): New function.
3609 (ppc64v1_emit_ops_impl): New static variable.
3610 (ppc64v2_emit_ops_impl): New static variable.
3611 (ppc_emit_ops): New function.
3612 (linux_low_target): Wire in ppc_emit_ops.
3613
a2174ba4
MK
36142016-03-31 Wei-cheng Wang <cole945@gmail.com>
3615 Marcin Kościelnicki <koriakin@0x04.net>
3616
3617 PR/17221
3618 * Makefile.in: Add powerpc-*-ipa.o
3619 * configure.srv: Add ipa_obj for powerpc*-linux.
3620 * linux-ppc-ipa.c: New file.
3621 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3622 includes.
3623 (PPC_FIELD): New macro.
3624 (PPC_SEXT): New macro.
3625 (PPC_OP6): New macro.
3626 (PPC_BO): New macro.
3627 (PPC_LI): New macro.
3628 (PPC_BD): New macro.
3629 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3630 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3631 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3632 (ppc_get_thread_area): New function.
3633 (is_elfv2_inferior): New function.
3634 (gen_ds_form): New function.
3635 (GEN_STD): New macro.
3636 (GEN_STDU): New macro.
3637 (GEN_LD): New macro.
3638 (GEN_LDU): New macro.
3639 (gen_d_form): New function.
3640 (GEN_ADDI): New macro.
3641 (GEN_ADDIS): New macro.
3642 (GEN_LI): New macro.
3643 (GEN_LIS): New macro.
3644 (GEN_ORI): New macro.
3645 (GEN_ORIS): New macro.
3646 (GEN_LWZ): New macro.
3647 (GEN_STW): New macro.
3648 (GEN_STWU): New macro.
3649 (gen_xfx_form): New function.
3650 (GEN_MFSPR): New macro.
3651 (GEN_MTSPR): New macro.
3652 (GEN_MFCR): New macro.
3653 (GEN_MTCR): New macro.
3654 (GEN_SYNC): New macro.
3655 (GEN_LWSYNC): New macro.
3656 (gen_x_form): New function.
3657 (GEN_OR): New macro.
3658 (GEN_MR): New macro.
3659 (GEN_LWARX): New macro.
3660 (GEN_STWCX): New macro.
3661 (GEN_CMPW): New macro.
3662 (gen_md_form): New function.
3663 (GEN_RLDICL): New macro.
3664 (GEN_RLDICR): New macro.
3665 (gen_i_form): New function.
3666 (GEN_B): New macro.
3667 (GEN_BL): New macro.
3668 (gen_b_form): New function.
3669 (GEN_BNE): New macro.
3670 (GEN_LOAD): New macro.
3671 (GEN_STORE): New macro.
3672 (gen_limm): New function.
3673 (gen_atomic_xchg): New function.
3674 (gen_call): New function.
3675 (ppc_relocate_instruction): New function.
3676 (ppc_install_fast_tracepoint_jump_pad): New function.
3677 (ppc_get_min_fast_tracepoint_insn_len): New function.
3678 (ppc_get_ipa_tdesc_idx): New function.
3679 (the_low_target): Wire in the new functions.
3680 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3681 tdescs.
3682 * linux-ppc-tdesc.h: New file.
3683
a13c4696
MK
36842016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3685
3686 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3687 (alloc_jump_pad_buffer): New function.
3688 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3689 (alloc_jump_pad_buffer): New function.
3690 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3691 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3692 (alloc_jump_pad_buffer): New function.
3693 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3694 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3695 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3696 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3697
1cda1512
MK
36982016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3699
3700 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3701 * linux-amd64-ipa.c: Likewise.
3702 * linux-i386-ipa.c: Likewise.
3703 * linux-s390-ipa.c: Likewise.
3704 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3705 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3706 set_trace_state_variable_value_ptr.
3707 (struct ipa_sym_addresses): Likewise.
3708 (symbol_list): Likewise.
3709 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3710 accessing gdb_collect directly.
3711 (gdb_collect_ptr_type): New typedef.
3712 (get_raw_reg_ptr_type): New typedef.
3713 (get_trace_state_variable_value_ptr_type): New typedef.
3714 (set_trace_state_variable_value_ptr_type): New typedef.
3715 (gdb_collect_ptr): New global.
3716 (get_raw_reg_ptr): New global.
3717 (get_trace_state_variable_value_ptr): New global.
3718 (set_trace_state_variable_value_ptr): New global.
3719 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3720 accessing get_raw_reg directly.
3721 (get_get_tsv_func_addr): Likewise for
3722 get_trace_state_variable_value_ptr.
3723 (get_set_tsv_func_addr): Likewise for
3724 set_trace_state_variable_value_ptr.
3725 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3726
72fb5488
SM
37272016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3728
3729 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3730
28170b88
MK
37312016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3732
3733 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3734 packets.
3735 (relocate_instruction): Remove own_buf.
3736 * server.c (own_buf): Make global.
3737 (handle_v_requests): Make global.
3738 * server.h (own_buf): New declaration.
3739 (handle_v_requests): New prototype.
3740
f39e8743
MK
37412016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3742
3743 PR 18377
3744 * linux-s390-low.c (add_insns): New function.
3745 (s390_emit_prologue): New function.
3746 (s390_emit_epilogue): New function.
3747 (s390_emit_add): New function.
3748 (s390_emit_sub): New function.
3749 (s390_emit_mul): New function.
3750 (s390_emit_lsh): New function.
3751 (s390_emit_rsh_signed): New function.
3752 (s390_emit_rsh_unsigned): New function.
3753 (s390_emit_ext): New function.
3754 (s390_emit_log_not): New function.
3755 (s390_emit_bit_and): New function.
3756 (s390_emit_bit_or): New function.
3757 (s390_emit_bit_xor): New function.
3758 (s390_emit_bit_not): New function.
3759 (s390_emit_equal): New function.
3760 (s390_emit_less_signed): New function.
3761 (s390_emit_less_unsigned): New function.
3762 (s390_emit_ref): New function.
3763 (s390_emit_if_goto): New function.
3764 (s390_emit_goto): New function.
3765 (s390_write_goto_address): New function.
3766 (s390_emit_litpool): New function.
3767 (s390_emit_const): New function.
3768 (s390_emit_call): New function.
3769 (s390_emit_reg): New function.
3770 (s390_emit_pop): New function.
3771 (s390_emit_stack_flush): New function.
3772 (s390_emit_zero_ext): New function.
3773 (s390_emit_swap): New function.
3774 (s390_emit_stack_adjust): New function.
3775 (s390_emit_set_r2): New function.
3776 (s390_emit_int_call_1): New function.
3777 (s390_emit_void_call_2): New function.
3778 (s390_emit_eq_goto): New function.
3779 (s390_emit_ne_goto): New function.
3780 (s390_emit_lt_goto): New function.
3781 (s390_emit_le_goto): New function.
3782 (s390_emit_gt_goto): New function.
3783 (s390_emit_ge_goto): New function.
3784 (s390x_emit_prologue): New function.
3785 (s390x_emit_epilogue): New function.
3786 (s390x_emit_add): New function.
3787 (s390x_emit_sub): New function.
3788 (s390x_emit_mul): New function.
3789 (s390x_emit_lsh): New function.
3790 (s390x_emit_rsh_signed): New function.
3791 (s390x_emit_rsh_unsigned): New function.
3792 (s390x_emit_ext): New function.
3793 (s390x_emit_log_not): New function.
3794 (s390x_emit_bit_and): New function.
3795 (s390x_emit_bit_or): New function.
3796 (s390x_emit_bit_xor): New function.
3797 (s390x_emit_bit_not): New function.
3798 (s390x_emit_equal): New function.
3799 (s390x_emit_less_signed): New function.
3800 (s390x_emit_less_unsigned): New function.
3801 (s390x_emit_ref): New function.
3802 (s390x_emit_if_goto): New function.
3803 (s390x_emit_const): New function.
3804 (s390x_emit_call): New function.
3805 (s390x_emit_reg): New function.
3806 (s390x_emit_pop): New function.
3807 (s390x_emit_stack_flush): New function.
3808 (s390x_emit_zero_ext): New function.
3809 (s390x_emit_swap): New function.
3810 (s390x_emit_stack_adjust): New function.
3811 (s390x_emit_int_call_1): New function.
3812 (s390x_emit_void_call_2): New function.
3813 (s390x_emit_eq_goto): New function.
3814 (s390x_emit_ne_goto): New function.
3815 (s390x_emit_lt_goto): New function.
3816 (s390x_emit_le_goto): New function.
3817 (s390x_emit_gt_goto): New function.
3818 (s390x_emit_ge_goto): New function.
3819 (s390_emit_ops): New function.
3820 (struct linux_target_ops): Fill in emit_ops hook.
3821
abd9baf9
MK
38222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3823
3824 PR 18377
3825 * Makefile.in: Add s390 IPA files.
3826 * configure.srv: Build IPA for s390.
3827 * linux-s390-ipa.c: New file.
3828 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3829 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3830 (tdesc_s390_linux32): Likewise.
3831 (init_registers_s390_linux32v1): Likewise.
3832 (tdesc_s390_linux32v1): Likewise.
3833 (init_registers_s390_linux32v2): Likewise.
3834 (tdesc_s390_linux32v2): Likewise.
3835 (init_registers_s390_linux64): Likewise.
3836 (tdesc_s390_linux64): Likewise.
3837 (init_registers_s390_linux64v1): Likewise.
3838 (tdesc_s390_linux64v1): Likewise.
3839 (init_registers_s390_linux64v2): Likewise.
3840 (tdesc_s390_linux64v2): Likewise.
3841 (init_registers_s390_te_linux64): Likewise.
3842 (tdesc_s390_te_linux64): Likewise.
3843 (init_registers_s390_vx_linux64): Likewise.
3844 (tdesc_s390_vx_linux64): Likewise.
3845 (init_registers_s390_tevx_linux64): Likewise.
3846 (tdesc_s390_tevx_linux64): Likewise.
3847 (init_registers_s390x_linux64): Likewise.
3848 (tdesc_s390x_linux64): Likewise.
3849 (init_registers_s390x_linux64v1): Likewise.
3850 (tdesc_s390x_linux64v1): Likewise.
3851 (init_registers_s390x_linux64v2): Likewise.
3852 (tdesc_s390x_linux64v2): Likewise.
3853 (init_registers_s390x_te_linux64): Likewise.
3854 (tdesc_s390x_te_linux64): Likewise.
3855 (init_registers_s390x_vx_linux64): Likewise.
3856 (tdesc_s390x_vx_linux64): Likewise.
3857 (init_registers_s390x_tevx_linux64): Likewise.
3858 (tdesc_s390x_tevx_linux64): Likewise.
3859 (have_hwcap_s390_vx): New static variable.
3860 (s390_arch_setup): Fill have_hwcap_s390_vx.
3861 (s390_get_thread_area): New function.
3862 (s390_ft_entry_gpr_esa): New const.
3863 (s390_ft_entry_gpr_zarch): New const.
3864 (s390_ft_entry_misc): New const.
3865 (s390_ft_entry_fr): New const.
3866 (s390_ft_entry_vr): New const.
3867 (s390_ft_main_31): New const.
3868 (s390_ft_main_64): New const.
3869 (s390_ft_exit_fr): New const.
3870 (s390_ft_exit_vr): New const.
3871 (s390_ft_exit_misc): New const.
3872 (s390_ft_exit_gpr_esa): New const.
3873 (s390_ft_exit_gpr_zarch): New const.
3874 (append_insns): New function.
3875 (s390_relocate_instruction): New function.
3876 (s390_install_fast_tracepoint_jump_pad): New function.
3877 (s390_get_min_fast_tracepoint_insn_len): New function.
3878 (s390_get_ipa_tdesc_idx): New function.
3879 (struct linux_target_ops): Wire in the above functions.
3880 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3881 * linux-s390-tdesc.h: New file.
3882
a4105d04
MK
38832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3884
3885 * linux-s390-low.c (s390_supports_tracepoints): New function.
3886 (struct linux_target_ops): Fill supports_tracepoints hook.
3887
35ac8b3e
YQ
38882016-03-18 Yao Qi <yao.qi@linaro.org>
3889
3890 * linux-low.c (lwp_signal_can_be_delivered): New function.
3891 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3892
94610ec4
YQ
38932016-03-18 Yao Qi <yao.qi@linaro.org>
3894
3895 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3896 0 if signal is enqueued. Remove 'signal' from one debugging
3897 message. Move one debugging message to some lines below.
3898 Remove code setting 'signal' to 0.
3899
80aea927
YQ
39002016-03-18 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-low.c (linux_low_filter_event): Remove redundant
3903 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3904
b04fd3be
MK
39052016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3906
3907 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3908 (struct linux_target_ops): Wire in the above.
3909
c40c8d4b
YQ
39102016-03-03 Yao Qi <yao.qi@linaro.org>
3911
3912 * linux-low.c: Update comments to start_step_over.
3913
0f8288ae
YQ
39142016-03-03 Yao Qi <yao.qi@linaro.org>
3915
3916 PR server/19736
3917 * linux-low.c (handle_extended_wait): Set child suspended
3918 if event_lwp->bp_reinsert isn't zero.
3919
fdbd04a8
YQ
39202016-03-02 Yao Qi <yao.qi@linaro.org>
3921
3922 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3923 enqueue_pending_signal.
3924
6896a8fa
MK
39252016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3926
3927 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3928 is actually loaded.
3929
ab503087
MK
39302016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3931
3932 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3933 (s390_regmap_3264) [!__s390x__]: New global.
3934 (s390_collect_ptrace_register): Skip map entries containing -1.
3935 (s390_supply_ptrace_register): Ditto.
3936 (s390_fill_gprs_high): New function.
3937 (s390_store_gprs_high): New function.
3938 (s390_regsets): Add NT_S390_HIGH_GPRS.
3939 (s390_get_hwcap): Enable on 31-bit.
3940 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3941 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3942 Detect NT_S390_HIGH_GPRS.
3943 (s390_usrregs_info_3264): Enable on 31-bit.
3944 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3945 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3946
ae91f625
MK
39472016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3948
3949 PR gdb/13808
3950 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3951 * configure.srv: Ditto.
3952 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3953 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3954 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3955 (init_registers_amd64_linux): Remove prototype.
3956 (tdesc_amd64_linux): Remove declaration.
3957 (get_ipa_tdesc): New function.
3958 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3959 initialize remaining tdescs.
3960 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3961 (init_registers_i386_linux): Remove prototype.
3962 (tdesc_i386_linux): Remove declaration.
3963 (get_ipa_tdesc): New function.
3964 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3965 initialize remaining tdescs.
3966 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3967 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3968 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3969 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3970 (x86_get_ipa_tdesc_idx): New function.
3971 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3972 * linux-x86-tdesc.h: New file.
3973 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3974 (target_get_ipa_tdesc_idx): New macro.
3975 * tracepoint.c (ipa_tdesc_idx): New macro.
3976 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3977 (symbol_list): Add ipa_tdesc_idx.
3978 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3979 (ipa_tdesc): Remove.
3980 (ipa_tdesc_idx): New variable.
3981 (get_context_regcache): Use get_ipa_tdesc.
3982 (gdb_collect): Ditto.
3983 (gdb_probe): Ditto.
3984 * tracepoint.h (get_ipa_tdesc): New prototype.
3985 (ipa_tdesc): Remove.
3986
e7ad2f14
PA
39872016-02-24 Pedro Alves <palves@redhat.com>
3988
3989 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3990 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3991 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3992 Factor out common code between the USE_SIGTRAP_SIGINFO and
3993 !USE_SIGTRAP_SIGINFO blocks.
3994 (linux_low_filter_event): Call save_stop_reason instead of
3995 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3996 Update comments.
3997 (linux_wait_1): Update comments.
3998
657f9cde
WW
39992016-02-24 Wei-cheng Wang <cole945@gmail.com>
4000
4001 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4002 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4003 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4004 ppc_insert_point, ppc_remove_point.
4005
b00b61e1
MK
40062016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4007
4008 * linux-s390-low.c (s390_supports_z_point_type): New function.
4009 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4010
553cb527
YQ
40112016-02-16 Yao Qi <yao.qi@linaro.org>
4012
4013 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4014 PC. Get pc from regcache_read_pc.
4015
a5652c21
YQ
40162016-02-12 Yao Qi <yao.qi@linaro.org>
4017
4018 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4019 or linux_get_pc_32bit.
4020 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4021
ed443b61
YQ
40222016-02-12 Yao Qi <yao.qi@linaro.org>
4023
4024 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4025 arm_linux_get_next_pcs_fixup.
4026
020ecd38
MK
40272016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4028
4029 * tracepoint.c (x_tracepoint_action_download): Change
4030 write_inferior_data_ptr to write_inferior_data_pointer.
4031 (cmd_qtstart): Likewise.
4032 (write_inferior_data_ptr): Remove.
4033 (download_agent_expr): Change write_inferior_data_ptr to
4034 write_inferior_data_pointer.
4035 (download_tracepoint_1): Likewise.
4036 (download_tracepoint): Likewise.
4037 (download_trace_state_variables): Likewise.
4038
7cae9051
WW
40392016-02-11 Wei-cheng Wang <cole945@gmail.com>
4040 Marcin Kościelnicki <koriakin@0x04.net>
4041
4042 * tracepoint.c (struct tracepoint_action_ops): Remove.
4043 (struct tracepoint_action): Remove ops.
4044 (m_tracepoint_action_download, r_tracepoint_action_download)
4045 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4046 size and offset accordingly.
4047 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4048 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4049 (tracepoint_action_send, tracepoint_action_download): New functions.
4050 Helpers for trace action handlers.
4051 (add_tracepoint_action): Remove setup actions ops.
4052 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4053
9f6a71b4
YQ
40542016-02-10 Yao Qi <yao.qi@linaro.org>
4055
4056 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4057
1e94266c
SM
40582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4059
4060 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4061 to AC_OUTPUT.
4062 * configure: Regenerate.
4063
8adce034
SM
40642016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4065
4066 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4067 void * to gdb_byte *.
4068 * linux-low.c (siginfo_fixup): Likewise.
4069 (linux_xfer_siginfo): Likewise.
4070 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4071 Likewise.
4072 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4073
93813b37
WT
40742016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4075
4076 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4077 to srv_tgtobj.
4078 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4079 to srv_tgtobj.
4080 * linux-x86-low.c [__x86_64__]: Include
4081 "nat/amd64-linux-siginfo.h".
4082 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4083 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4084 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4085 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4086 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4087 (cpt_si_fd, si_timerid, si_overrun): Move from
4088 nat/amd64-linux-siginfo.c.
4089 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4090
8424cc97
SM
40912016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4092
4093 * server.c (skip_to_semicolon): Remove.
4094 (process_point_options): Use strchrnul instead of
4095 skip_to_semicolon.
4096
4d18591b
YQ
40972016-01-26 Yao Qi <yao.qi@linaro.org>
4098
4099 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4100 * linux-low.c (install_software_single_step_breakpoints): Don't
4101 call regcache_read_pc.
4102 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4103 argument pc.
4104
d8020970
YQ
41052016-01-26 Yao Qi <yao.qi@linaro.org>
4106
4107 * linux-low.c (install_software_single_step_breakpoints): Call
4108 regcache_read_pc instead of get_pc.
4109
8b207339
YQ
41102016-01-26 Yao Qi <yao.qi@linaro.org>
4111
4112 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4113 (unblock_async_io): Rename to ...
4114 (block_unblock_async_io): ... it. New function.
4115 (enable_async_io): Don't install SIGIO handler. Unblock it
4116 instead.
4117 (disable_async_io): Don't ignore SIGIO. Block it instead.
4118 (initialize_async_io): Install SIGIO handler. Don't call
4119 unblock_async_io.
4120
18879fef
YQ
41212016-01-26 Yao Qi <yao.qi@linaro.org>
4122
4123 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4124 first character is '\003', call *the_target->request_interrupt.
4125
a0f8e08a
YQ
41262016-01-25 Yao Qi <yao.qi@linaro.org>
4127
4128 * remote-utils.c (new_thread_notify): Remove.
4129 (dead_thread_notify): Likewise.
4130 * remote-utils.h (new_thread_notify): Remove declaration.
4131 (dead_thread_notify): Likewise.
4132
cc5fd9ab
MK
41332016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4134
4135 * gdb.trace/pending.exp: Fix expected message on continue.
4136
99e8eb11
MK
41372016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4138
4139 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4140 it works properly on big-endian machines where sizeof (CORE_ADDR)
4141 != sizeof (void *).
4142
a994041d
PA
41432016-01-21 Pedro Alves <palves@redhat.com>
4144
4145 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4146 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4147 * configure: Regenerate.
4148
f7a6a40d
YQ
41492016-01-21 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4152 is_thumb and set it according to CPSR saved on the stack.
4153 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4154 arm_sigreturn_next_pc.
4155
6f69e520
YQ
41562016-01-18 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-low.c (linux_set_pc_64bit): New function.
4159 (linux_get_pc_64bit): New function.
4160 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4161 Declare.
4162 * linux-sparc-low.c (debug_threads): Remove declaration.
4163 (sparc_get_pc): Remove.
4164 (the_low_target): Use linux_get_pc_64bit instead of
4165 sparc_get_pc.
4166 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4167 (the_low_target): Use linux_get_pc_64bit and
4168 linux_set_pc_64bit.
4169
276d4552
YQ
41702016-01-18 Yao Qi <yao.qi@linaro.org>
4171
4172 * linux-arm-low.c (debug_threads): Remove declaration.
4173 (arm_get_pc, arm_set_pc): Remove.
4174 (the_low_target): Use linux_get_pc_32bit and
4175 linux_set_pc_32bit.
4176 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4177 (the_low_target): Use linux_get_pc_32bit and
4178 linux_set_pc_32bit.
4179 * linux-cris-low.c (debug_threads): Remove declaration.
4180 (cris_get_pc, cris_set_pc,): Remove.
4181 (the_low_target): Use linux_get_pc_32bit and
4182 linux_set_pc_32bit.
4183 * linux-crisv32-low.c (debug_threads): Remove declaration.
4184 (cris_get_pc, cris_set_pc): Remove.
4185 (the_low_target): Use linux_get_pc_32bit and
4186 linux_set_pc_32bit.
4187 * linux-low.c: Include inttypes.h.
4188 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4189 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4190 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4191 (the_low_target): Use linux_get_pc_32bit and
4192 linux_set_pc_32bit.
4193 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4194 (the_low_target): Use linux_get_pc_32bit and
4195 linux_set_pc_32bit.
4196 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4197 (the_low_target): Use linux_get_pc_32bit and
4198 linux_set_pc_32bit.
4199 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4200 (the_low_target): Use linux_get_pc_32bit and
4201 linux_set_pc_32bit.
4202 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4203 (the_low_target): Use linux_get_pc_32bit and
4204 linux_set_pc_32bit.
4205
eb0edac8
GB
42062016-01-18 Gary Benson <gbenson@redhat.com>
4207
4208 * configure.ac (AC_FUNC_FORK): New check.
4209 * config.in: Regenerate.
4210 * configure: Likewise.
4211
1b451dda
YQ
42122016-01-14 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4215 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4216 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4217 arm_get_next_pcs_ctor.
4218
82075af2
JS
42192016-01-12 Josh Stone <jistone@redhat.com>
4220 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4221
4222 * inferiors.h: Include "gdb_vecs.h".
4223 (struct process_info): Add syscalls_to_catch.
4224 * inferiors.c (remove_process): Free syscalls_to_catch.
4225 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4226 syscall_return stops.
4227 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4228 * server.c (handle_general_set): Handle QCatchSyscalls.
4229 (handle_query): Report support for QCatchSyscalls.
4230 * target.h (struct target_ops): Add supports_catch_syscall.
4231 (target_supports_catch_syscall): New macro.
4232 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4233 (struct lwp_info): Add syscall_state.
4234 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4235 Maintain syscall_state and syscalls_to_catch across exec.
4236 (get_syscall_trapinfo): New function, proxy to the_low_target.
4237 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4238 (linux_low_filter_event): Toggle syscall_state entry/return for
4239 syscall traps, and set it ignored for all others.
4240 (gdb_catching_syscalls_p): New function.
4241 (gdb_catch_this_syscall_p): New function.
4242 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4243 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4244 (linux_supports_catch_syscall): New function.
4245 (linux_target_ops): Install it.
4246 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4247 (the_low_target): Install it.
4248
8f13a3ce
MF
42492016-01-12 Mike Frysinger <vapier@gentoo.org>
4250
4251 * acinclude.m4: Include new ../warning.m4 file.
4252 * configure: Regenerated.
4253 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4254
5b3da067
MF
42552016-01-12 Mike Frysinger <vapier@gentoo.org>
4256
4257 * ax.c (is_goto_target): Mark static.
4258 * linux-low.c (register_addr): Likewise.
4259 (linux_fetch_registers, linux_store_registers): Likewise.
4260 * mem-break.c (any_persistent_commands): Fix old prototype.
4261 (add_commands_to_breakpoint): Mark static.
4262 * regcache.c (find_register_by_name): Delete unused func.
4263 * remote-utils.c (hex_or_minus_one): Mark static.
4264 * server.c (monitor_show_help): Mark static.
4265 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4266 handle_v_requests): Likewise.
4267
bc504a31
PA
42682016-01-12 Pedro Alves <palves@redhat.com>
4269
4270 Remove use of the registered trademark symbol throughout.
4271
5a0dd67a
YQ
42722016-01-08 Yao Qi <yao.qi@linaro.org>
4273
4274 * remote-utils.c (getpkt): If c is '\003', call target hook
4275 request_interrupt.
4276
b2ca446f
YQ
42772016-01-06 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4280 linux-aarch32-low.c.
4281 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4282 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4283 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4284 (thumb2_breakpoint): Declare.
4285 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4286 linux-aarch32-low.h.
4287 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4288 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4289 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4290
edd88788
JB
42912016-01-01 Joel Brobecker <brobecker@adacore.com>
4292
4293 * gdbreplay.c (gdbreplay_version): Change copyright year in
4294 version message.
4295 * server.c (gdbserver_version): Likewise.
4296
65da7f14
PP
42972015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4298
4299 * server.c (crc32_table): Delete.
4300 (crc32): Use libiberty's xcrc32 function.
4301
4abd5ed2
JB
43022015-12-22 Joel Brobecker <brobecker@adacore.com>
4303
4304 * lynx-low.c (lynx_delete_thread_callback): New function.
4305 (lynx_mourn): Properly delete our process and all of its
4306 threads. Remove call to clear_inferiors.
4307
0e50fe5c
JB
43082015-12-22 Joel Brobecker <brobecker@adacore.com>
4309
4310 * target.c (thread_search_callback): Add check that
4311 the thread_stopped target callback is not NULL before
4312 calling it.
4313
35adc03f
YQ
43142015-12-21 Yao Qi <yao.qi@linaro.org>
4315
4316 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4317 arm breakpoint.
4318
bd2b2909
AT
43192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4320
4321 * server.c (handle_query): Call target_supports_software_single_step.
4322
7fe5e27e
AT
43232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4324
4325 * linux-low.c (single_step): New function.
4326 (linux_resume_one_lwp_throw): Call single_step.
4327 (start_step_over): Likewise.
4328
d9311bfa
AT
43292015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330
4331 * Makefile.in (SFILES): Append arch/arm-linux.c,
4332 arch/arm-get-next-pcs.c.
4333 (arm-linux.o): New rule.
4334 (arm-get-next-pcs.o): New rule.
4335 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4336 arm-linux.o.
4337 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4338 to linux-aarch32-low.c.
4339 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4340 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4341 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4342 (thumb2_breakpoint_len): Likewise.
4343 (arm_is_thumb_mode): Make non-static.
4344 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4345 from linux-aarch32-low.c.
4346 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4347 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4348 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4349 (thumb2_breakpoint_len): Likewise.
4350 (arm_is_thumb_mode): New declaration.
4351 * linux-arm-low.c: Include arch/arm-linux.h
4352 aarch/arm-get-next-pcs.h, sys/syscall.h.
4353 (get_next_pcs_ops): New struct.
4354 (get_next_pcs_addr_bits_remove): New function.
4355 (get_next_pcs_is_thumb): New function.
4356 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4357 (arm_sigreturn_next_pc): Likewise.
4358 (get_next_pcs_syscall_next_pc): Likewise.
4359 (arm_gdbserver_get_next_pcs): Likewise.
4360 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4361 Initialize.
4362 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4363 * server.h: Include gdb_vecs.h.
4364
68ce2059
AT
43652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4366
4367 * Makefile.in (SFILES): Append common/common-regcache.c.
4368 (OBS): Append common-regcache.o.
4369 (common-regcache.o): New rule.
4370 * regcache.c (init_register_cache): Initialize cache to
4371 REG_UNAVAILABLE.
4372 (regcache_raw_read_unsigned): New function.
4373 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4374 register_status enum.
4375
fa5308bd
AT
43762015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4377
4378 * linux-aarch64-low.c (the_low_targets): Rename
4379 breakpoint_reinsert_addr to get_next_pcs.
4380 * linux-arm-low.c (the_low_targets): Likewise.
4381 * linux-bfin-low.c (the_low_targets): Likewise.
4382 * linux-cris-low.c (the_low_targets): Likewise.
4383 * linux-crisv32-low.c (the_low_targets): Likewise.
4384 * linux-low.c (can_software_single_step): Likewise.
4385 (install_software_single_step_breakpoints): New function.
4386 (start_step_over): Use install_software_single_step_breakpoints.
4387 * linux-low.h: New CORE_ADDR vector.
4388 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4389 get_next_pcs.
4390 * linux-mips-low.c (the_low_targets): Likewise.
4391 * linux-nios2-low.c (the_low_targets): Likewise.
4392 * linux-sparc-low.c (the_low_targets): Likewise.
4393
4a6ed09b
PA
43942015-12-17 Pedro Alves <palves@redhat.com>
4395
4396 * linux-low.c (linux_kill_one_lwp): Remove references to
4397 LinuxThreads.
4398 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4399 to 'kill'.
4400 (linux_init_signals): Delete.
4401 (initialize_low): Adjust.
4402 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4403
7544db95
PA
44042015-12-16 Pedro Alves <palves@redhat.com>
4405
4406 * configure.ac (compiler warning flags): When testing a
4407 -Wno-foo option, check whether -Wfoo works instead.
4408 * configure: Regenerate.
4409
8020350c
DB
44102015-12-11 Don Breazeal <donb@codesourcery.com>
4411
4412 * server.c (process_serial_event): Don't exit from gdbserver
4413 in remote mode if there are still active inferiors.
4414
db91f502
YQ
44152015-12-11 Yao Qi <yao.qi@linaro.org>
4416
4417 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4418 arm_breakpoint_at if the process is 32-bit.
4419
b37a6290
YQ
44202015-12-11 Yao Qi <yao.qi@linaro.org>
4421
4422 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4423 arm breakpoint.
4424
17b1509a
YQ
44252015-12-07 Yao Qi <yao.qi@linaro.org>
4426
4427 * configure.srv: Append arm.o to srv_tgtobj for
4428 aarch64*-*-linux* target.
4429 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4430 from linux-arm-low.c.
4431 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4432 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4433 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4434 (thumb2_breakpoint_len): Likewise.
4435 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4436 (arm_breakpoint_kinds): Likewise.
4437 (arm_breakpoint_kind_from_pc): Likewise.
4438 (arm_sw_breakpoint_from_kind): Likewise.
4439 (arm_breakpoint_kind_from_current_state): Likewise.
4440 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4441 (arm_sw_breakpoint_from_kind): Declare.
4442 (arm_breakpoint_kind_from_current_state): Declare.
4443 (arm_breakpoint_at): Declare.
4444 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4445 arm_sw_breakpoint_from_kind if process is 32-bit.
4446 (aarch64_breakpoint_kind_from_pc): New function.
4447 (aarch64_breakpoint_kind_from_current_state): New function.
4448 (the_low_target): Initialize fields breakpoint_kind_from_pc
4449 and breakpoint_kind_from_current_state.
4450 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4451 linux-aarch32-low.c.
4452 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4453 (arm_breakpoint, arm_breakpoint_len): Likewise.
4454 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4455 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4456 (arm_is_thumb_mode): Likewise.
4457 (arm_breakpoint_at): Likewise.
4458 (arm_breakpoint_kind_from_pc): Likewise.
4459 (arm_sw_breakpoint_from_kind): Likewise.
4460 (arm_breakpoint_kind_from_current_state): Likewise.
4461
4462 Revert:
4463 2015-08-04 Yao Qi <yao.qi@linaro.org>
4464
4465 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4466 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4467 * server.c (extended_protocol): Remove "static".
4468 * server.h (extended_protocol): Declare it.
4469
ece66d65
JS
44702015-12-04 Josh Stone <jistone@redhat.com>
4471
4472 * target.h (struct target_ops) <arch_setup>: Rename to ...
4473 (struct target_ops) <post_create_inferior>: ... this.
4474 (target_arch_setup): Rename to ...
4475 (target_post_create_inferior): ... this, calling post_create_inferior.
4476 * server.c (start_inferior): Update target_arch_setup calls to
4477 target_post_create_inferior.
4478 * linux-low.c (linux_low_ptrace_options): Forward declare.
4479 (linux_arch_setup): Update its comment for general use.
4480 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4481 (struct linux_target_ops): Use linux_post_create_inferior.
4482 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4483 to post_create_inferior.
4484 * nto-low.c (struct nto_target_ops): Likewise.
4485 * spu-low.c (struct spu_target_ops): Likewise.
4486 * win32-low.c (struct win32_target_ops): Likewise.
4487
e58c48b4
AT
44882015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4489
4490 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4491
fbec8956
AT
44922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4493
4494 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4495 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4496 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4497 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4498 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4499 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4500 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4501 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4502 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4503 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4504 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4505 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4506
9b4c5f87
AT
45072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4508
4509 * linux-low.c (linux_look_up_symbols): Don't call
4510 linux_supports_traceclone.
4511 * linux-low.h (thread_db_init): Remove use_events argument.
4512 * thread-db.c (thread_db_use_event): Remove global variable.
4513 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4514 (struct thread_db) <td_create_bp>: Remove field.
4515 (thread_db_create_event): Remove function.
4516 (thread_db_enable_reporting): Likewise.
4517 (find_one_thread): Don't check for thread_db_use_events.
4518 (attach_thread): Likewise.
4519 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4520 (try_thread_db_load_1): Don't check for thread_db_use_events.
4521 (thread_db_init): Remove use_events argument and thread events
4522 handling.
4523 (remove_thread_event_breakpoints): Remove function.
4524 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4525
7d00775e
AT
45262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4527
4528 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4529 New function.
4530 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4531 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4532 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4533 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4534 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4535 Initialize.
4536 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4537 New function.
4538 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4539 * linux-low.c (can_hardware_single_step): Use
4540 supports_hardware_single_step.
4541 (can_software_single_step): New function.
4542 (start_step_over): Call can_software_single_step.
4543 (linux_supports_hardware_single_step): New function.
4544 (struct target_ops) <supports_software_single_step>: Initialize.
4545 * linux-low.h (struct linux_target_ops)
4546 <supports_hardware_single_step>: Initialize.
4547 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4548 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4549 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4550 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4551 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4552 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4553 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4554 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4555 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4556 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4557 Initialize.
4558 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4559 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4560 Initialize.
4561 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4562 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4563 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4564 New function.
4565 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4566 * target.h (struct target_ops): <supports_software_single_step>:
4567 New field.
4568 (target_supports_software_single_step): New macro.
4569
2d97cd35
AT
45702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4571
4572 * linux-low.c (linux_wait_1): Fix pc advance condition.
4573 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4574 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4575
769ef81f
AT
45762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4577
4578 * linux-arm-low.c (arm_is_thumb_mode): New function.
4579 (arm_breakpoint_at): Use arm_is_thumb_mode.
4580 (arm_breakpoint_kind_from_current_state): New function.
4581 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4582 Initialize.
4583 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4584 (linux_breakpoint_kind_from_current_state): New function.
4585 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4586 * linux-low.h (struct linux_target_ops)
4587 <breakpoint_kind_from_current_state>: New field.
4588 * target.h (struct target_ops): Likewise.
4589 (target_breakpoint_kind_from_current_state): New macro.
4590
1bebeeca
PA
45912015-11-30 Pedro Alves <palves@redhat.com>
4592
4593 * linux-low.c (linux_resume): Wake up the event loop before
4594 returning.
4595
a67a9fae
PA
45962015-11-30 Pedro Alves <palves@redhat.com>
4597
4598 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4599 check.
4600 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4601 to -1.
4602 * target.c (struct thread_search): New structure.
4603 (thread_search_callback): New function.
4604 (prev_general_thread): New global.
4605 (prepare_to_access_memory, done_accessing_memory): New functions.
4606 * target.h (prepare_to_access_memory, done_accessing_memory):
4607 Replace macros with function declarations.
4608
f2faf941
PA
46092015-11-30 Pedro Alves <palves@redhat.com>
4610
4611 PR 14618
4612 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4613 report TARGET_WAITKIND_NO_RESUMED.
4614 * remote-utils.c (prepare_resume_reply): Handle
4615 TARGET_WAITKIND_NO_RESUMED.
4616 * server.c (report_no_resumed): New global.
4617 (handle_query) <qSupported>: Handle "no-resumed+". Report
4618 "no-resumed+" support.
4619 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4620 return error if the client doesn't support no-resumed events.
4621 (push_stop_notification): New function.
4622 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4623 events if the client supports them.
4624
a681f9c9
PA
46252015-11-30 Pedro Alves <palves@redhat.com>
4626
4627 * linux-low.c (thread_still_has_status_pending_p): Don't check
4628 vCont;t here.
4629 (lwp_resumed): New function.
4630 (status_pending_p_callback): Return early if the LWP is not
4631 supposed to be resumed.
4632
65706a29
PA
46332015-11-30 Pedro Alves <palves@redhat.com>
4634
4635 * linux-low.c (handle_extended_wait): Assert that the LWP's
4636 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4637 thread create events, leave the new child's status pending.
4638 (linux_low_filter_event): If GDB wants to hear about thread exit
4639 events, leave the LWP marked dead and don't delete it.
4640 (linux_wait_for_event_filtered): Don't check for thread exit.
4641 (filter_exit_event): New function.
4642 (linux_wait_1): Use it, when returning an exit event.
4643 (linux_resume_one_lwp_throw): Assert that the LWP's
4644 waitstatus is TARGET_WAITKIND_IGNORE.
4645 * remote-utils.c (prepare_resume_reply): Handle
4646 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4647 * server.c (report_thread_events): New global.
4648 (handle_general_set): Handle QThreadEvents.
4649 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4650 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4651 TARGET_WAITKIND_THREAD_EXITED.
4652 * server.h (report_thread_events): Declare.
4653
56cf4bed
PA
46542015-11-30 Pedro Alves <palves@redhat.com>
4655
4656 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4657 the thread's last_resume_kind was resume_stop.
4658
500c1d85
PA
46592015-11-30 Pedro Alves <palves@redhat.com>
4660
4661 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4662 before returning.
4663
de979965
PA
46642015-11-30 Pedro Alves <palves@redhat.com>
4665
4666 * server.c (handle_v_requests): Handle vCtrlC.
4667
34c65914
PA
46682015-11-30 Pedro Alves <palves@redhat.com>
4669
4670 * gdbthread.h (find_any_thread_of_pid): Declare.
4671 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4672 functions.
4673 * server.c (handle_query): If current_thread is NULL, look for
4674 another thread of the selected process.
4675
79efa585 46762015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4677 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4678
4679 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4680 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4681 name in reply.
4682 * target.h (struct target_ops) <thread_name>: New field.
4683 (target_thread_name): New macro.
4684
80d82c19
JB
46852015-11-23 Joel Brobecker <brobecker@adacore.com>
4686
4687 * regcache.h (regcache_invalidate_pid): Add declaration.
4688 * regcache.c (regcache_invalidate_pid): New function, extracted
4689 from regcache_invalidate.
4690 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4691 Add trivial documentation comment.
4692 * lynx-low.c: Use regcache_invalidate_pid instead of
4693 regcache_invalidate.
4694
64da5dd5
JB
46952015-11-23 Joel Brobecker <brobecker@adacore.com>
4696
4697 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4698 and Elf64_auxv_t if the target is Android.
4699
37ce4055
DE
47002015-11-22 Doug Evans <xdje42@gmail.com>
4701
4702 * target.h: #include <sys/types.h>.
4703
06e03fff
PA
47042015-11-19 Pedro Alves <palves@redhat.com>
4705
4706 * linux-low.c (linux_process_qsupported): Change prototype.
4707 Adjust.
4708 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4709 Change prototype.
4710 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4711 and adjust to loop over all features.
4712 * server.c (handle_query) <qSupported>: Adjust to call
4713 target_process_qsupported once, passing it a vector of unprocessed
4714 features.
4715 * target.h (struct target_ops) <process_qsupported>: Change
4716 prototype.
4717 (target_process_qsupported): Adjust.
4718
9a084706
PA
47192015-11-19 Pedro Alves <palves@redhat.com>
4720
4721 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4722 mode.
4723 * configure: Regenerate.
4724
dad44a1f
PA
47252015-11-19 Pedro Alves <palves@redhat.com>
4726
4727 * configure: Regenerate.
4728
231c0592
YQ
47292015-11-19 Yao Qi <yao.qi@linaro.org>
4730
4731 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4732 type to uint32_t.
4733
6c1c9a8b
YQ
47342015-11-19 Yao Qi <yao.qi@linaro.org>
4735
4736 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4737 (struct aarch64_operand): Move enum out.
4738
9caa3311
YQ
47392015-11-19 Yao Qi <yao.qi@linaro.org>
4740
4741 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4742 struct user_fpsimd_state *.
4743 (aarch64_store_fpregset): Likewise.
4744
6a69a054
YQ
47452015-11-19 Yao Qi <yao.qi@linaro.org>
4746
4747 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4748 struct user_pt_regs *.
4749 (aarch64_store_gregset): Likewise.
4750
1798301e
PA
47512015-11-18 Pedro Alves <palves@redhat.com>
4752
4753 * Makefile.in (all_object_files): Add $IPA_OBJS.
4754
ce7715e2
PA
47552015-11-17 Pedro Alves <palves@redhat.com>
4756
4757 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4758 GDB_SIGNAL_0 and gdb_signal_to_string.
4759
c0879059
PA
47602015-11-17 Pedro Alves <palves@redhat.com>
4761
4762 * win32-low.c (handle_output_debug_string): Remove parameter.
4763 (win32_kill): Remove our_status local and adjust call to
4764 handle_output_debug_string.
4765 (get_child_debug_event): Adjust call to
4766 handle_output_debug_string.
4767
1996e237
SM
47682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4769
4770 * linux-mips-low.c (mips_fill_gregset): Add cast.
4771 (mips_store_gregset): Likewise.
4772 (mips_fill_fpregset): Likewise.
4773 (mips_store_fpregset): Likewise.
4774
cbec665b
SM
47752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4776
4777 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4778 priv.
4779
eb3e3c67
SM
47802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4781
4782 * linux-mips-low.c (mips_linux_new_thread): Change type of
4783 watch_type to enum target_hw_bp_type.
4784
171de4b8
SM
47852015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4786
4787 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4788 Change return type to arm_hwbp_type.
4789
04248ead
SM
47902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4791
4792 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4793 (arm_store_gregset): Likewise.
4794 * linux-arm-low.c (arm_get_hwcap): Likewise.
4795 (arm_read_description): Likewise.
4796
04b3479c
SM
47972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4798
4799 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4800
2bc84e8a
SM
48012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4802
4803 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4804 (ppc_fill_vsxregset): Likewise.
4805 (ppc_store_vsxregset): Likewise.
4806 (ppc_fill_vrregset): Likewise.
4807 (ppc_store_vrregset): Likewise.
4808 (ppc_fill_evrregset): Likewise.
4809 (ppc_store_evrregset): Likewise.
4810
e6c5bb05
SM
48112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4812
4813 * linux-ppc-low.c (ppc_usrregs_info): Remove
4814 forward-declaration.
4815 (ppc_arch_setup): Move lower in file.
4816
7ea45d72
SM
48172015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4818
4819 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4820 (ps_pdwrite): Likewise.
4821
69291610
HW
48222015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4823
4824 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4825 to after assert checks.
4826
b42945fd
SM
48272015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4828
4829 * proc-service.c (ps_pdread): Add/adjust casts.
4830 (ps_pdwrite): Add/adjust casts.
4831
d6f85c84
SM
48322015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4833
4834 * server.c (handle_search_memory_1): Cast return value of
4835 memmem.
4836
f98cd059
SM
48372015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4838
4839 * server.c (write_qxfer_response): Change type of data to
4840 gdb_byte *.
4841
d2412fa5
PA
48422015-10-29 Pedro Alves <palves@redhat.com>
4843
4844 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4845
c17414a2
PA
48462015-10-29 Pedro Alves <palves@redhat.com>
4847
4848 * tracepoint.c (clear_installed_tracepoints): Add casts.
4849
e053fbc4
PA
48502015-10-29 Pedro Alves <palves@redhat.com>
4851
4852 * server.c (handle_v_cont, process_serial_event): Add enum
4853 gdb_signal casts to signal parsing code.
4854
add67df8
PA
48552015-10-29 Pedro Alves <palves@redhat.com>
4856
4857 * linux-low.h (NULL_REGSET): Define.
4858 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4859 * linux-arm-low.c (arm_regsets): Likewise.
4860 * linux-crisv32-low.c (cris_regsets): Likewise.
4861 * linux-m68k-low.c (m68k_regsets): Likewise.
4862 * linux-mips-low.c (mips_regsets): Likewise.
4863 * linux-nios2-low.c (nios2_regsets): Likewise.
4864 * linux-ppc-low.c (ppc_regsets): Likewise.
4865 * linux-s390-low.c (s390_regsets): Likewise.
4866 * linux-sh-low.c (sh_regsets): Likewise.
4867 * linux-sparc-low.c (sparc_regsets): Likewise.
4868 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4869 * linux-tile-low.c (tile_regsets): Likewise.
4870 * linux-x86-low.c (x86_regsets): Likewise.
4871 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4872
50bc912a
PA
48732015-10-29 Pedro Alves <palves@redhat.com>
4874
4875 * linux-low.h (NULL_REGSET): Define.
4876 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4877 * linux-arm-low.c (arm_regsets): Likewise.
4878 * linux-crisv32-low.c (cris_regsets): Likewise.
4879 * linux-m68k-low.c (m68k_regsets): Likewise.
4880 * linux-mips-low.c (mips_regsets): Likewise.
4881 * linux-nios2-low.c (nios2_regsets): Likewise.
4882 * linux-ppc-low.c (ppc_regsets): Likewise.
4883 * linux-s390-low.c (s390_regsets): Likewise.
4884 * linux-sh-low.c (sh_regsets): Likewise.
4885 * linux-sparc-low.c (sparc_regsets): Likewise.
4886 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4887 * linux-tile-low.c (tile_regsets): Likewise.
4888 * linux-x86-low.c (x86_regsets): Likewise.
4889 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4890
682b2546
DE
48912015-10-26 Doug Evans <dje@google.com>
4892
4893 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4894
963843d4
DE
48952015-10-26 Doug Evans <dje@google.com>
4896
4897 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4898
d41401ac
DE
48992015-10-26 Doug Evans <dje@google.com>
4900
4901 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4902 for debug_printf.
4903 (attach_thread, find_new_threads_callback): Ditto.
4904
3db28855
AT
49052015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4906
4907 * mem-break.h (set_breakpoint_data): Remove.
4908
fb78e89c
AT
49092015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4910
4911 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4912 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4913 (initialize_low): Remove set_breakpoint_data call.
4914 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4915 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4916 (initialize_low): Remove set_breakpoint_data call.
4917 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4918 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4919 (initialize_low): Remove set_breakpoint_data call.
4920
2e6ee069
AT
49212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4922
4923 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4924 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4925 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4926 * target.h (target_breakpoint_kind_from_pc): New macro.
4927
1652a986
AT
49282015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4929
4930 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4931 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4932 the default breakpoint kind.
4933
abeead09
AT
49342015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4935
4936 * linux-arm-low.c (arm_supports_z_point_type): Add software
4937 breakpoint support.
4938
b0b4b501
AT
49392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4940
4941 * linux-arm-low.c: Refactor breakpoint definitions.
4942 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4943 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4944
8689682c
AT
49452015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4946
4947 * Makefile.in: Add arm.c/o.
4948 * configure.srv: Likewise.
4949 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4950 (arm_breakpoint_kind_from_pc): New function.
4951 (arm_sw_breakpoint_from_kind): Return proper kind.
4952 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4953
27165294
AT
49542015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4955
4956 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4957 removal.
4958 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4959 (struct raw_breakpoint) <size>: Remove.
4960 (struct raw_breakpoint) <kind>: Add.
4961 (bp_size): New function.
4962 (bp_opcode): Likewise.
4963 (find_raw_breakpoint_at): Adjust for kind.
4964 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4965 (remove_memory_breakpoint): Adjust for kind call bp_size.
4966 (set_raw_breakpoint_at): Adjust for kind.
4967 (set_breakpoint): Likewise.
4968 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4969 (delete_raw_breakpoint): Adjust for kind.
4970 (delete_breakpoint): Likewise.
4971 (find_gdb_breakpoint): Likewise.
4972 (set_gdb_breakpoint_1): Likewise.
4973 (set_gdb_breakpoint): Likewise.
4974 (delete_gdb_breakpoint_1): Likewise.
4975 (delete_gdb_breakpoint): Likewise.
4976 (uninsert_raw_breakpoint): Likewise.
4977 (reinsert_raw_breakpoint): Likewise.
4978 (set_breakpoint_data): Remove.
4979 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4980 (check_mem_read): Adjust for kind call bp_size.
4981 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4982 (clone_one_breakpoint): Adjust for kind.
4983 * mem-break.h (set_gdb_breakpoint): Likewise.
4984 (delete_gdb_breakpoint): Likewise.
4985 * server.c (process_serial_event): Likewise.
4986
dd373349
AT
49872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4988
4989 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4990 (struct linux_target_ops) <breakpoint>: Remove.
4991 (struct linux_target_ops) <breakpoint_len>: Remove.
4992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4994 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4995 (arm_sw_breakpoint_from_kind): New function.
4996 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4997 (struct linux_target_ops) <breakpoint>: Remove.
4998 (struct linux_target_ops) <breakpoint_len>: Remove.
4999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5001 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5002 (struct linux_target_ops) <breakpoint>: Remove.
5003 (struct linux_target_ops) <breakpoint_len>: Remove.
5004 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5005 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5006 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5007 (struct linux_target_ops) <breakpoint>: Remove.
5008 (struct linux_target_ops) <breakpoint_len>: Remove.
5009 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5010 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5011 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5012 and sw_breakpoint_from_kind to increment the pc.
5013 (linux_breakpoint_kind_from_pc): New function.
5014 (linux_sw_breakpoint_from_kind): New function.
5015 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5016 (initialize_low): Call breakpoint_kind_from_pc and
5017 sw_breakpoint_from_kind to replace breakpoint_data/len.
5018 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5019 New field.
5020 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5021 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5022 (struct linux_target_ops) <breakpoint>: Remove.
5023 (struct linux_target_ops) <breakpoint_len>: Remove.
5024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5025 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5026 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5027 (struct linux_target_ops) <breakpoint>: Remove.
5028 (struct linux_target_ops) <breakpoint_len>: Remove.
5029 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5030 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5031 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5032 (struct linux_target_ops) <breakpoint>: Remove.
5033 (struct linux_target_ops) <breakpoint_len>: Remove.
5034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5036 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5037 (struct linux_target_ops) <breakpoint>: Remove.
5038 (struct linux_target_ops) <breakpoint_len>: Remove.
5039 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5040 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5041 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5042 (struct linux_target_ops) <breakpoint>: Remove.
5043 (struct linux_target_ops) <breakpoint_len>: Remove.
5044 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5045 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5046 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5047 (struct linux_target_ops) <breakpoint>: Remove.
5048 (struct linux_target_ops) <breakpoint_len>: Remove.
5049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5050 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5051 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5052 (struct linux_target_ops) <breakpoint>: Remove.
5053 (struct linux_target_ops) <breakpoint_len>: Remove.
5054 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5055 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5056 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5057 (struct linux_target_ops) <breakpoint>: Remove.
5058 (struct linux_target_ops) <breakpoint_len>: Remove.
5059 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5060 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5061 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5062 (struct linux_target_ops) <breakpoint>: Remove.
5063 (struct linux_target_ops) <breakpoint_len>: Remove.
5064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5065 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5066 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5067 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5068 (struct linux_target_ops) <breakpoint>: Remove.
5069 (struct linux_target_ops) <breakpoint_len>: Remove.
5070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5072 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5073 (struct linux_target_ops) <breakpoint>: Remove.
5074 (struct linux_target_ops) <breakpoint_len>: Remove.
5075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5077
4cd98a19
AT
50782015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5079
5080 * linux-cris-low.c (cris_get_pc): Remove void arg.
5081
774ee6d2
AR
50822015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5083
5084 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5085 variable name.
5086
833dcd29
AR
50872015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5088
5089 * inferiors.c (thread_pid_matches_callback): New function.
5090 (find_thread_process): New function.
5091 (remove_thread): Reset current_thread.
5092 (remove_process): Assert threads have been removed first.
5093
8d689ee5
YQ
50942015-10-15 Yao Qi <yao.qi@linaro.org>
5095
5096 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5097 if it is 3.
5098 (aarch64_remove_point): Likewise.
5099 * regcache.c (regcache_register_size): New function.
5100
1c2e1515
YQ
51012015-10-12 Yao Qi <yao.qi@linaro.org>
5102
5103 * linux-aarch64-low.c: Update all callers as emit_load_store
5104 is renamed to aarch64_emit_load_store.
5105
e1c587c3
YQ
51062015-10-12 Yao Qi <yao.qi@linaro.org>
5107
5108 * linux-aarch64-low.c: Update all callers of function renaming
5109 from emit_insn to aarch64_emit_insn.
5110
b6542f81
YQ
51112015-10-12 Yao Qi <yao.qi@linaro.org>
5112
5113 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5114 arch/aarch64-insn.h.
5115 (struct aarch64_memory_operand): Likewise.
5116 (ENCODE): Likewise.
5117 (emit_insn): Move to arch/aarch64-insn.c.
5118 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5119 (emit_load_store): Move to arch/aarch64-insn.c.
5120 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5121 (can_encode_int32): Remove.
5122
246994ce
YQ
51232015-10-12 Yao Qi <yao.qi@linaro.org>
5124
5125 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5126 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5127 (aarch64_relocate_instruction): Likewise.
5128 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5129 (struct aarch64_insn_visitor): Likewise.
5130
0badd99f
YQ
51312015-10-12 Yao Qi <yao.qi@linaro.org>
5132
5133 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5134 (struct aarch64_insn_visitor): New.
5135 (struct aarch64_insn_relocation_data): New.
5136 (aarch64_ftrace_insn_reloc_b): New function.
5137 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5138 (aarch64_ftrace_insn_reloc_cb): Likewise.
5139 (aarch64_ftrace_insn_reloc_tb): Likewise.
5140 (aarch64_ftrace_insn_reloc_adr): Likewise.
5141 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5142 (aarch64_ftrace_insn_reloc_others): Likewise.
5143 (visitor): New.
5144 (aarch64_relocate_instruction): Use visitor.
5145
dfaffe9d
YQ
51462015-10-12 Yao Qi <yao.qi@linaro.org>
5147
5148 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5149 int. Add argument buf.
5150 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5151 aarch64_relocate_instruction.
5152
70b439f0
YQ
51532015-10-12 Yao Qi <yao.qi@linaro.org>
5154
5155 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5156 argument insn. Remove local variable insn. Don't call
5157 target_read_uint32.
5158 (aarch64_install_fast_tracepoint_jump_pad): Call
5159 target_read_uint32.
5160
7781c06f
YQ
51612015-09-30 Yao Qi <yao.qi@linaro.org>
5162
5163 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5164 (emit_load_store_pair): Likewise.
5165
9a3c8263
SM
51662015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5167
5168 * dll.c (match_dll): Add cast(s).
5169 (unloaded_dll): Likewise.
5170 * linux-low.c (second_thread_of_pid_p): Likewise.
5171 (delete_lwp_callback): Likewise.
5172 (count_events_callback): Likewise.
5173 (select_event_lwp_callback): Likewise.
5174 (linux_set_resume_request): Likewise.
5175 * server.c (accumulate_file_name_length): Likewise.
5176 (emit_dll_description): Likewise.
5177 (handle_qxfer_threads_worker): Likewise.
5178 (visit_actioned_threads): Likewise.
5179 * thread-db.c (any_thread_of): Likewise.
5180 * tracepoint.c (same_process_p): Likewise.
5181 (match_blocktype): Likewise.
5182 (build_traceframe_info_xml): Likewise.
5183
224c3ddb
SM
51842015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5185
5186 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5187 assignment.
5188 (gdb_unparse_agent_expr): Likewise.
5189 * hostio.c (require_data): Likewise.
5190 (handle_pread): Likewise.
5191 * linux-low.c (disable_regset): Likewise.
5192 (fetch_register): Likewise.
5193 (store_register): Likewise.
5194 (get_dynamic): Likewise.
5195 (linux_qxfer_libraries_svr4): Likewise.
5196 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5197 (set_fast_tracepoint_jump): Likewise.
5198 (uninsert_fast_tracepoint_jumps_at): Likewise.
5199 (reinsert_fast_tracepoint_jumps_at): Likewise.
5200 (validate_inserted_breakpoint): Likewise.
5201 (clone_agent_expr): Likewise.
5202 * regcache.c (init_register_cache): Likewise.
5203 * remote-utils.c (putpkt_binary_1): Likewise.
5204 (decode_M_packet): Likewise.
5205 (decode_X_packet): Likewise.
5206 (look_up_one_symbol): Likewise.
5207 (relocate_instruction): Likewise.
5208 (monitor_output): Likewise.
5209 * server.c (handle_search_memory): Likewise.
5210 (handle_qxfer_exec_file): Likewise.
5211 (handle_qxfer_libraries): Likewise.
5212 (handle_qxfer): Likewise.
5213 (handle_query): Likewise.
5214 (handle_v_cont): Likewise.
5215 (handle_v_run): Likewise.
5216 (captured_main): Likewise.
5217 * target.c (write_inferior_memory): Likewise.
5218 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5219 * tracepoint.c (init_trace_buffer): Likewise.
5220 (add_tracepoint_action): Likewise.
5221 (add_traceframe): Likewise.
5222 (add_traceframe_block): Likewise.
5223 (cmd_qtdpsrc): Likewise.
5224 (cmd_qtdv): Likewise.
5225 (cmd_qtstatus): Likewise.
5226 (response_source): Likewise.
5227 (response_tsv): Likewise.
5228 (cmd_qtnotes): Likewise.
5229 (gdb_collect): Likewise.
5230 (initialize_tracepoint): Likewise.
5231
afbe19f8
PL
52322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5233
5234 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5235 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5236 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5237 <NOP>: New.
5238 (enum aarch64_condition_codes): New enum.
5239 (w0): New static global.
5240 (fp): Likewise.
5241 (lr): Likewise.
5242 (struct aarch64_memory_operand) <type>: New
5243 MEMORY_OPERAND_POSTINDEX type.
5244 (postindex_memory_operand): New helper function.
5245 (emit_ret): New function.
5246 (emit_load_store_pair): New function, factored out of emit_stp
5247 with support for MEMORY_OPERAND_POSTINDEX.
5248 (emit_stp): Rewrite using emit_load_store_pair.
5249 (emit_ldp): New function.
5250 (emit_load_store): Likewise.
5251 (emit_ldr): Mention post-index instruction in comment.
5252 (emit_ldrh): New function.
5253 (emit_ldrb): New function.
5254 (emit_ldrsw): Mention post-index instruction in comment.
5255 (emit_str): Likewise.
5256 (emit_subs): New function.
5257 (emit_cmp): Likewise.
5258 (emit_and): Likewise.
5259 (emit_orr): Likewise.
5260 (emit_orn): Likewise.
5261 (emit_eor): Likewise.
5262 (emit_mvn): Likewise.
5263 (emit_lslv): Likewise.
5264 (emit_lsrv): Likewise.
5265 (emit_asrv): Likewise.
5266 (emit_mul): Likewise.
5267 (emit_sbfm): Likewise.
5268 (emit_sbfx): Likewise.
5269 (emit_ubfm): Likewise.
5270 (emit_ubfx): Likewise.
5271 (emit_csinc): Likewise.
5272 (emit_cset): Likewise.
5273 (emit_nop): Likewise.
5274 (emit_ops_insns): New helper function.
5275 (emit_pop): Likewise.
5276 (emit_push): Likewise.
5277 (aarch64_emit_prologue): New function.
5278 (aarch64_emit_epilogue): Likewise.
5279 (aarch64_emit_add): Likewise.
5280 (aarch64_emit_sub): Likewise.
5281 (aarch64_emit_mul): Likewise.
5282 (aarch64_emit_lsh): Likewise.
5283 (aarch64_emit_rsh_signed): Likewise.
5284 (aarch64_emit_rsh_unsigned): Likewise.
5285 (aarch64_emit_ext): Likewise.
5286 (aarch64_emit_log_not): Likewise.
5287 (aarch64_emit_bit_and): Likewise.
5288 (aarch64_emit_bit_or): Likewise.
5289 (aarch64_emit_bit_xor): Likewise.
5290 (aarch64_emit_bit_not): Likewise.
5291 (aarch64_emit_equal): Likewise.
5292 (aarch64_emit_less_signed): Likewise.
5293 (aarch64_emit_less_unsigned): Likewise.
5294 (aarch64_emit_ref): Likewise.
5295 (aarch64_emit_if_goto): Likewise.
5296 (aarch64_emit_goto): Likewise.
5297 (aarch64_write_goto_address): Likewise.
5298 (aarch64_emit_const): Likewise.
5299 (aarch64_emit_call): Likewise.
5300 (aarch64_emit_reg): Likewise.
5301 (aarch64_emit_pop): Likewise.
5302 (aarch64_emit_stack_flush): Likewise.
5303 (aarch64_emit_zero_ext): Likewise.
5304 (aarch64_emit_swap): Likewise.
5305 (aarch64_emit_stack_adjust): Likewise.
5306 (aarch64_emit_int_call_1): Likewise.
5307 (aarch64_emit_void_call_2): Likewise.
5308 (aarch64_emit_eq_goto): Likewise.
5309 (aarch64_emit_ne_goto): Likewise.
5310 (aarch64_emit_lt_goto): Likewise.
5311 (aarch64_emit_le_goto): Likewise.
5312 (aarch64_emit_gt_goto): Likewise.
5313 (aarch64_emit_ge_got): Likewise.
5314 (aarch64_emit_ops_impl): New static global variable.
5315 (aarch64_emit_ops): New target function, return
5316 &aarch64_emit_ops_impl.
5317 (struct linux_target_ops): Install it.
5318
bb903df0
PL
53192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5320
5321 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5322 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5323 aarch64-ipa.o.
5324 * linux-aarch64-ipa.c: New file.
5325 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5326 and endian.h.
5327 (aarch64_get_thread_area): New target method.
5328 (extract_signed_bitfield): New helper function.
5329 (aarch64_decode_ldr_literal): New function.
5330 (enum aarch64_opcodes): New enum.
5331 (struct aarch64_register): New struct.
5332 (struct aarch64_operand): New struct.
5333 (x0): New static global.
5334 (x1): Likewise.
5335 (x2): Likewise.
5336 (x3): Likewise.
5337 (x4): Likewise.
5338 (w2): Likewise.
5339 (ip0): Likewise.
5340 (sp): Likewise.
5341 (xzr): Likewise.
5342 (aarch64_register): New helper function.
5343 (register_operand): Likewise.
5344 (immediate_operand): Likewise.
5345 (struct aarch64_memory_operand): New struct.
5346 (offset_memory_operand): New helper function.
5347 (preindex_memory_operand): Likewise.
5348 (enum aarch64_system_control_registers): New enum.
5349 (ENCODE): New macro.
5350 (emit_insn): New helper function.
5351 (emit_b): New function.
5352 (emit_bcond): Likewise.
5353 (emit_cb): Likewise.
5354 (emit_tb): Likewise.
5355 (emit_blr): Likewise.
5356 (emit_stp): Likewise.
5357 (emit_ldp_q_offset): Likewise.
5358 (emit_stp_q_offset): Likewise.
5359 (emit_load_store): Likewise.
5360 (emit_ldr): Likewise.
5361 (emit_ldrsw): Likewise.
5362 (emit_str): Likewise.
5363 (emit_ldaxr): Likewise.
5364 (emit_stxr): Likewise.
5365 (emit_stlr): Likewise.
5366 (emit_data_processing_reg): Likewise.
5367 (emit_data_processing): Likewise.
5368 (emit_add): Likewise.
5369 (emit_sub): Likewise.
5370 (emit_mov): Likewise.
5371 (emit_movk): Likewise.
5372 (emit_mov_addr): Likewise.
5373 (emit_mrs): Likewise.
5374 (emit_msr): Likewise.
5375 (emit_sevl): Likewise.
5376 (emit_wfe): Likewise.
5377 (append_insns): Likewise.
5378 (can_encode_int32_in): New helper function.
5379 (aarch64_relocate_instruction): New function.
5380 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5381 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5382 (struct linux_target_ops): Install aarch64_get_thread_area,
5383 aarch64_install_fast_tracepoint_jump_pad and
5384 aarch64_get_min_fast_tracepoint_insn_len.
5385
787749ea
PL
53862015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5387
5388 * Makefile.in (aarch64-insn.o): New rule.
5389 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5390
9812b2e6
YQ
53912015-09-21 Yao Qi <yao.qi@linaro.org>
5392
5393 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5394
18fe412b
YQ
53952015-09-21 Yao Qi <yao.qi@linaro.org>
5396
5397 * tracepoint.c (max_jump_pad_size): Remove.
5398
a0cc84cd
YQ
53992015-09-18 Yao Qi <yao.qi@linaro.org>
5400
5401 * linux-aarch64-low.c: Don't include sys/uio.h.
5402 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5403
d78908cf
WW
54042015-09-16 Wei-cheng Wang <cole945@gmail.com>
5405
5406 * tracepoint.c (eval_result_type): Change prototype.
5407 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5408
d57e0d50
PA
54092015-09-15 Pedro Alves <palves@redhat.com>
5410
5411 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5412 Check whether to report exec events instead of checking whether
5413 multiprocess is enabled.
5414
5a676acc
PA
54152015-09-15 Pedro Alves <palves@redhat.com>
5416
5417 PR remote/18965
5418 * remote-utils.c (prepare_resume_reply): Merge
5419 TARGET_WAITKIND_VFORK_DONE switch case with the
5420 TARGET_WAITKIND_FORKED case.
5421
7c5d0fad
YQ
54222015-09-15 Yao Qi <yao.qi@linaro.org>
5423
5424 * server.c (handle_query): Check string comparison using
5425 "else if" instead of "if".
5426
750ce8d1
YQ
54272015-09-15 Yao Qi <yao.qi@linaro.org>
5428
5429 * server.c (vCont_supported): New global variable.
5430 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5431 matches. Append ";vContSupported+" to own_buf.
5432 (handle_v_requests): Append ";s;S" to own_buf if target supports
5433 hardware single step or vCont_supported is false.
5434 (capture_main): Set vCont_supported to zero.
5435
70b90b91
YQ
54362015-09-15 Yao Qi <yao.qi@linaro.org>
5437
5438 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5439 it to ...
5440 (linux_supports_hardware_single_step): ... New function.
5441 (linux_target_ops): Update.
5442 * lynx-low.c (lynx_target_ops): Set field
5443 supports_hardware_single_step to target_can_do_hardware_single_step.
5444 * nto-low.c (nto_target_ops): Likewise.
5445 * spu-low.c (spu_target_ops): Likewise.
5446 * win32-low.c (win32_target_ops): Likewise.
5447 * target.c (target_can_do_hardware_single_step): New function.
5448 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5449 Remove. <supports_hardware_single_step>: New field.
5450 (target_supports_conditional_breakpoints): Remove.
5451 (target_supports_hardware_single_step): New macro.
5452 (target_can_do_hardware_single_step): Declare.
5453 * server.c (handle_query): Use target_supports_hardware_single_step
5454 instead of target_supports_conditional_breakpoints.
5455
ade90bde
YQ
54562015-09-15 Yao Qi <yao.qi@linaro.org>
5457
5458 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5459 function.
5460 (struct linux_target_ops the_low_target): Install
5461 aarch64_linux_siginfo_fixup.
5462
94585166
DB
54632015-09-11 Don Breazeal <donb@codesourcery.com>
5464 Luis Machado <lgustavo@codesourcery.com>
5465
5466 * linux-low.c (linux_mourn): Static declaration.
5467 (linux_arch_setup): Move in front of
5468 handle_extended_wait.
5469 (linux_arch_setup_thread): New function.
5470 (handle_extended_wait): Handle exec events. Call
5471 linux_arch_setup_thread. Make event_lwp argument a
5472 pointer-to-a-pointer.
5473 (check_zombie_leaders): Do not check stopped threads.
5474 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5475 (linux_low_filter_event): Add lwp and thread for exec'ing
5476 non-leader thread if leader thread has been deleted.
5477 Refactor code into linux_arch_setup_thread and call it.
5478 Pass child lwp pointer by reference to handle_extended_wait.
5479 (linux_wait_for_event_filtered): Update comment.
5480 (linux_wait_1): Prevent clobbering exec event status.
5481 (linux_supports_exec_events): New function.
5482 (linux_target_ops) <supports_exec_events>: Initialize new member.
5483 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5484 new member.
5485 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5486 * server.c (report_exec_events): New global variable.
5487 (handle_query): Handle qSupported query for exec-events feature.
5488 (captured_main): Initialize report_exec_events.
5489 * server.h (report_exec_events): Declare new global variable.
5490 * target.h (struct target_ops) <supports_exec_events>: New
5491 member.
5492 (target_supports_exec_events): New macro.
5493 * win32-low.c (win32_target_ops) <supports_exec_events>:
5494 Initialize new member.
5495
0568462b
MM
54962015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5497
5498 * linux-low.c (linux_low_enable_btrace): Remove.
5499 (linux_target_ops): Replace linux_low_enable_btrace with
5500 linux_enable_btrace.
5501
39edd165
YQ
55022015-09-03 Yao Qi <yao.qi@linaro.org>
5503
5504 * linux-aarch64-low.c (aarch64_insert_point): Call
5505 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5506 returns true.
5507
1db33b5a
UW
55082015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5509
5510 * linux-low.c (check_stopped_by_breakpoint): Use
5511 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5512
ab290430
PA
55132015-08-27 Pedro Alves <palves@redhat.com>
5514
5515 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5516
8d749320
SM
55172015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5518
6711b7f8
SM
5519 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5520 the XNEW-family equivalent.
8d749320
SM
5521 (compile_bytecodes): Likewise.
5522 * dll.c (loaded_dll): Likewise.
5523 * event-loop.c (append_callback_event): Likewise.
5524 (create_file_handler): Likewise.
5525 (create_file_event): Likewise.
5526 * hostio.c (handle_open): Likewise.
5527 * inferiors.c (add_thread): Likewise.
5528 (add_process): Likewise.
5529 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5530 * linux-arm-low.c (arm_new_process): Likewise.
5531 (arm_new_thread): Likewise.
5532 * linux-low.c (add_to_pid_list): Likewise.
5533 (linux_add_process): Likewise.
5534 (handle_extended_wait): Likewise.
5535 (add_lwp): Likewise.
5536 (enqueue_one_deferred_signal): Likewise.
5537 (enqueue_pending_signal): Likewise.
5538 (linux_resume_one_lwp_throw): Likewise.
5539 (linux_resume_one_thread): Likewise.
5540 (linux_read_memory): Likewise.
5541 (linux_write_memory): Likewise.
5542 * linux-mips-low.c (mips_linux_new_process): Likewise.
5543 (mips_linux_new_thread): Likewise.
5544 (mips_add_watchpoint): Likewise.
5545 * linux-x86-low.c (initialize_low_arch): Likewise.
5546 * lynx-low.c (lynx_add_process): Likewise.
5547 * mem-break.c (set_raw_breakpoint_at): Likewise.
5548 (set_breakpoint): Likewise.
5549 (add_condition_to_breakpoint): Likewise.
5550 (add_commands_to_breakpoint): Likewise.
5551 (clone_agent_expr): Likewise.
5552 (clone_one_breakpoint): Likewise.
5553 * regcache.c (new_register_cache): Likewise.
5554 * remote-utils.c (look_up_one_symbol): Likewise.
5555 * server.c (queue_stop_reply): Likewise.
5556 (start_inferior): Likewise.
5557 (queue_stop_reply_callback): Likewise.
5558 (handle_target_event): Likewise.
5559 * spu-low.c (fetch_ppc_memory): Likewise.
5560 (store_ppc_memory): Likewise.
5561 * target.c (set_target_ops): Likewise.
5562 * thread-db.c (thread_db_load_search): Likewise.
5563 (try_thread_db_load_1): Likewise.
5564 * tracepoint.c (add_tracepoint): Likewise.
5565 (add_tracepoint_action): Likewise.
5566 (create_trace_state_variable): Likewise.
5567 (cmd_qtdpsrc): Likewise.
5568 (cmd_qtro): Likewise.
5569 (add_while_stepping_state): Likewise.
5570 * win32-low.c (child_add_thread): Likewise.
5571 (get_image_name): Likewise.
5572
ed8b7b42
YQ
55732015-08-25 Yao Qi <yao.qi@linaro.org>
5574
5575 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5576
db3cb7cb
YQ
55772015-08-25 Yao Qi <yao.qi@linaro.org>
5578
5579 * Makefile.in (aarch64-linux.o): New rule.
5580 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5581 srv_tgtobj.
5582 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5583 (aarch64_init_debug_reg_state): Make it extern.
5584 (aarch64_linux_prepare_to_resume): Remove.
5585
f6011a1c
YQ
55862015-08-25 Yao Qi <yao.qi@linaro.org>
5587
5588 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5589 lwp_arch_private_info and ptid_of_lwp.
5590
88e2cf7e
YQ
55912015-08-25 Yao Qi <yao.qi@linaro.org>
5592
5593 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5594 Find proc_info by find_process_pid. All callers updated.
5595
5e35436e
YQ
55962015-08-25 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5599 Remove.
5600 (debug_reg_change_callback): Remove.
5601 (aarch64_notify_debug_reg_change): Remove.
5602
4a8a7965
YQ
56032015-08-25 Yao Qi <yao.qi@linaro.org>
5604
5605 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5606 Call current_lwp_ptid.
5607
32a271ee
YQ
56082015-08-25 Yao Qi <yao.qi@linaro.org>
5609
5610 * linux-aarch64-low.c (debug_reg_change_callback): Use
5611 debug_printf.
5612
0d51c8d7
YQ
56132015-08-25 Yao Qi <yao.qi@linaro.org>
5614
5615 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5616
31a43dd5
YQ
56172015-08-25 Yao Qi <yao.qi@linaro.org>
5618
5619 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5620
8ee52567
YQ
56212015-08-25 Yao Qi <yao.qi@linaro.org>
5622
5623 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5624 the code.
5625
ff3f0f45
YQ
56262015-08-25 Yao Qi <yao.qi@linaro.org>
5627
5628 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5629 Remove.
5630 (debug_reg_change_callback): Remove argument entry and add argument
5631 lwp. Remove local variable thread. Don't print thread id in the
5632 debugging output. Don't check whether pid of thread equals to pid.
5633 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5634 iterate_over_lwps instead find_inferior.
5635
3d40fbb5
PA
56362015-08-24 Pedro Alves <palves@redhat.com>
5637
5638 * inferiors.c (get_first_process): New function.
5639 * inferiors.h (get_first_process): New declaration.
5640 * remote-utils.c (read_ptid): Default to the first process in the
5641 list, instead of to the current thread's process.
5642
438e1e42
PA
56432015-08-24 Pedro Alves <palves@redhat.com>
5644
5645 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5646 * event-loop.c: Likewise.
5647 * remote-utils.c: Likewise.
5648 * tracepoint.c: Likewise.
5649
a8c6d4fc
PA
56502015-08-24 Pedro Alves <palves@redhat.com>
5651
5652 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5653 ptid_get_lwp.
5654
99b0bb12
PA
56552015-08-21 Pedro Alves <palves@redhat.com>
5656
5657 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5658 instead of literal 1.
5659
f8904751
PA
56602015-08-21 Pedro Alves <palves@redhat.com>
5661
5662 * tdesc.c (default_description): Explicitly zero-initialize.
5663
465a859e
PA
56642015-08-21 Pedro Alves <palves@redhat.com>
5665
5666 PR gdb/18749
5667 * inferiors.c (remove_thread): Discard any pending stop reply for
5668 this thread.
5669 * server.c (remove_all_on_match_pid): Rename to ...
5670 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5671 instead of a pid.
5672 (discard_queued_stop_replies): Change parameter to a ptid. Now
5673 extern.
5674 (handle_v_kill, kill_inferior_callback, captured_main)
5675 (process_serial_event): Adjust.
5676 * server.h (discard_queued_stop_replies): Declare.
5677
f0db101d
PA
56782015-08-21 Pedro Alves <palves@redhat.com>
5679
5680 * linux-low.c (wait_for_sigstop): Always switch to no thread
5681 selected if the previously current thread dies.
5682 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5683 process instead of the current thread's.
5684 * remote-utils.c (input_interrupt): Don't check if there's no
5685 current thread.
5686 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5687 current thread to the general thread fails, error out.
5688 (handle_qxfer_auxv, handle_qxfer_libraries)
5689 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5690 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5691 (handle_query): Check if there's a thread selected instead of
5692 checking whether there's any thread in the thread list.
5693 (handle_qxfer_threads, handle_qxfer_btrace)
5694 (handle_qxfer_btrace_conf): Don't error out early if there's no
5695 thread in the thread list.
5696 (handle_v_cont, myresume): Don't set the current thread to the
5697 continue thread.
5698 (process_serial_event) <Hg handling>: Also set thread_id if the
5699 previous general thread is still alive.
5700 (process_serial_event) <g/G handling>: If setting the current
5701 thread to the general thread fails, error out.
5702 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5703 thread's lwp instead of the current thread's.
5704 * target.c (set_desired_thread): If the desired thread was not
5705 found, leave the current thread pointing to NULL. Return an int
5706 (boolean) indicating success.
5707 * target.h (set_desired_thread): Change return type to int.
5708
40045d91
MF
57092015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5710
5711 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5712 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5713 #includes.
5714 (ps_get_thread_area): New function.
5715
45face3b
GB
57162015-08-19 Gary Benson <gbenson@redhat.com>
5717
5718 * hostio.c (handle_pread): Do not attempt to read more data
5719 than hostio_reply_with_data can fit in a packet.
5720
16d5f642
JB
57212015-08-18 Joel Brobecker <brobecker@adacore.com>
5722
5723 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5724
a738da3a
MF
57252015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5726
5727 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5728
33ebda9d
PA
57292015-08-06 Pedro Alves <palves@redhat.com>
5730
5731 * tracepoint.c (expr_eval_result): Now an int.
5732
a44892be
PA
57332015-08-06 Pedro Alves <palves@redhat.com>
5734
5735 * gdbthread.h (struct regcache): Forward declare.
5736 (struct thread_info) <regcache_data>: Now a struct regcache
5737 pointer.
5738 * inferiors.c (inferior_regcache_data)
5739 (set_inferior_regcache_data): Now work with struct regcache
5740 pointers.
5741 * inferiors.h (struct regcache): Forward declare.
5742 (inferior_regcache_data, set_inferior_regcache_data): Now work
5743 with struct regcache pointers.
5744 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5745 (free_register_cache_thread): Remove struct regcache pointer
5746 casts.
5747
608a1e46
PA
57482015-08-06 Pedro Alves <palves@redhat.com>
5749
5750 * server.c (captured_main): On error, print the exception message
5751 to stderr, and if run_once is set, throw a quit.
5752
f0ce0d3a
PA
57532015-08-06 Pedro Alves <palves@redhat.com>
5754
5755 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5756 the current thread.
5757
bf47e248
PA
57582015-08-06 Pedro Alves <palves@redhat.com>
5759
5760 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5761 reading beyond the passed in buffer length.
5762
b6b9ffcc
PL
57632015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5764
5765 * tracepoint.c (symbol_list) <required>: Remove.
5766
863d01bd
PA
57672015-08-06 Pedro Alves <palves@redhat.com>
5768
5769 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5770 count if stopping and suspending threads.
5771 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5772 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5773 (linux_detach): Complete an ongoing step-over.
5774 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5775 throughout.
5776 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5777 (linux_wait_1): If passing a signal to the inferior after
5778 finishing a step-over, unsuspend and re-resume all lwps. If we
5779 see a single-step event but the thread should be continuing, don't
5780 pass the trap to gdb.
5781 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5782 internal_error instead of gdb_assert.
5783 (enqueue_pending_signal): New function.
5784 (check_ptrace_stopped_lwp_gone): Add debug output.
5785 (start_step_over): Use internal_error instead of gdb_assert.
5786 (complete_ongoing_step_over): New function.
5787 (linux_resume_one_thread): Don't resume a suspended thread.
5788 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5789 it stepping.
5790
00db26fa
PA
57912015-08-06 Pedro Alves <palves@redhat.com>
5792
5793 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5794 (linux_thread_alive): Use lwp_is_marked_dead.
5795 (extended_event_reported): Delete.
5796 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5797 instead of extended_event_reported.
5798 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5799 as well.
5800 (lwp_is_marked_dead): New function.
5801 (lwp_running): Use lwp_is_marked_dead.
5802 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5803 comment.
5804
ad071a30
PA
58052015-08-06 Pedro Alves <palves@redhat.com>
5806
5807 * linux-low.c (linux_wait_1): Move fork event output out of the
5808 !report_to_gdb check. Pass event_child->waitstatus to
5809 target_waitstatus_to_string instead of ourstatus.
5810
524b57e6
YQ
58112015-08-04 Yao Qi <yao.qi@linaro.org>
5812
5813 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5814 if current_thread is 32 bit.
5815
6085d6f6
YQ
58162015-08-04 Yao Qi <yao.qi@linaro.org>
5817
5818 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5819 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5820 * server.c (extended_protocol): Remove "static".
5821 * server.h (extended_protocol): Declare it.
5822
8a7e4587
YQ
58232015-08-04 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5826 both aarch64 and aarch32.
5827 (aarch64_set_pc): Likewise.
5828
3b53ae99
YQ
58292015-08-04 Yao Qi <yao.qi@linaro.org>
5830
5831 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5832 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5833 arm-with-neon.xml to srv_xmlfiles.
5834 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5835 (is_64bit_tdesc): New function.
5836 (aarch64_linux_read_description): New function.
5837 (aarch64_arch_setup): Call aarch64_linux_read_description.
5838 (regs_info): Rename to regs_info_aarch64.
5839 (aarch64_regs_info): Return right regs_info.
5840 (initialize_low_arch): Call initialize_low_arch_aarch32.
5841
bd9e6534
YQ
58422015-08-04 Yao Qi <yao.qi@linaro.org>
5843
5844 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5845 * linux-aarch32-low.c: New file.
5846 * linux-aarch32-low.h: New file.
5847 * linux-arm-low.c (arm_fill_gregset): Move it to
5848 linux-aarch32-low.c.
5849 (arm_store_gregset): Likewise.
5850 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5851 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5852 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5853 (regs_info): Rename to regs_info_arm.
5854 (arm_regs_info): Return regs_info_aarch32 if
5855 have_ptrace_getregset is 1 and target description is
5856 arm_with_neon or arm_with_vfpv3.
5857 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5858 Call initialize_low_arch_aarch32 instead.
5859
ded48a5e
YQ
58602015-08-04 Yao Qi <yao.qi@linaro.org>
5861
5862 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5863 * linux-low.c: ... here.
5864 * linux-low.h (have_ptrace_getregset): Declare it.
5865
96e9210f
PA
58662015-08-04 Pedro Alves <palves@redhat.com>
5867
5868 * thread-db.c (struct thread_db): Use new typedefs.
5869 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5870 CHK calls.
5871 (disable_thread_event_reporting): Cast result of dlsym to
5872 destination function pointer type.
5873 (thread_db_mourn): Use td_ta_delete_ftype.
5874
af60a1ef
SL
58752015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5876
5877 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5878 arch variant.
5879 (CDX_BREAKPOINT): Define for R2.
5880 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5881 (the_low_target): Add comments.
5882
e8b41681
YQ
58832015-07-30 Yao Qi <yao.qi@linaro.org>
5884
5885 * linux-arm-low.c (arm_hwcap): Remove it.
5886 (arm_read_description): New local variable arm_hwcap. Don't
5887 set arm_hwcap to zero.
5888
89abb039
YQ
58892015-07-30 Yao Qi <yao.qi@linaro.org>
5890
5891 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5892 Use regcache->tdesc instead.
5893 (arm_store_wmmxregset): Likewise.
5894 (arm_fill_vfpregset): Likewise.
5895 (arm_store_vfpregset): Likewise.
5896
deca266c
YQ
58972015-07-30 Yao Qi <yao.qi@linaro.org>
5898
5899 * linux-arm-low.c: Include arch/arm.h.
5900 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5901 (arm_store_gregset): Likewise.
5902
aa58a496
SM
59032015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5904
5905 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5906 ptrace's 4th parameter.
5907
50904b25
YQ
59082015-07-27 Yao Qi <yao.qi@linaro.org>
5909
5910 * configure.srv (case aarch64*-*-linux*): Don't set
5911 srv_linux_usrregs.
5912
5826e159
PA
59132015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5914
5915 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5916 sys/ptrace.h.
5917 * linux-arm-low.c: Likewise.
5918 * linux-cris-low.c: Likewise.
5919 * linux-crisv32-low.c: Likewise.
5920 * linux-low.c: Likewise.
5921 * linux-m68k-low.c: Likewise.
5922 * linux-mips-low.c: Likewise.
5923 * linux-nios2-low.c: Likewise.
5924 * linux-s390-low.c: Likewise.
5925 * linux-sparc-low.c: Likewise.
5926 * linux-tic6x-low.c: Likewise.
5927 * linux-tile-low.c: Likewise.
5928 * linux-x86-low.c: Likewise.
5929
54019719
PA
59302015-07-24 Pedro Alves <palves@redhat.com>
5931
5932 * config.in: Regenerate.
5933 * configure: Regenerate.
5934
eb7aa561
PA
59352015-07-24 Pedro Alves <palves@redhat.com>
5936
5937 * acinclude.m4: Include ../ptrace.m4.
5938 * configure.ac: Call GDB_AC_PTRACE.
5939 * config.in, configure: Regenerate.
5940
55d7b841
YQ
59412015-07-24 Yao Qi <yao.qi@linaro.org>
5942
5943 * linux-low.c (linux_create_inferior): Remove setting to
5944 proc->priv->new_inferior.
5945 (linux_attach): Likewise.
5946 (linux_low_filter_event): Likewise.
5947 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5948
c06cbd92
YQ
59492015-07-24 Yao Qi <yao.qi@linaro.org>
5950
5951 * linux-low.c (linux_arch_setup): New function.
5952 (linux_low_filter_event): If proc->tdesc is NULL and
5953 proc->attached is true, call the_low_target.arch_setup.
5954 Otherwise, keep status pending, and return.
5955 (linux_resume_one_lwp_throw): Don't call get_pc if
5956 thread->while_stepping isn't NULL. Don't call
5957 get_thread_regcache if proc->tdesc is NULL.
5958 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5959 (linux_target_ops): Install arch_setup.
5960 * server.c (start_inferior): Call the_target->arch_setup.
5961 * target.h (struct target_ops) <arch_setup>: New field.
5962 (target_arch_setup): New marco.
5963 * lynx-low.c (lynx_target_ops): Update.
5964 * nto-low.c (nto_target_ops): Update.
5965 * spu-low.c (spu_target_ops): Update.
5966 * win32-low.c (win32_target_ops): Update.
5967
5ae3ebba
YQ
59682015-07-24 Yao Qi <yao.qi@linaro.org>
5969
5970 * linux-low.c (linux_add_process): Don't set
5971 proc->priv->new_inferior.
5972 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5973 (linux_attach): Likewise.
5974
eb97750b
YQ
59752015-07-24 Yao Qi <yao.qi@linaro.org>
5976
5977 * server.c (start_inferior): Code refactor.
5978
51aee833
YQ
59792015-07-24 Yao Qi <yao.qi@linaro.org>
5980
5981 * server.c (process_serial_event): Set general_thread.
5982
af1b22f3
YQ
59832015-07-21 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5986 aarch64_linux_get_debug_reg_capacity.
5987
554717a3
YQ
59882015-07-17 Yao Qi <yao.qi@linaro.org>
5989
5990 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5991 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5992 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5993 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5994 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5995 (AARCH64_HWP_ALIGNMENT): Likewise.
5996 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5997 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5998 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5999 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6000 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6001 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6002 (struct aarch64_debug_reg_state): Likewise.
6003 (struct arch_lwp_info): Likewise.
6004 (aarch64_align_watchpoint): Likewise.
6005 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6006 (aarch64_watchpoint_length): Likewise.
6007 (aarch64_point_encode_ctrl_reg): Likewise
6008 (aarch64_point_is_aligned): Likewise.
6009 (aarch64_align_watchpoint): Likewise.
6010 (aarch64_linux_set_debug_regs):
6011 (aarch64_dr_state_insert_one_point): Likewise.
6012 (aarch64_dr_state_remove_one_point): Likewise.
6013 (aarch64_handle_breakpoint): Likewise.
6014 (aarch64_handle_aligned_watchpoint): Likewise.
6015 (aarch64_handle_unaligned_watchpoint): Likewise.
6016 (aarch64_handle_watchpoint): Likewise.
6017
c67ca4de
YQ
60182015-07-17 Yao Qi <yao.qi@linaro.org>
6019
6020 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6021 and don't aarch64_get_debug_reg_state. All callers update.
6022 (aarch64_handle_aligned_watchpoint): Likewise.
6023 (aarch64_handle_unaligned_watchpoint): Likewise.
6024 (aarch64_handle_watchpoint): Likewise.
6025 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6026 (aarch64_remove_point): Likewise.
6027
25abf979
YQ
60282015-07-17 Yao Qi <yao.qi@linaro.org>
6029
6030 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6031 debug_printf.
6032 (aarch64_handle_unaligned_watchpoint): Likewise.
6033
db1ff28b
JK
60342015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6035
6036 Revert the previous 3 commits:
6037 Move gdb_regex* to common/
6038 Move linux_find_memory_regions_full & co.
6039 gdbserver build-id attribute generator
6040
700ca40f
JK
60412015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6042 Jan Kratochvil <jan.kratochvil@redhat.com>
6043
6044 gdbserver build-id attribute generator.
6045 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6046 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6047 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6048 (find_phdr): New.
6049 (get_dynamic): Use find_pdhr to traverse program headers.
6050 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6051 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6052 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6053 (get_hex_build_id): New.
6054 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6055 to reply XML document.
6056
9904185c
JK
60572015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6058 Jan Kratochvil <jan.kratochvil@redhat.com>
6059
6060 * target.c: Include target/target-utils.h and fcntl.h.
6061 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6062 (target_fileio_read_stralloc): New functions.
6063
6e5b4429
JK
60642015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6065
6066 * Makefile.in (OBS): Add gdb_regex.o.
6067 (gdb_regex.o): New.
6068 * config.in: Rebuilt.
6069 * configure: Rebuilt.
6070
ddc98fbf
JK
60712015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6072 Jan Kratochvil <jan.kratochvil@redhat.com>
6073
6074 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6075 * Makefile.in (OBS): Add target-utils.o.
6076 (linux-maps.o, target-utils.o): New.
6077 * configure.srv (srv_linux_obj): Add linux-maps.o.
6078
e57bb7a0
PL
60792015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6080
6081 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6082 function, return 1.
6083 (the_low_target): Install it.
6084
586b02a9
PA
60852015-07-14 Pedro Alves <palves@redhat.com>
6086
6087 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6088 Instead, ignore ECHILD, and throw an error for other errnos.
6089
58c1b36c
PA
60902015-07-10 Pedro Alves <palves@redhat.com>
6091
6092 * event-loop.c (struct callback_event) <data>: Change type to
6093 gdb_client_data instance instead of gdb_client_data pointer.
6094 (append_callback_event): Adjust.
6095
421530db
PL
60962015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6097
6098 * linux-aarch64-low.c: Add comments for each linux_target_ops
6099 method. Remove comments already covered in target_ops and
6100 linux_target_ops definitions.
6101 (the_low_target): Add comments for each unimplemented method.
6102
c2d65f38
YQ
61032015-07-09 Yao Qi <yao.qi@linaro.org>
6104
6105 * linux-aarch64-low.c (aarch64_regmap): Remove.
6106 (aarch64_usrregs_info): Remove.
6107 (regs_info): Set field usrregs to NULL.
6108
b20a6524
MM
61092015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6110
6111 * linux-low.c: Include "rsp-low.h"
6112 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6113 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6114 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6115 (handle_btrace_enable_pt): New.
6116 (handle_btrace_general_set): Support "pt".
6117 (handle_btrace_conf_general_set): Support "pt:size".
6118
96c97461
PL
61192015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6120
6121 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6122 Z_PACKET_SW_BP.
6123
37d66942
PL
61242015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6125
6126 * linux-aarch64-low.c: Remove comment about endianness.
6127 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6128 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6129 memcmp.
6130
dc06243f
GB
61312015-06-24 Gary Benson <gbenson@redhat.com>
6132
6133 * linux-i386-ipa.c (stdint.h): Do not include.
6134 * lynx-i386-low.c (stdint.h): Likewise.
6135 * lynx-ppc-low.c (stdint.h): Likewise.
6136 * mem-break.c (stdint.h): Likewise.
6137 * thread-db.c (stdint.h): Likewise.
6138 * tracepoint.c (stdint.h): Likewise.
6139 * win32-low.c (stdint.h): Likewise.
6140
124e13d9
SM
61412015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6142
6143 * server.c (write_qxfer_response): Update call to
6144 remote_escape_output.
6145
909c2cda
JK
61462015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6147 Jan Kratochvil <jan.kratochvil@redhat.com>
6148
6149 Merge multiple hex conversions.
6150 * gdbreplay.c (tohex): Rename to 'fromhex'.
6151 (logchar): Use fromhex.
6152
24c05f46
JK
61532015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6154
6155 * server.c (handle_qxfer_libraries): Set `version' attribute for
6156 <library-list>.
6157
14d2069a
GB
61582015-06-10 Gary Benson <gbenson@redhat.com>
6159
6160 * target.h (struct target_ops) <multifs_open>: New field.
6161 <multifs_unlink>: Likewise.
6162 <multifs_readlink>: Likewise.
6163 * linux-low.c (nat/linux-namespaces.h): New include.
6164 (linux_target_ops): Initialize the_target->multifs_open,
6165 the_target->multifs_unlink and the_target->multifs_readlink.
6166 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6167 * hostio.c (hostio_fs_pid): New static variable.
6168 (hostio_handle_new_gdb_connection): New function.
6169 (handle_setfs): Likewise.
6170 (handle_open): Use the_target->multifs_open as appropriate.
6171 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6172 (handle_readlink): Use the_target->multifs_readlink as
6173 appropriate.
6174 (handle_vFile): Handle vFile:setfs packets.
6175 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6176 after target_handle_new_gdb_connection.
6177
4b8b5e72
GB
61782015-06-10 Gary Benson <gbenson@redhat.com>
6179
6180 * configure.ac (AC_CHECK_FUNCS): Add setns.
6181 * config.in: Regenerate.
6182 * configure: Likewise.
6183 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6184 (linux-namespaces.o): New rule.
6185 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6186
3ac2e371
GB
61872015-06-09 Gary Benson <gbenson@redhat.com>
6188
6189 * hostio.c (handle_open): Process mode argument with
6190 fileio_to_host_mode.
6191
ca9b78ce
YQ
61922015-06-01 Yao Qi <yao.qi@linaro.org>
6193
6194 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6195 * linux-x86-low.c: Likewise.
6196
bfacd19d
DB
61972015-05-28 Don Breazeal <donb@codesourcery.com>
6198
6199 * linux-low.c (handle_extended_wait): Initialize
6200 thread_info.last_resume_kind for new fork children.
6201
452003ef
PA
62022015-05-15 Pedro Alves <palves@redhat.com>
6203
6204 * target.h (target_handle_new_gdb_connection): Rewrite using if
6205 wrapped in do/while.
6206
1041a03c
JB
62072015-05-14 Joel Brobecker <brobecker@adacore.com>
6208
6209 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6210 * configure, config.in: Regenerate.
6211 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6212 Declare typedef.
6213
c269dbdb
DB
62142015-05-12 Don Breazeal <donb@codesourcery.com>
6215
6216 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6217 PTRACE_EVENT_VFORK_DONE.
6218 (linux_low_ptrace_options, extended_event_reported): Add vfork
6219 events.
6220 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6221 and "vforkdone" for RSP 'T' Stop Reply Packet.
6222 * server.h (report_vfork_events): Declare
6223 global variable.
6224
3a8a0396
DB
62252015-05-12 Don Breazeal <donb@codesourcery.com>
6226
6227 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6228 (the_low_target) <new_fork>: Initialize new member.
6229 * linux-arm-low.c (arm_new_fork): New function.
6230 (the_low_target) <new_fork>: Initialize new member.
6231 * linux-low.c (handle_extended_wait): Call new target function
6232 new_fork.
6233 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6234 * linux-mips-low.c (mips_add_watchpoint): New function
6235 extracted from mips_insert_point.
6236 (the_low_target) <new_fork>: Initialize new member.
6237 (mips_linux_new_fork): New function.
6238 (mips_insert_point): Call mips_add_watchpoint.
6239 * linux-x86-low.c (x86_linux_new_fork): New function.
6240 (the_low_target) <new_fork>: Initialize new member.
6241
de0d863e
DB
62422015-05-12 Don Breazeal <donb@codesourcery.com>
6243
6244 * linux-low.c (handle_extended_wait): Implement return value,
6245 rename argument 'event_child' to 'event_lwp', handle
6246 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6247 (linux_low_ptrace_options): New function.
6248 (linux_low_filter_event): Call linux_low_ptrace_options,
6249 use different argument fo linux_enable_event_reporting,
6250 use return value from handle_extended_wait.
6251 (extended_event_reported): New function.
6252 (linux_wait_1): Call extended_event_reported and set
6253 status to report fork events.
6254 (linux_write_memory): Add pid to debug message.
6255 (reset_lwp_ptrace_options_callback): New function.
6256 (linux_handle_new_gdb_connection): New function.
6257 (linux_target_ops): Initialize new structure member.
6258 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6259 * lynx-low.c: Initialize new structure member.
6260 * remote-utils.c (prepare_resume_reply): Implement stop reason
6261 "fork" for "T" stop message.
6262 * server.c (handle_query): Call handle_new_gdb_connection.
6263 * server.h (report_fork_events): Declare global flag.
6264 * target.h (struct target_ops) <handle_new_gdb_connection>:
6265 New member.
6266 (target_handle_new_gdb_connection): New macro.
6267 * win32-low.c: Initialize new structure member.
6268
ddcbc397
DB
62692015-05-12 Don Breazeal <donb@codesourcery.com>
6270
6271 * mem-break.c (APPEND_TO_LIST): Define macro.
6272 (clone_agent_expr): New function.
6273 (clone_one_breakpoint): New function.
6274 (clone_all_breakpoints): New function.
6275 * mem-break.h: Declare new functions.
6276
89245bc0
DB
62772015-05-12 Don Breazeal <donb@codesourcery.com>
6278
6279 * linux-low.c (linux_supports_fork_events): New function.
6280 (linux_supports_vfork_events): New function.
6281 (linux_target_ops): Initialize new structure members.
6282 (initialize_low): Call linux_check_ptrace_features.
6283 * lynx-low.c (lynx_target_ops): Initialize new structure
6284 members.
6285 * server.c (report_fork_events, report_vfork_events):
6286 New global flags.
6287 (handle_query): Add new features to qSupported packet and
6288 response.
6289 (captured_main): Initialize new global variables.
6290 * target.h (struct target_ops) <supports_fork_events>:
6291 New member.
6292 <supports_vfork_events>: New member.
6293 (target_supports_fork_events): New macro.
6294 (target_supports_vfork_events): New macro.
6295 * win32-low.c (win32_target_ops): Initialize new structure
6296 members.
6297
835205d0
GB
62982015-05-12 Gary Benson <gbenson@redhat.com>
6299
6300 * server.c (handle_qxfer_exec_file): Use current process
6301 if annex is empty.
6302
21e94bd9
SL
63032015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6304
6305 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6306 Remove HAVE_PTRACE_GETREGS conditionals.
6307 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6308 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6309
45614f15
YQ
63102015-05-08 Yao Qi <yao.qi@linaro.org>
6311
6312 * linux-low.c (linux_supports_conditional_breakpoints): New
6313 function.
6314 (linux_target_ops): Install new target method.
6315 * lynx-low.c (lynx_target_ops): Install NULL hook for
6316 supports_conditional_breakpoints.
6317 * nto-low.c (nto_target_ops): Likewise.
6318 * spu-low.c (spu_target_ops): Likewise.
6319 * win32-low.c (win32_target_ops): Likewise.
6320 * server.c (handle_query): Check
6321 target_supports_conditional_breakpoints.
6322 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6323 New field.
6324 (target_supports_conditional_breakpoints): New macro.
6325
80ad801e
PA
63262015-05-06 Pedro Alves <palves@redhat.com>
6327
6328 PR server/18081
6329 * server.c (start_inferior): If the process exits, mourn it.
6330
819843c7
GB
63312015-04-21 Gary Benson <gbenson@redhat.com>
6332
6333 * hostio.c (fileio_open_flags_to_host): Factored out to
6334 fileio_to_host_openflags in common/fileio.c. Single use
6335 updated.
6336
a2d5a9d7
MF
63372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6338
6339 * linux-xtensa-low.c (xtensa_fill_gregset)
6340 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6341 XCHAL_HAVE_LOOP.
6342
deb44829
MF
63432015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6344
6345 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6346 (regs_info): Replace usrregs pointer with NULL.
6347
e57f1de3
GB
63482015-04-17 Gary Benson <gbenson@redhat.com>
6349
6350 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6351 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6352 * server.c (handle_qxfer_exec_file): New function.
6353 (qxfer_packets): Add exec-file entry.
6354 (handle_query): Report qXfer:exec-file:read as supported packet.
6355
62828379
RN
63562015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6357
6358 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6359
b88bb450
GB
63602015-04-09 Gary Benson <gbenson@redhat.com>
6361
6362 * hostio-errno.c (errno_to_fileio_error): Remove function.
6363 Update caller to use remote_fileio_to_fio_error.
6364
c8f4bfdd
YQ
63652015-04-09 Yao Qi <yao.qi@linaro.org>
6366
6367 * linux-low.c (linux_insert_point): Call
6368 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6369 (linux_remove_point): Call remove_memory_breakpoint if type is
6370 raw_bkpt_type_sw.
6371 * linux-x86-low.c (x86_insert_point): Don't call
6372 insert_memory_breakpoint.
6373 (x86_remove_point): Don't call remove_memory_breakpoint.
6374
41f98f02
PA
63752015-04-01 Pedro Alves <palves@redhat.com>
6376 Cleber Rosa <crosa@redhat.com>
6377
6378 * server.c (gdbserver_usage): Reorganize and extend the usage
6379 message.
6380
2bf6fb9d
PA
63812015-03-24 Pedro Alves <palves@redhat.com>
6382
6383 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6384 output. Also dump TRAP_TRACE.
6385 (linux_low_filter_event): In debug output, distinguish a
6386 resume_stop SIGSTOP from a delayed SIGSTOP.
6387
369f6daa
GB
63882015-03-24 Gary Benson <gbenson@redhat.com>
6389
6390 * linux-x86-low.c (x86_linux_new_thread): Moved to
6391 nat/x86-linux.c.
6392 (x86_linux_prepare_to_resume): Likewise.
6393
8e5d4070
GB
63942015-03-24 Gary Benson <gbenson@redhat.com>
6395
6396 * Makefile.in (x86-linux-dregs.o): New rule.
6397 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6398 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6399 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6400 (x86_linux_dr_get): Likewise.
6401 (x86_linux_dr_set): Likewise.
6402 (update_debug_registers_callback): Likewise.
6403 (x86_linux_dr_set_addr): Likewise.
6404 (x86_linux_dr_get_addr): Likewise.
6405 (x86_linux_dr_set_control): Likewise.
6406 (x86_linux_dr_get_control): Likewise.
6407 (x86_linux_dr_get_status): Likewise.
6408 (x86_linux_update_debug_registers): Likewise.
6409
2b95d440
GB
64102015-03-24 Gary Benson <gbenson@redhat.com>
6411
6412 * linux-x86-low.c (x86_linux_update_debug_registers):
6413 New function, factored out from...
6414 (x86_linux_prepare_to_resume): ...this.
6415
14b0bc68
GB
64162015-03-24 Gary Benson <gbenson@redhat.com>
6417
6418 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6419 (x86_linux_dr_set): Likewise.
6420 (update_debug_registers_callback): Likewise.
6421 (x86_linux_dr_set_addr): Likewise.
6422 (x86_linux_dr_get_addr): Likewise.
6423 (x86_linux_dr_set_control): Likewise.
6424 (x86_linux_dr_get_control): Likewise.
6425 (x86_linux_dr_get_status): Likewise.
6426 (x86_linux_prepare_to_resume): Likewise.
6427
5dfe6ca8
GB
64282015-03-24 Gary Benson <gbenson@redhat.com>
6429
6430 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6431 Use perror_with_name. Pass string through gettext.
6432 (x86_linux_dr_set): Likewise.
6433
d33472ad
GB
64342015-03-24 Gary Benson <gbenson@redhat.com>
6435
6436 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6437 (x86_linux_dr_set_addr): ...this.
6438 (x86_dr_low_get_addr): Rename to...
6439 (x86_linux_dr_get_addr): ...this.
6440 (x86_dr_low_set_control): Rename to...
6441 (x86_linux_dr_set_control): ...this.
6442 (x86_dr_low_get_control): Rename to...
6443 (x86_linux_dr_get_control): ...this.
6444 (x86_dr_low_get_status): Rename to...
6445 (x86_linux_dr_get_status): ...this.
6446 (x86_dr_low): Update with new function names.
6447
4b134ca1
GB
64482015-03-24 Gary Benson <gbenson@redhat.com>
6449
6450 * Makefile.in (x86-linux.o): New rule.
6451 * configure.srv: Add x86-linux.o to relevant targets.
6452 * linux-low.c (lwp_set_arch_private_info): New function.
6453 (lwp_arch_private_info): Likewise.
6454 * linux-x86-low.c: Include nat/x86-linux.h.
6455 (arch_lwp_info): Removed structure.
6456 (update_debug_registers_callback):
6457 Use lwp_set_debug_registers_changed.
6458 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6459 and lwp_set_debug_registers_changed.
6460 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6461
34c703da
GB
64622015-03-24 Gary Benson <gbenson@redhat.com>
6463
6464 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6465 * linux-arm-low.c (arm_new_thread): Likewise.
6466 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6467 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6468 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6469 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6470
cff068da
GB
64712015-03-24 Gary Benson <gbenson@redhat.com>
6472
6473 * linux-low.c (ptid_of_lwp): New function.
6474 (lwp_is_stopped): Likewise.
6475 (lwp_stop_reason): Likewise.
6476 * linux-x86-low.c (update_debug_registers_callback):
6477 Use lwp_is_stopped.
6478 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6479 lwp_stop_reason.
6480
b2f7c7e8
GB
64812015-03-24 Gary Benson <gbenson@redhat.com>
6482
6483 * linux-low.h (linux_stop_lwp): Remove declaration.
6484
6d4ee8c6
GB
64852015-03-24 Gary Benson <gbenson@redhat.com>
6486
6487 * linux-low.h: Include nat/linux-nat.h.
6488 * linux-low.c (iterate_over_lwps_args): New structure.
6489 (iterate_over_lwps_filter): New function.
6490 (iterate_over_lwps): Likewise.
6491 * linux-x86-low.c (update_debug_registers_callback):
6492 Update signature to what iterate_over_lwps expects.
6493 Remove PID check that iterate_over_lwps now performs.
6494 (x86_dr_low_set_addr): Use iterate_over_lwps.
6495 (x86_dr_low_set_control): Likewise.
6496
70a0bb6b
GB
64972015-03-24 Gary Benson <gbenson@redhat.com>
6498
6499 * linux-x86-low.c (x86_debug_reg_state): New function.
6500 (x86_linux_prepare_to_resume): Use the above.
6501
7b669087
GB
65022015-03-24 Gary Benson <gbenson@redhat.com>
6503
6504 * linux-low.c (current_lwp_ptid): New function.
6505 * linux-x86-low.c: Include nat/linux-nat.h.
6506 (x86_dr_low_get_addr): Use current_lwp_ptid.
6507 (x86_dr_low_get_control): Likewise.
6508 (x86_dr_low_get_status): Likewise.
6509
eef49a3d
PA
65102015-03-20 Pedro Alves <palves@redhat.com>
6511
6512 * tracepoint.c (cmd_qtstatus): Make "str" const.
6513
b2333d22
PA
65142015-03-20 Pedro Alves <palves@redhat.com>
6515
6516 * server.c (handle_general_set): Make "req_str" const.
6517
23f238d3
PA
65182015-03-19 Pedro Alves <palves@redhat.com>
6519
6520 * linux-low.c (linux_resume_one_lwp): Rename to ...
6521 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6522 instead call perror_with_name.
6523 (check_ptrace_stopped_lwp_gone): New function.
6524 (linux_resume_one_lwp): Reimplement as wrapper around
6525 linux_resume_one_lwp_throw that swallows errors if the LWP is
6526 gone.
6527
91baf43f
PA
65282015-03-19 Pedro Alves <palves@redhat.com>
6529
6530 * linux-low.c (count_events_callback, select_event_lwp_callback):
6531 No longer check whether the thread has resume_stop as last resume
6532 kind.
6533
8bf3b159
PA
65342015-03-19 Pedro Alves <palves@redhat.com>
6535
6536 * linux-low.c (count_events_callback, select_event_lwp_callback):
6537 Use the lwp's status_pending_p field, not the thread's.
6538
b90fc188
PA
65392015-03-19 Pedro Alves <palves@redhat.com>
6540
6541 * linux-low.c (select_event_lwp_callback): Update comments to
6542 no longer mention SIGTRAP.
6543
464b0089
GB
65442015-03-18 Gary Benson <gbenson@redhat.com>
6545
6546 * server.c (handle_query): Do not report vFile:fstat as supported.
6547
aa9e327f
GB
65482015-03-11 Gary Benson <gbenson@redhat.com>
6549
6550 * hostio.c (sys/types.h): New include.
6551 (sys/stat.h): Likewise.
6552 (common-remote-fileio.h): Likewise.
6553 (handle_fstat): New function.
6554 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6555
791c0056
GB
65562015-03-11 Gary Benson <gbenson@redhat.com>
6557
6558 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6559 struct stat.st_blocks and struct stat.st_blksize.
6560 * configure: Regenerate.
6561 * config.in: Likewise.
6562 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6563 (OBS): Add common-remote-fileio.o.
6564 (common-remote-fileio.o): New rule.
6565
9a9df970
PA
65662015-03-09 Pedro Alves <palves@redhat.com>
6567
6568 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6569 'struct sockaddr' pointer in 'accept' call.
6570
9eb1356e
PA
65712015-03-09 Pedro Alves <palves@redhat.com>
6572
6573 Revert:
6574 2015-03-07 Pedro Alves <palves@redhat.com>
6575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6576 or <winsock2.h> here. Instead include "gdb_socket.h".
6577 (remote_open): Use union gdb_sockaddr_u.
6578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6579 or <winsock2.h> here. Instead include "gdb_socket.h".
6580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6582 or <sys/un.h>.
6583 (init_named_socket, gdb_agent_helper_thread): Use union
6584 gdb_sockaddr_u.
6585
aac331e4
PA
65862015-03-07 Pedro Alves <palves@redhat.com>
6587
6588 * configure.ac (build_warnings): Move
6589 -Wdeclaration-after-statement to the C-specific set.
6590 * configure: Regenerate.
6591
366c75fc
PA
65922015-03-07 Pedro Alves <palves@redhat.com>
6593
6594 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6595 or <winsock2.h> here. Instead include "gdb_socket.h".
6596 (remote_open): Use union gdb_sockaddr_u.
6597 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6598 or <winsock2.h> here. Instead include "gdb_socket.h".
6599 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6600 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6601 or <sys/un.h>.
6602 (init_named_socket, gdb_agent_helper_thread): Use union
6603 gdb_sockaddr_u.
6604
492d29ea
PA
66052015-03-07 Pedro Alves <palves@redhat.com>
6606
6607 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6608 instead.
6609
60a191ed
YQ
66102015-03-06 Yao Qi <yao.qi@linaro.org>
6611
6612 * linux-aarch64-low.c (aarch64_insert_point): Use
6613 show_debug_regs as a boolean.
6614 (aarch64_remove_point): Likewise.
6615
f5771b1d
PA
66162015-03-05 Pedro Alves <palves@redhat.com>
6617
6618 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6619 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6620 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6621 * nto-low.c (nto_target_ops): Likewise.
6622 * spu-low.c (spu_target_ops): Likewise.
6623 * win32-low.c (win32_target_ops): Likewise.
6624
3e572f71
PA
66252015-03-04 Pedro Alves <palves@redhat.com>
6626
72f4393d 6627 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6628 Decide whether a breakpoint triggered based on the SIGTRAP's
6629 siginfo.si_code.
72f4393d
L
6630 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6631 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6632 (linux_low_filter_event): Check for breakpoints before checking
6633 watchpoints.
6634 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6635 siginfo.si_code.
72f4393d
L
6636 (linux_stopped_by_sw_breakpoint)
6637 (linux_supports_stopped_by_sw_breakpoint)
6638 (linux_stopped_by_hw_breakpoint)
6639 (linux_supports_stopped_by_hw_breakpoint): New functions.
6640 (linux_target_ops): Install new target methods.
3e572f71 6641
1ec68e26
PA
66422015-03-04 Pedro Alves <palves@redhat.com>
6643
6644 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6645 * server.c (swbreak_feature, hwbreak_feature): New globals.
6646 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6647 (captured_main): Clear swbreak_feature and hwbreak_feature.
6648 * server.h (swbreak_feature, hwbreak_feature): Declare.
6649 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6650 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6651 supports_stopped_by_hw_breakpoint>: New fields.
6652 (target_supports_stopped_by_sw_breakpoint)
6653 (target_stopped_by_sw_breakpoint)
6654 (target_supports_stopped_by_hw_breakpoint)
6655 (target_stopped_by_hw_breakpoint): Declare.
6656
15c66dd6
PA
66572015-03-04 Pedro Alves <palves@redhat.com>
6658
6659 enum lwp_stop_reason -> enum target_stop_reason
6660 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6661 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6662 (linux_wait_1, stuck_in_jump_pad_callback)
6663 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6664 (linux_stopped_by_watchpoint):
6665 * linux-low.h (enum lwp_stop_reason): Delete.
6666 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6667 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6668
98fc70d6
YQ
66692015-03-04 Yao Qi <yao.qi@linaro.org>
6670
6671 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6672
dd2ac174
GB
66732015-03-03 Gary Benson <gbenson@redhat.com>
6674
6675 * hostio.c (handle_vFile): Fix prefix lengths.
6676
d68e53f4
MM
66772015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6678
6679 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6680 ptr_bits.
6681
bf2d68ab
AA
66822015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6683
6684 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6685 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6686 (clean): Add "rm -f" for above C files.
6687 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6688 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6689 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6690 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6691 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6692 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6693 (init_registers_s390x_vx_linux64)
6694 (init_registers_s390x_tevx_linux64)
6695 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6696 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6697 declarations.
6698 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6699 (s390_store_vxrs_high): New functions.
6700 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6701 NT_S390_VXRS_HIGH.
6702 (s390_arch_setup): Add logic for selecting one of the new target
6703 descriptions. Activate the new vector regsets if applicable.
6704 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6705 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6706 and init_registers_s390x_tevx_linux64.
6707
c966a859
PA
67082015-03-01 Pedro Alves <palves@redhat.com>
6709
6710 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6711 parameter.
6712
4180215b
PA
67132015-02-27 Pedro Alves <palves@redhat.com>
6714
6715 * linux-x86-low.c (u_debugreg_offset): New function.
6716 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6717
749bab01
PA
67182015-02-27 Pedro Alves <palves@redhat.com>
6719
6720 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6721 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6722 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6723 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6724 (ps_lsetfpregs, ps_getpid)
6725 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6726 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6727 (ps_lsetxregs, ps_plog): Declare.
6728
3c14e5a3
PA
67292015-02-27 Pedro Alves <palves@redhat.com>
6730
6731 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6732 IP_AGENT_EXPORT_FUNC.
6733 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6734 IP_AGENT_EXPORT_FUNC.
6735 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6736 (IP_AGENT_EXPORT): Delete.
6737 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6738 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6739 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6740 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6741 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6742 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6743 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6744 (traceframe_read_count, traceframe_write_count)
6745 (traceframes_created, trace_state_variables, get_raw_reg)
6746 (get_trace_state_variable_value, set_trace_state_variable_value)
6747 (ust_loaded, helper_thread_id, cmd_buf): Use
6748 IPA_SYM_EXPORTED_NAME.
6749 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6750 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6751 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6752 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6753 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6754 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6755 EXTERN_C_PUSH/EXTERN_C_POP.
6756 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6757 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6758 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6759 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6760 (traceframe_write_count, traceframe_read_count)
6761 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6762 (about_to_request_buffer_space, get_trace_state_variable_value)
6763 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6764 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6765 EXTERN_C_PUSH/EXTERN_C_POP.
6766 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6767 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6768 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6769 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6770 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6771 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6772 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6773 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6774 Define.
6775 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6776 (IP_AGENT_EXPORT_VAR_DECL): Define.
6777 (tracing): Declare.
6778 (gdb_agent_get_raw_reg): Declare.
6779
fe978cb0
PA
67802015-02-27 Tom Tromey <tromey@redhat.com>
6781 Pedro Alves <palves@redhat.com>
6782
6783 Rename symbols whose names are reserved C++ keywords throughout.
6784
3bc3d82a
PA
67852015-02-27 Pedro Alves <palves@redhat.com>
6786
6787 * Makefile.in (COMPILER): New, get it from autoconf.
6788 (CXX): Get from autoconf instead.
6789 (COMPILE.pre): Use COMPILER.
6790 (CC-LD): Rename to ...
6791 (CC_LD): ... this. Use COMPILER.
6792 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6793 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6794 * acinclude.m4: Include build-with-cxx.m4.
6795 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6796 Disable -Werror by default if building in C++ mode.
6797 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6798 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6799 the C++ compiler. Save/restore CXXFLAGS too.
6800 * configure: Regenerate.
6801
07697489
PA
68022015-02-27 Pedro Alves <palves@redhat.com>
6803
6804 * acinclude.m4: Include libiberty.m4.
6805 * configure.ac: Call libiberty_INIT.
6806 * config.in, configure: Regenerate.
6807
9beb7c4e
PA
68082015-02-26 Pedro Alves <palves@redhat.com>
6809
6810 * linux-low.c (linux_wait_1): When incrementing the PC past a
6811 program breakpoint always use the_low_target.breakpoint_len as
6812 increment, rather than the maximum between that and
6813 the_low_target.decr_pc_after_break.
6814
8090aef2
PA
68152015-02-23 Pedro Alves <palves@redhat.com>
6816
6817 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6818 thread was doing a step-over; always adjust the PC if
6819 we stepped over a permanent breakpoint.
6820 (linux_wait_1): If we stepped over breakpoint that was on top of a
6821 permanent breakpoint, manually advance the PC past it.
6822
bc9540e8
PA
68232015-02-23 Pedro Alves <palves@redhat.com>
6824
6825 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6826 modes.
6827 (x86_fill_gregset, x86_store_gregset): Use it when handling
6828 $orig_eax.
6829
2db9a427
PA
68302015-02-20 Pedro Alves <palves@redhat.com>
6831
6832 * thread-db.c: Include "nat/linux-procfs.h".
6833 (thread_db_init): Skip listing new threads if the kernel supports
6834 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6835
afa8d396
PA
68362015-02-20 Pedro Alves <palves@redhat.com>
6837
6838 * linux-low.c (status_pending_p_callback): Use ptid_match.
6839
c9587f88
AT
68402015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6841
6842 PR breakpoints/16812
6843 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6844 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6845 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6846
b05ec7a5
AT
68472015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6848
6849 PR breakpoints/15956
6850 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6851
d33501a5
MM
68522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6853
6854 * linux-low.c (linux_low_btrace_conf): Print size.
6855 * server.c (handle_btrace_conf_general_set): New.
6856 (hanle_general_set): Call handle_btrace_conf_general_set.
6857 (handle_query): Report Qbtrace-conf:bts:size as supported.
6858
f4abbc16
MM
68592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6860
6861 * linux-low.c (linux_low_enable_btrace): Update parameters.
6862 (linux_low_btrace_conf): New.
6863 (linux_target_ops)<to_btrace_conf>: Initialize.
6864 * server.c (current_btrace_conf): New.
6865 (handle_btrace_enable): Rename to ...
6866 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6867 to target_enable_btrace. Update comment. Update users.
6868 (handle_qxfer_btrace_conf): New.
6869 (qxfer_packets): Add btrace-conf entry.
6870 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6871 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6872 (target_ops)<read_btrace_conf>: New.
6873 (target_enable_btrace): Update parameters.
6874 (target_read_btrace_conf): New.
6875
043c3577
MM
68762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6877
6878 * server.c (handle_btrace_general_set): Remove call to
6879 target_supports_btrace.
6880 (supported_btrace_packets): New.
6881 (handle_query): Call supported_btrace_packets.
6882 * target.h: include btrace-common.h.
6883 (btrace_target_info): Removed.
6884 (supports_btrace, target_supports_btrace): Update parameters.
6885
734b0e4b
MM
68862015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6887
6888 * Makefile.in (SFILES): Add common/btrace-common.c.
6889 (OBS): Add common/btrace-common.o.
6890 (btrace-common.o): Add build rules.
6891 * linux-low: Include btrace-common.h.
6892 (linux_low_read_btrace): Use struct btrace_data. Call
6893 btrace_data_init and btrace_data_fini.
6894
d6c146e9
PA
68952015-02-06 Pedro Alves <palves@redhat.com>
6896
6897 * thread-db.c (find_new_threads_callback): Add debug output.
6898
20ba1ce6
PA
68992015-02-04 Pedro Alves <palves@redhat.com>
6900
6901 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6902 (resume_stopped_resumed_lwps): New function.
6903 (linux_wait_for_event_filtered): Use it.
6904
8cc73a39
SDJ
69052015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6906
6907 * Makefile.in (SFILES): Add linux-personality.c.
6908 (linux-personality.o): New rule.
6909 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6910 list of objects to be built.
6911 * linux-low.c: Include nat/linux-personality.h.
6912 (linux_create_inferior): Remove code to disable address space
6913 randomization (moved to ../nat/linux-personality.c). Create
6914 cleanup to disable address space randomization.
6915
fb23d554
SDJ
69162015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6917
6918 * Makefile.in (posix-strerror.o): New rule.
6919 (mingw-strerror.o): Likewise.
6920 * configure: Regenerated.
6921 * configure.ac: Source file ../common/common.host. Initialize new
6922 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6923
cdf43629
YQ
69242015-01-14 Yao Qi <yao@codesourcery.com>
6925
6926 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6927 (ppc-linux.o): New rule.
6928 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6929 * configure.ac: AC_CHECK_FUNCS(getauxval).
6930 * config.in: Re-generated.
6931 * configure: Re-generated.
6932 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6933 ppc64_64bit_inferior_p
6934
514c5338
YQ
69352015-01-14 Yao Qi <yao@codesourcery.com>
6936
6937 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6938 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6939 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6940 (PT_ORIG_R3, PT_TRAP): Likewise.
6941 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6942 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6943 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6944
3368c1e5
JB
69452015-01-10 Joel Brobecker <brobecker@adacore.com>
6946
6947 * i387-fp.c (i387_cache_to_xsave): In look over
6948 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6949 zmmh_low_space field by use of zmmh_high_space.
6950
582511be
PA
69512015-01-09 Pedro Alves <palves@redhat.com>
6952
6953 * linux-low.c (step_over_bkpt): Move higher up in the file.
6954 (handle_extended_wait): Don't store the stop_pc here.
6955 (get_stop_pc): Adjust comments and rename to ...
6956 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6957 stopped for a software breakpoint or hardware breakpoint.
6958 (thread_still_has_status_pending_p): New function.
6959 (status_pending_p_callback): Use
6960 thread_still_has_status_pending_p. If the event is no longer
6961 interesting, resume the LWP.
6962 (handle_tracepoints): Add assert.
6963 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6964 (wstatus_maybe_breakpoint): New function.
6965 (cancel_breakpoint): Delete function.
6966 (check_stopped_by_watchpoint): New function, factored out from
6967 linux_low_filter_event.
6968 (lp_status_maybe_breakpoint): Delete function.
6969 (linux_low_filter_event): Remove filter_ptid argument.
6970 Leave thread group exits pending here. Store the LWP's stop PC.
6971 Always leave events pending.
6972 (linux_wait_for_event_filtered): Pull all events out of the
6973 kernel, and leave them all pending.
6974 (count_events_callback, select_event_lwp_callback): Consider all
6975 events.
6976 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6977 (select_event_lwp): Only give preference to the stepping LWP in
6978 all-stop mode. Adjust comments.
6979 (ignore_event): New function.
6980 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6981 references to cancel_breakpoints. Adjust to renames. Also give
6982 equal priority to all LWPs that have had events in non-stop mode.
6983 If reporting a software breakpoint event, unadjust the LWP's PC.
6984 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6985 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6986 Adjust.
6987 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6988 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6989 (linux_stopped_by_watchpoint): Adjust.
6990 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6991 * linux-low.h (enum lwp_stop_reason): New.
6992 (struct lwp_info) <stop_pc>: Adjust comment.
6993 <stopped_by_watchpoint>: Delete field.
6994 <stop_reason>: New field.
6995 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6996 * mem-break.c (software_breakpoint_inserted_here)
6997 (hardware_breakpoint_inserted_here): New function.
6998 * mem-break.h (software_breakpoint_inserted_here)
6999 (hardware_breakpoint_inserted_here): Declare.
7000 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7001 (cancel_breakpoints): Delete.
7002 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7003 (upload_fast_traceframes): Remove references to
7004 cancel_breakpoints.
7005
a33e3959
PA
70062015-01-09 Pedro Alves <palves@redhat.com>
7007
7008 * thread-db.c (find_new_threads_callback): Ignore thread if the
7009 kernel thread ID is -1.
7010
8784d563
PA
70112015-01-09 Pedro Alves <palves@redhat.com>
7012
7013 * linux-low.c (linux_attach_fail_reason_string): Move to
7014 nat/linux-ptrace.c, and rename.
7015 (linux_attach_lwp): Update comment.
7016 (attach_proc_task_lwp_callback): New function.
7017 (linux_attach): Adjust to rename and use
7018 linux_proc_attach_tgid_threads.
7019 (linux_attach_fail_reason_string): Delete declaration.
7020
76f2b779
JB
70212015-01-01 Joel Brobecker <brobecker@adacore.com>
7022
7023 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7024 * server.c (gdbserver_version): Likewise.
7025
fafcc06a
SDJ
70262014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7027
7028 * remote-utils.c: Include ctype.h.
7029 (input_interrupt): Explicitly handle the case when the char
7030 received is the NUL byte. Improve the printing of non-ASCII
7031 characters.
7032
beed38b8
JB
70332014-12-16 Joel Brobecker <brobecker@adacore.com>
7034
7035 * linux-low.c (linux_low_filter_event): Update call to
7036 linux_enable_event_reporting following the addition of
7037 a new parameter to that function.
7038
bf330350
CU
70392014-12-16 Catalin Udma <catalin.udma@freescale.com>
7040
7041 PR server/17457
7042 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7043 (AARCH64_FPCR_REGNO): Likewise.
7044 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7045 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7046 (aarch64_store_fpregset): Likewise.
7047
5227d625
JB
70482014-12-15 Joel Brobecker <brobecker@adacore.com>
7049
7050 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7051 Remove FIXME comment about assumption about N.
7052
f93b65a0
JB
70532014-12-13 Joel Brobecker <brobecker@adacore.com>
7054
7055 * configure.ac: If large-file support is disabled in GDBserver,
7056 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7057 * configure: Regenerate.
7058
e5a9158d
AA
70592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7060
7061 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7062 warning upon ENODATA from ptrace.
7063 * linux-s390-low.c (s390_store_tdb): New.
7064 (s390_regsets): Add regset for NT_S390_TDB.
7065
feea5f36
AA
70662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7067
7068 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7069 without a fill_function.
7070 * linux-s390-low.c (s390_fill_last_break): Remove.
7071 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7072 (s390_arch_setup): Use regset's size instead of fill_function for
7073 loop end condition.
7074
098dbe61
AA
70752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7076
7077 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7078 the regset's store function when ptrace returned an error.
7079 * regcache.c (get_thread_regcache): Invalidate register cache
7080 before fetching inferior's registers.
7081
28eef672
AA
70822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7083
7084 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7085 while-loop as for-loop.
7086 (regsets_store_inferior_registers): Likewise.
7087
bdca27a2
YQ
70882014-11-28 Yao Qi <yao@codesourcery.com>
7089
7090 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7091 * config.in, configure: Re-generate.
7092 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7093 is defined.
7094
9c232dda
YQ
70952014-11-21 Yao Qi <yao@codesourcery.com>
7096
7097 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7098 (AC_CHECK_HEADERS): Remove malloc.h.
7099 * configure: Re-generated.
7100 * config.in: Re-generated.
7101 * server.h: Don't include alloca.h and malloc.h.
7102 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7103 Don't include malloc.h.
7104
43968415
JB
71052014-11-17 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7108 corresponding ERRNO check in same block.
7109
40e91bc7
PA
71102014-11-12 Pedro Alves <palves@redhat.com>
7111
7112 * server.c (cont_thread): Update comment.
7113 (start_inferior, attach_inferior): No longer clear cont_thread.
7114 (handle_v_cont): No longer set cont_thread.
7115 (captured_main): Clear cont_thread each time a GDB connects.
7116
c2c118cf
PA
71172014-11-12 Pedro Alves <palves@redhat.com>
7118
7119 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7120 thread, and don't resume all threads if the Hc thread has exited.
7121
78708b7c
PA
71222014-11-12 Pedro Alves <palves@redhat.com>
7123
7124 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7125 the process group instead of to a specific LWP.
7126
a2abc7de
PA
71272014-10-15 Pedro Alves <palves@redhat.com>
7128
7129 PR server/17487
7130 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7131 parameter.
7132 (arm_set_thread_context): Delete.
7133 (the_low_target): Adjust.
7134 * win32-i386-low.c (debug_registers_changed)
7135 (debug_registers_used): Delete.
7136 (update_debug_registers_callback): New function.
7137 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7138 needing to update their debug registers.
7139 (win32_get_current_dr): New function.
7140 (x86_dr_low_get_addr, x86_dr_low_get_control)
7141 (x86_dr_low_get_status): Fetch the debug register from the thread
7142 record's context.
7143 (i386_initial_stuff): Adjust.
7144 (i386_get_thread_context): Remove current_event parameter. Don't
7145 clear debug_registers_changed nor copy DR values to
7146 debug_reg_state.
7147 (i386_set_thread_context): Delete.
7148 (i386_prepare_to_resume): New function.
7149 (i386_thread_added): Mark the thread as needing to update irs
7150 debug registers.
7151 (the_low_target): Remove i386_set_thread_context and install
7152 i386_prepare_to_resume.
7153 * win32-low.c (win32_get_thread_context): Adjust.
7154 (win32_set_thread_context): Use SetThreadContext
7155 directly.
7156 (win32_prepare_to_resume): New function.
7157 (win32_require_context): New function, factored out from ...
7158 (thread_rec): ... this.
7159 (continue_one_thread): Call win32_prepare_to_resume on each thread
7160 we're about to continue.
7161 (win32_resume): Call win32_prepare_to_resume on the event thread.
7162 * win32-low.h (struct win32_thread_info)
7163 <debug_registers_changed>: New field.
7164 (struct win32_target_ops): Change prototype of set_thread_context,
7165 delete set_thread_context and add prepare_to_resume.
7166 (win32_require_context): New declaration.
7167
a442d071
GB
71682014-10-08 Gary Benson <gbenson@redhat.com>
7169
7170 * server.h: Do not include common-exceptions.h.
7171
6f1947e8
GB
71722014-10-08 Gary Benson <gbenson@redhat.com>
7173
7174 * server.h: Do not include cleanups.h.
7175
63b434a4
JH
71762014-09-30 James Hogan <james.hogan@imgtec.com>
7177
7178 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7179 mips64-dsp-linux.c.
7180
c4d9ceb6
YQ
71812014-09-23 Yao Qi <yao@codesourcery.com>
7182
7183 * linux-low.c (lp_status_maybe_breakpoint): New function.
7184 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7185 (count_events_callback): Likewise.
7186 (select_event_lwp_callback): Likewise.
7187 (cancel_breakpoints_callback): Likewise.
7188
89a5711c
DB
71892014-09-19 Don Breazeal <donb@codesourcery.com>
7190
7191 * linux-low.c (handle_extended_wait): Call
7192 linux_ptrace_get_extended_event.
7193 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7194 linux_is_extended_waitstatus.
7195
bffc0964
JB
71962014-09-16 Joel Brobecker <brobecker@adacore.com>
7197
7198 * Makefile.in (CPPFLAGS): Define.
7199 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7200 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7201
0bfdf32f
GB
72022014-09-16 Gary Benson <gbenson@redhat.com>
7203
7204 * inferiors.h (current_inferior): Renamed as...
7205 (current_thread): New variable. All uses updated.
7206 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7207 (maybe_move_out_of_jump_pad): Likewise.
7208 (cancel_breakpoint): Likewise.
7209 (linux_low_filter_event): Likewise.
7210 (wait_for_sigstop): Likewise.
7211 (linux_resume_one_lwp): Likewise.
7212 (need_step_over_p): Likewise.
7213 (start_step_over): Likewise.
7214 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7215 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7216 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7217 and save_inferior as saved_thread.
7218 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7219 saved_thread.
7220 (regcache_invalidate_thread): Likewise.
7221 * remote-utils.c (prepare_resume_reply): Likewise.
7222 * thread-db.c (thread_db_get_tls_address): Likewise.
7223 (disable_thread_event_reporting): Likewise.
7224 (remove_thread_event_breakpoints): Likewise.
7225 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7226 as saved_thread.
7227 * target.h (set_desired_inferior): Renamed as...
7228 (set_desired_thread): New declaration. All uses updated.
7229 * server.c (myresume): Updated comment to reference thread instead
7230 of inferior.
7231 (handle_serial_event): Likewise.
7232 (handle_target_event): Likewise.
7233
361c8ade
GB
72342014-09-12 Tom Tromey <tromey@redhat.com>
7235 Gary Benson <gbenson@redhat.com>
7236
7237 * regcache.h: Include common-regcache.h.
7238 (regcache_read_pc): Don't declare.
7239 * regcache.c (get_thread_regcache_for_ptid): New function.
7240
bd9269f7
GB
72412014-09-11 Tom Tromey <tromey@redhat.com>
7242 Gary Benson <gbenson@redhat.com>
7243
7244 * symbol.c: New file.
7245 * Makefile.in (SFILES): Add symbol.c.
7246 (OBS): Add symbol.o.
7247
f8c1d06b
GB
72482014-09-11 Gary Benson <gbenson@redhat.com>
7249
7250 * target.c (target_stop_ptid, target_continue_ptid): New
7251 functions.
7252
721ec300
GB
72532014-09-11 Tom Tromey <tromey@redhat.com>
7254 Gary Benson <gbenson@redhat.com>
7255
7256 * target.h: Include target/target.h.
7257 * target.c (target_read_memory, target_read_uint32)
7258 (target_write_memory): New functions.
7259
c5e92cca
GB
72602014-09-11 Gary Benson <gbenson@redhat.com>
7261
7262 * server.h (debug_hw_points): Don't declare.
7263 * server.c (debug_hw_points): Don't define. Replace all uses
7264 with show_debug_regs.
7265 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7266 all uses with show_debug_regs.
7267
2e4bb98a
EBM
72682014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7269
7270 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7271 endianness into account.
7272 (ppc_supply_ptrace_register): Likewise.
7273
ac740bc7
JH
72742014-09-03 James Hogan <james.hogan@imgtec.com>
7275
7276 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7277 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7278
97ea6506
GB
72792014-09-03 Gary Benson <gbenson@redhat.com>
7280
7281 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7282 ALL_DEBUG_ADDRESS_REGISTERS.
7283
df7e5265
GB
72842014-09-02 Gary Benson <gbenson@redhat.com>
7285
7286 * i386-low.h: Renamed as...
7287 * x86-low.h: New file. All type, function and variable name
7288 prefixes changed from "i386_" to "x86_". All references updated.
7289 * i386-low.c: Renamed as...
7290 * x86-low.c: New file. All type, function and variable name
7291 prefixes changed from "i386_" to "x86_". All references updated.
7292
ed859da7
GB
72932014-09-02 Gary Benson <gbenson@redhat.com>
7294
7295 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7296 (x86_linux_new_thread): Likewise.
7297
860789c7
GB
72982014-08-29 Gary Benson <gbenson@redhat.com>
7299
7300 * server.h (setjmp.h): Do not include.
7301 (toplevel): Do not declare.
7302 (common-exceptions.h): Include.
7303 (cleanups.h): Likewise.
7304 * server.c (toplevel): Do not define.
7305 (exit_code): New static global.
7306 (detach_or_kill_for_exit_cleanup): New function.
7307 (main): New function. Original main renamed to...
7308 (captured_main): New function.
7309 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7310
ff55e1b5
GB
73112014-08-29 Gary Benson <gbenson@redhat.com>
7312
7313 * Makefile.in (SFILES): Add common/common-exceptions.c.
7314 (OBS): Add common-exceptions.o.
7315 (common-exceptions.o): New rule.
7316 * utils.c (prepare_to_throw_exception): New function.
7317
e9bcb658
GB
73182014-08-29 Gary Benson <gbenson@redhat.com>
7319
7320 * config.in: Regenerate.
7321 * configure: Likewise.
7322
e3180625
GB
73232014-08-29 Gary Benson <gbenson@redhat.com>
7324
7325 * Makefile.in (SFILES): Add common/cleanups.c.
7326 (OBS): cleanups.o.
7327 (cleanups.o): New rule.
7328
e3d6ba5d
GB
73292014-08-29 Gary Benson <gbenson@redhat.com>
7330
7331 * utils.c (internal_vwarning): New function.
7332
7096e886
GB
73332014-08-28 Gary Benson <gbenson@redhat.com>
7334
7335 * utils.h (fatal): Remove declaration.
7336 * utils.c (fatal): Remove function.
7337
14ce3192
GB
73382014-08-28 Gary Benson <gbenson@redhat.com>
7339
7340 * tracepoint.c (gdb_agent_init): Replace fatal with
7341 perror_with_name.
7342 (initialize_tracepoint): Likewise.
7343
50278d59
GB
73442014-08-28 Gary Benson <gbenson@redhat.com>
7345
7346 * remote-utils.c (remote_prepare): Replace fatal with error.
7347
aa96c426
GB
73482014-08-28 Gary Benson <gbenson@redhat.com>
7349
7350 * linux-low.c (linux_async): Replace fatal with warning.
7351 Tidy up and return.
7352 (linux_start_non_stop): Return -1 if linux_async failed.
7353
f7160e97
GB
73542014-08-28 Gary Benson <gbenson@redhat.com>
7355
7356 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7357 gdb_assert.
7358 (i386_dr_low_get_addr): Remove vague comment.
7359 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7360 gdb_assert.
7361
38e08fca
GB
73622014-08-28 Gary Benson <gbenson@redhat.com>
7363
7364 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7365 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7366 internal_error.
7367 (linux_resume_one_lwp): Likewise.
7368 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7369 gdb_assert.
7370 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7371 with internal_error.
7372 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7373 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7374 (find_register_by_name): Replace fatal with internal_error.
7375 (find_regno): Likewise.
7376 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7377 * thread-db.c (thread_db_create_event): Likewise.
7378 (thread_db_load_search): Likewise.
7379 (try_thread_db_load_1): Likewise.
7380 * tracepoint.c (get_jump_space_head): Replace fatal with
7381 internal_error.
7382 (claim_trampoline_space): Likewise.
7383 (have_fast_tracepoint_trampoline_buffer): Likewise.
7384 (cmd_qtstart): Likewise.
7385 (stop_tracing): Likewise.
7386 (fast_tracepoint_collecting): Likewise.
7387 (target_malloc): Likewise.
7388 (download_tracepoint): Likewise.
7389 (download_trace_state_variables): Replace check with gdb_assert.
7390 (upload_fast_traceframes): Replace fatal with internal_error.
7391
34abf635
GB
73922014-08-19 Tom Tromey <tromey@redhat.com>
7393 Gary Benson <gbenson@redhat.com>
7394
7395 * Makefile.in (SFILES): Add common/common-debug.c.
7396 (OBS): Add common-debug.o.
7397 (common-debug.o): New rule.
7398 * debug.h (debug_printf): Don't declare.
7399 * debug.c (debug_printf): Renamed and rewritten as...
7400 (debug_vprintf): New function.
7401
f6e94d78
GB
74022014-08-19 Gary Benson <gbenson@redhat.com>
7403
7404 * utils.h: Do not include print-utils.h.
7405
9239eeab
GB
74062014-08-19 Tom Tromey <tromey@redhat.com>
7407 Gary Benson <gbenson@redhat.com>
7408
7409 * server.h: Add static assertion.
7410 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7411
ef87c8bb
GB
74122014-08-19 Tom Tromey <tromey@redhat.com>
7413 Gary Benson <gbenson@redhat.com>
7414
7415 * Makefile.in (SFILES): Add common/errors.c.
7416 (OBS): Add errors.o.
7417 (IPA_OBS): Add errors-ipa.o.
7418 (errors.o): New rule.
7419 (errors-ipa.o): Likewise.
7420 * utils.h (perror_with_name, error, warning): Don't declare.
7421 * utils.c (warning): Renamed and rewritten as...
7422 (vwarning): New function.
7423 (error): Renamed and rewritten as...
7424 (verror): New function.
7425 (internal_error): Renamed and rewritten as...
7426 (internal_verror): New function.
7427
bb974a24
GB
74282014-08-07 Gary Benson <gbenson@redhat.com>
7429
7430 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7431 * configure: Regenerate.
7432 * config.in: Likewise.
7433 * server.h: Do not include errno.h.
7434 * event-loop.c: Likewise.
7435 * hostio-errno.c: Likewise.
7436 * linux-low.c: Likewise.
7437 * remote-utils.c: Likewise.
7438 * spu-low.c: Likewise.
7439 * utils.c: Likewise.
7440 * gdbreplay.c: Unconditionally include errno.h.
7441
6d3d12eb
GB
74422014-08-07 Gary Benson <gbenson@redhat.com>
7443
7444 * server.h: Do not include string.h.
7445 * event-loop.c: Likewise.
7446 * linux-low.c: Likewise.
7447 * regcache.c: Likewise.
7448 * remote-utils.c: Likewise.
7449 * spu-low.c: Likewise.
7450 * utils.c: Likewise.
7451
dccbb609
GB
74522014-08-07 Gary Benson <gbenson@redhat.com>
7453
7454 * server.h: Do not include gdb_assert.h.
7455
e76df0d0
GB
74562014-08-07 Gary Benson <gbenson@redhat.com>
7457
7458 * server.h: Do not include common-utils.h.
7459
4cb9c816
GB
74602014-08-07 Gary Benson <gbenson@redhat.com>
7461
7462 * server.h: Do not include ptid.h.
7463 * notif.h: Likewise.
7464
3995eeee
GB
74652014-08-07 Gary Benson <gbenson@redhat.com>
7466
7467 * server.h: Do not include gdb_locale.h.
7468
cb9f1a9b
GB
74692014-08-07 Gary Benson <gbenson@redhat.com>
7470
7471 * server.h: Do not include gdb/signals.h.
7472 * win32-low.c: Likewise.
7473
a5fceff8
GB
74742014-08-07 Gary Benson <gbenson@redhat.com>
7475
7476 * server.h: Do not include pathmax.h.
7477
b9391142
GB
74782014-08-07 Gary Benson <gbenson@redhat.com>
7479
7480 * server.h: Do not include libiberty.h.
7481 * linux-bfin-low.c: Likewise.
7482
0e443c87
GB
74832014-08-07 Gary Benson <gbenson@redhat.com>
7484
7485 * server.h: Do not include ansidecl.h.
7486
8ebb3f56
GB
74872014-08-07 Gary Benson <gbenson@redhat.com>
7488
7489 * linux-x86-low.c: Do not include stddef.h.
7490 * lynx-ppc-low.c: Likewise.
7491 * tracepoint.c: Likewise.
7492
8980bdf6
GB
74932014-08-07 Gary Benson <gbenson@redhat.com>
7494
7495 * server.h: Do not include stdarg.h.
7496 * nto-low.c: Likewise.
7497
d7096f71
GB
74982014-08-07 Gary Benson <gbenson@redhat.com>
7499
7500 * server.h: Do not include stdlib.h.
7501 * inferiors.c: Likewise.
7502 * linux-low.c: Likewise.
7503 * regcache.c: Likewise.
7504 * spu-low.c: Likewise.
7505 * tracepoint.c: Likewise.
7506 * utils.c: Likewise.
7507
d02f550d
GB
75082014-08-07 Gary Benson <gbenson@redhat.com>
7509
7510 * server.h: Do not include stdio.h.
7511 * linux-low.c: Likewise.
7512 * remote-utils.c: Likewise.
7513 * spu-low.c: Likewise.
7514 * utils.c: Likewise.
7515 * wincecompat.c: Likewise.
7516
87f6c4e3
GB
75172014-08-06 Gary Benson <gbenson@redhat.com>
7518
7519 * regcache.c (init_register_cache): Move conditionals inside if.
7520
7089dca4
GB
75212014-08-06 Gary Benson <gbenson@redhat.com>
7522
7523 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7524
462f517e
GB
75252014-07-31 Gary Benson <gbenson@redhat.com>
7526
7527 * ax.h: Do not include server.h.
7528 * gdbthread.h: Likewise.
7529 * lynx-low.h: Likewise.
7530 * notif.h: Likewise.
7531
976411d6
GB
75322014-07-30 Gary Benson <gbenson@redhat.com>
7533
7534 * server.h: Include common-defs.h.
7535 Do not include config.h or build-gnulib-gdbserver/config.h.
7536
d41f6d8e
GB
75372014-07-30 Gary Benson <gbenson@redhat.com>
7538
7539 * hostio-errno.c: Move server.h to top of includes list.
7540 * inferiors.c: Likewise.
7541 * linux-x86-low.c: Likewise.
7542 * notif.c: Include server.h.
7543
314c6a35
TT
75442014-07-24 Tom Tromey <tromey@redhat.com>
7545 Gary Benson <gbenson@redhat.com>
7546
7547 * server.h (CORE_ADDR): Now unsigned.
7548
69ff6be5
PA
75492014-07-16 Pedro Alves <palves@redhat.com>
7550
7551 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7552
ce9e3fe7
PA
75532014-07-15 Pedro Alves <palves@redhat.com>
7554
7555 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7556 copy.
7557
e76126e8
PA
75582014-07-11 Pedro Alves <palves@redhat.com>
7559
7560 * linux-low.c (kill_wait_lwp): New function, based on
7561 kill_one_lwp_callback, but use my_waitpid directly.
7562 (kill_one_lwp_callback, linux_kill): Use it.
7563
8e9db26e
PA
75642014-06-23 Pedro Alves <palves@redhat.com>
7565
7566 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7567 before setting DR0..DR3.
7568
698b3e08
GB
75692014-06-20 Gary Benson <gbenson@redhat.com>
7570
7571 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7572 * configure: Regenerated.
7573 * config.in: Likewise.
7574
125f8a3d
GB
75752014-06-20 Gary Benson <gbenson@redhat.com>
7576
7577 * Makefile.in (SFILES): Update locations for files moved
7578 from common to nat.
7579 (object file files): Reordered.
7580
42995dbd
GB
75812014-06-20 Gary Benson <gbenson@redhat.com>
7582
7583 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7584 (i386_dr_low_set_addr): Likewise.
7585 (i386_dr_low_get_addr): Likewise.
7586 (i386_dr_low_can_set_control): Likewise.
7587 (i386_dr_low_set_control): Likewise.
7588 (i386_dr_low_get_control): Likewise.
7589 (i386_dr_low_get_status): Likewise.
7590 (i386_get_debug_register_length): Likewise.
7591 * linux-x86-low.c (i386_dr_low_set_addr):
7592 Changed signature. Made static.
7593 (i386_dr_low_get_addr): Likewise.
7594 (i386_dr_low_set_control): Likewise.
7595 (i386_dr_low_get_control): Likewise.
7596 (i386_dr_low_get_status): Likewise.
7597 (i386_dr_low): New global variable.
7598 * win32-i386-low.c (i386_dr_low_set_addr):
7599 Changed signature. Made static.
7600 (i386_dr_low_get_addr): Likewise.
7601 (i386_dr_low_set_control): Likewise.
7602 (i386_dr_low_get_control): Likewise.
7603 (i386_dr_low_get_status): Likewise.
7604 (i386_dr_low): New global variable.
7605
e1d2394b
MS
76062014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7607
7608 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7609 * Makefile.in (AR, AR_FLAGS): Define.
7610 * configure: Regenerate.
7611
3a8ee006
GB
76122014-06-19 Gary Benson <gbenson@redhat.com>
7613
7614 * Makefile.in (i386-dregs.o): New rule.
7615 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7616 * i386-low.c (target.h): Remove include.
7617 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7618 (DR_CONTROL_SHIFT): Likewise.
7619 (DR_CONTROL_SIZE): Likewise.
7620 (DR_RW_EXECUTE): Likewise.
7621 (DR_RW_WRITE): Likewise.
7622 (DR_RW_READ): Likewise.
7623 (DR_RW_IORW): Likewise.
7624 (DR_LEN_1): Likewise.
7625 (DR_LEN_2): Likewise.
7626 (DR_LEN_4): Likewise.
7627 (DR_LEN_8): Likewise.
7628 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7629 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7630 (DR_ENABLE_SIZE): Likewise.
7631 (DR_LOCAL_SLOWDOWN): Likewise.
7632 (DR_GLOBAL_SLOWDOWN): Likewise.
7633 (DR_CONTROL_RESERVED): Likewise.
7634 (I386_DR_CONTROL_MASK): Likewise.
7635 (I386_DR_VACANT): Likewise.
7636 (I386_DR_LOCAL_ENABLE): Likewise.
7637 (I386_DR_GLOBAL_ENABLE): Likewise.
7638 (I386_DR_DISABLE): Likewise.
7639 (I386_DR_SET_RW_LEN): Likewise.
7640 (I386_DR_GET_RW_LEN): Likewise.
7641 (I386_DR_WATCH_HIT): Likewise.
7642 (i386_wp_op_t): Likewise.
7643 (i386_show_dr): Likewise.
7644 (i386_length_and_rw_bits): Likewise.
7645 (i386_insert_aligned_watchpoint): Likewise.
7646 (i386_remove_aligned_watchpoint): Likewise.
7647 (i386_handle_nonaligned_watchpoint): Likewise.
7648 i386_update_inferior_debug_regs(): Likewise.
7649 (i386_dr_insert_watchpoint): Likewise.
7650 (i386_dr_remove_watchpoint): Likewise.
7651 (i386_dr_region_ok_for_watchpoint): Likewise.
7652 (i386_dr_stopped_data_address): Likewise.
7653 (i386_dr_stopped_by_watchpoint): Likewise.
7654
8f26655c
GB
76552014-06-19 Gary Benson <gbenson@redhat.com>
7656
7657 * i386-low.c (i386_dr_show): Renamed to
7658 i386_show_dr and made static. All uses updated.
7659 (i386_dr_length_and_rw_bits): Renamed to
7660 i386_length_and_rw_bits and made static.
7661 All uses updated.
7662 (i386_dr_insert_aligned_watchpoint): Renamed to
7663 i386_insert_aligned_watchpoint and made static.
7664 All uses updated.
7665 (i386_dr_remove_aligned_watchpoint): Renamed to
7666 i386_remove_aligned_watchpoint and made static.
7667 All uses updated.
7668 (i386_dr_update_inferior_debug_regs): Renamed to
7669 i386_update_inferior_debug_regs and made static.
7670 All uses updated.
7671
b9228891
GB
76722014-06-18 Gary Benson <gbenson@redhat.com>
7673
5171def3
GB
7674 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7675 (i386_dr_low_can_set_control): Likewise.
7676 (i386_get_debug_register_length): Likewise.
7677 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7678 (i386_dr_low_can_set_control): Likewise.
7679 (i386_get_debug_register_length): Likewise.
7680
76812014-06-17 Gary Benson <gbenson@redhat.com>
7682
b9228891
GB
7683 * i386-low.h (i386-dregs.h): New include.
7684 (DR_FIRSTADDR): Now in i386-dregs.h.
7685 (DR_LASTADDR): Likewise.
7686 (DR_NADDR): Likewise.
7687 (DR_STATUS): Likewise.
7688 (DR_CONTROL): Likewise.
7689 (i386_debug_reg_state): Likewise.
7690 (i386_dr_insert_watchpoint): Likewise.
7691 (i386_dr_remove_watchpoint): Likewise.
7692 (i386_dr_region_ok_for_watchpoint): Likewise.
7693 (i386_dr_stopped_data_address): Likewise.
7694 (i386_dr_stopped_by_watchpoint): Likewise.
7695 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7696
4be83cc2
GB
76972014-06-18 Gary Benson <gbenson@redhat.com>
7698
7699 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7700 i386_dr_insert_watchpoint.
7701 (i386_low_remove_watchpoint): Renamed to
7702 i386_dr_remove_watchpoint.
7703 (i386_low_region_ok_for_watchpoint): Renamed to
7704 i386_dr_region_ok_for_watchpoint.
7705 (i386_low_stopped_data_address): Renamed to
7706 i386_dr_stopped_data_address.
7707 (i386_low_stopped_by_watchpoint): Renamed to
7708 i386_dr_stopped_by_watchpoint.
7709 * i386-low.c (i386_show_dr): Renamed to
7710 i386_dr_show and made nonstatic. All uses updated.
7711 (i386_length_and_rw_bits): Renamed to
7712 i386_dr_length_and_rw_bits and made nonstatic.
7713 All uses updated.
7714 (i386_insert_aligned_watchpoint): Renamed to
7715 i386_dr_insert_aligned_watchpoint and made nonstatic.
7716 All uses updated.
7717 (i386_remove_aligned_watchpoint): Renamed to
7718 i386_dr_remove_aligned_watchpoint and made nonstatic.
7719 All uses updated.
7720 (i386_update_inferior_debug_regs): Renamed to
7721 i386_dr_update_inferior_debug_regs and made nonstatic.
7722 All uses updated.
7723 (i386_low_insert_watchpoint): Renamed to
7724 i386_dr_insert_watchpoint. All uses updated.
7725 (i386_low_remove_watchpoint): Renamed to
7726 i386_dr_remove_watchpoint. All uses updated.
7727 (i386_low_region_ok_for_watchpoint): Renamed to
7728 i386_dr_region_ok_for_watchpoint. All uses updated.
7729 (i386_low_stopped_data_address): Renamed to
7730 i386_dr_stopped_data_address. All uses updated.
7731 (i386_low_stopped_by_watchpoint): Renamed to
7732 i386_dr_stopped_by_watchpoint. All uses updated.
7733
131aa0d4
GB
77342014-06-18 Gary Benson <gbenson@redhat.com>
7735
7736 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7737 (i386_dr_low_can_set_control): Likewise.
7738 (i386_insert_aligned_watchpoint): New check.
7739
d9305f7f
GB
77402014-06-18 Gary Benson <gbenson@redhat.com>
7741
7742 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7743 Renamed to state.
7744
e927c9fc
GB
77452014-06-18 Gary Benson <gbenson@redhat.com>
7746
7747 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7748 instead of fatal and error.
7749 (i386_handle_nonaligned_watchpoint): Likewise.
7750
1b6d4134
GB
77512014-06-18 Gary Benson <gbenson@redhat.com>
7752
7753 * i386-low.c (i386_get_debug_register_length): New macro.
7754 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7755 (i386_show_dr): Use debug_printf instead of fprintf. Use
7756 phex to format values.
7757
6e62758f
GB
77582014-06-18 Gary Benson <gbenson@redhat.com>
7759
7760 * i386-low.h: Comment changes.
7761 * i386-low.c: Likewise.
7762
fc6e2f03
GB
77632014-06-18 Gary Benson <gbenson@redhat.com>
7764
7765 * i386-low.c: Whitespace changes.
7766
f9d1eeed
TT
77672014-06-12 Tom Tromey <tromey@redhat.com>
7768
7769 * utils.c (freeargv): Remove.
7770
0b04e523
TT
77712014-06-12 Tom Tromey <tromey@redhat.com>
7772
7773 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7774 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7775 (parse_debug_format_options): Likewise.
7776 (gdbserver_usage): Likewise.
7777 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7778 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7779 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7780 against libiberty.
7781 ($(LIBGNU)): Depend on libiberty.
7782 (all-lib): Recurse into all subdirs.
7783 (install-only): Invoke "install" target in subdirs.
7784 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7785 targets.
7786 * configure: Rebuild.
7787 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7788 for vasprintf, vsnprintf, or gettimeofday.
7789 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7790 srv_tgtobj.
7791
270c9937
JB
77922014-06-05 Joel Brobecker <brobecker@adacore.com>
7793
7794 * development.sh: Delete.
7795 * Makefile.in (config.status): Adjust dependency on development.sh.
7796 * configure.ac: Adjust development.sh source call.
7797 * configure: Regenerate.
7798
0a261ed8
PA
77992014-06-02 Pedro Alves <palves@redhat.com>
7800
7801 * ax.c (gdb_free_agent_expr): New function.
7802 * ax.h (gdb_free_agent_expr): New declaration.
7803 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7804 list.
7805 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7806 static.
7807 (clear_breakpoint_conditions_and_commands): New function.
7808 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7809 (clear_breakpoint_conditions_and_commands): New declaration.
7810
e9dae05e
RR
78112014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7812
7813 * linux-aarch64-low.c (asm/ptrace.h): Include.
7814
5876f503
JK
78152014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7816
7817 Fix TLS access for -static -pthread.
7818 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7819 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7820 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7821
802e8e6d
PA
78222014-05-20 Pedro Alves <palves@redhat.com>
7823
7824 * linux-aarch64-low.c (aarch64_insert_point)
7825 (aarch64_remove_point): No longer check whether the type is
7826 supported here. Adjust to new interface.
7827 (the_low_target): Install aarch64_supports_z_point_type as
7828 supports_z_point_type method.
7829 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7830 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7831 instead of a Z packet char. Adjust.
7832 (arm_supports_z_point_type): New function.
7833 (arm_insert_point, arm_remove_point): Adjust to new interface.
7834 (the_low_target): Install arm_supports_z_point_type.
7835 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7836 (cris_insert_point, cris_remove_point): Adjust to new interface.
7837 Don't check whether the type is supported here.
7838 (the_low_target): Install cris_supports_z_point_type.
7839 * linux-low.c (linux_supports_z_point_type): New function.
7840 (linux_insert_point, linux_remove_point): Adjust to new interface.
7841 * linux-low.h (struct linux_target_ops) <insert_point,
7842 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7843 raw_breakpoint pointer parameter.
7844 <supports_z_point_type>: New method.
7845 * linux-mips-low.c (mips_supports_z_point_type): New function.
7846 (mips_insert_point, mips_remove_point): Adjust to new interface.
7847 Use mips_supports_z_point_type.
7848 (the_low_target): Install mips_supports_z_point_type.
7849 * linux-ppc-low.c (the_low_target): Install NULL as
7850 supports_z_point_type method.
7851 * linux-s390-low.c (the_low_target): Install NULL as
7852 supports_z_point_type method.
7853 * linux-sparc-low.c (the_low_target): Install NULL as
7854 supports_z_point_type method.
7855 * linux-x86-low.c (x86_supports_z_point_type): New function.
7856 (x86_insert_point): Adjust to new insert_point interface. Use
7857 insert_memory_breakpoint. Adjust to new
7858 i386_low_insert_watchpoint interface.
7859 (x86_remove_point): Adjust to remove_point interface. Use
7860 remove_memory_breakpoint. Adjust to new
7861 i386_low_remove_watchpoint interface.
7862 (the_low_target): Install x86_supports_z_point_type.
7863 * lynx-low.c (lynx_target_ops): Install NULL as
7864 supports_z_point_type callback.
7865 * nto-low.c (nto_supports_z_point_type): New.
7866 (nto_insert_point, nto_remove_point): Adjust to new interface.
7867 (nto_target_ops): Install nto_supports_z_point_type.
7868 * mem-break.c: Adjust intro comment.
7869 (struct raw_breakpoint) <raw_type, size>: New fields.
7870 <inserted>: Update comment.
7871 <shlib_disabled>: Delete field.
7872 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7873 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7874 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7875 (raw_bkpt_type_to_target_hw_bp_type): New function.
7876 (find_enabled_raw_code_breakpoint_at): New function.
7877 (find_raw_breakpoint_at): New type and size parameters. Use them.
7878 (insert_memory_breakpoint): New function, based off
7879 set_raw_breakpoint_at.
7880 (remove_memory_breakpoint): New function.
7881 (set_raw_breakpoint_at): Reimplement.
7882 (set_breakpoint): New, based on set_breakpoint_at.
7883 (set_breakpoint_at): Reimplement.
7884 (delete_raw_breakpoint): Go through the_target->remove_point
7885 instead of assuming memory breakpoints.
7886 (find_gdb_breakpoint_at): Delete.
7887 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7888 (find_gdb_breakpoint): New function.
7889 (set_gdb_breakpoint_at): Delete.
7890 (z_type_supported): New function.
7891 (set_gdb_breakpoint_1): New function, loosely based off
7892 set_gdb_breakpoint_at.
7893 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7894 (delete_gdb_breakpoint_at): Delete.
7895 (delete_gdb_breakpoint_1): New function, loosely based off
7896 delete_gdb_breakpoint_at.
7897 (delete_gdb_breakpoint): New function.
7898 (clear_gdb_breakpoint_conditions): Rename to ...
7899 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7900 breakpoint.
7901 (add_condition_to_breakpoint): Make static.
7902 (add_breakpoint_condition): Take a struct breakpoint pointer
7903 instead of an address. Adjust.
7904 (gdb_condition_true_at_breakpoint): Rename to ...
7905 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7906 z_type parameter.
7907 (gdb_condition_true_at_breakpoint): Reimplement.
7908 (add_breakpoint_commands): Take a struct breakpoint pointer
7909 instead of an address. Adjust.
7910 (gdb_no_commands_at_breakpoint): Rename to ...
7911 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7912 parameter. Return true if no breakpoint was found. Change debug
7913 output.
7914 (gdb_no_commands_at_breakpoint): Reimplement.
7915 (run_breakpoint_commands): Rename to ...
7916 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7917 and change return type to boolean.
7918 (run_breakpoint_commands): New function.
7919 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7920 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7921 breakpoint. Go through the_target->remove_point instead of
7922 assuming memory breakpoint.
7923 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7924 software and hardware breakpoints.
7925 (reinsert_raw_breakpoint): Go through the_target->insert_point
7926 instead of assuming memory breakpoint.
7927 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7928 software and hardware breakpoints.
7929 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7930 Check both software and hardware breakpoints.
7931 (validate_inserted_breakpoint): Assert the breakpoint is a
7932 software breakpoint. Set the inserted flag to -1 instead of
7933 setting shlib_disabled.
7934 (delete_disabled_breakpoints): Adjust.
7935 (validate_breakpoints): Only validate software breakpoints.
7936 Adjust to inserted flag change.
7937 (check_mem_read, check_mem_write): Skip breakpoint types other
7938 than software breakpoints. Adjust to inserted flag change.
7939 * mem-break.h (enum raw_bkpt_type): New enum.
7940 (raw_breakpoint, struct process_info): Forward declare.
7941 (Z_packet_to_target_hw_bp_type): Delete declaration.
7942 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7943 (set_gdb_breakpoint, delete_gdb_breakpoint)
7944 (clear_breakpoint_conditions): New declarations.
7945 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7946 (breakpoint_inserted_here): Update comment.
7947 (add_breakpoint_condition, add_breakpoint_commands): Replace
7948 address parameter with a breakpoint pointer parameter.
7949 (gdb_breakpoint_here): Update comment.
7950 (delete_gdb_breakpoint_at): Delete.
7951 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7952 * server.c (process_point_options): Take a struct breakpoint
7953 pointer instead of an address. Adjust.
7954 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7955 delete_gdb_breakpoint.
7956 * spu-low.c (spu_target_ops): Install NULL as
7957 supports_z_point_type method.
7958 * target.h: Include mem-break.h.
7959 (struct target_ops) <prepare_to_access_memory>: Update comment.
7960 <supports_z_point_type>: New field.
7961 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7962 instead of a char. Also take a raw breakpoint pointer.
7963 * win32-arm-low.c (the_low_target): Install NULL as
7964 supports_z_point_type.
7965 * win32-i386-low.c (i386_supports_z_point_type): New function.
7966 (i386_insert_point, i386_remove_point): Adjust to new interface.
7967 (the_low_target): Install i386_supports_z_point_type.
7968 * win32-low.c (win32_supports_z_point_type): New function.
7969 (win32_insert_point, win32_remove_point): Adjust to new interface.
7970 (win32_target_ops): Install win32_supports_z_point_type.
7971 * win32-low.h (struct win32_target_ops):
7972 <supports_z_point_type>: New method.
7973 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7974 instead of a char. Also take a raw breakpoint pointer.
7975
932539e3
PA
79762014-05-20 Pedro Alves <palves@redhat.com>
7977
7978 * mem-break.h: Include break-common.h.
7979 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7980 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7981 (Z_packet_to_target_hw_bp_type): New declaration.
7982 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7983 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7984 (Z_PACKET_ACCESS_WP): Delete macros.
7985 (Z_packet_to_hw_type): Delete function.
7986 * i386-low.h: Don't include break-common.h here.
7987 (Z_packet_to_hw_type): Delete declaration.
7988 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7989 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7990 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7991 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7992 * linux-aarch64-low.c: Don't include break-common.h here.
7993 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7994 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7995 (Z_packet_to_target_hw_bp_type): Delete function.
7996 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7997 function.
7998 (mips_insert_point, mips_remove_point): Use
7999 Z_packet_to_target_hw_bp_type.
8000
4ff0d3d8
PA
80012014-05-20 Pedro Alves <palves@redhat.com>
8002
8003 * linux-aarch64-low.c: Include break-common.h.
8004 (enum target_point_type): Delete.
8005 (Z_packet_to_point_type): Rename to ...
8006 (Z_packet_to_target_hw_bp_type): ... this, and return a
8007 target_hw_bp_type instead.
8008 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8009 instead of an enum target_point_type.
8010 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8011 breakpoint type.
8012 (aarch64_dr_state_insert_one_point)
8013 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8014 (aarch64_handle_aligned_watchpoint)
8015 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8016 Take an enum target_hw_bp_type instead of an enum
8017 target_point_type.
8018 (aarch64_supports_z_point_type): New function.
8019 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8020 use Z_packet_to_target_hw_bp_type.
8021
786dc519
JB
80222014-05-20 Joel Brobecker <brobecker@adacore.com>
8023
8024 * configure.ac: Only use -Werror by default when DEVELOPMENT
8025 is true.
8026 * configure: Regenerate.
8027
9e0aa64f
JK
80282014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8029
8030 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8031 * linux-x86-low.c (X86_64_USER_REGS): New.
8032 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8033
2b577b92
YQ
80342014-04-28 Yao Qi <yao@codesourcery.com>
8035
8036 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8037 name.
8038
94611da2
PA
80392014-04-25 Pedro Alves <palves@redhat.com>
8040
8041 PR server/16255
8042 * linux-low.c (linux_attach_fail_reason_string): New function.
8043 (linux_attach_lwp): Delete.
8044 (linux_attach_lwp_1): Rename to ...
8045 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8046 argument. Remove "initial" parameter. Return int instead of
8047 void. Don't error or warn here.
8048 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8049 failure to attach to the tgid. Call warning when failing to
8050 attach to an lwp.
8051 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8052 argument. Remove "initial" parameter. Return int instead of
8053 void. Don't error or warn here.
8054 (linux_attach_fail_reason_string): New declaration.
8055 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8056 interface change. Use linux_attach_fail_reason_string.
8057
01f9f808
MS
80582014-04-24 Michael Sturm <michael.sturm@mintel.com>
8059 Walfred Tedeschi <walfred.tedeschi@intel.com>
8060
8061 * Makefile.in: Added rules to handle new files
8062 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8063 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8064 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8065 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8066 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8067 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8068 x32-avx512-linux.o.
8069 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8070 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8071 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8072 i386/x32-avx512.xml.
8073 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8074 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8075 i386/x32-avx512-linux.xml.
8076 * i387-fp.c (num_avx512_k_registers): New constant for number
8077 of K registers.
8078 (num_avx512_zmmh_low_registers): New constant for number of
8079 lower ZMM registers (0-15).
8080 (num_avx512_zmmh_high_registers): New constant for number of
8081 higher ZMM registers (16-31).
8082 (num_avx512_ymmh_registers): New contant for number of higher
8083 YMM registers (ymm16-31 added by avx521 on x86_64).
8084 (num_avx512_xmm_registers): New constant for number of higher
8085 XMM registers (xmm16-31 added by AVX512 on x86_64).
8086 (struct i387_xsave): Add space for AVX512 registers.
8087 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8088 Add code to handle AVX512 registers.
8089 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8090 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8091 prototypei from generated file.
8092 (tdesc_amd64_avx512_linux): Likewise.
8093 (init_registers_x32_avx512_linux): Likewise.
8094 (tdesc_x32_avx512_linux): Likewise.
8095 (init_registers_i386_avx512_linux): Likewise.
8096 (tdesc_i386_avx512_linux): Likewise.
8097 (x86_64_regmap): Add AVX512 registers.
8098 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8099 mask.
8100 (initialize_low_arch): Add code to initialize AVX512 registers.
8101
51aa91f9
PA
81022014-04-23 Pedro Alves <palves@redhat.com>
8103
8104 * mem-break.c (find_gdb_breakpoint_at): Make static.
8105 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8106
a4165e94
PA
81072014-04-23 Pedro Alves <palves@redhat.com>
8108
8109 * i386-low.c: Don't include break-common.h here.
8110 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8111 prototype to take target_hw_bp_type as argument instead of a Z
8112 packet char.
8113 * i386-low.h: Include break-common.h here.
8114 (Z_packet_to_hw_type): Declare.
8115 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8116 prototypes.
8117 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8118 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8119 (x86_remove_point): Convert the packet number to a
8120 target_hw_bp_type before calling i386_low_remove_watchpoint.
8121 * win32-i386-low.c (i386_insert_point): Convert the packet number
8122 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8123 (i386_remove_point): Convert the packet number to a
8124 target_hw_bp_type before calling i386_low_remove_watchpoint.
8125
b8acf843
PA
81262014-04-23 Pedro Alves <palves@redhat.com>
8127
8128 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8129
d708bcd1
PA
81302014-04-10 Pedro Alves <palves@redhat.com>
8131
8132 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8133 Check if the condition or command is NULL before checking if the
8134 breakpoint is known. On success, return true.
8135 * mem-break.h (add_breakpoint_condition): Document return.
8136 (add_breakpoint_commands): Add describing comment.
8137 * server.c (skip_to_semicolon): New function.
8138 (process_point_options): Use it.
8139
2eec7d5b
PA
81402014-04-09 Pedro Alves <palves@redhat.com>
8141
8142 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8143 to lwpid_of.
8144
fa96cb38
PA
81452014-02-27 Pedro Alves <palves@redhat.com>
8146
8147 PR 12702
8148 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8149 macros.
8150 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8151 output.
8152 (last_thread_of_process_p): Take a PID argument instead of a
8153 thread pointer.
8154 (linux_wait_for_lwp): Delete.
8155 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8156 functions.
8157 (linux_low_filter_event): New function, party factored out from
8158 linux_wait_for_event.
8159 (linux_wait_for_event): Rename to ...
8160 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8161 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8162 sigsuspend. Check for zombie leaders.
8163 (linux_wait_for_event): Reimplement as wrapper around
8164 linux_wait_for_event_filtered.
8165 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8166 a normal or signal exit is seen, it's the whole process exiting.
8167 (wait_for_sigstop): No longer a for_each_inferior callback.
8168 Rewrite on top of linux_wait_for_event_filtered.
8169 (stop_all_lwps): Call wait_for_sigstop directly.
8170 * server.c (resume, handle_target_event): Handle
8171 TARGET_WAITKIND_NO_RESUMED.
8172
d763de10
JB
81732014-02-26 Joel Brobecker <brobecker@adacore.com>
8174
8175 * win32-low.c (psapi_get_dll_name,
8176 * win32_CreateToolhelp32Snapshot): Delete.
8177 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8178 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8179 Delete.
8180 (handle_load_dll): Add function description.
8181 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8182
850a0f76
JB
81832014-02-26 Joel Brobecker <brobecker@adacore.com>
8184
8185 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8186 Add comment.
8187 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8188 base address when calling win32_add_one_solib.
8189 (handle_load_dll): Delete local variable load_addr.
8190 Remove 0x1000 offset applied to DLL base address when calling
8191 win32_add_one_solib.
8192 (handle_unload_dll): Add comment.
8193
f25b3fc3
JB
81942014-02-26 Joel Brobecker <brobecker@adacore.com>
8195
8196 * win32-low.c (win32_add_all_dlls): Renames
8197 win32_ensure_ntdll_loaded. Rewrite function documentation.
8198 Adjust implementation to always load all DLLs.
8199 Add 0x1000 offset to DLL base address when calling
8200 win32_add_one_solib.
8201 (child_initialization_done): New static global.
8202 (do_initial_child_stuff): Set child_initialization_done to
8203 zero during child initialization, and 1 after. Replace call
8204 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8205 Add comment.
8206 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8207 (handle_unload_dll): Add function documentation.
8208 (get_child_debug_event): Ignore load and unload DLL events
8209 during child initialization.
8210
d86d4aaf
DE
82112014-02-20 Doug Evans <dje@google.com>
8212
3bc32da3 8213 Remove global all_lwps.
d86d4aaf
DE
8214 * inferiors.h (ptid_of): Move here from linux-low.h.
8215 (pid_of, lwpid_of): Ditto.
8216 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8217 parameter is a struct thread_info * now.
8218 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8219 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8220 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8221 directly.
8222 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8223 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8224 * linux-arm-low.c (update_registers_callback): Update, "entry"
8225 parameter is a struct thread_info * now.
8226 Fetch lwpid from current_inferior directly.
8227 (arm_insert_point): Pass &all_threads to find_inferior instead of
8228 &all_lwps.
8229 (arm_remove_point): Ditto.
8230 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8231 (arm_prepare_to_resume): Fetch pid from thread.
8232 (arm_read_description): Fetch lwpid from current_inferior directly.
8233 * linux-low.c (all_lwps): Delete.
8234 (delete_lwp): Delete call to remove_inferior.
8235 (handle_extended_wait): Fetch lwpid from thread.
8236 (add_lwp): Don't set lwp->entry.id. Remove call to
8237 add_inferior_to_list.
8238 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8239 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8240 (kill_one_lwp_callback): Ditto.
8241 (linux_kill): Don't dereference NULL pointer.
8242 Fetch ptid,lwpid from thread.
8243 (get_detach_signal): Fetch ptid from thread.
8244 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8245 Simplify call to regcache_invalidate_thread.
8246 (delete_lwp_callback): Update, "entry" parameter is a
8247 struct thread_info * now. Fetch pid from thread.
8248 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8249 (status_pending_p_callback): Update, "entry" parameter is a
8250 struct thread_info * now. Fetch ptid from thread.
8251 (find_lwp_pid): Update, "entry" parameter is a
8252 struct thread_info * now.
8253 (linux_wait_for_lwp): Fetch pid from thread.
8254 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8255 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8256 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8257 (dequeue_one_deferred_signal): Ditto.
8258 (cancel_breakpoint): Fetch ptid from current_inferior.
8259 (linux_wait_for_event): Pass &all_threads to find_inferior,
8260 not &all_lwps. Fetch ptid, lwpid from thread.
8261 (count_events_callback): Update, "entry" parameter is a
8262 struct thread_info * now.
8263 (select_singlestep_lwp_callback): Ditto.
8264 (select_event_lwp_callback): Ditto.
8265 (cancel_breakpoints_callback): Ditto.
8266 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8267 not &all_lwps.
8268 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8269 (unsuspend_one_lwp): Update, "entry" parameter is a
8270 struct thread_info * now.
8271 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8272 not &all_lwps.
8273 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8274 Fetch lwpid from thread, not lwp.
8275 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8276 Pass &all_threads to find_inferior, not &all_lwps.
8277 (send_sigstop): Fetch lwpid from thread, not lwp.
8278 (send_sigstop_callback): Update, "entry" parameter is a
8279 struct thread_info * now.
8280 (suspend_and_send_sigstop_callback): Ditto.
8281 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8282 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8283 struct thread_info * now.
8284 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8285 from thread, lwp.
8286 (lwp_running): Update, "entry" parameter is a
8287 struct thread_info * now.
8288 (stop_all_lwps): Fetch ptid from thread.
8289 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8290 (linux_resume_one_lwp): Fetch lwpid from thread.
8291 (linux_set_resume_request): Update, "entry" parameter is a
8292 struct thread_info * now. Fetch pid, lwpid from thread.
8293 (resume_status_pending_p): Update, "entry" parameter is a
8294 struct thread_info * now.
8295 (need_step_over_p): Ditto. Fetch lwpid from thread.
8296 (start_step_over): Fetch lwpid from thread.
8297 (linux_resume_one_thread): Update, "entry" parameter is a
8298 struct thread_info * now. Fetch lwpid from thread.
8299 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8300 (proceed_one_lwp): Update, "entry" parameter is a
8301 struct thread_info * now. Fetch lwpid from thread.
8302 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8303 struct thread_info * now.
8304 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8305 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8306 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8307 directly.
8308 (regsets_store_inferior_registers): Ditto.
8309 (fetch_register, store_register): Ditto.
8310 (linux_read_memory, linux_write_memory): Ditto.
8311 (linux_request_interrupt): Ditto.
8312 (linux_read_auxv): Ditto.
8313 (linux_xfer_siginfo): Ditto.
8314 (linux_qxfer_spu): Ditto.
8315 (linux_qxfer_libraries_svr4): Ditto.
8316 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8317 moved to inferiors.h.
8318 (get_lwp): Delete.
8319 (get_thread_lwp): Update.
8320 (struct lwp_info): Delete member "entry". Simplify comment for
8321 member "thread".
8322 (all_lwps): Delete.
8323 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8324 current_inferior directly.
8325 (update_watch_registers_callback): Update, "entry" parameter is a
8326 struct thread_info * now. Fetch pid from thread.
8327 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8328 (mips_insert_point): Fetch lwpid from current_inferior.
8329 Pass &all_threads to find_inferior, not &all_lwps.
8330 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8331 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8332 directly.
8333 (mips_stopped_data_address): Ditto.
8334 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8335 directly.
8336 * linux-tile-low.c (tile_arch_setup): Ditto.
8337 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8338 (update_debug_registers_callback): Update, "entry" parameter is a
8339 struct thread_info * now. Fetch pid from thread.
8340 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8341 Pass &all_threads to find_inferior, not &all_lwps.
8342 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8343 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8344 Pass &all_threads to find_inferior, not &all_lwps.
8345 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8346 (i386_dr_low_get_status): Ditto.
8347 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8348 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8349 (x86_linux_read_description): Ditto.
8350 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8351
3b8361aa
DE
83522014-02-20 Doug Evans <dje@google.com>
8353
8354 * inferiors.c (get_first_inferior): Fix buglet.
8355
f7667f0d
DE
83562014-02-19 Doug Evans <dje@google.com>
8357
8358 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8359 * inferiors.c (add_thread): Change result type to struct thread_info *.
8360 All callers updated.
8361 (add_lwp): Call add_thread here instead of in callers.
8362 All callers updated.
8363 * linux-low.h (get_lwp_thread): Rewrite.
8364 (struct lwp_info): New member "thread".
8365
b3312d80
DE
83662014-02-19 Doug Evans <dje@google.com>
8367
8368 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8369 All callers updated.
8370
ecc6f45c
DE
83712014-02-19 Doug Evans <dje@google.com>
8372
8373 * inferiors.c (add_thread): Fix whitespace.
8374
649ebbca
DE
83752014-02-19 Doug Evans <dje@google.com>
8376
8377 * dll.c (clear_dlls): Replace accessing list implemention details
8378 with API function.
8379 * gdbthread.h (get_first_thread): Declare.
8380 * inferiors.c (for_each_inferior_with_data): New function.
8381 (get_first_thread): New function.
8382 (find_thread_ptid): Simplify.
8383 (get_first_inferior): New function.
8384 (clear_list): Delete.
8385 (one_inferior_p): New function.
8386 (clear_inferior_list): New function.
8387 (clear_inferiors): Update.
8388 * inferiors.h (for_each_inferior_with_data): Declare.
8389 (clear_inferior_list): Declare.
8390 (one_inferior_p): Declare.
8391 (get_first_inferior): Declare.
8392 * linux-low.c (linux_wait_for_event): Replace accessing list
8393 implemention details with API function.
8394 * server.c (target_running): Ditto.
8395 (accumulate_file_name_length): New function.
8396 (emit_dll_description): New function.
8397 (handle_qxfer_libraries): Replace accessing list implemention
8398 details with API function.
8399 (handle_qxfer_threads_worker): New function.
8400 (handle_qxfer_threads_proper): Replace accessing list implemention
8401 details with API function.
8402 (handle_query): Ditto.
8403 (visit_actioned_threads_callback_ftype): New typedef.
8404 (visit_actioned_threads_data): New struct.
8405 (visit_actioned_threads): Rewrite to be find_inferior callback.
8406 (resume): Call find_inferior.
8407 (handle_status): Replace accessing list implemention
8408 details with API function.
8409 (process_serial_event): Replace accessing list implemention details
8410 with API function.
8411 * target.c (set_desired_inferior): Replace accessing list implemention
8412 details with API function.
8413 * tracepoint.c (same_process_p): New function.
8414 (gdb_agent_about_to_close): Replace accessing list implemention
8415 details with API function.
8416 * win32-low.c (child_delete_thread): Replace accessing list
8417 implemention details with API function.
8418 (match_dll_by_basename): New function.
8419 (dll_is_loaded_by_basename): New function.
8420 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8421 details call to dll_is_loaded_by_basename.
8422
80894984
DE
84232014-02-19 Doug Evans <dje@google.com>
8424
8425 * dll.h (struct dll_info): Add comment.
8426 * gdbthread.h (struct thread_info): Add comment.
8427 (current_ptid): Simplify.
8428 * inferiors.c (add_process): Update.
8429 (remove_process): Update.
8430 * inferiors.h (struct process_info): Rename member "head" to "entry".
8431 * linux-low.c (delete_lwp): Update.
8432 (add_lwp): Update.
8433 (last_thread_of_process_p): Update.
8434 (kill_one_lwp_callback, linux_kill): Update.
8435 (status_pending_p_callback): Update.
8436 (wait_for_sigstop): Update. Simplify read of ptid.
8437 (start_step_over): Update.
8438 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8439 (get_lwp_thread): Update.
8440 (struct lwp_info): Rename member "head" to "entry".
8441 * regcache.h (inferior_list_entry): Delete.
8442 * server.c (kill_inferior_callback): Update.
8443 (detach_or_kill_inferior_callback): Update.
8444 (print_started_pid): Update.
8445 (print_attached_pid): Update.
8446 (process_serial_event): Simplify read of ptid.
8447 * thread-db.c (thread_db_create_event): Update.
8448 (thread_db_get_tls_address): Update.
8449 * win32-low.c (current_inferior_ptid): Simplify.
8450
46917d26
TT
84512014-02-19 Tom Tromey <tromey@redhat.com>
8452
8453 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8454 argument.
8455 (target_supports_btrace): Update.
8456
0759a81e
YQ
84572014-02-14 Yao Qi <yao@codesourcery.com>
8458
8459 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8460 (rsp-low-ipa.o): New target.
8461
a7191e8b
TT
84622014-02-12 Tom Tromey <tromey@redhat.com>
8463
8464 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8465 convert_ascii_to_int.
8466 * regcache.c (registers_to_string): Likewise.
8467 * remote-utils.c (decode_M_packet): Likewise.
8468 * server.c (process_serial_event): Likewise.
8469
ff0e980e
TT
84702014-02-12 Tom Tromey <tromey@redhat.com>
8471
8472 * server.c (handle_query, handle_v_run): Use hex2bin, not
8473 unhexify.
8474 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8475
e9371aff
TT
84762014-02-12 Tom Tromey <tromey@redhat.com>
8477
8478 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8479 convert_int_to_ascii.
8480 * regcache.c (registers_to_string, collect_register_as_string):
8481 Likewise.
8482 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8483 Likewise.
8484 * server.c (process_serial_event): Likewise.
8485 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8486 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8487
971dc0b8
TT
84882014-02-12 Tom Tromey <tromey@redhat.com>
8489
8490 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8491 bin2hex, not hexify.
8492 * tracepoint.c (cmd_qtstatus): Likewise.
8493
0a822afb
TT
84942014-02-12 Tom Tromey <tromey@redhat.com>
8495
8496 * remote-utils.c (monitor_output): Pass explicit length to
8497 hexify.
8498
9c3d6531
TT
84992014-02-12 Tom Tromey <tromey@redhat.com>
8500
8501 * tracepoint.c: Include rsp-low.h.
8502 * server.c: Include rsp-low.h.
8503 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8504 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8505 declare.
8506 * remote-utils.c: Include rsp-low.h.
8507 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8508 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8509 (convert_int_to_ascii, convert_ascii_to_int): Move to
8510 common/rsp-low.c.
8511 * regcache.c: Include rsp-low.h.
8512 * ax.c: Include rsp-low.h.
8513 * Makefile.in (SFILES): Add common/rsp-low.c.
8514 (OBS): Add rsp-low.o.
8515 (rsp-low.o): New target.
8516
01fd3ea5
TT
85172014-02-12 Tom Tromey <tromey@redhat.com>
8518
8519 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8520 Include print-utils.h.
8521 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8522 (plongest, thirty_two, phex_nz): Remove.
8523 * Makefile.in (SFILES): Add common/print-utils.c.
8524 (OBS): Add print-utils.o.
8525 (print-utils-ipa.o): New target.
8526 (print-utils.o): New target.
8527 (IPA_OBJS): Add print-utils-ipa.o.
8528
e99dc820
TT
85292014-02-06 Tom Tromey <tromey@redhat.com>
8530
8531 * Makefile.in (SFILES): Fix indentation.
8532
ee1e2d4f
DE
85332014-02-05 Doug Evans <dje@google.com>
8534
8535 * linux-low.c (linux_wait_for_event): Improve comment.
8536 (linux_wait_1): Keep current_inferior in sync with event_child.
8537
f5a02773
DE
85382014-01-22 Doug Evans <dje@google.com>
8539
8540 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8541
87ce2a04
DE
85422014-01-22 Doug Evans <dje@google.com>
8543
8544 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8545 * configure: Regenerate.
8546 * config.in: Regenerate.
8547 * Makefile.in (SFILES): Add debug.c.
8548 (OBS): Add debug.o.
8549 * debug.c: New file.
8550 * debug.h: New file.
8551 * linux-aarch64-low.c (*): Update all debugging printfs to use
8552 debug_printf instead of fprintf.
8553 * linux-arm-low.c (*): Ditto.
8554 * linux-cris-low.c (*): Ditto.
8555 * linux-crisv32-low.c (*): Ditto.
8556 * linux-m32r-low.c (*): Ditto.
8557 * linux-sparc-low.c (*): Ditto.
8558 * linux-x86.c (*): Ditto.
8559 * linux-low.c (*): Ditto.
8560 (linux_wait_1): Add calls to debug_enter, debug_exit.
8561 (linux_wait): Remove redundant debugging printf.
8562 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8563 (linux_resume, unstop_all_lwps): Ditto.
8564 * mem-break.c (*): Update all debugging printfs to use
8565 debug_printf instead of fprintf.
8566 * remote-utils.c (*): Ditto.
8567 * thread-db.c (*): Ditto.
8568 * server.c #include <ctype.h>, "gdb_vecs.h".
8569 (debug_threads): Moved to debug.c.
8570 (*): Update all debugging printfs to use debug_printf instead of
8571 fprintf.
8572 (start_inferior): Replace call to fflush with call to debug_flush.
8573 (monitor_show_help): Mention set debug-format.
8574 (parse_debug_format_options): New function.
8575 (handle_monitor_command): Handle "monitor set debug-format".
8576 (gdbserver_usage): Mention --debug-format.
8577 (main): Parse --debug-format.
8578 * server.h (debug_threads): Declaration moved to debug.h.
8579 #include "debug.h".
8580 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8581 trace_debug_1 that uses debug_printf.
8582 (tracepoint_look_up_symbols): Update all debugging printfs to use
8583 debug_printf instead of fprintf.
8584
e671835b
BS
85852014-01-20 Baruch Siach <baruch@tkos.co.il>
8586
8587 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8588 sys/ptrace.h.
8589
b5737fa9
PA
85902014-01-17 Pedro Alves <palves@redhat.com>
8591
ea38d2a9 8592 PR build/16445
c7faa97a
PA
8593 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8594 defined after including gdb_proc_service.h.
b5737fa9 8595
40ed484e
DE
85962014-01-16 Doug Evans <dje@google.com>
8597
8598 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8599 (match_dll): Use it.
8600
969c39fb
MM
86012014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8602
8603 * target.h (target_ops) <read_btrace>: Change parameters and
8604 return type to allow error reporting.
8605 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8606 trace reading errors on.
8607 * linux-low.c (linux_low_read_btrace): Pass trace reading
8608 errors on.
8609 (linux_low_disable_btrace): New.
8610
ab7f45ba
DE
86112014-01-15 Doug Evans <dje@google.com>
8612
8613 * inferiors.c (thread_id_to_gdb_id): Delete.
8614 * inferiors.h (thread_id_to_gdb_id): Delete.
8615
66af0f44
EZ
86162014-01-13 Eli Zaretskii <eliz@gnu.org>
8617
8618 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8619 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8620 versions.
8621
9939e131
PA
86222014-01-08 Pedro Alves <palves@redhat.com>
8623
8624 * server.c (handle_status): Don't discard previous queued stop
8625 replies or thread's pending status here.
8626 (main) <disconnection>: Do it here instead.
8627
b7ea362b
PA
86282014-01-08 Pedro Alves <palves@redhat.com>
8629
8630 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8631 * server.c (visit_actioned_threads, handle_pending_status): New
8632 function.
8633 (handle_v_cont): Factor out parts to ...
8634 (resume): ... this new function. If in all-stop, and a thread
8635 being resumed has a pending status, report it without actually
8636 resuming.
8637 (myresume): Adjust to use the new 'resume' function.
8638 (clear_pending_status_callback, set_pending_status_callback)
8639 (find_status_pending_thread_callback): New functions.
8640 (handle_status): Handle the case of multiple threads having
8641 interesting statuses to report. Report threads' real last signal
8642 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8643 with an interesting thread to report the status for, instead of
8644 always reporting the status of the first thread.
8645
28498c42
JB
86462014-01-01 Joel Brobecker <brobecker@adacore.com>
8647
8648 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8649 * gdbreplay.c (gdbreplay_version): Likewise.
8650
f45c82da
YZ
86512013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8652
8653 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8654 iov.iov_len with the real length in use.
8655
379a5e2d
JB
86562013-12-13 Joel Brobecker <brobecker@adacore.com>
8657
8658 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8659 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8660 for all targets that use win32-low.c.
8661 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8662 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8663
4210d83e
PA
86642013-12-13 Pedro Alves <palves@redhat.com>
8665
8666 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8667 if equal to TARGET_WAITKIND_LOADED.
8668 * win32-low.c (cached_status): New static global.
8669 (win32_wait): Add declaration.
8670 (do_initial_child_stuff): Flush all initial pending debug events
8671 up to the initial breakpoint.
8672 (win32_wait): If CACHED_STATUS was set, return that instead
8673 of doing a real wait. Remove the code resuming the execution
8674 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8675 during the initial phase. Also remove the code changing
8676 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8677 TARGET_WAITKIND_STOPPED.
8678
e7f0d979
YQ
86792013-12-11 Yao Qi <yao@codesourcery.com>
8680
8681 * notif.c (handle_notif_ack): Return 0 if no notification
8682 matches.
8683
ebcf782c
DE
86842013-11-20 Doug Evans <dje@google.com>
8685
8686 * linux-low.c (linux_set_resume_request): Fix comment.
8687
20ad9378
DE
86882013-11-20 Doug Evans <dje@google.com>
8689
8690 * linux-low.c (resume_status_pending_p): Tweak comment.
8691
a196ebeb
WT
86922013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8693
8694 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8695 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8696 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8697 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8698 (srv_amd64_regobj): Add amd64-mpx.o.
8699 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8700 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8701 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8702 * i387-fp.c (num_pl_bnd_register) Added constant.
8703 (num_pl_bnd_cfg_registers) Added constant.
8704 (struct i387_xsave) Added reserved area and MPX fields.
8705 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8706 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8707 function.
8708 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8709 (init_registers_amd64_mpx_linux): Declare new function.
8710 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8711 (x86_64_regmap): Add MPX registers.
8712 (x86_linux_read_description): Add MPX case.
8713 (initialize_low_arch): Initialize MPX targets.
8714
0080a2f6
TT
87152013-11-18 Tom Tromey <tromey@redhat.com>
8716
8717 * configure: Rebuild.
8718 * configure.ac: Don't check for stdlib.h.
8719 * gdbreplay.c: Unconditionally include stdlib.h.
8720
2978b111
TT
87212013-11-18 Tom Tromey <tromey@redhat.com>
8722
8723 * config.in: Rebuild.
8724 * configure: Rebuild.
8725 * configure.ac: Don't use AC_HEADER_DIRENT.
8726
a3d08894
TT
87272013-11-18 Tom Tromey <tromey@redhat.com>
8728
8729 * server.h: Don't check HAVE_STRING_H.
8730 * gdbreplay.c: Don't check HAVE_STRING_H.
8731 * configure: Rebuild.
8732
0a5dd17d
TT
87332013-11-18 Tom Tromey <tromey@redhat.com>
8734
8735 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8736 LIBGNU.
8737
1bd2f0ba
TT
87382013-11-08 Tom Tromey <tromey@redhat.com>
8739
8740 * configure, config.in: Rebuild.
8741 * configure.ac: Remove unused configury.
8742
3266f10b
TT
87432013-11-08 Tom Tromey <tromey@redhat.com>
8744
8745 * acinclude.m4: Include common.m4, codeset.m4.
8746 * configure, config.in: Rebuild.
8747 * configure.ac: Use GDB_AC_COMMON.
8748
6682d959
AA
87492013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8750
8751 * linux-s390-low.c (HWCAP_S390_TE): New define.
8752 (s390_arch_setup): Consider the TE field in the HWCAP for
8753 determining 'have_regset_tdb'.
8754
fd0a4d76
SDJ
87552013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8756
8757 PR gdb/16014
8758 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8759 call to sizeof.
8760
1a3d890b
PA
87612013-10-02 Pedro Alves <palves@redhat.com>
8762
8763 * server.c (process_serial_event): Don't output "GDBserver
8764 exiting" if GDB is connected through stdio.
8765 * target.c (mywait): Likewise, be silent if GDB is connected
8766 through stdio.
8767
97ad4581
JB
87682013-10-01 Joel Brobecker <brobecker@adacore.com>
8769
8770 * lynx-low.c (lynx_add_threads_after_attach): New function.
8771 (lynx_attach): Remove call to add_thread. Add call to
8772 lynx_add_threads_after_attach instead.
8773
5b4e221c
MF
87742013-09-28 Mike Frysinger <vapier@gentoo.org>
8775
8776 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8777 * config.in, configure: Regenerated.
8778
ee47b2f8
YQ
87792013-09-18 Yao Qi <yao@codesourcery.com>
8780
8781 PR server/15959
8782 * server.c (start_inferior): Clear 'resume_info'.
8783
d6707650 87842013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8785
d6707650
JW
8786 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8787 for each register.
8788
9243dd0e 87892013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8790
9243dd0e
JW
8791 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8792 linux-tile-low.o to srv_tgtobj.
8793
c623a6ef
WN
87942013-09-16 Will Newton <will.newton@linaro.org>
8795
8796 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8797 out regs.
8798
fb71d39e
PA
87992013-09-06 Pedro Alves <palves@redhat.com>
8800
8801 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8802 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8803 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8804 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8805 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8806 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8807
8e7e9910
PA
88082013-09-06 Pedro Alves <palves@redhat.com>
8809
8810 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8811 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8812
7c3a12ca
PA
88132013-09-06 Pedro Alves <palves@redhat.com>
8814
8815 * linux-amd64-ipa.c: Include tracepoint.h.
8816 * linux-i386-ipa.c: Include tracepoint.h.
8817
8eb3d7b6
RW
88182013-09-06 Ricard Wanderlof <ricardw@axis.com>
8819
8820 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8821 (ps_get_thread_area): New function.
8822
eddddb9d
RW
88232013-09-06 Ricard Wanderlof <ricardw@axis.com>
8824
8825 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8826 (initialize_low_arch): Call init_registers_crisv32 rather than
8827 init_register_crisv32.
8828
533b0600
PA
88292013-09-05 Pedro Alves <palves@redhat.com>
8830
8831 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8832 to ...
8833 * hostio.h: ... this new file.
8834 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8835 win32-low.c: Include hostio.h.
8836
0ce3d3b5
PA
88372013-09-05 Pedro Alves <palves@redhat.com>
8838
8839 * server.h (gdb_client_data, handler_func, callback_handler_func)
8840 (delete_file_handler, add_file_handler, append_callback_event)
8841 (delete_callback_event, start_event_loop, initialize_event_loop):
8842 Move to event-loop.h and include it.
8843 * event-loop.h: New file.
8844
799cdc37
PA
88452013-09-05 Pedro Alves <palves@redhat.com>
8846
8847 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8848 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8849 (loaded_dll, unloaded_dll): Move to ...
8850 * dll.h: ... this new file.
8851 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8852
6a6bbd9d
PA
88532013-09-05 Pedro Alves <palves@redhat.com>
8854
8855 * server.h (current_process, get_thread_process, all_processes)
8856 (add_inferior_to_list, for_each_inferior, current_inferior)
8857 (remove_inferior, add_process, remove_process, find_process_pid)
8858 (have_started_inferiors_p, have_attached_inferiors_p)
8859 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8860 (clear_inferiors, find_inferior, find_inferior_id)
8861 (inferior_target_data, set_inferior_target_data)
8862 (inferior_regcache_data, set_inferior_regcache_data): Move to
8863 inferiors.h, and include it.
8864 * inferiors.h: New file.
8865
f699aaba
PA
88662013-09-05 Pedro Alves <palves@redhat.com>
8867
8868 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8869 Move ...
72f4393d 8870 * ax.h: ... here.
f699aaba 8871
c144c7a0
PA
88722013-09-05 Pedro Alves <palves@redhat.com>
8873
8874 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8875 tracepoint.h.
8876 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8877 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8878 (handle_tracepoint_general_set, handle_tracepoint_query)
8879 (tracepoint_finished_step, tracepoint_was_hit)
8880 (release_while_stepping_state_list, current_traceframe)
8881 (in_readonly_region, traceframe_read_mem)
8882 (fetch_traceframe_registers, traceframe_read_sdata)
8883 (traceframe_read_info, struct fast_tpoint_collect_status)
8884 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8885 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8886 (supply_fast_tracepoint_registers)
8887 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8888 (ipa_tdesc, claim_trampoline_space)
8889 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8890 (agent_mem_read, agent_get_trace_state_variable_value)
8891 (agent_set_trace_state_variable_value, agent_tsv_read)
8892 (agent_mem_read_string, get_raw_reg_func_addr)
8893 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8894 * tracepoint.h: ... this new file.
8895
ff42e6ab
PA
88962013-09-05 Pedro Alves <palves@redhat.com>
8897
8898 * server.h (perror_with_name, error, fatal, warning, paddress)
8899 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8900 include it.
8901 * utils.h: New file.
8902
541af0f4
PA
89032013-09-05 Pedro Alves <palves@redhat.com>
8904
8905 * server.h (remote_debug, noack_mode, transport_is_reliable)
8906 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8907 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8908 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8909 (write_enn, initialize_async_io, enable_async_io)
8910 (disable_async_io, check_remote_input_interrupt_request)
8911 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8912 (dead_thread_notify, prepare_resume_reply)
8913 (decode_address_to_semicolon, decode_address, decode_m_packet)
8914 (decode_M_packet, decode_X_packet, decode_xfer_write)
8915 (decode_search_memory_packet, unhexify, hexify)
8916 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8917 (look_up_one_symbol, relocate_instruction)
8918 (monitor_output): Move to remote-utils.h, and include it.
8919 * remote-utils.h: New file.
8920
eebdf26b
PA
89212013-09-05 Pedro Alves <palves@redhat.com>
8922
8923 * server.h (_): Delete.
8924
3aafd2ff
PA
89252013-09-02 Pedro Alves <palves@redhat.com>
8926
8927 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8928 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8929 allocated.
8930 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8931
cee83bcb
PM
89322013-09-02 Pierre Muller <muller@sourceware.org>
8933
8934 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8935 or WriteProcessMemory complete successfully and handle
8936 ERROR_PARTIAL_COPY error.
8937
9a13b2fa
PA
89382013-09-02 Pedro Alves <palves@redhat.com>
8939
8940 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8941 error instead of EIO.
8942
602e3198
JK
89432013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8944
8945 PR server/15604
8946 * linux-low.c: Include filestuff.h.
8947 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8948 * lynx-low.c: Include filestuff.h.
8949 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8950 * server.c: Include filestuff.h.
8951 (main): Call notice_open_fds.
8952 * spu-low.c: Include filestuff.h.
8953 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8954
96d7229d
LM
89552013-08-22 Luis Machado <lgustavo@codesourcery.com>
8956
8957 * Makefile.in: Explain why ../target and ../nat are not
8958 listed as include file search paths.
8959 (linux-waitpid.o): New object file rule.
8960 * configure.srv (srv_native_linux_obj): New variable.
8961 Replace all occurrences of linux native object files with
8962 $srv_native_linux_obj.
8963 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8964 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8965 (linux_enable_event_reporting): Remove declaration.
8966 (my_waitpid): Moved to common/linux-waitpid.c.
8967 (linux_wait_for_event): Pass ptid when calling
8968 linux_enable_event_reporting.
8969 (linux_supports_tracefork_flag): Remove.
8970 (linux_enable_event_reporting): Likewise.
8971 (linux_tracefork_grandchild): Remove.
8972 (STACK_SIZE): Moved to common/linux-ptrace.c.
8973 (linux_tracefork_child): Remove.
8974 (linux_test_for_tracefork): Remove.
8975 (linux_look_up_symbols): Call linux_supports_traceclone.
8976 (initialize_low): Remove call to linux_test_for_tracefork.
8977 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8978 common/linux-ptrace.h.
8979 (PTRACE_TYPE_ARG4): Likewise.
8980 Include linux-ptrace.h.
8981
32940073
PA
89822013-08-21 Pedro Alves <palves@redhat.com>
8983
8984 * config.in: Renegerate.
8985
33b60d58 89862013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8987
33b60d58
LM
8988 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8989 (SFILES): Remove $(srcdir)/common/target-common.c and
8990 add $(srcdir)/target/waitstatus.c.
8991 (OBS): Remove target-common.o and add waitstatus.o.
8992 (server_h): Remove $(srcdir)/../common/target-common.h and
8993 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8994 and $(srcdir)/../target/waitstatus.h.
8995 (target-common.o): Remove.
8996 (waitstatus.o): New target object file.
8997 * target.h: Do not include target-common.h and
8998 include target/resume.h, target/wait.h and
8999 target/waitstatus.h.
9000
b8e1b30e
LM
90012013-08-13 Luis Machado <lgustavo@codesourcery.com>
9002
9003 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9004 to PTRACE_TYPE_ARG3.
9005 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9006 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9007 PTRACE_TYPE_ARG4.
9008 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9009 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9010
7a60ad40
YQ
90112013-07-27 Jie Zhang <jie@codesourcery.com>
9012 Daniel Jacobowitz <dan@codesourcery.com>
9013 Yao Qi <yao@codesourcery.com>
9014
9015 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9016 (mips-linux-watch.o): New rule.
9017 (mips_linux_watch_h): New variable.
9018 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9019 srv_tgtobj.
9020 * linux-mips-low.c: Include mips-linux-watch.h.
9021 (struct arch_process_info, struct arch_lwp_info): New.
9022 (update_watch_registers_callback): New function.
9023 (mips_linux_new_process, mips_linux_new_thread) New functions.
9024 (mips_linux_prepare_to_resume, mips_insert_point): New
9025 functions.
9026 (mips_remove_point, mips_stopped_by_watchpoint): New
9027 functions.
9028 (rsp_bp_type_to_target_hw_bp_type): New function.
9029 (mips_stopped_data_address): New function.
9030 (the_low_target): Add watchpoint support functions.
9031
de6f69ad
YQ
90322013-07-27 Yao Qi <yao@codesourcery.com>
9033
9034 * i386-low.c: Include break-common.h.
9035 (enum target_hw_bp_type): Remove.
9036
3360c0bf
LM
90372013-07-24 Luis Machado <lgustavo@codesourcery.com>
9038
9039 * Makefile.in (SFILES): /common/target-common.c.
9040 (OBS): Add target-common.o.
9041 (server_h): Add $(srcdir)/../common/target-common.h.
9042 (target-common.o): New target.
9043 * server.c (queue_stop_reply_callback): Free
9044 status string after use.
9045 * target.c (target_waitstatus_to_string): Remove.
9046 * target.h: Include target-common.h.
9047 (resume_kind): Likewise.
9048 (target_waitkind): Likewise.
9049 (target_waitstatus): Likewise.
9050 (TARGET_WNOHANG): Likewise.
9051
bd885420
YQ
90522013-07-04 Yao Qi <yao@codesourcery.com>
9053
9054 * Makefile.in (host_alias): Use @host_noncanonical@.
9055 (target_alias): Use @target_noncanonical@.
9056 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9057 ACX_NONCANONICAL_HOST.
9058 * configure: Regenerated.
9059
9060 Revert:
9061 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9062
9063 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9064 * configure: Rebuild.
9065 * Makefile.in (version_host, version_target): Get from configure.
9066 (version.c): Use $(version_host) and $(version_target).
9067
17ef446e
PA
90682013-07-03 Pedro Alves <palves@redhat.com>
9069
9070 * Makefile.in (config.status): Depend on development.sh.
9071 * acinclude.m4: Include libmcheck.m4.
9072 * configure: Regenerate.
9073
7a9a7487
MG
90742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9075
9076 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9077 attribute inside the parentheses.
9078 (winapi_DebugSetProcessKillOnExit): Ditto.
9079 (winapi_DebugBreakProcess): Ditto.
9080 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9081
49b64de6
MG
90822013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9083
9084 * notif.h (notif_event): Add a dummy member to avoid compiler
9085 errors.
9086
d5749ee7
PA
90872013-07-01 Pedro Alves <palves@redhat.com>
9088
9089 * hostio.c (HOSTIO_PATH_MAX): Define.
9090 (require_filename, handle_open, handle_unlink, handle_readlink):
9091 Use it.
9092
d8d2a3ee
PA
90932013-07-01 Pedro Alves <palves@redhat.com>
9094
9095 * server.h: Include "pathmax.h".
9096 * linux-low.c: Don't include sys/param.h.
9097 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9098 MAXPATHLEN.
9099 * win32-low.c: Don't include sys/param.h.
9100 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9101
bc7dea8d
PA
91022013-07-01 Pedro Alves <palves@redhat.com>
9103
9104 * event-loop.c: Don't check HAVE_UNISTD_H before including
9105 <unistd.h>.
9106 * gdbreplay.c: Likewise.
9107 * remote-utils.c: Likewise.
9108 * server.c: Likewise.
9109 * configure.ac: Don't check for unistd.h.
9110 * configure: Regenerate.
9111
d6c2da54
TT
91122013-06-28 Tom Tromey <tromey@redhat.com>
9113
9114 * Makefile.in (version.c): Use version.in, not
9115 common/version.in.
9116
257b6bec
MG
91172013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9118
9119 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9120 * configure: Rebuild.
9121 * Makefile.in (version_host, version_target): Get from configure.
9122 (version.c): Use $(version_host) and $(version_target).
9123
86ebe149
DK
91242013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9125
9126 Fix trace-status to output user name without trailing colon.
9127 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9128
f30aa5af
DK
91292013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9130
9131 Fix trace-status to output proper start-time and stop-time.
9132 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9133 output start time and stop time in hex as gdb expects.
9134
28a93511
YQ
91352013-06-26 Pedro Alves <pedro@codesourcery.com>
9136
9137 * tracepoint.c (build_traceframe_info_xml): Output trace state
9138 variables present in the trace buffer.
9139
01208463
TT
91402013-06-24 Tom Tromey <tromey@redhat.com>
9141
9142 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9143 create-version.sh.
9144 (version.o): Remove.
9145 * gdbreplay.c: Include version.h.
9146 (version, host_name): Don't declare.
9147 * server.h: Include version.h.
9148 (version, host_name): Don't declare.
9149
760256f9
PA
91502013-06-12 Pedro Alves <palves@redhat.com>
9151
9152 * linux-x86-low.c (linux_is_elf64): Delete global.
9153 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9154 with local linux_pid_exe_is_elf_64_file use.
9155
030031ee
PA
91562013-06-11 Pedro Alves <palves@redhat.com>
9157
9158 * linux-low.c (regset_disabled, disable_regset): New functions.
9159 (regsets_fetch_inferior_registers)
9160 (regsets_store_inferior_registers): Use them.
9161 (initialize_regsets_info); Don't allocate the disabled_regsets
9162 array here.
9163 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9164 comment.
9165
5da6eb0a
PA
91662013-06-11 Pedro Alves <palves@redhat.com>
9167
9168 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9169 xmalloc.
9170
7e5aaa09
PA
91712013-06-11 Pedro Alves <palves@redhat.com>
9172
9173 * linux-x86-low.c (initialize_low_arch): Call
9174 init_registers_x32_avx_linux.
9175
d878444c
JK
91762013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9177
9178 Fix compatibility with Android Bionic.
9179 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9180 it is not empty.
9181
3aee8918
PA
91822013-06-07 Pedro Alves <palves@redhat.com>
9183
5f2b57b5 9184 PR server/14823
3aee8918
PA
9185 * Makefile.in (OBS): Add tdesc.o.
9186 (IPA_OBJS): Add tdesc-ipa.o.
9187 (tdesc-ipa.o): New rule.
9188 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9189 interface.
9190 * linux-low.c (new_inferior): Delete.
9191 (disabled_regsets, num_regsets): Delete.
9192 (linux_add_process): Adjust to set the new per-process
9193 new_inferior flag.
9194 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9195 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9196 was a stop. When calling arch_setup, switch the current inferior
9197 to the thread that got an event.
9198 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9199 (regsets_fetch_inferior_registers)
9200 (regsets_store_inferior_registers): New regsets_info parameter.
9201 Adjust to use it.
9202 (linux_register_in_regsets): New regs_info parameter. Adjust to
9203 use it.
9204 (register_addr, fetch_register, store_register): New usrregs_info
9205 parameter. Adjust to use it.
9206 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9207 parameter regs_info. Adjust to use it.
9208 (linux_fetch_registers): Get the current inferior's regs_info, and
9209 adjust to use it.
9210 (linux_store_registers): Ditto.
9211 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9212 (initialize_low): Don't initialize the target_regsets here. Call
9213 initialize_low_arch.
9214 * linux-low.h (target_regsets): Delete declaration.
9215 (struct regsets_info): New.
9216 (struct usrregs_info): New.
9217 (struct regs_info): New.
9218 (struct process_info_private) <new_inferior>: New field.
9219 (struct linux_target_ops): Delete the num_regs, regmap, and
9220 regset_bitmap fields. New field regs_info.
9221 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9222 * i387-fp.c (num_xmm_registers): Delete.
9223 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9224 calls to new interface.
9225 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9226 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9227 Infer the number of xmm registers from the regcache's target
9228 description.
9229 * i387-fp.h (num_xmm_registers): Delete.
9230 * inferiors.c (add_thread): Don't install the thread's regcache
9231 here.
9232 * proc-service.c (gregset_info): Fetch the current inferior's
9233 regs_info. Adjust to use it.
9234 * regcache.c: Include tdesc.h.
9235 (register_bytes, reg_defs, num_registers)
9236 (gdbserver_expedite_regs): Delete.
9237 (get_thread_regcache): If the thread doesn't have a regcache yet,
9238 create one, instead of aborting gdbserver.
9239 (regcache_invalidate_one): Rename to ...
9240 (regcache_invalidate_thread): ... this.
9241 (regcache_invalidate_one): New.
9242 (regcache_invalidate): Only invalidate registers of the current
9243 process.
9244 (init_register_cache): Add target_desc parameter, and use it.
9245 (new_register_cache): Ditto. Assert the target description has a
9246 non zero registers_size.
9247 (regcache_cpy): Add assertions. Adjust.
9248 (realloc_register_cache, set_register_cache): Delete.
9249 (registers_to_string, registers_from_string): Adjust.
9250 (find_register_by_name, find_regno, find_register_by_number)
9251 (register_cache_size): Add target_desc parameter, and use it.
9252 (free_register_cache_thread, free_register_cache_thread_one)
9253 (regcache_release, register_cache_size): New.
9254 (register_size): Add target_desc parameter, and use it.
9255 (register_data, supply_register, supply_register_zeroed)
9256 (supply_regblock, supply_register_by_name, collect_register)
9257 (collect_register_as_string, collect_register_by_name): Adjust.
9258 * regcache.h (struct target_desc): Forward declare.
9259 (struct regcache) <tdesc>: New field.
9260 (init_register_cache, new_register_cache): Add target_desc
9261 parameter.
9262 (regcache_invalidate_thread): Declare.
9263 (regcache_invalidate_one): Delete declaration.
9264 (regcache_release): Declare.
9265 (find_register_by_number, register_cache_size, register_size)
9266 (find_regno): Add target_desc parameter.
9267 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9268 declarations.
9269 * remote-utils.c: Include tdesc.h.
9270 (outreg, prepare_resume_reply): Adjust.
9271 * server.c: Include tdesc.h.
9272 (gdbserver_xmltarget): Delete declaration.
9273 (get_features_xml, process_serial_event): Adjust.
9274 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9275 declare.
9276 (struct process_info) <tdesc>: New field.
9277 (ipa_tdesc): Declare.
9278 * tdesc.c: New file.
9279 * tdesc.h: New file.
9280 * tracepoint.c: Include tdesc.h.
9281 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9282 (get_context_regcache): Adjust to pass ipa_tdesc down.
9283 (do_action_at_tracepoint): Adjust to get the register cache size
9284 from the context regcache's description.
9285 (traceframe_walk_blocks): Adjust to get the register cache size
9286 from the current trace frame's description.
9287 (traceframe_get_pc): Adjust to get current trace frame's
9288 description and pass it down.
9289 (gdb_collect): Adjust to get the register cache size from the
9290 IPA's description.
9291 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9292 (gdbserver_xmltarget): Delete.
9293 (initialize_low_tracepoint): Set the ipa's target description.
9294 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9295 (initialize_low_tracepoint): Set the ipa's target description.
9296 * linux-x86-low.c: Include tdesc.h.
9297 [__x86_64__] (is_64bit_tdesc): New.
9298 (ps_get_thread_area, x86_get_thread_area): Use it.
9299 (i386_cannot_store_register): Rename to ...
9300 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9301 (i386_cannot_fetch_register): Rename to ...
9302 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9303 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9304 to new interface.
9305 (target_regsets): Rename to ...
9306 (x86_regsets): ... this.
9307 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9308 interface.
9309 (x86_siginfo_fixup): Use is_64bit_tdesc.
9310 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9311 (tdesc_x32_avx_linux, tdesc_x32_linux)
9312 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9313 Declare.
9314 (x86_linux_update_xmltarget): Delete.
9315 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9316 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9317 (AMD64_LINUX_USER64_CS): New.
9318 (x86_linux_read_description): New, based on
9319 x86_linux_update_xmltarget.
9320 (same_process_callback): New.
9321 (x86_arch_setup_process_callback): New.
9322 (x86_linux_update_xmltarget): New.
9323 (x86_regsets_info): New.
9324 (amd64_linux_regs_info): New.
9325 (i386_linux_usrregs_info): New.
9326 (i386_linux_regs_info): New.
9327 (x86_linux_regs_info): New.
9328 (x86_arch_setup): Reimplement.
9329 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9330 (x86_emit_ops): Ditto.
9331 (the_low_target): Adjust. Install x86_linux_regs_info,
9332 x86_cannot_fetch_register, and x86_cannot_store_register.
9333 (initialize_low_arch): New.
9334 * linux-ia64-low.c (tdesc_ia64): Declare.
9335 (ia64_fetch_register): Adjust.
9336 (ia64_usrregs_info, regs_info): New globals.
9337 (ia64_regs_info): New function.
9338 (the_low_target): Adjust.
9339 (initialize_low_arch): New function.
9340 * linux-sparc-low.c (tdesc_sparc64): Declare.
9341 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9342 Adjust.
9343 (sparc_arch_setup): New function.
9344 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9345 (the_low_target): Adjust.
9346 (initialize_low_arch): New function.
9347 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9348 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9349 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9350 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9351 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9352 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9353 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9354 (tdesc_powerpc_isa205_vsx64l): Declare.
9355 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9356 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9357 (ppc_set_pc, ppc_get_hwcap): Adjust.
9358 (ppc_usrregs_info): Forward declare.
9359 (!__powerpc64__) ppc_regmap_adjusted: New global.
9360 (ppc_arch_setup): Adjust to the current process'es target
9361 description.
9362 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9363 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9364 (ppc_store_evrregset): Adjust.
9365 (target_regsets): Rename to ...
9366 (ppc_regsets): ... this, and make static.
9367 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9368 (ppc_regs_info): New function.
9369 (the_low_target): Adjust.
9370 (initialize_low_arch): New function.
9371 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9372 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9373 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9374 (tdesc_s390x_linux64v2): Declare.
9375 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9376 (s390_fill_gregset, s390_store_last_break): Adjust.
9377 (target_regsets): Rename to ...
9378 (s390_regsets): ... this, and make static.
9379 (s390_get_pc, s390_set_pc): Adjust.
9380 (s390_get_hwcap): New target_desc parameter, and use it.
9381 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9382 (s390_arch_setup): Adjust to set the current process'es target
9383 description. Don't adjust the regmap.
9384 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9385 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9386 (regs_info_3264): New globals.
9387 (s390_regs_info): New function.
9388 (the_low_target): Adjust.
9389 (initialize_low_arch): New function.
9390 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9391 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9392 [__mips64] (init_registers_mips_linux)
9393 (init_registers_mips_dsp_linux): Delete defines.
9394 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9395 (have_dsp): New global.
9396 (mips_read_description): New, based on mips_arch_setup.
9397 (mips_arch_setup): Reimplement.
9398 (get_usrregs_info): New function.
9399 (mips_cannot_fetch_register, mips_cannot_store_register)
9400 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9401 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9402 (target_regsets): Rename to ...
9403 (mips_regsets): ... this, and make static.
9404 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9405 (dsp_regs_info, regs_info): New globals.
9406 (mips_regs_info): New function.
9407 (the_low_target): Adjust.
9408 (initialize_low_arch): New function.
9409 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9410 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9411 Declare.
9412 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9413 (arm_read_description): New, with bits factored from
9414 arm_arch_setup.
9415 (arm_arch_setup): Reimplement.
9416 (target_regsets): Rename to ...
9417 (arm_regsets): ... this, and make static.
9418 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9419 (arm_regs_info): New function.
9420 (the_low_target): Adjust.
9421 (initialize_low_arch): New function.
9422 * linux-m68k-low.c (tdesc_m68k): Declare.
9423 (target_regsets): Rename to ...
9424 (m68k_regsets): ... this, and make static.
9425 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9426 (m68k_regs_info): New function.
9427 (m68k_arch_setup): New function.
9428 (the_low_target): Adjust.
9429 (initialize_low_arch): New function.
9430 * linux-sh-low.c (tdesc_sharch): Declare.
9431 (target_regsets): Rename to ...
9432 (sh_regsets): ... this, and make static.
9433 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9434 (sh_regs_info, sh_arch_setup): New functions.
9435 (the_low_target): Adjust.
9436 (initialize_low_arch): New function.
9437 * linux-bfin-low.c (tdesc_bfin): Declare.
9438 (bfin_arch_setup): New function.
9439 (bfin_usrregs_info, regs_info): New globals.
9440 (bfin_regs_info): New function.
9441 (the_low_target): Adjust.
9442 (initialize_low_arch): New function.
9443 * linux-cris-low.c (tdesc_cris): Declare.
9444 (cris_arch_setup): New function.
9445 (cris_usrregs_info, regs_info): New globals.
9446 (cris_regs_info): New function.
9447 (the_low_target): Adjust.
9448 (initialize_low_arch): New function.
9449 * linux-cris-low.c (tdesc_crisv32): Declare.
9450 (cris_arch_setup): New function.
9451 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9452 (cris_regs_info): New function.
9453 (the_low_target): Adjust.
9454 (initialize_low_arch): New function.
9455 * linux-m32r-low.c (tdesc_m32r): Declare.
9456 (m32r_arch_setup): New function.
9457 (m32r_usrregs_info, regs_info): New globals.
9458 (m32r_regs_info): Adjust.
9459 (initialize_low_arch): New function.
9460 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9461 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9462 (tic6x_usrregs_info): Forward declare.
9463 (tic6x_read_description): New function, based on ...
9464 (tic6x_arch_setup): ... this. Reimplement.
9465 (target_regsets): Rename to ...
9466 (tic6x_regsets): ... this, and make static.
9467 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9468 (tic6x_regs_info): New function.
9469 (the_low_target): Adjust.
9470 (initialize_low_arch): New function.
9471 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9472 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9473 (target_regsets): Rename to ...
9474 (xtensa_regsets): ... this, and make static.
9475 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9476 globals.
9477 (xtensa_arch_setup, xtensa_regs_info): New functions.
9478 (the_low_target): Adjust.
9479 (initialize_low_arch): New function.
9480 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9481 (nios2_arch_setup): Set the current process'es tdesc.
9482 (target_regsets): Rename to ...
9483 (nios2_regsets): ... this.
9484 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9485 (nios2_regs_info): New function.
9486 (the_low_target): Adjust.
9487 (initialize_low_arch): New function.
a261b8f5
PA
9488 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9489 (aarch64_arch_setup): Set the current process'es tdesc.
9490 (target_regsets): Rename to ...
9491 (aarch64_regsets): ... this.
9492 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9493 (aarch64_regs_info): New function.
9494 (the_low_target): Adjust.
9495 (initialize_low_arch): New function.
3aee8918
PA
9496 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9497 globals.
9498 (target_regsets): Rename to ...
9499 (tile_regsets): ... this.
9500 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9501 (tile_regs_info): New function.
9502 (tile_arch_setup): Set the current process'es tdesc.
9503 (the_low_target): Adjust.
9504 (initialize_low_arch): New function.
9505 * spu-low.c (tdesc_spu): Declare.
9506 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9507 * win32-arm-low.c (tdesc_arm): Declare.
9508 (arm_arch_setup): New function.
9509 (the_low_target): Install arm_arch_setup instead of
9510 init_registers_arm.
9511 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9512 (init_windows_x86): Rename to ...
9513 (i386_arch_setup): ... this. Set `win32_tdesc'.
9514 (the_low_target): Adjust.
9515 * win32-low.c (win32_tdesc): New global.
9516 (child_add_thread): Don't create the thread cache here.
9517 (do_initial_child_stuff): Set the new process'es tdesc.
9518 * win32-low.h (struct target_desc): Forward declare.
9519 (win32_tdesc): Declare.
9520 * lynx-i386-low.c (tdesc_i386): Declare global.
9521 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9522 * lynx-low.c (lynx_tdesc): New global.
9523 (lynx_add_process): Set the new process'es tdesc.
9524 * lynx-low.h (struct target_desc): Forward declare.
9525 (lynx_tdesc): Declare global.
9526 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9527 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9528 * nto-low.c (nto_tdesc): New global.
9529 (do_attach): Set the new process'es tdesc.
9530 * nto-low.h (struct target_desc): Forward declare.
9531 (nto_tdesc): Declare.
9532 * nto-x86-low.c (tdesc_i386): Declare.
9533 (nto_x86_arch_setup): Set `nto_tdesc'.
9534
b1fbec62
GB
95352013-06-04 Gary Benson <gbenson@redhat.com>
9536
9537 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9538 to qSupported response when appropriate.
9539 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9540 with nonzero-length annex.
9541 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9542 arguments supplied in annex.
9543
d1ec4ce7
DE
95442013-05-31 Doug Evans <dje@google.com>
9545
ac44adcb 9546 PR server/15594
d1ec4ce7
DE
9547 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9548 64 bits in 64-cross-32 environment.
9549
9b25f2d3
PA
95502013-05-28 Pedro Alves <palves@redhat.com>
9551
9552 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9553 (aarch64-without-fpu.c): Delete rule.
9554 * configure.srv (aarch64*-*-linux*): Remove references to
9555 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9556 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9557 declaration.
9558
6740dc9c
PA
95592013-05-24 Pedro Alves <palves@redhat.com>
9560
9561 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9562 instead of strchr/decode_address. Error if the range isn't split
9563 with a ','. Don't assume there's be a ':' in the action.
9564
c2d6af84
PA
95652013-05-23 Yao Qi <yao@codesourcery.com>
9566 Pedro Alves <palves@redhat.com>
9567
9568 * linux-low.c (lwp_in_step_range): New function.
9569 (linux_wait_1): If the thread was range stepping and stopped
9570 outside the stepping range, report the stop to GDB. Otherwise,
9571 continue stepping. Add range stepping debug output.
9572 (linux_set_resume_request): Copy the step range from the resume
9573 request to the lwp.
9574 (linux_supports_range_stepping): New.
9575 (linux_target_ops) <supports_range_stepping>: Set to
9576 linux_supports_range_stepping.
9577 * linux-low.h (struct linux_target_ops)
9578 <supports_range_stepping>: New field.
9579 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9580 * linux-x86-low.c (x86_supports_range_stepping): New.
9581 (the_low_target) <supports_range_stepping>: Set to
9582 x86_supports_range_stepping.
9583 * server.c (handle_v_cont): Handle 'r' action.
9584 (handle_v_requests): Append ";r" if the target supports range
9585 stepping.
9586 * target.h (struct thread_resume) <step_range_start,
9587 step_range_end>: New fields.
9588 (struct target_ops) <supports_range_stepping>:
9589 New field.
9590 (target_supports_range_stepping): New macro.
9591
58794e1a
JB
95922013-05-17 Joel Brobecker <brobecker@adacore.com>
9593
9594 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9595 confusion in comment.
9596
d631c5a7
JB
95972013-05-17 Joel Brobecker <brobecker@adacore.com>
9598
9599 * lynx-low.c (struct process_info_private): New type.
9600 (lynx_add_process): New function.
9601 (lynx_create_inferior, lynx_attach): Replace calls to
9602 add_process by calls to lynx_add_process.
9603 (lynx_resume): If PTID is null, then try using
9604 current_process()->private->last_wait_event_ptid.
9605 Add comments.
9606 (lynx_clear_inferiors): Delete. The contents of that function
9607 has been inlined in lynx_mourn;
9608 (lynx_wait_1): Save the ptid in the process's private data.
9609 (lynx_mourn): Free the process' private data. Replace call
9610 to lynx_clear_inferiors by call to clear_inferiors.
9611
96f7a20f
YQ
96122013-05-17 Yao Qi <yao@codesourcery.com>
9613
9614 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9615 the right place.
9616
db0dfaa0
LM
96172013-05-16 Luis Machado <lgustavo@codesourcery.com>
9618
9619 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9620 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9621 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9622 PT_TEXT_END_ADDR guards. Update comments.
9623 (linux_target_op) <read_offsets>: Conditionally define to
9624 linux_read_offsets if the target is UCLIBC and if it defines
9625 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9626
68f5f838
SL
96272013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9628 Andrew Jenner <andrew@codesourcery.com>
9629
9630 * Makefile.in (SFILES): Add linux-nios2-low.c.
9631 (clean): Add action to delete nios2-linux.c.
9632 (nios2-linux.c): New rule.
9633 * configure.srv: Add nios2*-*-linux*.
9634 * linux-nios2-low.c: New.
9635
1ebff1fd
HAQ
96362013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9637
9638 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9639
f6150862
HZ
96402013-04-25 Hui Zhu <hui@codesourcery.com>
9641
9642 PR gdb/15186
f6150862
HZ
9643 * ax.c (ax_printf): Add fflush.
9644
614c279d
TT
96452013-04-22 Tom Tromey <tromey@redhat.com>
9646
9647 * Makefile.in (SFILES): Add filestuff.c.
9648 (OBS): Add filestuff.o.
9649 (filestuff.o): New target.
9650 * config.in, configure: Rebuild.
9651 * configure.ac: Check for fdwalk, pipe2.
9652
7d4e5717
PA
96532013-04-17 Pedro Alves <palves@redhat.com>
9654
9655 * configure.ac (USE_THREAD_DB): Delete variable.
9656 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9657 Don't AC_SUBST USE_THREAD_DB.
9658 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9659 * config.in, configure: Regenerate.
9660
d5c93e41
PA
96612013-04-16 Pedro Alves <palves@redhat.com>
9662
9663 * linux-low.h (struct lwp_info) <thread_known>: Move under
9664 the USE_THREAD_DB #ifdef.
9665
04f5fe89
PA
96662013-04-16 Pedro Alves <palves@redhat.com>
9667
9668 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9669 (linux-low.o): Delete rule.
9670 * linux-low.h: Always include "gdb_thread_db.h" instead of
9671 conditionally including thread_db.h.
9672 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9673 HAVE_THREAD_DB_H.
9674
480b27bf
JK
96752013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9676
9677 * Makefile.in (install-only): Fix make install regression.
9678
43662968
JK
96792013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9680
9681 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9682 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9683 installation.
9684 * gdbserver.1: Remove.
9685
3e74e146
PA
96862013-03-22 Pedro Alves <palves@redhat.com>
9687
9688 * linux-low.c (handle_extended_wait): Don't call
9689 linux_enable_event_reporting.
9690
a8347a2a
TT
96912013-03-15 Tony Theodore <tonyt@logyst.com>
9692
9693 PR build/9098:
9694 * Makefile.in (SHELL): Use @SHELL@.
9695
eeb56fa7
SDJ
96962013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9697
9698 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9699 compiler warning.
9700
4fa7e2ff
JB
97012013-03-13 Joel Brobecker <brobecker@adacore.com>
9702
9703 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9704 Remove extraneous NULL element.
9705
8ddb1965
YQ
97062013-03-13 Yao Qi <yao@codesourcery.com>
9707
9708 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9709 'V' block in trace frame.
9710
9accd112
MM
97112013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9712
9713 * target.h (struct target_ops): Add btrace ops.
9714 (target_supports_btrace): New macro.
9715 (target_enable_btrace): New macro.
9716 (target_disable_btrace): New macro.
9717 (target_read_btrace): New macro.
9718 * gdbthread.h (struct thread_info): Add btrace field.
9719 * server.c: Include btrace-common.h.
9720 (handle_btrace_general_set): New function.
9721 (handle_btrace_enable): New function.
9722 (handle_btrace_disable): New function.
9723 (handle_general_set): Call handle_btrace_general_set.
9724 (handle_qxfer_btrace): New function.
9725 (struct qxfer qxfer_packets[]): Add btrace entry.
9726 * inferiors.c (remove_thread): Disable btrace.
9727 * linux-low: Include linux-btrace.h.
9728 (linux_low_enable_btrace): New function.
9729 (linux_low_read_btrace): New function.
9730 (linux_target_ops): Add btrace ops.
9731 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9732 Add srv_linux_btrace=yes.
9733 (x86_64-*-linux*): Add linux-btrace.o.
9734 Add srv_linux_btrace=yes.
9735 * configure.ac: Define HAVE_LINUX_BTRACE.
9736 * config.in: Regenerated.
9737 * configure: Regenerated.
9738
5cc22e4c
MM
97392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9740
9741 * server.c (handle_qxfer): Preserve error message if -3 is
9742 returned.
9743 (qxfer): Document the -3 return value.
9744
7c97f91e
MM
97452013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9746
9747 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9748 (linux_btrace_h): New variable.
9749 (linux-btrace.o): New rule.
9750
be9a119c 97512013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9752 Hafiz Abid Qadeer <abidh@codesourcery.com>
9753
9754 * tracepoint.c (trace_buffer_size): New global.
9755 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9756 (init_trace_buffer): Change to one-argument function. Allocate
9757 trace buffer memory.
9758 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9759 handle QTBuffer:size packet.
9760 (cmd_bigqtbuffer_size): New function.
9761 (initialize_tracepoint): Call init_trace_buffer with
9762 DEFAULT_TRACE_BUFFER_SIZE.
9763 * server.c (handle_query): Add QTBuffer:size in the
9764 supported packets.
9765
e64f7499
YQ
97662013-03-07 Yao Qi <yao@codesourcery.com>
9767
9768 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9769 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9770 of -1.
9771 (cmd_qtsp): Adjust condition. Do post increment.
9772 Set cur_action and cur_step_action back to 0.
9773
f0ae6fc3
PA
97742013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9775
9776 PR server/15236
9777 * linux-low.c (linux_write_memory): Return early success if LEN is
9778 zero.
9779
b5b0b0af
CV
97802013-03-05 Corinna Vinschen <vinschen@redhat.de>
9781
334ad4a8 9782 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9783
589bc927
TT
97842013-02-28 Tom Tromey <tromey@redhat.com>
9785
9786 * configure.ac: Invoke AC_SYS_LARGEFILE.
9787 * configure, config.in: Rebuild.
9788
dfe07582
CV
97892013-02-28 Corinna Vinschen <vinschen@redhat.com>
9790
9791 * win32-low.c: Throughout, fix format strings and casts of
9792 printf-like functions to avoid type related warnings on all
9793 platforms.
9794 (get_child_debug_event): Print dwDebugEventCode as hex since
9795 that's how it's usually documented.
9796
736cd585
YQ
97972013-02-28 Yao Qi <yao@codesourcery.com>
9798
9799 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9800 pulongest.
9801
e1f58301
JW
98022013-02-27 Jiong Wang <jiwang@tilera.com>
9803
9804 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9805 (reg-tilegx32.c): New rule.
9806 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9807 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9808 different register info initializer according to elf class.
9809 (init_registers_tilgx32): New function. The tilegx32 register info
9810 initializer.
9811 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9812 (tile_store_gregset): Likewise.
9813
d171ca78
YQ
98142013-02-27 Yao Qi <yao@codesourcery.com>
9815
9816 * server.c (process_point_options): Print debug message when
9817 debug_threads is true.
9818
282bbdf3
YQ
98192013-02-26 Yao Qi <yao@codesourcery.com>
9820
9821 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9822
aca22551
PA
98232013-02-19 Pedro Alves <palves@redhat.com>
9824 Kai Tietz <ktietz@redhat.com>
9825
9826 PR gdb/15161
9827
9828 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9829 instead of strtoul to extract address from packet.
9830 (process_serial_event) <'z'>: Likewise.
9831
4f3cee1c
YQ
98322013-02-18 Yao Qi <yao@codesourcery.com>
9833
9834 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9835
8e1d55a3
PA
98362013-02-14 Pedro Alves <palves@redhat.com>
9837
9838 Plug memory leak.
9839
9840 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9841 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9842
458820da
PA
98432013-02-14 Pedro Alves <palves@redhat.com>
9844
9845 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9846
baea0dae
PA
98472013-02-14 Pedro Alves <palves@redhat.com>
9848
9849 * tracepoint.c (save_string): Delete.
9850 (add_tracepoint_action): Use savestring instead of save_string.
9851
0b1afbb3
PA
98522013-02-12 Pedro Alves <palves@redhat.com>
9853
9854 * linux-xtensa-low.c: Ditto.
9855 * xtensa-xtregs.c: Ditto.
9856
8a4ac37e
PA
98572013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9858
9859 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9860 thread_db.
9861
148de6bb
MS
98622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9863
9864 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9865 aarch64_num_wp_regs and aarch64_num_bp_regs to
9866 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9867
55fac6e0
MS
98682013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9869
9870 * linux-aarch64-low.c (ps_get_thread_area): Replace
9871 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9872
176eb98c
MS
98732013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9874 Marcus Shawcroft <marcus.shawcroft@arm.com>
9875 Nigel Stephens <nigel.stephens@arm.com>
9876 Yufeng Zhang <yufeng.zhang@arm.com>
9877
9878 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9879 (aarch64.c, aarch64-without-fpu.c): New targets.
9880 * configure.srv (aarch64*-*-linux*): New.
9881 * linux-aarch64-low.c: New file.
9882
56f7af9c
MS
98832013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9884
43aaf8b6 9885 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9886 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9887 (dequeue_one_deferred_signal, linux_resume_one_thread)
9888 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9889 (linux_tracefork_grandchild, linux_test_for_tracefork)
9890 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9891 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9892 where the argument is 0.
9893
60f662b0
YQ
98942013-01-25 Yao Qi <yao@codesourcery.com>
9895
9896 * event-loop.c: Include "queue.h".
9897 (gdb_event_p): New typedef.
9898 (struct gdb_event) <next_event>: Remove.
9899 (event_queue): Change to QUEUE(gdb_event_p).
9900 (async_queue_event): Remove.
9901 (gdb_event_xfree): New.
9902 (initialize_event_loop): New.
9903 (process_event): Use API from QUEUE.
9904 (wait_for_event): Likewise.
9905 * server.c (main): Call initialize_event_loop.
9906 * server.h (initialize_event_loop): Declare.
9907
5ae4861a
YQ
99082013-01-18 Yao Qi <yao@codesourcery.com>
9909
9910 * ax.h (struct eval_agent_expr_context): New.
9911 (gdb_eval_agent_expr): Update declaration.
9912 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9913 TFRAME. Add new argument CTX.
9914 * server.h (struct eval_agent_expr_context): Declare.
9915 (agent_mem_read, agent_tsv_read): Update declaration.
9916 (agent_mem_read_string): Likewise.
9917 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9918 (add_traceframe_block): Add new argument TPOINT.
9919 Increase TPOINT->traceframe_usage.
9920 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9921 eval_tracepoint_agent_expr.
9922 (condition_true_at_tracepoint): Likewise.
9923 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9924 (agent_mem_read_string, agent_tsv_read): Likewise.
9925
85e00e85
YQ
99262013-01-16 Yao Qi <yao@codesourcery.com>
9927
9928 * linux-low.c (linux_resume_one_lwp): Don't check
9929 'lwp->bp_reinsert != 0'.
9930
4039cf45
JB
99312013-01-07 Joel Brobecker <brobecker@adacore.com>
9932 Pedro Alves <palves@redhat.com>
9933
9934 * lynx-low.c (ptrace_request_to_str): Define a temporary
9935 macro and use it to simplify this function's implementation.
9936
9044dee2
JB
99372013-01-07 Joel Brobecker <brobecker@adacore.com>
9938
9939 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9940 sets errno.
9941
e6352c8f
JB
99422013-01-07 Joel Brobecker <brobecker@adacore.com>
9943
9944 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9945
50681a27
JB
99462013-01-07 Joel Brobecker <brobecker@adacore.com>
9947
9948 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9949
3f6e77ef
JB
99502013-01-07 Joel Brobecker <brobecker@adacore.com>
9951
9952 * lynx-low.c (lynx_resume): Use the resume_info parameter
9953 to determine the ptid for the lynx_ptrace call, unless
9954 it is equal to minus_one_ptid, in which case we use the
9955 ptid of the current_inferior.
9956 (lynx_wait_1): After having received a thread create/exit
9957 event, resume the inferior's execution using the signaling
9958 thread's ptid, rather than the old ptid.
9959
7fda33ae
JB
99602013-01-07 Joel Brobecker <brobecker@adacore.com>
9961
9962 * lynx-low.c (lynx_resume): Delete variable ret.
9963
b9786c74
JB
99642013-01-01 Joel Brobecker <brobecker@adacore.com>
9965
9966 * gdbreplay.c (gdbreplay_version): Update copyright year.
9967 * server.c (gdbserver_version): Likewise.
9968
8b93d60f
JB
99692012-12-17 Joel Brobecker <brobecker@adacore.com>
9970
9971 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9972 new thread.
9973
037335a7
JB
99742012-12-17 Joel Brobecker <brobecker@adacore.com>
9975
9976 * lynx-low.c (ptrace_request_to_str): Add handling for
9977 PTRACE_GETTRACESIG.
9978
52d4cbd8
JB
99792012-12-17 Joel Brobecker <brobecker@adacore.com>
9980
9981 * lynx-low.c (lynx_attach): Delete variable new_process.
9982
ab8f6ca9
JB
99832012-12-17 Joel Brobecker <brobecker@adacore.com>
9984
9985 * lynx-low.c (lynx_create_inferior): Delete variable
9986 new_process.
9987
78cbc024
JB
99882012-12-17 Joel Brobecker <brobecker@adacore.com>
9989
9990 * lynx-low.c (ptrace_request_to_str): Do not handle
9991 PTRACE_GETTHREADLIST if this macro does not exist.
9992
14a00470
YQ
99932012-12-15 Yao Qi <yao@codesourcery.com>
9994
9995 * Makefile.in (OBS): Add notif.o.
9996 * notif.c, notif.h: New.
9997 * server.c: Include "notif.h".
9998 (struct vstop_notif) <next>: Remove.
9999 <base>: New field.
10000 (queue_stop_reply): Update.
10001 (push_event, send_next_stop_reply): Remove.
10002 (discard_queued_stop_replies): Update.
10003 (notif_stop): New variable.
10004 (handle_v_stopped): Remove.
10005 (handle_v_requests): Don't call handle_v_stopped. Call
10006 handle_ack_notif instead.
10007 (queue_stop_reply_callback): Call notif_event_enque instead
10008 of queue_stop_reply.
10009 (handle_status): Don't call send_next_stop_reply, call
10010 notif_write_event instead.
10011 (kill_inferior_callback): Likewise.
10012 (detach_or_kill_inferior_callback): Likewise.
10013 (main): Call initialize_notif.
10014 (process_serial_event): Call QUEUE_is_empty.
10015 (handle_target_event): Call notif_push instead of push event.
10016 * server.h (push_event): Remove declaration.
10017
61c125b9
TT
100182012-12-10 Tom Tromey <tromey@redhat.com>
10019
10020 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10021 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10022 macros.
10023 (.c.o): Rewrite.
10024 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10025 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10026 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10027 (amd64-linux-ipa.o, ax.o): Rewrite.
10028 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10029 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10030 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10031 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10032 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10033 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10034 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10035 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10036 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10037 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10038 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10039 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10040 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10041 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10042 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10043 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10044 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10045 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10046 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10047 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10048 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10049 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10050 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10051 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10052 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10053 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10054 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10055 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10056 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10057 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10058 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10059 (reg-tilegx.o): Remove.
10060 (all_object_files): New macro.
10061 Include .deps files.
10062 * aclocal.m4, configure: Rebuild.
10063 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10064 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10065 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10066
e90e9ad9
TT
100672012-12-05 Tom Tromey <tromey@redhat.com>
10068
10069 PR gdb/14917:
10070 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10071
02d403bf 100722012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10073
10074 * configure.ac: Check for linux/perf_event.h.
10075 * config.in: Regenerated.
10076 * configure: Regenerated.
10077
0270a750
PA
100782012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10079
10080 * hostio.c (handle_readlink): Decrease buffer size
10081 parameter passed to readlink by one byte.
10082
8c29b58e
YQ
100832012-11-26 Yao Qi <yao@codesourcery.com>
10084
10085 * configure.ac (build_warnings): Append '-Wempty-body'.
10086 * configure: Regenerated.
10087 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10088 body.
10089
8bdce1ff
PM
100902012-11-15 Pierre Muller <muller@sourceware.org>
10091
10092 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10093 * config.in: Regenerate.
10094 * configure: Regenerate.
10095 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10096 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10097 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10098 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10099 header.
10100 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10101 instead of <sys/wait.h> header.
10102 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10103
02d403bf 101042012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10105
10106 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10107 (various make rules): Remove -DGDBSERVER
10108
fbd5db48
YQ
101092012-11-09 Yao Qi <yao@codesourcery.com>
10110
10111 * spu-low.c (current_ptid): Move it to ..
10112 * gdbthread.h: ... here. New.
10113 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10114 * server.c (myresume, process_serial_event): Likewise.
10115 * thread-db.c (thread_db_find_new_threads): Likewise.
10116 * tracepoint.c (run_inferior_command): Likewise.
10117
b3dc46ff
AB
101182012-10-01 Andrew Burgess <aburgess@broadcom.com>
10119
10120 * server.c (handle_search_memory_1): Include access length in
10121 warning message.
10122
07c04788
HPN
101232012-09-05 Michael Brandt <michael.brandt@axis.com>
10124
10125 * linux-crisv32-low.c: Fix compile errors.
10126
918d227b
YQ
101272012-09-04 Yao Qi <yao@codesourcery.com>
10128
10129 * tracepoint.c (cmd_qtsv): Adjust debug message.
10130 Don't check CUR_TPOINT.
10131
18c1b81a
YQ
101322012-08-28 Yao Qi <yao@codesourcery.com>
10133
10134 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10135 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10136 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10137 Remove declarations of xmalloc, xreallloc, xstrdup and
10138 freeargv.
10139 * Makefile.in (libiberty_h): New.
10140 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10141 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10142
dc82f37b
YQ
101432012-08-23 Yao Qi <yao@codesourcery.com>
10144
10145 * server.h: Remove declaration of 'xsnprintf'.
10146
406b1477
KS
101472012-08-22 Keith Seitz <keiths@redhat.com>
10148
10149 * server.h: Include build-gnulib-gbserver/config.h.
10150 * gdbreplay.c: Likewise.
10151
e6712ff1
DE
101522012-08-08 Doug Evans <dje@google.com>
10153
10154 * Makefile.in (SFILES): Add gdb_vecs.c.
10155 (OBS): Add gdb_vecs.o.
10156 (gdb_vecs_h, host_defs_h): New variables.
10157 (thread-db.o): Add $(gdb_vecs_h) dependency.
10158 (gdb_vecs.o): New rule.
10159 * thread-db.c: #include "gdb_vecs.h".
10160 (thread_db_load_search): Use a vector to iterate over path elements.
10161 Handle text appearing after "$pdir".
10162
10163 * configure.ac: Add check for strstr.
10164 * config.in: Regenerate.
10165 * configure: Regenerate.
10166
7c3270ae
UW
101672012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10168
10169 * hostio.c (handle_pread): If pread fails, fall back to attempting
10170 lseek/read.
10171 (handle_pwrite): Likewise for pwrite.
10172
b62e2b27
UW
101732012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10174
10175 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10176 between unsupported TYPE and unimplementable ADDR/LEN combination.
10177 (arm_insert_point): Act on new return value.
10178
78a99e91
PA
101792012-07-31 Pedro Alves <palves@redhat.com>
10180
10181 * server.c (process_point_options): Only skip tokens if we find
10182 one that is unrecognized. Don't treat 'X' specially while
10183 skipping unrecognized tokens.
10184
fcf303ab
UW
101852012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10186
10187 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10188 to 4-byte-align HW breakpoint addresses for Thumb.
10189
7255706c
YQ
101902012-07-27 Yao Qi <yao@codesourcery.com>
10191
10192 PR remote/14161.
10193
10194 * server.h: Declare gdb_agent_about_to_close.
10195 * target.c (kill_inferior): Include "agent.h".
10196 New. Send command 'kill'.
10197 * target.h (kill_inferior): Removed macro.
10198 * tracepoint.c (gdb_agent_about_to_close): New.
10199 (gdb_agent_helper_thread): Handle command 'close'.
10200 Wait endlessly until the inferior stops.
10201 Install gdb_agent_remove_socket to atexit hook.
10202 (agent_socket_name): New static variable.
10203 (gdb_agent_socket_init): Replace local variable 'name' with
10204 'agent_socket_name'.
10205 (gdb_agent_remove_socket): New.
10206
5a3f286f
YQ
102072012-07-27 Yao Qi <yao@codesourcery.com>
10208
10209 * server.c (process_point_options): Stop at 'X' when parsing.
10210
961bd387
ME
102112012-07-19 Michael Eager <eager@eagercon.com>
10212
a261b8f5 10213 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10214 to hw_execute.
10215 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10216 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10217 hardware breakpoint.
10218
aa7c7447
JK
102192012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10220
10221 * gdbserver/linux-low.c (initialize_low): Call
10222 linux_ptrace_init_warnings.
10223
7f216e7c
DE
102242012-07-02 Doug Evans <dje@google.com>
10225
10226 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10227 pointer to int.
10228
d3ce09f5
SS
102292012-07-02 Stan Shebs <stan@codesourcery.com>
10230
10231 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10232 (ax.o): Add it to build rule.
10233 (ax-ipa.o): Ditto.
10234 (OBS): Add format.o.
10235 (IPA_OBS): Add format.o.
10236 * server.c (handle_query): Claim support for breakpoint commands.
10237 (process_point_options): Add command case.
10238 (process_serial_event): Leave running if there are printfs in
10239 effect.
10240 * mem-break.h (any_persistent_commands): Declare.
10241 (add_breakpoint_commands): Declare.
10242 (gdb_no_commands_at_breakpoint): Declare.
10243 (run_breakpoint_commands): Declare.
10244 * mem-break.c (struct point_command_list): New struct.
10245 (struct breakpoint): New field command_list.
10246 (any_persistent_commands): New function.
10247 (add_commands_to_breakpoint): New function.
10248 (add_breakpoint_commands): New function.
10249 (gdb_no_commands_at_breakpoint): New function.
10250 (run_breakpoint_commands): New function.
10251 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10252 locally.
10253 * ax.c: Include format.h.
10254 (ax_printf): New function.
10255 (gdb_eval_agent_expr): Add printf opcode.
10256
2f8f6aed
YQ
102572012-06-13 Yao Qi <yao@codesourcery.com>
10258
10259 * server.c (start_inferior): Remove duplicated writes to fields
10260 'last_resume_kind' and 'last_status' of 'current_inferior'.
10261
0c9070b3
YQ
102622012-06-12 Yao Qi <yao@codesourcery.com>
10263 Pedro Alves <palves@redhat.com>
10264
10265 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10266 comment.
10267 * server.c (handle_v_cont): Extend comment.
10268
c52daf70
YQ
102692012-06-11 Yao Qi <yao@codesourcery.com>
10270
10271 * linux-low.c (linux_attach): Add 'static'.
10272
d38bbb0a
YQ
102732012-06-06 Yao Qi <yao@codesourcery.com>
10274
10275 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10276
89dc0afd
JK
102772012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10278
10279 Fix gcc -flto compilation warning.
10280 * server.c (main): Make variable multi_mode and attach volatile.
10281
75f62ce7
TJB
102822012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10283
10284 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10285 if the platform doesn't know about it.
10286
65f479b6
PA
102872012-05-30 Jeff Kenton <jkenton@tilera.com>
10288
10289 * Makefile.in (SFILES): Add linux-tile-low.c.
10290 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10291 * configure.srv: Handle tilegx-*-linux*.
10292 * linux-tile-low.c: New file.
10293
0c5bf5a9
JK
102942012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10295
10296 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10297
a493e3e2
PA
102982012-05-24 Pedro Alves <palves@redhat.com>
10299
10300 PR gdb/7205
10301
43aaf8b6 10302 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10303
2ea28649
PA
103042012-05-24 Pedro Alves <palves@redhat.com>
10305
10306 PR gdb/7205
10307
10308 Replace target_signal with gdb_signal throughout.
10309
8d409d16
MR
103102012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10311
10312 * linux-low.c (linux_store_registers): Avoid the copying sequence
10313 when no data has been retrieved by ptrace.
10314
23512c01
MGD
103152012-05-22 Will Deacon <will.deacon@arm.com>
10316
10317 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10318 Include asm/ptrace.h.
10319 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10320 already defined.
10321
4934b29e
MR
103222012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10323
10324 * linux-low.c (linux_store_registers): Don't re-retrieve data
10325 with ptrace that has already been obtained from /proc. Always
10326 copy any data retrieved with ptrace to the buffer supplied.
10327
bde24c0a
PA
103282012-05-11 Yao Qi <yao@codesourcery.com>
10329 Pedro Alves <palves@redhat.com>
10330
10331 * linux-low.c (enum stopping_threads_kind): New.
10332 (stopping_threads): Change type to `enum stopping_threads_kind'.
10333 (handle_extended_wait): If stopping and suspending threads, leave
10334 the new_lwp suspended too.
10335 (linux_wait_for_event): Adjust.
10336 (stop_all_lwps): Set `stopping_threads' to
10337 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10338 whether we're suspending threads or just stopping them. Assert no
10339 recursion happens.
10340
623b6bdf
YQ
103412012-04-29 Yao Qi <yao@codesourcery.com>
10342
10343 * server.h: Move some code to ...
10344 * gdbthread.h: ... here. New.
10345 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10346 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10347 (nto-low.o, win32-low.o): Likewise.
10348 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10349 * regcache.c, remote-utils.c, server.c: Likewise.
10350 * target.c, tracepoint.c, win32-low.c: Likewise.
10351
f15f9948
TJB
103522012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10353
10354 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10355 (PTRACE_ARG4_TYPE): Likewise.
10356 (PTRACE_XFER_TYPE): Likewise.
10357 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10358 ptrace to PTRACE_ARG3_TYPE.
10359 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10360 (PTRACE_ARG4_TYPE): Likewise.
10361 (PTRACE_XFER_TYPE): Likewise.
10362 (linux_detach_one_lwp): Cast fourth argument of
10363 ptrace to long then PTRACE_ARG4_TYPE.
10364 (regsets_fetch_inferior_registers): Cast third argument of
10365 ptrace to long then PTRACE_ARG3_TYPE.
10366 (regsets_store_inferior_registers): Likewise.
10367
38ea300a
PA
103682012-04-20 Pedro Alves <palves@redhat.com>
10369
10370 * configure: Regenerate.
10371
c971b7fa
PA
103722012-04-19 Pedro Alves <palves@redhat.com>
10373
43aaf8b6 10374 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10375 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10376 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10377 (all, install-only, uninstall, clean-info, all-lib, clean): No
10378 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10379 (maintainer-clean realclean distclean): Use subdir_do.
10380 (subdir_do): New.
10381 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10382 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10383 * acinclude.m4: Include acx_configure_dir.m4.
10384 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10385 calls. Call AC_PROG_RANLIB. Configure gnulib using
10386 ACX_CONFIGURE_DIR.
10387 (GNULIB): New.
10388 (GNULIB_STDINT_H): Adjust.
10389 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10390 * gdbreplay.c: Include build-gnulib/config.h.
10391 * server.h: Likewise.
10392 * aclocal.m4: Regenerate.
10393 * config.in: Regenerate.
10394 * configure: Regenerate.
c971b7fa 10395
809277f8
PA
103962012-04-19 Pedro Alves <palves@redhat.com>
10397
10398 * Makefile.in (LIBGNU, INCGNU): Adjust.
10399 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10400 (all, install-only, uninstall, clean-info, all-lib, clean)
10401 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10402 * configure.ac: Adjust AC_OUTPUT output.
10403 * aclocal.m4: Regenerate.
10404 * configure: Regenerate.
10405
fd9bb8b8
PA
104062012-04-19 Pedro Alves <palves@redhat.com>
10407
10408 * Makefile.in (generated_files): New.
10409 (server_h): Remove the explicit dependency on config.h, and depend
10410 on $generated_files.
10411
1c298c66
PA
104122012-04-19 Pedro Alves <palves@redhat.com>
10413
10414 * Makefile.in (INCGNU): Add -Ignulib.
10415
57c4b50b
PA
104162012-04-19 Pedro Alves <palves@redhat.com>
10417
10418 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10419 (INCGNU): ... this, and spell out -I here.
10420 (GNULIB_LIB): Rename to ...
10421 (LIBGNU): ... this.
10422 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10423
1030e047
PA
104242012-04-19 Pedro Alves <palves@redhat.com>
10425
10426 * config.in: Regenerate.
10427
447d4319
PA
104282012-04-19 Pedro Alves <palves@redhat.com>
10429
10430 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10431 * server.h (memmem): Remove declaration.
10432 * config.in: Regenerate.
10433 * configure: Regenerate.
10434
aad9eab9
YQ
104352012-04-19 Yao Qi <yao@codesourcery.com>
10436
10437 * Makefile.in (SFILES): Add common/vec.c.
10438 (OBS): Add vec.o.
10439 (vec.o): New rule.
10440
3e10640f
YQ
104412012-04-19 Yao Qi <yao@codesourcery.com>
10442
10443 * remote-utils.c (prepare_resume_reply): Replace with macro
10444 target_core_of_thread.
10445 * server.c (handle_qxfer_threads_proper): Likewise.
10446 * target.h (traget_core_of_thread): New macro.
10447
71622373
PA
104482012-04-18 Pedro Alves <palves@redhat.com>
10449
10450 * aclocal.m4: Regenerate.
10451 * configure: Regenerate.
10452
80d26939
YQ
104532012-04-16 Yao Qi <yao@codesourcery.com>
10454
10455 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10456 duplicated on address.
10457
42476b70
YQ
104582012-04-16 Yao Qi <yao@codesourcery.com>
10459
10460 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10461 (struct tracepoint_action_ops) <send>: New field.
10462 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10463 (agent_expr_send, x_tracepoint_action_send): New.
10464 (l_tracepoint_action_send): New.
10465 (cmd_qtdp): Download and install tracepoint
10466 according to `use_agent'.
10467 (run_inferior_command): Add one more parameter `len'.
10468 Update callers.
10469 (tracepoint_send_agent): New.
10470 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10471
7bc83639
YQ
104722012-04-16 Yao Qi <yao@codesourcery.com>
10473
10474 * tracepoint.c (download_tracepoints): Moved to ...
10475 (cmd_qtstart): ... here.
10476
5f18041e
YQ
104772012-04-14 Yao Qi <yao@codesourcery.com>
10478
10479 * tracepoint.c: Include inttypes.h.
10480 (struct collect_memory_action): Use sized types.
10481 (struct tracepoint): Likewise.
10482 (cmd_qtdp, stop_tracing): Update print specifiers.
10483 (cmd_qtp, response_tracepoint): Likewise.
10484 (collect_data_at_tracepoint): Likewise.
10485 (collect_data_at_step): Likewise.
10486
55a8c076
YQ
104872012-04-14 Yao Qi <yao@codesourcery.com>
10488
10489 Import gnulib module inttypes.
10490 * aclocal.m4, config.in, configure: Regenerated.
10491
dc750257
YQ
104922012-04-14 Yao Qi <yao@codesourcery.com>
10493
10494 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10495 Makefile and config.status at last.
10496
0ab5faf9
YQ
104972012-04-13 Yao Qi <yao@codesourcery.com>
10498
10499 * tracepoint.c: Include stdint.h unconditionally.
10500
18f5fd81
TJB
105012012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10502
10503 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10504 on BFD_HAVE_SYS_PROCFS_TYPE.
10505 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10506 * configure: Regenerate.
10507 * config.in: Likewise.
10508
4d47af5c
L
105092012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10510
10511 * Makefile.in (clean): Also remove x32.c x32-linux.c
10512 x32-avx.c x32-avx-linux.c.
10513 (x32.o): New target.
10514 (x32.c): Likewise.
10515 (x32-linux.o): Likewise.
10516 (x32-linux.c): Likewise.
10517 (x32-avx.o): Likewise.
10518 (x32-avx.c): Likewise.
10519 (x32-avx-linux.o): Likewise.
10520 (x32-avx-linux.c): Likewise.
10521
10522 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10523 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10524 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10525 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10526 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10527 i386/x32-avx-linux.xml.
10528
10529 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10530 (init_registers_x32_avx_linux): Likwise.
10531 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10532 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10533
ecedbe58
PA
105342012-04-13 Pedro Alves <palves@redhat.com>
10535
10536 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10537 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10538 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10539 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10540 the sub-make.
10541
c92b5177
L
105422012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10543
10544 * linux-x86-low.c (compat_x32_clock_t): New.
10545 (compat_x32_siginfo_t): Likewise.
10546 (compat_x32_siginfo_from_siginfo): Likewise.
10547 (siginfo_from_compat_x32_siginfo): Likewise.
10548 (linux_is_elf64): Likewise.
10549 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10550 and siginfo_from_compat_x32_siginfo for x32.
10551 (x86_arch_setup): Set linux_is_elf64.
10552
214d508e
L
105532012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10554
10555 PR gdb/13969
10556 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10557 e_machine field.
10558 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10559 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10560 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10561 compatible with process.
10562
c9a1864a
YQ
105632012-04-12 Yao Qi <yao@codesourcery.com>
10564
10565 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10566 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10567 (install-only, install-info, clean): Handle sub dir gnulib.
10568 (all-lib, am--refresh): New targets.
10569 (memmem.o): Remove target.
10570 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10571 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10572 (AC_REPLACE_FUNCS): Remove memmem.
10573 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10574 (AC_OUTPUT): Generate Makefile in gnulib/.
10575 * aclocal.m4, config.in, configure: Regenerated.
10576
367ba2c2
MR
105772012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10578
10579 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10580
9d236627
PA
105812012-04-05 Pedro Alves <palves@redhat.com>
10582
10583 -Werror=strict-aliasing
10584
10585 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10586 pointer.
10587
111217b3
PA
105882012-04-04 Pedro Alves <palves@redhat.com>
10589
10590 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10591 (sparc_store_gregset_from_stack, sparc_store_gregset)
10592 (sparc_breakpoint_at): Fix formatting.
10593
8365dcf5
TJB
105942012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10595
10596 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10597 are available.
10598 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10599 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10600 * config.in: Regenerate.
10601 * configure: Likewise.
10602
689cc2ae
PA
106032012-03-29 Pedro Alves <palves@redhat.com>
10604
10605 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10606 Correct ptrace arguments.
10607
c14dfd32
PA
106082012-03-28 Pedro Alves <palves@redhat.com>
10609
10610 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10611 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10612 (IA64_FR1_REGNUM): New defines.
10613 (ia64_fetch_register): New.
10614 (the_low_target): Install it.
10615 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10616 field.
10617 * linux-low.c (linux_fetch_registers): Try the
10618 the_low_target.fetch_register hook first.
10619
10620 * linux-arm-low.c (the_low_target): Adjust.
10621 * linux-bfin-low.c (the_low_target): Adjust.
10622 * linux-cris-low.c (the_low_target): Adjust.
10623 * linux-crisv32-low.c (the_low_target): Adjust.
10624 * linux-m32r-low.c (the_low_target): Adjust.
10625 * linux-m68k-low.c (the_low_target): Adjust.
10626 * linux-mips-low.c (the_low_target): Adjust.
10627 * linux-ppc-low.c (the_low_target): Adjust.
10628 * linux-s390-low.c (the_low_target): Adjust.
10629 * linux-sh-low.c (the_low_target): Adjust.
10630 * linux-sparc-low.c (the_low_target): Adjust.
10631 * linux-tic6x-low.c (the_low_target): Adjust.
10632 * linux-x86-low.c (the_low_target): Adjust.
10633 * linux-xtensa-low.c (the_low_target): Adjust.
10634
63c88e13
PA
106352012-03-26 Pedro Alves <palves@redhat.com>
10636
10637 * server.c (handle_qxfer_libraries): Don't bail early if
10638 the_target->qxfer_libraries_svr4 is not NULL.
10639
fb723180
PA
106402012-03-26 Pedro Alves <palves@redhat.com>
10641
10642 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10643
0afae3cf
PA
106442012-03-23 Pedro Alves <palves@redhat.com>
10645
10646 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10647 "library-list-svr4" element's start tag when the the DSO list is
10648 empty.
10649
485f1ee4
PA
106502012-03-23 Pedro Alves <palves@redhat.com>
10651
10652 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10653 a variable whose type size is the same as the inferior's pointer
10654 size.
10655
a5362b9a
TS
106562012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10657
10658 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10659 struct siginfo.
10660 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10661 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10662 * linux-low.h: Include <signal.h>.
10663 (struct siginfo): Remove forward declaration.
10664 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10665 struct siginfo.
10666
d226c142
MF
106672012-03-21 Mike Frysinger <vapier@gentoo.org>
10668
10669 * .gitignore: Ignore more files.
10670
122f36ef
PA
106712012-03-19 Pedro Alves <palves@redhat.com>
10672 Jan Kratochvil <jan.kratochvil@redhat.com>
10673
10674 * server.c (cont_thread, general_thread): Add describing comments.
10675 (start_inferior): Clear `cont_thread'.
10676 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10677 of a process.
10678
fc3e5175
YQ
106792012-03-15 Yao Qi <yao@codesourcery.com>
10680
10681 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10682 handling to ...
10683 (cmd_qtdp): ... here.
10684
8d0d92cd
YQ
106852012-03-15 Yao Qi <yao@codesourcery.com>
10686
10687 * tracepoint.c (struct tracepoint_action_ops): New.
10688 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10689 (m_tracepoint_action_download): New.
10690 (r_tracepoint_action_download): New.
10691 (x_tracepoint_action_download): New.
10692 (l_tracepoint_action_download): New.
10693 (add_tracepoint_action): Install `action->ops' according type.
10694 (download_tracepoint_1): Move code `download' function pointer
10695 of various tracepoint_action_ops.
10696
87b0bb13
JK
106972012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10698
10699 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10700 linux_ptrace_attach_warnings.
10701
5f572dec
JK
107022012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10703
10704 * Makefile.in (linux-ptrace.o): New.
10705 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10706 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10707 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10708 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10709 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10710 of these targets.
10711 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10712
f4647387
YQ
107132012-03-08 Yao Qi <yao@codesourcery.com>
10714 Pedro Alves <palves@redhat.com>
10715
10716 Fix PR server/13392.
10717 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10718 offset of JMP insn.
10719 * tracepoint.c (remove_tracepoint): New.
10720 (cmd_qtdp): Call remove_tracepoint when failed to install.
10721
9b224c5e
PA
107222012-03-07 Pedro Alves <palves@redhat.com>
10723
10724 * linux-low.c (get_detach_signal): New.
10725 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10726 Pass on pending signals to PTRACE_DETACH. Check the result of the
10727 ptrace call.
10728 * server.c (program_signals, program_signals_p): New.
10729 (handle_general_set): Handle QProgramSignals.
10730 * server.h (program_signals, program_signals_p): Declare.
10731
e237a7e2
JK
107322012-03-05 Pedro Alves <palves@redhat.com>
10733 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10736 New comment why.
10737
5808517f
YQ
107382012-03-03 Yao Qi <yao@codesourcery.com>
10739
10740 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10741 agent_look_up_symbols.
10742
58b4daa5
YQ
107432012-03-03 Yao Qi <yao@codesourcery.com>
10744
10745 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10746 (linux-x86-low.o): Likewise.
10747 * server.h: Remove in_process_agent_loaded.
10748 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10749 common/agent.c.
10750 Update callers.
10751
8ffcbaaf
YQ
107522012-03-03 Yao Qi <yao@codesourcery.com>
10753
10754 * tracepoint.c (gdb_agent_capability): New global.
10755 (in_process_agent_loaded_ust): Renamed to
10756 `in_process_agent_supports_ust'.
10757 Update callers.
10758 (in_process_agent_supports_ust): Call agent_capability_check.
10759 (clear_installed_tracepoints): Assert that agent supports
10760 agent.
10761
d1feda86
YQ
107622012-03-03 Yao Qi <yao@codesourcery.com>
10763
10764 * linux-low.c (linux_supports_agent): New.
10765 (linux_target_ops): Initialize field `supports_agent' with
10766 linux_supports_agent.
10767 * target.h (struct target_ops) <supports_agent>: New.
10768 (target_supports_agent): New macro.
10769 * server.c (handle_general_set): Handle packet 'QAgent'.
10770 (handle_query): Send `QAgent+'.
10771 * Makefile.in (server.o): Depends on agent.h.
10772
2fa291ac
YQ
107732012-03-03 Yao Qi <yao@codesourcery.com>
10774
10775 * Makefile.in (OBS): Add agent.o.
10776 Add new rule for agent.o.
10777 Track dependence of tracepoint.c on agent.h.
10778 * tracepoint.c (run_inferior_command_1):
10779 (run_inferior_command): Call agent_run_command.
10780 (gdb_ust_connect_sync_socket): Deleted. Move it to
10781 common/agent.c.
10782 (resume_thread, stop_thread): Likewise.
10783 (gdb_ust_socket_init): Renamed to ...
10784 (gdb_agent_socket_init): ... New.
10785 (gdb_ust_thread): Renamed to ...
10786 (gdb_agent_helper_thread): ... New.
10787 (gdb_ust_init): Move some code to ...
10788 (gdb_agent_init): ... here. New.
10789 [HAVE_UST]: Call gdb_ust_init.
10790 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10791 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10792 * config.in, configure: Regenerated.
10793
05044653
PA
107942012-03-02 Pedro Alves <palves@redhat.com>
10795
10796 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10797 * linux-low.c (struct simple_pid_list): New.
10798 (stopped_pids): New a struct simple_pid_list pointer.
10799 (add_to_pid_list, pull_pid_from_list): New.
10800 (handle_extended_wait): Don't assume the first signal new children
10801 report is SIGSTOP. Adjust call to pull_pid_from_list.
10802 (linux_wait_for_lwp): Adjust.
10803
8d00225b
YQ
108042012-03-02 Yao Qi <yao@codesourcery.com>
10805
10806 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10807 debug log.
10808
19560ba5
YQ
108092012-03-02 Yao Qi <yao@codesourcery.com>
10810
10811 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10812 `stop_pc' and `tpoint'. Update caller.
10813
1faeff08
MR
108142012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10815
10816 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10817 * linux-low.c (use_linux_regsets): New macro.
10818 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10819 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10820 (linux_register_in_regsets): New function.
10821 (usr_fetch_inferior_registers): Skip registers covered by
10822 regsets.
10823 (usr_store_inferior_registers): Likewise.
10824 (usr_fetch_inferior_registers): New macro.
10825 (usr_store_inferior_registers): Likewise.
10826 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10827 (linux_store_registers): Likewise.
10828 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10829 prototype.
10830 (init_registers_mips64_dsp_linux): Likewise.
10831 (init_registers_mips_linux): New macro.
10832 (init_registers_mips_dsp_linux): Likewise.
10833 (mips_dsp_num_regs): Likewise.
10834 (DSP_BASE, DSP_CONTROL): New fallback macros.
10835 (mips_base_regs): New macro.
10836 (mips_regmap): Use it. Fix the size.
10837 (mips_dsp_regmap): New variable.
10838 (mips_dsp_regset_bitmap): Likewise.
10839 (mips_arch_setup): New function.
10840 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10841 than mips_regmap.
10842 (mips_cannot_store_register): Likewise.
10843 (the_low_target): Update .arch_setup, .num_regs and .regmap
10844 initializers. Add .regset_bitmap initializer.
10845 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10846 initializer.
10847 * linux-bfin-low.c (the_low_target): Likewise.
10848 * linux-cris-low.c (the_low_target): Likewise.
10849 * linux-crisv32-low.c (the_low_target): Likewise.
10850 * linux-ia64-low.c (the_low_target): Likewise.
10851 * linux-m32r-low.c (the_low_target): Likewise.
10852 * linux-m68k-low.c (the_low_target): Likewise.
10853 * linux-ppc-low.c (the_low_target): Likewise.
10854 * linux-s390-low.c (the_low_target): Likewise.
10855 * linux-sh-low.c (the_low_target): Likewise.
10856 * linux-sparc-low.c (the_low_target): Likewise.
10857 * linux-tic6x-low.c (the_low_target): Likewise.
10858 * linux-x86-low.c (the_low_target): Likewise.
10859 * linux-xtensa-low.c (the_low_target): Likewise.
10860 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10861 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10862 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10863 srv_xmlfiles.
10864 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10865 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10866
c03e6ccc
YQ
108672012-02-29 Yao Qi <yao@codesourcery.com>
10868 Pedro Alves <palves@redhat.com>
10869
10870 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10871 `step_over_finished' is true.
10872
644cebc9
PA
108732012-02-27 Pedro Alves <palves@redhat.com>
10874
10875 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10876 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10877
c14d7ab2
PA
108782012-02-27 Pedro Alves <palves@redhat.com>
10879
10880 PR server/9684
10881 * linux-low.c (pid_is_stopped): New.
10882 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10883
412c89dd
LM
108842012-02-25 Luis Machado <lgustavo@codesourcery.com>
10885
10886 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10887 of conditions.
10888
b745defe
MR
108892012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10890
10891 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10892
9f3a5c85
LM
108932012-02-24 Luis Machado <lgustavo@codesourcery>
10894
10895 * server.c (handle_query): Advertise support for target-side
10896 breakpoint condition evaluation.
10897 (process_point_options): New function.
10898 (process_serial_event): When inserting a breakpoint, check for
10899 a target-side condition that should be evaluated.
10900
10901 * mem-break.c: Include regcache.h and ax.h.
10902 (point_cond_list_t): New data structure.
10903 (breakpoint) <cond_list>: New field.
10904 (find_gdb_breakpoint_at): Make non-static.
10905 (delete_gdb_breakpoint_at): Clear any target-side
10906 conditions.
10907 (clear_gdb_breakpoint_conditions): New function.
10908 (add_condition_to_breakpoint): Likewise.
10909 (add_breakpoint_condition): Likewise.
10910 (gdb_condition_true_at_breakpoint): Likewise.
10911 (gdb_breakpoint_here): Return result directly instead
10912 of going through a local variable.
10913
10914 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10915 (clear_gdb_breakpoint_conditions): Likewise.
10916 (add_breakpoint_condition): Likewise.
10917 (gdb_condition_true_at_breakpoint): Likewise.
10918
10919 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10920 (need_step_over_p): Take target-side breakpoint condition into
10921 consideration.
10922
5e1dc496
LM
109232012-02-24 Luis Machado <lgustavo@codesourcery>
10924
10925 * server.h: Include tracepoint.h.
10926 (agent_mem_read, agent_get_trace_state_variable_value,
10927 agent_set_trace_state_variable_value,
10928 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10929 get_set_tsv_func_addr): New prototypes.
10930
10931 * ax.h: New include file.
10932 * ax.c: New source file.
10933
10934 * tracepoint.c: Include ax.h.
10935 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10936 agent_expr, eval_result_type): Move to ax.h.
10937 (parse_agent_expr): Rename to ...
10938 (gdb_parse_agent_expr): ... this, make it non-static and move
10939 to ax.h.
10940 (unparse_agent_expr) Rename to ...
10941 (gdb_unparse_agent_expr): ... this, make it non-static and move
10942 to ax.h.
10943 (eval_agent_expr): Rename to ...
10944 (eval_tracepoint_agent_expr): ... this.
10945 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10946 forward declarations.
10947 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10948 (agent_get_trace_state_variable_value): New function.
10949 (agent_set_trace_state_variable_value): New function.
10950 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10951 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10952 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10953 (condition_true_at_tracepoint): Likewise.
10954 (parse_agent_expr): Rename to ...
10955 (gdb_parse_agent_expr): ... this and move to ax.c.
10956 (unparse_agent_expr): Rename to ...
10957 (gdb_unparse_agent_expr): ... this and move to ax.c.
10958 (gdb_agent_op_name): Move to ax.c.
10959 (eval_agent_expr): Rename to ...
10960 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10961 and move to ax.c.
10962 (eval_tracepoint_agent_expr): New function.
10963 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10964 non-static.
5e1dc496
LM
10965 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10966 ax.c.
10967 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10968 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10969 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10970 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10971 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10972 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10973 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10974 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10975 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10976 (compile_bytecodes): Remove forward declaration.
10977 (is_goto_target): Move to ax.c.
10978 (compile_bytecodes): Move to ax.c and call
10979 agent_get_trace_state_variable_value (...) and
10980 agent_set_trace_state_variable_value (...).
10981
10982 * Makefile.in: Update ax.c and IPA dependencies.
10983
277e4e52
PA
109842012-02-24 Pedro Alves <palves@redhat.com>
10985
10986 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10987 (cmd_bigqtbuffer_circular): ... this. Only handle
10988 'QTBuffer:circular:'.
10989 (handle_tracepoint_general_set): Adjust.
10990
bf4c19f7
YQ
109912012-02-16 Yao Qi <yao@codesourcery.com>
10992
10993 * inferiors.c: Move code to ...
10994 * dll.c: .... here. New.
10995 * server.h: Declare clear_dlls.
10996 * Makefile.in (SFILES): Add dll.c.
10997 (OBS): Add dll.o
10998 (dll.o): New rule.
10999
d73f2619
YQ
110002012-02-11 Yao Qi <yao@codesourcery.com>
11001
11002 * server.c: (handle_monitor_command): Add a new parameter
11003 `own_buf'.
11004 (handle_query): Update caller.
11005
f8255c2a
JB
110062012-02-09 Joel Brobecker <brobecker@adacore.com>
11007
11008 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11009 * configure, config.in: Regenerate.
11010 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11011 is not defined.
11012
da84f473
PA
110132012-02-02 Pedro Alves <palves@redhat.com>
11014
11015 Try SIGKILL first, then PTRACE_KILL.
11016 * linux-low.c (linux_kill_one_lwp): New.
11017 (linux_kill_one_lwp): Rename to ...
11018 (kill_one_lwp_callback): ... this. Use the new
11019 linux_kill_one_lwp.
11020
e886a173
PA
110212012-02-02 Pedro Alves <palves@redhat.com>
11022
11023 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11024 inferior.
11025
be07f1a2
PA
110262012-01-27 Pedro Alves <palves@redhat.com>
11027
11028 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11029 (elf_64_file_p): Make static.
11030 (linux_pid_exe_is_elf_64_file): New.
11031 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11032 Delete declarations.
11033 (linux_pid_exe_is_elf_64_file): Declare.
11034 * linux-x86-low.c (x86_arch_setup): Use
11035 linux_pid_exe_is_elf_64_file.
11036
d8301ad1
JK
110372012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11038
11039 * linux-low.c (linux_wait_for_event_1): Rename to ...
11040 (linux_wait_for_event): ... here and merge it with former
11041 linux_wait_for_event - new variable wait_ptid, use it.
11042 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11043
01b17894
PA
110442012-01-23 Pedro Alves <palves@redhat.com>
11045
11046 * server.c (main): Avoid yet another case of infinite loop while
11047 detaching/killing after a longjmp.
11048
e825046f
JK
110492012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11050
11051 Code cleanup.
11052 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11053
b9e7b9c3
UW
110542012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11055
11056 * hostio.c (handle_readlink): New function.
11057 (handle_vFile): Call it to handle "vFile:readlink" packets.
11058
901f9912
UW
110592012-01-20 Pedro Alves <palves@redhat.com>
11060 Ulrich Weigand <ulrich.weigand@linaro.org>
11061
11062 * server.c (handle_v_requests): Only support vAttach and vRun to
11063 start multiple processes when in extended protocol mode.
11064
fc1ab1a0
PA
110652012-01-17 Pedro Alves <palves@redhat.com>
11066
11067 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11068 memalign plus mprotect to allocate the scratch buffer.
11069
7d5d4e98
PA
110702012-01-13 Pedro Alves <palves@redhat.com>
11071
11072 * server.c (attach_inferior): Clear `cont_thread'.
11073
f128d5e9
PA
110742012-01-13 Pedro Alves <palves@redhat.com>
11075
11076 * server.c (main): Avoid infinite loop while detaching/killing
11077 after a longjmp.
11078
06db92f0
DE
110792012-01-09 Doug Evans <dje@google.com>
11080
11081 * server.c (start_inferior): Set last_ptid in --wrapper case.
11082
32d92999
YQ
110832012-01-06 Yao Qi <yao@codesourcery.com>
11084
11085 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11086 defined.
11087 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11088
5e0a92a9
YQ
110892012-01-04 Yao Qi <yao@codesourcery.com>
11090
11091 * tracepoint.c (cmd_qtdp): Print debug message
11092 for static tracepoint.
11093
ae639e8c
YQ
110942012-01-04 Yao Qi <yao@codesourcery.com>
11095
11096 * tracepoint.c (trace_vdebug): Differentiate debug message
11097 between gdbserver and IPA.
11098
f72429c5
YQ
110992012-01-03 Yao Qi <yao@codesourcery.com>
11100
11101 * tracepoint.c (tracepoint_was_hit): Don't collect for
11102 static tracepoint.
11103
12c3e59c
JB
111042012-01-02 Joel Brobecker <brobecker@adacore.com>
11105
11106 * terminal.h: Reformat copyright header.
11107
67827812
JB
111082012-01-02 Joel Brobecker <brobecker@adacore.com>
11109
11110 * server.c (gdbserver_version): Update copyright year.
11111 * gdbreplay.c (gdbreplay_version): Likewise.
11112
3e52c33d
JK
111132011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11114
11115 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11116
11117 Revert:
11118 2011-12-18 Hui Zhu <teawater@gmail.com>
11119 * linux-low.c (linux_create_inferior): Save return value to ret.
11120
66f1260e
HZ
111212011-12-18 Hui Zhu <teawater@gmail.com>
11122
11123 * linux-low.c (linux_create_inferior): Save return value to ret.
11124
e77616d7
DE
111252011-12-16 Doug Evans <dje@google.com>
11126
e7b06c57
DE
11127 * linux-low.c (linux_create_inferior): If stdio connection,
11128 redirect stdin from /dev/null, stdout to stderr.
11129 * remote-utils.c (remote_is_stdio): New static global.
11130 (remote_connection_is_stdio): New function.
11131 (remote_prepare): Handle stdio connection.
11132 (remote_open): Ditto.
11133 (remote_close): Don't close stdin for stdio connections.
11134 (read_prim,write_prim): New functions. Replace all calls to
11135 read/write to these.
11136 * server.c (main): Watch for "-" argument. Move call to
11137 remote_prepare before start_inferior.
11138 * server.h (STDIO_CONNECTION_NAME): New macro.
11139 (remote_connection_is_stdio): Declare.
11140
e77616d7
DE
11141 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11142 in debugging output.
11143
82067193
YQ
111442011-12-15 Yao Qi <yao@codesourcery.com>
11145
11146 * tracepoint.c: Include sys/syscall.h.
11147 (gdb_ust_thread): Remove preprocessor conditional.
11148
82bfbe7e
PA
111492011-12-14 Pedro Alves <pedro@codesourcery.com>
11150
11151 * linux-low.c (linux_detach_one_lwp): Call
11152 the_low_target.prepare_to_resume before detaching.
11153
712c6575
YQ
111542011-12-14 Yao Qi <yao@codesourcery.com>
11155
11156 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11157 of write.
11158
d54d1edf
YQ
111592011-12-14 Yao Qi <yao@codesourcery.com>
11160
11161 * i386-low.c (i386_low_stopped_data_address): Initialize local
11162 variable `control'.
11163
6210a125
PA
111642011-12-13 Pedro Alves <pedro@codesourcery.com>
11165
11166 PR remote/13492
11167
11168 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11169 DR_CONTROL unless necessary. Extend comments.
11170 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11171 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11172
2ece8244
YQ
111732011-12-13 Yao Qi <yao@codesourcery.com>
11174
11175 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11176 macros.
11177 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11178
784867a5
JK
111792011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11180
11181 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11182 Print new debug message for such case.
11183
6bf36717
JK
111842011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11185
11186 Fix overlapping memcpy.
11187 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11188 the read_inferior_memory transfer.
11189 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11190 write_inferior_memory transfer.
11191 (set_fast_tracepoint_jump): New variable buf. Use it for the
11192 read_inferior_memory and write_inferior_memory transfers.
11193 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11194 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11195 Use it for the write_inferior_memory transfer.
11196 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11197 buffers.
11198
50275556
MR
111992011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11200
11201 * linux-low.c (fetch_register, store_register): Make code
11202 consistent, fix formatting.
11203
7325beb4
MR
112042011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11205
11206 * linux-low.c (usr_store_inferior_registers): Factor out code
11207 to handle individual registers into...
11208 (store_register): ... this new function.
11209
c642a434
UW
112102011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11211
11212 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11213 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11214 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11215 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11216 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11217 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11218 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11219 (srv_xmlfiles): Add new XML files.
11220
11221 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11222 and <sys/uio.h>.
11223 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11224 (init_registers_s390_linux32v1): Add prototype.
11225 (init_registers_s390_linux32v2): Likewise.
11226 (init_registers_s390_linux64v1): Likewise.
11227 (init_registers_s390_linux64v2): Likewise.
11228 (init_registers_s390x_linux64v1): Likewise.
11229 (init_registers_s390x_linux64v2): Likewise.
11230 (s390_num_regs): Increment to 52.
11231 (s390_regmap): Add orig_r2 register.
11232 (s390_num_regs_3264): Increment to 68.
11233 (s390_regmap_3264): Add orig_r2 register.
11234 (s390_collect_ptrace_register): Handle orig_r2 register.
11235 (s390_supply_ptrace_register): Likewise.
11236 (s390_fill_last_break): New function.
11237 (s390_store_last_break): Likewise.
11238 (s390_fill_system_call): New function.
11239 (s390_store_system_call): Likewise.
11240 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11241 register sets.
11242 (s390_check_regset): New function.
11243 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11244 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11245 Update target_regsets for available register sets.
11246
2268b414
JK
112472011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11248 Jan Kratochvil <jan.kratochvil@redhat.com>
11249
11250 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11251 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11252 New.
11253 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11254 * linux-low.h (struct process_info_private): New member r_debug.
11255 * server.c (handle_qxfer_libraries): Call
11256 the_target->qxfer_libraries_svr4.
11257 (handle_qxfer_libraries_svr4): New function.
11258 (qxfer_packets): New entry "libraries-svr4".
11259 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11260 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11261 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11262 PACKET_qXfer_libraries_svr4.
11263
d6db1fab
UW
112642011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11265
11266 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11267 PSW address/mask between 8-byte and 16-byte formats.
11268 (s390_supply_ptrace_register): Likewise.
11269 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11270 basic addressing mode bit.
11271
242f5f1c
SS
112722011-11-24 Stan Shebs <stan@codesourcery.com>
11273
11274 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11275
f196051f
SS
112762011-11-17 Stan Shebs <stan@codesourcery.com>
11277
11278 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11279 (tracing_start_time): New global.
11280 (tracing_stop_time): New global.
11281 (tracing_user_name): New global.
11282 (tracing_notes): New global.
11283 (tracing_stop_note): New global.
11284 (cmd_qtstart): Set traceframe_usage, start_time.
11285 (stop_tracing): Set stop_time.
11286 (cmd_qtstatus): Report additional status.
11287 (cmd_qtp): New function.
11288 (handle_tracepoint_query): Call it.
11289 (cmd_qtnotes): New function.
11290 (handle_tracepoint_general_set): Call it.
11291 (get_timestamp): Rename from tsv_get_timestamp.
11292
405f8e94
SS
112932011-11-14 Stan Shebs <stan@codesourcery.com>
11294 Kwok Cheung Yeung <kcy@codesourcery.com>
11295
11296 * linux-x86-low.c (small_jump_insn): New.
11297 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11298 trampoline and error message, build a trampoline and issue a small
11299 jump instruction to it.
11300 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11301 trampoline and error message.
11302 (x86_get_min_fast_tracepoint_insn_len): New.
11303 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11304 * linux-low.h (struct linux_target_ops): Add arguments to
11305 install_fast_tracepoint_jump_pad operation, add new operation.
11306 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11307 arguments.
11308 (linux_get_min_fast_tracepoint_insn_len): New function.
11309 (linux_target_op): Add new operation.
11310 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11311 (gdb_trampoline_buffer_end): Ditto.
11312 (gdb_trampoline_buffer_error): Ditto.
11313 (struct ipa_sym_addresses): Add fields for new IPA variables.
11314 (symbol_list): Add entries for new IPA variables.
11315 (struct tracepoint): Add fields to hold the address range of the
11316 trampoline used by the tracepoint.
11317 (trampoline_buffer_head): New static variable.
11318 (trampoline_buffer_tail): Ditto.
11319 (claim_trampoline_space): New function.
11320 (have_fast_tracepoint_trampoline_buffer): New function.
11321 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11322 structure.
11323 (install_fast_tracepoint): Ditto, also add error buffer argument.
11324 (cmd_qtminftpilen): New function.
11325 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11326 (fast_tracepoint_from_trampoline_address): New function.
11327 (fast_tracepoint_collecting): Handle trampoline as part of jump
11328 pad space.
11329 (set_trampoline_buffer_space): New function.
11330 (initialize_tracepoint): Initialize new IPA variables.
11331 * target.h (struct target_ops): Add arguments to
11332 install_fast_tracepoint_jump_pad operation, add new
11333 get_min_fast_tracepoint_insn_len operation.
11334 (target_get_min_fast_tracepoint_insn_len): New.
11335 (install_fast_tracepoint_jump_pad): Add arguments.
11336 * server.h (IPA_BUFSIZ): Define.
11337 * linux-i386-ipa.c: Include extra header files.
11338 (initialize_fast_tracepoint_trampoline_buffer): New function.
11339 (initialize_low_tracepoint): Call it.
11340 * server.h (set_trampoline_buffer_space): Declare.
11341 (claim_trampoline_space): Ditto.
11342 (have_fast_tracepoint_trampoline_buffer): Ditto.
11343
1e4d1764
YQ
113442011-11-14 Yao Qi <yao@codesourcery.com>
11345
11346 * server.c (handle_query): Handle InstallInTrace for qSupported.
11347 * tracepoint.c (add_tracepoint): Sort list.
11348 (install_tracepoint, download_tracepoint): New.
11349 (cmd_qtdp): Call them to install and download tracepoints.
11350 (sort_tracepoints): Removed.
11351 (cmd_qtstart): Update.
11352
5c73ff4e
YQ
113532011-11-14 Yao Qi <yao@codesourcery.com>
11354
11355 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11356 * mem-break.h: Declare.
11357 * tracepoint.c (cmd_qtstart): Move some code to ...
11358 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11359 New.
11360 (download_tracepoints): Move some code to ...
11361 (download_tracepoint_1): ... here. New.
11362
86a30030
YQ
113632011-11-08 Yao Qi <yao@codesourcery.com>
11364
11365 * remote-utils.c (relocate_instruction): A comment fix.
11366
8d26e50c
JB
113672011-11-07 Joel Brobecker <brobecker@adacore.com>
11368
11369 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11370 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11371 dr_status_mirror and dr_control_mirror from debug_reg_state.
11372 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11373 (i386_initial_stuff): Remove use of deleted globals.
11374 (i386_get_thread_context, i386_set_thread_context,
11375 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11376 from debug_reg_state.
11377
a59306a3
YQ
113782011-11-05 Yao Qi <yao@codesourcery.com>
11379
11380 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11381 address as TPOINT's.
11382
3065dfb6
SS
113832011-11-02 Stan Shebs <stan@codesourcery.com>
11384
11385 * tracepoint.c (agent_mem_read_string): New function.
11386 (eval_agent_expr): Call it for tracenz.
11387 * server.c (handle_query): Report support for tracenz.
11388
fd0d8c7c
YQ
113892011-11-02 Yao Qi <yao@codesourcery.com>
11390
11391 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11392
609086b1
YQ
113932011-11-02 Yao Qi <yao@codesourcery.com>
11394
11395 * target.h: Fix a typo in comment.
11396
b9fd1791
PA
113972011-10-31 Pedro Alves <pedro@codesourcery.com>
11398
11399 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11400 clobber the breakpoints' shadows with fast tracepoint jumps.
11401 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11402 * target.c (write_inferior_memory): Also pass MYADDR down to
11403 check_mem_write.
11404
03583c20
UW
114052011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11406
11407 * configure.ac: Check support for personality routine.
11408 * configure: Regenerate.
11409 * config.in: Likewise.
11410 * linux-low.c: Include <sys/personality.h>.
11411 Define ADDR_NO_RANDOMIZE if necessary.
11412 (linux_create_inferior): Disable address space randomization when
11413 forking inferior, if requested.
11414 (linux_supports_disable_randomization): New function.
11415 (linux_target_ops): Install it.
11416 * server.h (disable_randomization): Declare.
11417 * server.c (disable_randomization): New global variable.
11418 (handle_general_set): Handle QDisableRandomization.
11419 (handle_query): Likewise for qSupported.
11420 (main): Support --disable-randomization and --no-disable-randomization
11421 command line arguments.
11422 * target.h (struct target_ops): Add supports_disable_randomization.
11423 (target_supports_disable_randomization): New macro.
11424
723b724b
MF
114252011-09-29 Mike Frysinger <vapier@gentoo.org>
11426
11427 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11428 ifdef check.
11429 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11430 [!PT_GETDSBT] (target_loadmap): New definition.
11431 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11432 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11433 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11434 and PT_GETDSBT to LINUX_LOADMAP.
11435 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11436 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11437
55329a5c 114382011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11439
11440 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11441 (arm_linux_hwbp_cap): New static variable.
11442 (arm_linux_get_hwbp_cap): Replace by ...
11443 (arm_linux_init_hwbp_cap): ... this new function.
11444 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11445 (arm_linux_get_hw_watchpoint_count): Likewise.
11446 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11447 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11448 (arm_prepare_to_resume): Use perror_with_name instead of error.
11449
55329a5c 114502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11451
11452 * linux-arm-low.c: Include <signal.h>.
11453 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11454 (struct arm_linux_hwbp_cap): New data type.
11455 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11456 (struct arm_linux_hw_breakpoint): New data type.
11457 (MAX_BPTS, MAX_WPTS): Define.
11458 (struct arch_process_info, struct arch_lwp_info): New data types.
11459 (arm_linux_get_hwbp_cap): New function.
11460 (arm_linux_get_hw_breakpoint_count): Likewise.
11461 (arm_linux_get_hw_watchpoint_count): Likewise.
11462 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11463 (arm_hwbp_control_initialize): Likewise.
11464 (arm_hwbp_control_is_enabled): Likewise.
11465 (arm_hwbp_control_is_initialized): Likewise.
11466 (arm_hwbp_control_disable): Likewise.
11467 (arm_linux_hw_breakpoint_equal): Likewise.
11468 (arm_linux_hw_point_initialize): Likewise.
11469 (struct update_registers_data): New data structure.
11470 (update_registers_callback: New function.
11471 (arm_insert_point): Likewise.
11472 (arm_remove_point): Likewise.
11473 (arm_stopped_by_watchpoint): Likewise.
11474 (arm_stopped_data_address): Likewise.
11475 (arm_new_process): Likewise.
11476 (arm_new_thread): Likewise.
11477 (arm_prepare_to_resume): Likewise.
11478 (the_low_target): Register arm_insert_point, arm_remove_point,
11479 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11480 arm_new_thread, and arm_prepare_to_resume.
11481
6b9801d4
SS
114822011-09-15 Stan Shebs <stan@codesourcery.com>
11483
11484 * server.h (struct emit_ops): Add compare-goto fields.
11485 * tracepoint.c (gdb_agent_op_sizes): New table.
11486 (emit_eq_goto): New function.
11487 (emit_ne_goto): New function.
11488 (emit_lt_goto): New function.
11489 (emit_le_goto): New function.
11490 (emit_gt_goto): New function.
11491 (emit_ge_goto): New function.
11492 (is_goto_target): New function.
11493 (compile_bytecodes): Recognize special cases of compare-goto
11494 combinations and call specialized emitters for them.
11495 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11496 (amd64_emit_ne_goto): New function.
11497 (amd64_emit_lt_goto): New function.
11498 (amd64_emit_le_goto): New function.
11499 (amd64_emit_gt_goto): New function.
11500 (amd64_emit_ge_goto): New function.
11501 (amd64_emit_ops): Add the new functions.
11502 (i386_emit_eq_goto): New function.
11503 (i386_emit_ne_goto): New function.
11504 (i386_emit_lt_goto): New function.
11505 (i386_emit_le_goto): New function.
11506 (i386_emit_gt_goto): New function.
11507 (i386_emit_ge_goto): New function.
11508 (i386_emit_ops): Add the new functions.
11509
bf15cbda
SS
115102011-09-08 Stan Shebs <stan@codesourcery.com>
11511
11512 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11513 (i386_emit_epilogue): Restore %ebx.
11514
943ca1dd
JZ
115152011-08-31 Jie Zhang <jzhang918@gmail.com>
11516
11517 * server.c (step_thread): Remove definition.
11518 (process_serial_event): Don't handle Hs.
11519 * server.h (step_thread): Remove declaration.
11520 * target.c (set_desired_inferior): Remove use of step_thread.
11521
e3deef73
LM
115222011-08-24 Luis Machado <lgustavo@codesourcery.com>
11523
11524 * linux-low.c: Include linux-procfs.h.
11525 (linux_attach_lwp_1): Update comments.
11526 (linux_attach): Scan for existing threads when attaching to a
11527 process that is the tgid.
11528 * Makefile.in: Update dependencies.
11529
13da1c97
LM
115302011-08-24 Luis Machado <lgustavo@codesourcery.com>
11531
11532 * configure.srv: Add linux-procfs.o dependencies.
11533
881127c9
YQ
115342011-08-14 Yao Qi <yao@codesourcery.com>
11535
11536 * target.h (struct target_ops): Fix indent.
11537 * win32-low.c (win32_target_ops): Fix comment.
11538
58dbd541
YQ
115392011-08-14 Andrew Jenner <andrew@codesourcery.com>
11540 Yao Qi <yao@codesourcery.com>
11541
11542 * Makefile.in (clean): Remove tic6x-*.c files.
11543 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11544 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11545 (tic6x-c64xp-linux.c): Likewise.
11546 * configure.srv: Add support for tic6x-*-uclinux.
11547 * linux-tic6x-low.c: New.
11548 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11549
78d85199
YQ
115502011-08-14 Andrew Stubbs <ams@codesourcery.com>
11551 Yao Qi <yao@codesourcery.com>
11552
11553 * target.h (struct target_ops): Add read_loadmap.
11554 * linux-low.c (struct target_loadseg): New type.
11555 (struct target_loadmap): New type.
11556 (linux_read_loadmap): New function.
11557 (linux_target_ops): Add linux_read_loadmap.
11558 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11559 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11560 to NULL.
78d85199 11561
a959a88d
EZ
115622011-08-05 Eli Zaretskii <eliz@gnu.org>
11563
11564 * win32-low.c: Include <stdint.h>.
11565
1ced966e
PA
115662011-07-22 Pedro Alves <pedro@codesourcery.com>
11567
11568 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11569 to the inferior here.
11570 (i386_remove_aligned_watchpoint): Ditto.
11571 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11572 fit part of the watchpoint in the debug registers.
11573 (i386_update_inferior_debug_regs): New.
11574 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11575 registers, and only update the inferior on success.
11576 (i386_low_remove_watchpoint): Ditto.
11577
d26e3629
KY
115782011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11579
11580 * linux-low.c (compare_ints, unique, list_threads, show_process,
11581 linux_core_of_thread): Delete.
11582 (linux_target_ops): Change linux_core_of_thread to
11583 linux_common_core_of_thread.
11584 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11585 * utils.c (malloc_failure): Change type of argument.
11586 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11587 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11588 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11589 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11590 (IPA_OBJS): Add common-utils-ipa.o.
11591 (ptid_h, linux_osdata_h): New macros.
11592 (server_h): Add common/common-utils.h, common/xml-utils.h,
11593 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11594 common/ptid.h.
11595 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11596 ptid.o, buffer.o): New rules.
11597 (linux-low.o): Add common/linux-osdata.h as a dependency.
11598 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11599 * configure.ac: Add AC_HEADER_DIRENT check.
11600 * config.in: Regenerate.
11601 * configure: Regenerate.
11602 * remote-utils.c (xml_escape_text): Delete.
11603 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11604 buffer_xml_printf): Move to common/buffer.c.
11605 * server.c (main): Remove call to initialize_inferiors.
11606 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11607 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11608 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11609 internal_error, gdb_assert, gdb_assert_fail): Delete.
11610 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11611 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11612 common/buffer.h.
11613 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11614 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11615 initialize_inferiors): Delete.
11616
2275a1a7
PA
116172011-07-20 Pedro Alves <pedro@codesourcery.com>
11618
11619 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11620 symbol error.
11621
0a5b1e09
PA
116222011-05-31 Pedro Alves <pedro@codesourcery.com>
11623
11624 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11625 assertion.
11626 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11627
6938fd34
YQ
116282011-05-26 Yao Qi <yao@codesourcery.com>
11629
11630 * Makefile.in (thread-db.o): Track dependence to
11631 common/gdb_thread_db.h.
11632 * thread-db.c: include gdb_thread_db.h from right place.
11633
b481f9e0
TT
116342011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11635
11636 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11637 __FILE__ and __LINE__ to internal_error.
11638
98a5dd13
DE
116392011-05-13 Doug Evans <dje@google.com>
11640
11641 * thread-db.c (try_thread_db_load_from_sdir): New function.
11642 (try_thread_db_load_from_dir): New function.
11643 (thread_db_load_search): Handle $sdir, ignore $pdir.
11644 Remove trying of system directories if search of
11645 libthread-db-search-path fails, that is now done via $sdir.
11646
d248b706
KY
116472011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11648
11649 * server.c (handle_query): Add EnableDisableTracepoints to the list
11650 of supported features.
43aaf8b6 11651 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11652 tracepoints.
43aaf8b6
PA
11653 (cmd_qtenable_disable): New.
11654 (cmd_qtstart): Install tracepoints even if disabled.
11655 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11656 receiving a QTEnable or QTDisable packet.
11657 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11658 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11659 tracepoints.
11660 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11661
84e578fb
DE
116622011-05-10 Doug Evans <dje@google.com>
11663
11664 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11665
71f55dd8
DE
116662011-05-04 Doug Evans <dje@google.com>
11667
11668 * linux-low.c (linux_join): Skip process lookup.
11669 * spu-low.c (spu_join): Ditto.
11670 * server.c (join_inferiors_callback): Delete.
11671 (process_serial_event): For 'D' packet (detach) call join_inferior
11672 directly.
11673
4d393d60
JM
116742011-05-04 Joseph Myers <joseph@codesourcery.com>
11675
11676 * README: Don't mention xscale*-*-linux*.
11677 * configure.srv (xscale*-*-linux*): Don't handle target.
11678
b00ad6ff
NF
116792011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11680
11681 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11682 casting pointers.
11683 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11684 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11685 (i386_emit_void_call_2): Likewise.
11686
af96c192
YQ
116872011-04-26 Yao Qi <yao@codesourcery.com>
11688
43aaf8b6
PA
11689 * linux-low.c: Move common macros to linux-ptrace.h.
11690 Include linux-ptrace.h.
af96c192
YQ
11691 * Makefile.in (linux_ptrace_h): New.
11692 (linux-low.o): Depends on linux-ptrace.h.
11693
03f2bd59
JK
116942011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11695
11696 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11697 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11698 (remote_prepare): New function with most of the TCP code from ...
11699 (remote_open): ... here. Detect PORT here unconditionally. Move also
11700 setting transport_is_reliable.
11701 * server.c (run_once): New variable.
11702 (gdbserver_usage): Document it.
11703 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11704 the first run if RUN_ONCE.
11705 * server.h (run_once, remote_prepare): New declarations.
11706
7a9dd1b2
TT
117072011-04-19 Tom Tromey <tromey@redhat.com>
11708
11709 * win32-low.c (handle_load_dll): Remove duplicate "the".
11710
81239425
PM
117112011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11712
11713 Remove support for old Cygwin 1.5 versions.
11714 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11715 function to avoid warning.
11716 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11717 warning.
11718
9e0627f1
PM
117192011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11720
11721 * gdbserver/server.h (Macro _): Define it if not available.
11722
588eebee
MS
117232011-03-14 Michael Snyder <msnyder@vmware.com>
11724
348af9f7 11725 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11726
43f70d4c
JB
117272011-03-10 Joel Brobecker <brobecker@adacore.com>
11728
11729 * Makefile.in (maintainer-clean realclean distclean): Remove
11730 "make ... subdir_do" command.
11731
348af9f7
MS
117322011-03-10 Michael Snyder <msnyder@vmware.com>
11733
11734 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11735
11736 * server.c (handle_v_run): Free alloced buffer on early return.
11737
e637a4f5
YQ
117382011-03-09 Yao Qi <yao@codesourcery.com>
11739
11740 Revert:
11741 2011-03-04 Yao Qi <yao@codesourcery.com>
11742
11743 * Makefile.in: Remove GNU make feature --directory.
11744
11745 2011-03-05 Yao Qi <yao@codesourcery.com>
11746
11747 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11748 (subdir_do): New make target. Copied from gdb/Makefile.
11749 (maintainer-clean, realclean, distclean, clean): Call corresponding
11750 make targets in common/Makefile.
11751
11752 2011-02-11 Yao Qi <yao@codesourcery.com>
11753
11754 * configure.ac: Call AC_PROG_RANLIB.
11755 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11756 * configure: Regenerate.
11757
e6edda56
JK
117582011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11759
11760 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11761
e5141119
JB
117622011-03-06 Yao Qi <yao@codesourcery.com>
11763
11764 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11765
64794aa4
JB
117662011-03-05 Yao Qi <yao@codesourcery.com>
11767
11768 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11769 (subdir_do): New make target. Copied from gdb/Makefile.
11770 (maintainer-clean, realclean, distclean, clean): Call corresponding
11771 make targets in common/Makefile.
11772
7a762829
YQ
117732011-03-04 Yao Qi <yao@codesourcery.com>
11774
11775 * Makefile.in: Remove GNU make feature --directory.
11776
348af9f7
MS
117772011-03-04 Michael Snyder <msnyder@vmware.com>
11778
11779 * server.c (queue_stop_reply): Call xmalloc not malloc.
11780
117812011-03-02 Michael Snyder <msnyder@vmware.com>
11782
11783 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11784
9f72fee2
MS
117852011-02-28 Michael Snyder <msnyder@vmware.com>
11786
588eebee
MS
11787 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11788 (cmd_qtframe): Ditto.
11789 (cmd_qtbuffer): Ditto.
11790 (cmd_bigqtbuffer): Ditto.
11791
9f72fee2
MS
11792 * utils.c (decimal2str): Initialize 'width' to nine, then
11793 don't mess with it.
11794
8040bd49
UW
117952011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11796
11797 * hostio.c (require_data): Free *data, not data.
11798
7e52cbd0
JK
117992011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11800
11801 * hostio.c (require_data): Use free, not xfree.
11802
9130f83e
MS
118032011-02-27 Michael Snyder <msnyder@vmware.com>
11804
4b812f4e
MS
11805 * server.c (handle_query): Discard unused value.
11806
9130f83e
MS
11807 * hostio.c (require_data): Free malloc memory before returning
11808 error.
11809
69d37113
MS
118102011-02-26 Michael Snyder <msnyder@vmware.com>
11811
11812 * linux-low.c (list_threads): Call closedir for dirent.
11813
35f5825a
MS
118142011-02-27 Michael Snyder <msnyder@vmware.com>
11815
2a589cef
MS
11816 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11817 a case statement falls through.
11818
0adea5f7
MS
11819 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11820
35f5825a
MS
11821 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11822 in comparison.
11823
238f1c74
MS
118242011-02-26 Michael Snyder <msnyder@vmware.com>
11825
11826 * utils.c (decimal2str): Eliminate dead code and dead param.
11827 (pulongest): Drop dead param from call to decimal2str.
11828 (plongest): Ditto.
11829
633ff500
JB
118302011-02-24 Joel Brobecker <brobecker@adacore.com>
11831
11832 Revert the following patch (not approved yet):
11833 2011-02-21 Hui Zhu <teawater@gmail.com>
11834 * tracepoint.c (tp_printf): New function.
11835 (eval_agent_expr): Handle gdb_agent_op_printf.
11836
f9c6ff72
HZ
118372011-02-21 Hui Zhu <teawater@gmail.com>
11838
11839 * tracepoint.c (tp_printf): New function.
11840 (eval_agent_expr): Handle gdb_agent_op_printf.
11841
94d5e490
TT
118422011-02-18 Tom Tromey <tromey@redhat.com>
11843
11844 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11845 (tracepoint.o): Likewise.
11846 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11847 (gdb_agent_op_names): Likewise.
11848
c7f96d2b
TT
118492011-02-18 Tom Tromey <tromey@redhat.com>
11850
11851 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11852 gdb_agent_op_rot>: New constants.
11853 (gdb_agent_op_names): Add pick and roll.
11854 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11855 cases.
11856
0feedb2c
JK
118572011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11858
11859 * aclocal.m4: Regenerated with aclocal-1.11.1.
11860
b3b9301e
PA
118612011-02-14 Pedro Alves <pedro@codesourcery.com>
11862
11863 * server.c (handle_qxfer_traceframe_info): New.
11864 (qxfer_packets): Register "traceframe-info".
11865 (handle_query): Report support for qXfer:traceframe-info:read+.
11866 * tracepoint.c (match_blocktype): New.
11867 (traceframe_find_block_type): Rename to ...
11868 (traceframe_walk_blocks): ... this. Add callback filter argument,
11869 and use it.
11870 (traceframe_find_block_type): New, reimplemented on top of
11871 traceframe_walk_blocks.
11872 (build_traceframe_info_xml): New.
11873 (traceframe_read_info): New.
11874 * server.h (traceframe_read_info): Declare.
11875
4f3e6fb7
YQ
118762011-02-11 Yao Qi <yao@codesourcery.com>
11877
11878 * configure.ac: Call AC_PROG_RANLIB.
11879 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11880 * configure: Regenerate.
11881
764880b7
PA
118822011-02-07 Pedro Alves <pedro@codesourcery.com>
11883
11884 * server.c (gdb_read_memory): Change return semantics to allow
11885 partial transfers.
11886 (handle_search_memory_1): Adjust.
11887 (process_serial_event) <'m' packet>: Handle partial transfers.
11888 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11889
1c79eb8a
PA
118902011-01-28 Pedro Alves <pedro@codesourcery.com>
11891
11892 * regcache.c (init_register_cache): Initialize
11893 regcache->register_status.
11894 (free_register_cache): Release regcache->register_status.
11895 (regcache_cpy): Copy register_status.
11896 (registers_to_string): Print 'x's for unavailable registers.
11897 (supply_register): Mark the register's status valid or
11898 unavailable, depending on whether a buffer was passed in or not.
11899 (supply_register_zeroed): New.
11900 (supply_regblock): Mark the registers' status valid or
11901 unavailable, depending on whether a buffer was passed in or not.
11902 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11903 (struct regcache): New `register_status' field.
11904 (supply_register_zeroed): Declare.
11905 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11906 supply_register_zeroed, rather than passing a NULL buffer to
11907 supply_register.
11908 * tracepoint.c (fetch_traceframe_registers): Update comment.
11909
85724a0e
PA
119102011-01-28 Pedro Alves <pedro@codesourcery.com>
11911
11912 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11913 buffer explicit.
11914
d08aafef
PA
119152011-01-25 Pedro Alves <pedro@codesourcery.com>
11916
11917 * server.h (decode_xfer_write): Change prototype.
11918 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11919 and don't extract the annex here.
11920 * server.c (decode_xfer_read): Remove `annex' parameter,
11921 and don't extract the annex here.
11922 (decode_xfer): New.
11923 (struct qxfer): New.
11924 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11925 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11926 (handle_qxfer_statictrace): New functions, abstracted out from
11927 handle_query, and made to use the struct qxfer interface.
11928 (handle_threads_qxfer_proper): Rename to ...
11929 (handle_qxfer_threads_proper): ... this.
11930 (handle_threads_qxfer): Rename to ...
11931 (handle_qxfer_threads): ... this. Adjust.
11932 (qxfer_packets): New array.
11933 (handle_qxfer): New function.
11934 (handle_query): Use handle_qxfer.
11935
493e2a69
MS
119362011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11937
11938 * gdbreplay.c: Shorten lines of >= 80 columns.
11939 * linux-low.c: Ditto.
11940 * linux-ppc-low.c: Ditto.
11941 * linux-s390-low.c: Ditto.
11942 * linux-sparc-low.c: Ditto.
11943 * linux-x86-low.c: Ditto.
11944 * linux-xtensa-low.c: Ditto.
11945 * mem-break.c: Ditto.
11946 * nto-low.c: Ditto.
11947 * regcache.h: Ditto.
11948 * remote-utils.c: Ditto.
11949 * server.c: Ditto.
11950 * server.h: Ditto.
11951 * thread-db.c: Ditto.
11952 * tracepoint.c: Ditto.
11953 * utils.c: Ditto.
11954 * win32-low.h: Ditto.
11955
44944448
JB
119562011-01-05 Joel Brobecker <brobecker@adacore.com>
11957
11958 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11959 update.
11960
71ce852c
JB
119612011-01-01 Joel Brobecker <brobecker@adacore.com>
11962
11963 * server.c (gdbserver_version): Update copyright year in version
11964 output.
11965 * gdbreplay.c (gdbreplay_version): Ditto.
11966
eb826dc6
MF
119672010-12-29 Jie Zhang <jie.zhang@analog.com>
11968
11969 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11970 * linux-bfin-low.c: New file.
11971 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11972 PT_DATA_ADDR for BFIN targets.
11973 * Makefile.in (SFILES): Add linux-bfin-low.c.
11974 (clean): Remove reg-bfin.c.
11975 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11976 * README: Mention supported Blackfin targets.
11977
39ab222a
MF
119782010-12-23 Mike Frysinger <vapier@gentoo.org>
11979
11980 * .gitignore: New file.
11981
a1f2ce7d
MF
119822010-11-16 Mike Frysinger <vapier@gentoo.org>
11983
11984 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11985
f474844c
JZ
119862010-10-22 Jie Zhang <jie@codesourcery.com>
11987
11988 * Makefile.in: Add FLAGS_TO_PASS variable.
11989 (install): Remove dependency of install-only and recursively
11990 invoke make for install-only.
11991
f1048712
DE
119922010-10-04 Doug Evans <dje@google.com>
11993
11994 * Makefile.in (uninstall): Use $(DESTDIR).
11995
b53a1623
PA
119962010-09-24 Pedro Alves <pedro@codesourcery.com>
11997
e6ee044d
PA
11998 PR gdb/11842
11999
b53a1623
PA
12000 * linux-x86-low.c (compat_siginfo_from_siginfo)
12001 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12002 si_code is < 0. Check for si_code == SI_TIMER before checking for
12003 si_code < 0.
12004
fa1bd1e4
JB
120052010-09-13 Joel Brobecker <brobecker@adacore.com>
12006
12007 * lynx-i386-low.c: New file.
12008 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12009
47fac8f8
JB
120102010-09-13 Joel Brobecker <brobecker@adacore.com>
12011
12012 * lynx-low.c (ptrace_request_to_str): Remove handling for
12013 request values that have been removed in LynxOS 5.x.
12014
1adfc54d
JB
120152010-09-13 Joel Brobecker <brobecker@adacore.com>
12016
12017 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12018 <ptrace.h>
12019
c2a66c29
NS
120202010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12021
12022 * configure.ac: Add --enable-inprocess-agent option.
12023 * configure: Rebuilt.
12024
32fcada3
YQ
120252010-09-06 Yao Qi <yao@codesourcery.com>
12026
12027 * linux-low.c (linux_kill): Remove unused variable.
12028 (linux_stabilize_threads): Likewise.
12029 * server.c (start_inferior): Likewise.
12030 (queue_stop_reply_callback): Likewise.
12031 * tracepoint.c (do_action_at_tracepoint): Likewise.
12032
0cccb683
YQ
120332010-09-06 Yao Qi <yao@codesourcery.com>
12034
12035 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12036 on return.
12037
423ec54c
JK
120382010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12039
12040 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12041
12ac6819
PA
120422010-09-06 Pedro Alves <pedro@codesourcery.com>
12043
12044 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12045 "$(IPA_DEPFILES)".
12046
8ed54b31
JB
120472010-09-01 Joel Brobecker <brobecker@adacore.com>
12048
12049 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12050 gdbserver/lynx-ppc-low.c: New files.
12051 * Makefile.in (lynx_low_h): New variable.
12052 (lynx-low.o, lynx-ppc-low.o): New rules.
12053 * configure.ac: On LynxOS, link with -lnetinet.
12054 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12055 * configure: regenerate.
12056
bb0116a4
JB
120572010-09-01 Joel Brobecker <brobecker@adacore.com>
12058
12059 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12060 * configure.ac: Add check for vasprintf and vsnprintf.
12061 * configure, config.in: Regenerate.
12062 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12063
a778ab81 120642010-09-01 Joel Brobecker <brobecker@adacore.com>
12065
12066 * gdbreplay.c: Move include of alloca.h up, next to include of
12067 malloc.h.
12068 * server.h: Add include of malloc.h.
12069 * mem-break.c: Remove include of malloc.h.
12070 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12071
8b034a19 120722010-09-01 Joel Brobecker <brobecker@adacore.com>
12073
12074 * Makefile.in (memmem.o): Build with -Wno-error.
12075
120762010-09-01 Joel Brobecker <brobecker@adacore.com>
12077
12078 * utils.c (xsnprintf): Make non-static.
12079 * server.h: Add xsnprintf declaration.
12080 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12081 replace calls to snprintf by calls to xsnprintf throughout.
12082
120832010-09-01 Joel Brobecker <brobecker@adacore.com>
12084
12085 * configure.ac: Add configure check for alloca.
12086 * configure, config.in: Regenerate.
12087 * server.h: Include alloca.h if it exists.
12088 * gdbreplay.c: Include alloca.h if it exists.
12089
1a981360
PA
120902010-08-28 Pedro Alves <pedro@codesourcery.com>
12091
12092 * linux-low.c (__SIGRTMIN): Define if not already defined.
12093 (linux_create_inferior): Check for __ANDROID__ rather than
12094 __SIGRTMIN.
12095 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12096 are already deferred.
12097 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12098 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12099 stopped and already has a pending signal to report.
12100 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12101 a pending signal to report or is moving out of a jump pad.
12102 (linux_init_signals): Check for __ANDROID__ rather than
12103 __SIGRTMIN.
12104
b4d51a55
PA
121052010-08-28 Pedro Alves <pedro@codesourcery.com>
12106
12107 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12108 debug_threads check. Avoid a linear search when not doing debug
12109 output.
12110
ec48365d
PA
121112010-08-27 Pedro Alves <pedro@codesourcery.com>
12112
12113 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12114 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12115 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12116 (process_event): Change local fd's type to gdb_fildes_t.
12117 (create_file_handler): Adjust prototype.
12118 (delete_file_handler): Adjust prototype.
12119 (handle_file_event): Adjust prototype. Use pfildes.
12120 (create_file_event): Adjsut prototype.
12121 * remote-utils.c (remote_desc, listen_desc): Change type to
12122 gdb_fildes_t.
12123 * server.h: New gdb_fildes_t typedef.
12124 [USE_WIN32API]: Include winsock2.h.
12125 (delete_file_handler, add_file_handler): Adjust prototypes.
12126 (pfildes): Declare.
12127 * utils.c (pfildes): New.
12128
854d88f0
PA
121292010-08-27 Pedro Alves <pedro@codesourcery.com>
12130
12131 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12132 * configure: Regenerate.
12133
0146f85b
PA
121342010-08-27 Pedro Alves <pedro@codesourcery.com>
12135
12136 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12137 (linux_done_accessing_memory): ... this.
12138 (linux_target_ops): Adjust.
12139 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12140 * nto-low.c (nto_target_ops): Adjust comment.
12141 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12142 * spu-low.c (spu_target_ops): Adjust comment.
12143 * target.h (target_ops): Rename unprepare_to_access_memory field
12144 to done_accessing_memory.
12145 (unprepare_to_access_memory): Rename to ...
12146 (done_accessing_memory): ... this.
12147
90d74c30
PA
121482010-08-26 Pedro Alves <pedro@codesourcery.com>
12149
12150 * linux-low.c (linux_prepare_to_access_memory): New.
12151 (linux_unprepare_to_access_memory): New.
12152 (linux_target_ops): Install them.
12153 * server.c (read_memory): Rename to ...
12154 (gdb_read_memory): ... this. Use
12155 prepare_to_access_memory/prepare_to_access_memory.
12156 (write_memory): Rename to ...
12157 (gdb_write_memory): ... this. Use
12158 prepare_to_access_memory/prepare_to_access_memory.
12159 (handle_search_memory_1): Adjust.
12160 (process_serial_event): Adjust.
12161 * target.h (struct target_ops): New fields
12162 prepare_to_access_memory and unprepare_to_access_memory.
12163 (prepare_to_access_memory, unprepare_to_access_memory): New.
12164 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12165 prepare_to_access_memory/prepare_to_access_memory.
12166 * nto-low.c (nto_target_ops): Adjust.
12167 * spu-low.c (spu_target_ops): Adjust.
12168 * win32-low.c (win32_target_ops): Adjust.
12169
fd467969
PA
121702010-08-26 Pedro Alves <pedro@codesourcery.com>
12171
12172 * Makefile.in (WARN_CFLAGS): Get it from configure.
12173 (WERROR_CFLAGS): New.
12174 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12175 * configure.ac: Introduce --enable-werror, which adds -Werror to
12176 the compiler command line. Enabled by default. Disable with
12177 --disable-werror. Add -Wdeclaration-after-statement
12178 Wpointer-arith and -Wformat-nonliteral to warning flags.
12179 * configure: Regenerate.
12180
331e2f5f
PA
121812010-08-26 Pedro Alves <pedro@codesourcery.com>
12182
12183 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12184
e581f2b4
PA
121852010-08-26 Pedro Alves <pedro@codesourcery.com>
12186
12187 * gdbreplay.c (remote_error): New.
12188 (gdbchar): New.
12189 (expect): Use gdbchar. Check for error reading from GDB.
12190 Clarify sync error output.
12191 (play): Check for errors writing to GDB.
12192 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12193 * remote-utils.c (getpkt): Check for errors writing to the remote
12194 descriptor.
12195
3c11dd79
PA
121962010-08-25 Pedro Alves <pedro@codesourcery.com>
12197
12198 * linux-low.c (linux_wait_1): Move non-debugging code out of
12199 `debug_threads' control.
12200
d20a8ad9
PA
122012010-08-25 Pedro Alves <pedro@codesourcery.com>
12202
12203 * linux-low.c (linux_wait_1): Don't set last_status here.
12204 * server.c (push_event, queue_stop_reply_callback): Assert we're
12205 not pushing a TARGET_WAITKIND_IGNORE event.
12206 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12207 (myresume, handle_target_event): Set the thread's last_resume_kind
12208 and last_status from the target returned status.
12209
964e4306
PA
122102010-08-25 Pedro Alves <pedro@codesourcery.com>
12211
12212 PR threads/10729
12213
12214 * linux-x86-low.c (update_debug_registers_callback): New.
12215 (i386_dr_low_set_addr): Use it.
12216 (i386_dr_low_get_addr): New.
12217 (i386_dr_low_set_control): Use update_debug_registers_callback.
12218 (i386_dr_low_get_control): New.
12219 (i386_dr_low_get_status): Adjust.
12220 * linux-low.c (linux_stop_lwp): New.
12221 * linux-low.h (linux_stop_lwp): Declare.
12222
12223 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12224 argument instead of a i386_debug_reg_state.
12225 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12226 a i386_debug_reg_state.
12227 (i386_insert_aligned_watchpoint): Adjust.
12228 (i386_remove_aligned_watchpoint): Adjust.
12229 (i386_low_stopped_data_address): Read the debug registers from the
12230 inferior instead of from the mirrors.
12231 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12232 (i386_dr_low_get_addr): Declare.
12233 (i386_dr_low_get_control): Declare.
12234 (i386_dr_low_get_status): Change prototype.
12235
12236 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12237 (i386_dr_low_get_addr): New.
12238 (i386_dr_low_get_control): New.
12239 (i386_dr_low_get_status): Adjust prototype. Return
12240 dr_status_mirror.
12241 (i386_initial_stuff): Clear dr_status_mirror and
12242 dr_control_mirror.
12243 (i386_get_thread_context): Adjust.
12244 (i386_set_thread_context): Adjust.
12245 (i386_thread_added): Adjust.
12246
5f21a75b
PA
122472010-08-24 Pedro Alves <pedro@codesourcery.com>
12248
12249 * linux-low.h (linux_thread_area): Delete declaration.
12250
3e4c1235
TS
122512010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12252
12253 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12254 after its termination.
12255
1971b033
PA
122562010-08-09 Pedro Alves <pedro@codesourcery.com>
12257
12258 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12259 (gdb_wants_all_stopped): Delete.
12260 (linux_wait_1): Don't call them.
12261 * server.c (handle_v_cont): Tag all threads as want-stopped.
12262 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12263 stopped as "client-wants-stopped".
12264
310444ac
PA
122652010-07-31 Pedro Alves <pedro@codesourcery.com>
12266
12267 * Makefile.in (signals_h): New.
12268 (server_h): Depend on it.
12269 (server.o): Don't depend on $(signals_def).
12270 (signals.o): Depend on $(signals_def).
12271
a19cae16
JK
122722010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12273
12274 * Makefile.in (signals_def): New.
12275 (server_h): Append include/gdb/signals.h and signals_def.
12276 (server.o): Append signals_def.
12277
30d50328
JK
122782010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12279
12280 * server.c (handle_target_event): Use target_signal_to_host for
12281 resume_info.sig initialization.
12282 * target.h (struct thread_resume) <sig>: New comment.
12283
5c3216e2
OS
122842010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12285
c6f46ca0
OS
12286 * server.c (handle_query): strcpy() the returned string from paddress()
12287 instead of sprintf().
5c3216e2
OS
12288 * utils.c (paddress): Return phex_nz().
12289
6bd31874
JB
122902010-07-07 Joel Brobecker <brobecker@adacore.com>
12291
12292 * server.c (handle_v_cont): Call mourn_inferior if process
12293 just exited.
12294 (myresume): Likewise.
12295
0fb4aa4b
PA
122962010-07-01 Pedro Alves <pedro@codesourcery.com>
12297
12298 Static tracepoints, and integration with UST.
12299
12300 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12301 * mem-break.c (uninsert_all_breakpoints)
12302 (reinsert_all_breakpoints): New.
12303 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12304 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12305 (gdb_agent_ust_loaded, helper_thread_id)
12306 (gdb_agent_helper_thread_id): New macros.
12307 (struct ipa_sym_addresses): Add addr_ust_loaded,
12308 addr_helper_thread_id, addr_cmd_buf.
12309 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12310 (in_process_agent_loaded_ust): New.
12311 (write_e_ust_not_loaded): New.
12312 (maybe_write_ipa_ust_not_loaded): New.
12313 (struct collect_static_trace_data_action): New.
12314 (enum tracepoint_type) <static_tracepoint>: New.
12315 (struct tracepoint) <handle>: Mention static tracepoints.
12316 (struct static_tracepoint_ctx): New.
12317 (CMD_BUF_SIZE): New.
12318 (add_tracepoint_action): Handle static tracepoint actions.
12319 (unprobe_marker_at): New.
12320 (clear_installed_tracepoints): Handle static tracepoints.
12321 (cmd_qtdp): Handle static tracepoints.
12322 (probe_marker_at): New.
12323 (cmd_qtstart): Handle static tracepoints.
12324 (response_tracepoint): Handle static tracepoints.
12325 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12326 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12327 (get_context_regcache): Handle static tracepoints.
12328 (do_action_at_tracepoint): Handle static tracepoint actions.
12329 (traceframe_find_block_type): Handle static trace data blocks.
12330 (traceframe_read_sdata): New.
12331 (download_tracepoints): Download static tracepoint actions.
12332 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12333 (GDB_PROBE_NAME): New.
12334 (ust_ops): New.
12335 (GET_UST_SYM): New.
12336 (USTF): New.
12337 (dlsym_ust): New.
12338 (ust_marker_to_static_tracepoint): New.
12339 (gdb_probe): New.
12340 (collect_ust_data_at_tracepoint): New.
12341 (gdb_ust_probe): New.
12342 (UNIX_PATH_MAX, SOCK_DIR): New.
12343 (gdb_ust_connect_sync_socket): New.
12344 (resume_thread, stop_thread): New.
12345 (run_inferior_command): New.
12346 (init_named_socket): New.
12347 (gdb_ust_socket_init): New.
12348 (cstr_to_hexstr): New.
12349 (next_st): New.
12350 (first_marker, next_marker): New.
12351 (response_ust_marker): New.
12352 (cmd_qtfstm, cmd_qtsstm): New.
12353 (unprobe_marker_at, probe_marker_at): New.
12354 (cmd_qtstmat, gdb_ust_thread): New.
12355 (gdb_ust_init): New.
12356 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12357 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12358 (ST_REGENTRY): New.
12359 (x86_64_st_collect_regmap): New.
12360 (X86_64_NUM_ST_COLLECT_GREGS): New.
12361 (AMD64_RIP_REGNUM): New.
12362 (supply_static_tracepoint_registers): New.
12363 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12364 (ST_REGENTRY): New.
12365 (i386_st_collect_regmap): New.
12366 (i386_NUM_ST_COLLECT_GREGS): New.
12367 (supply_static_tracepoint_registers): New.
12368 * server.c (handle_query): Handle qXfer:statictrace:read.
12369 <qSupported>: Report support for StaticTracepoints, and
12370 qXfer:statictrace:read features.
12371 * server.h (traceframe_read_sdata)
12372 (supply_static_tracepoint_registers): Declare.
12373 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12374 (unpack_varlen_hex): Include in IPA build.
12375 * Makefile.in (ustlibs, ustinc): New.
12376 (IPA_OBJS): Add remote-utils-ipa.o.
12377 ($(IPA_LIB)): Link -ldl and -lpthread.
12378 (UST_CFLAGS): New.
12379 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12380 * config.in, configure: Regenerate.
12381
9e4344e5
PA
123822010-06-20 Ian Lance Taylor <iant@google.com>
12383 Pedro Alves <pedro@codesourcery.com>
12384
12385 * linux-x86-low.c (always_true): Delete.
12386 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12387 trying to fool the compiler with always_true.
12388
c6beb2cb
PA
123892010-06-20 Pedro Alves <pedro@codesourcery.com>
12390
12391 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12392 conditions in gdbserver.
12393
d2ed6730
UW
123942010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12395
12396 * spu-low.c (spu_read_memory): Wrap around local store limit.
12397 (spu_write_memory): Likewise.
12398
4e29fb54
PA
123992010-06-15 Pedro Alves <pedro@codesourcery.com>
12400
12401 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12402 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12403 LONGEST uses.
12404 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12405 uses.
12406 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12407 uses with LONGEST uses.
12408
6a271cae
PA
124092010-06-14 Stan Shebs <stan@codesourcery.com>
12410 Pedro Alves <pedro@codesourcery.com>
12411
12412 Bytecode compiler.
12413
12414 * linux-x86-low.c: Include limits.h.
12415 (add_insns): New.
12416 (always_true): New.
12417 (EMIT_ASM): New.
12418 (EMIT_ASM32): New.
12419 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12420 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12421 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12422 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12423 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12424 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12425 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12426 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12427 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12428 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12429 (amd64_emit_void_call_2): New.
12430 (amd64_emit_ops): New.
12431 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12432 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12433 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12434 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12435 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12436 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12437 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12438 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12439 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12440 (i386_emit_stack_adjust, i386_emit_int_call_1)
12441 (i386_emit_void_call_2): New.
12442 (i386_emit_ops): New.
12443 (x86_emit_ops): New.
12444 (the_low_target): Install x86_emit_ops.
12445 * server.h (struct emit_ops): New.
12446 (get_raw_reg_func_addr): Declare.
12447 (current_insn_ptr, emit_error): Declare.
12448 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12449 (set_trace_state_variable_value): New defines.
12450 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12451 addr_get_trace_state_variable_value and
12452 addr_set_trace_state_variable_value.
12453 (symbol_list): New fields for get_raw_reg,
12454 get_trace_state_variable_value and set_trace_state_variable_value.
12455 (condfn): New typedef.
12456 (struct tracepoint): New field `compiled_cond'.
12457 (do_action_at_tracepoint): Clear compiled_cond.
12458 (get_trace_state_variable_value, set_trace_state_variable_value):
12459 Export in the IPA.
12460 (condition_true_at_tracepoint): If there's a compiled condition,
12461 run that.
12462 (current_insn_ptr, emit_error): New globals.
12463 (struct bytecode_address): New.
12464 (get_raw_reg_func_addr): New.
12465 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12466 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12467 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12468 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12469 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12470 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12471 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12472 (compile_tracepoint_condition, compile_bytecodes): New.
12473 * target.h (emit_ops): Forward declare.
12474 (struct target_ops): New field emit_ops.
12475 (target_emit_ops): New.
12476 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12477 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12478 * linux-low.c (linux_emit_ops): New.
12479 (linux_target_ops): Install it.
12480 * linux-low.h (struct linux_target_ops): New field emit_ops.
12481
92b72907
UW
124822010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12483
12484 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12485 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12486
fa593d66
PA
124872010-06-01 Pedro Alves <pedro@codesourcery.com>
12488 Stan Shebs <stan@codesourcery.com>
12489
12490 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12491 (all): Depend on $(extra_libraries).
12492 (install-only): Install the IPA.
12493 (IPA_OBJS, IPA_LIB): New.
12494 (clean): Remove the IPA lib.
12495 (IPAGENT_CFLAGS): New.
12496 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12497 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12498 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12499 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12500 * configure.ac: Check for atomic builtins support in the compiler.
12501 (IPA_DEPFILES, extra_libraries): Define.
12502 * configure.srv (ipa_obj): Add description.
12503 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12504 (i[34567]86-*-linux*): Set ipa_obj.
12505 (x86_64-*-linux*): Set ipa_obj.
12506 * linux-low.c (stabilizing_threads): New.
12507 (supports_fast_tracepoints): New.
12508 (linux_detach): Stabilize threads before detaching.
12509 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12510 the lwp is either not stabilizing, or is moving out of a jump pad.
12511 (linux_fast_tracepoint_collecting): New.
12512 (maybe_move_out_of_jump_pad): New.
12513 (enqueue_one_deferred_signal): New.
12514 (dequeue_one_deferred_signal): New.
12515 (linux_wait_for_event_1): If moving out of a jump pad, defer
12516 pending signals to later.
12517 (linux_stabilize_threads): New.
12518 (linux_wait_1): Check if threads need moving out of jump pads, and
12519 do it if so.
12520 (stuck_in_jump_pad_callback): New.
12521 (move_out_of_jump_pad_callback): New.
12522 (lwp_running): New.
12523 (linux_resume_one_lwp): Handle moving out of jump pads.
12524 (linux_set_resume_request): Dequeue deferred signals.
12525 (need_step_over_p): Also step over fast tracepoint jumps.
12526 (start_step_over): Also uninsert fast tracepoint jumps.
12527 (finish_step_over): Also reinsert fast tracepoint jumps.
12528 (linux_install_fast_tracepoint_jump): New.
12529 (linux_target_ops): Install linux_stabilize_threads and
12530 linux_install_fast_tracepoint_jump_pad.
12531 * linux-low.h (linux_target_ops) <get_thread_area,
12532 install_fast_tracepoint_jump_pad>: New fields.
12533 (struct lwp_info) <collecting_fast_tracepoint,
12534 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12535 (linux_get_thread_area): Declare.
12536 * linux-x86-low.c (jump_insn): New.
12537 (x86_get_thread_area): New.
12538 (append_insns): New.
12539 (push_opcode): New.
12540 (amd64_install_fast_tracepoint_jump_pad): New.
12541 (i386_install_fast_tracepoint_jump_pad): New.
12542 (x86_install_fast_tracepoint_jump_pad): New.
12543 (the_low_target): Install x86_get_thread_area and
12544 x86_install_fast_tracepoint_jump_pad.
12545 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12546 (struct fast_tracepoint_jump): New.
12547 (fast_tracepoint_jump_insn): New.
12548 (fast_tracepoint_jump_shadow): New.
12549 (find_fast_tracepoint_jump_at): New.
12550 (fast_tracepoint_jump_here): New.
12551 (delete_fast_tracepoint_jump): New.
12552 (set_fast_tracepoint_jump): New.
12553 (uninsert_fast_tracepoint_jumps_at): New.
12554 (reinsert_fast_tracepoint_jumps_at): New.
12555 (set_breakpoint_at): Use write_inferior_memory.
12556 (uninsert_raw_breakpoint): Use write_inferior_memory.
12557 (check_mem_read): Mask out fast tracepoint jumps.
12558 (check_mem_write): Mask out fast tracepoint jumps.
12559 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12560 (set_fast_tracepoint_jump): Declare.
12561 (delete_fast_tracepoint_jump)
12562 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12563 (reinsert_fast_tracepoint_jumps_at): Declare.
12564 * regcache.c: Don't compile many functions when building the
12565 in-process agent library.
12566 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12567 the register buffer in the heap.
12568 (free_register_cache): If the register buffer isn't owned by the
12569 regcache, don't free it.
12570 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12571 pre-existing register caches.
12572 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12573 type.
12574 (convert_ascii_to_int): : Constify `from' parameter type.
12575 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12576 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12577 the needed buffer in-place.
12578 (relocate_instruction): New.
12579 * server.c (handle_query) <qSymbols>: If the target supports
12580 tracepoints, give it a chance of looking up symbols. Report
12581 support for fast tracepoints.
12582 (handle_status): Stabilize threads.
12583 (process_serial_event): Adjust.
12584 * server.h (struct fast_tracepoint_jump): Forward declare.
12585 (struct process_info) <fast_tracepoint_jumps>: New field.
12586 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12587 (decode_X_packet, decode_M_packet): Adjust.
12588 (relocate_instruction): Declare.
12589 (in_process_agent_loaded): Declare.
12590 (tracepoint_look_up_symbols): Declare.
12591 (struct fast_tpoint_collect_status): Declare.
12592 (fast_tracepoint_collecting): Declare.
12593 (force_unlock_trace_buffer): Declare.
12594 (handle_tracepoint_bkpts): Declare.
12595 (initialize_low_tracepoint)
12596 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12597 * target.h (struct target_ops) <stabilize_threads,
12598 install_fast_tracepoint_jump_pad>: New fields.
12599 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12600 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12601 [HAVE_STDINT_H]: Include stdint.h.
12602 (trace_debug_1): Rename to ...
12603 (trace_vdebug): ... this.
12604 (trace_debug): Rename to ...
12605 (trace_debug_1): ... this. Add `level' parameter.
12606 (trace_debug): New.
12607 (ATTR_USED, ATTR_NOINLINE): New.
12608 (IP_AGENT_EXPORT): New.
12609 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12610 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12611 (about_to_request_buffer_space, trace_buffer_is_full)
12612 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12613 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12614 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12615 (traceframe_write_count, traceframes_created)
12616 (trace_state_variables)
12617 New renaming defines.
12618 (struct ipa_sym_addresses): New.
12619 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12620 (symbol_list): New.
12621 (ipa_sym_addrs): New.
12622 (all_tracepoint_symbols_looked_up): New.
12623 (in_process_agent_loaded): New.
12624 (write_e_ipa_not_loaded): New.
12625 (maybe_write_ipa_not_loaded): New.
12626 (tracepoint_look_up_symbols): New.
12627 (debug_threads) [IN_PROCESS_AGENT]: New.
12628 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12629 (UNKNOWN_SIDE_EFFECTS): New.
12630 (stop_tracing): New.
12631 (flush_trace_buffer): New.
12632 (stop_tracing_bkpt): New.
12633 (flush_trace_buffer_bkpt): New.
12634 (read_inferior_integer): New.
12635 (read_inferior_uinteger): New.
12636 (read_inferior_data_pointer): New.
12637 (write_inferior_data_pointer): New.
12638 (write_inferior_integer): New.
12639 (write_inferior_uinteger): New.
12640 (struct collect_static_trace_data_action): Delete.
12641 (enum tracepoint_type): New.
12642 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12643 <actions_str, step_actions, step_actions_str>: Only include in
12644 GDBserver.
fa593d66
PA
12645 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12646 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12647 (tracepoints): Use IP_AGENT_EXPORT.
12648 (last_tracepoint): Don't include in the IPA.
12649 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12650 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12651 (alloced_trace_state_variables): New.
12652 (trace_state_variables): Use IP_AGENT_EXPORT.
12653 (traceframe_t): Delete unused variable.
12654 (circular_trace_buffer): Don't include in the IPA.
12655 (trace_buffer_start): Delete.
12656 (struct trace_buffer_control): New.
12657 (trace_buffer_free): Delete.
12658 (struct ipa_trace_buffer_control): New.
12659 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12660 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12661 New.
12662 (trace_buffer_ctrl): New.
12663 (TRACE_BUFFER_CTRL_CURR): New.
12664 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12665 Reimplement as macros.
12666 (trace_buffer_wrap): Delete.
12667 (traceframe_write_count, traceframe_read_count)
12668 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12669 (struct tracepoint_hit_ctx) <type>: New field.
12670 (struct fast_tracepoint_ctx): New.
12671 (memory_barrier): New.
12672 (cmpxchg): New.
12673 (record_tracepoint_error): Update atomically in the IPA.
12674 (clear_inferior_trace_buffer): New.
12675 (about_to_request_buffer_space): New.
12676 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12677 updating the same buffer.
12678 (add_tracepoint): Default the tracepoint's type to trap
12679 tracepoint, and orig_size to -1.
12680 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12681 internal variables.
12682 (create_trace_state_variable): New parameter `gdb'. Handle it.
12683 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12684 (cmd_qtdp): Handle fast tracepoints.
12685 (cmd_qtdv): Adjust.
12686 (max_jump_pad_size): New.
12687 (gdb_jump_pad_head): New.
12688 (get_jump_space_head): New.
12689 (claim_jump_space): New.
12690 (sort_tracepoints): New.
12691 (MAX_JUMP_SIZE): New.
12692 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12693 IPA.
12694 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12695 support. Upload fast traceframes, and delete internal IPA
12696 breakpoints.
12697 (stop_tracing_handler): New.
12698 (flush_trace_buffer_handler): New.
12699 (cmd_qtstop): Upload fast tracepoints.
12700 (response_tracepoint): Handle fast tracepoints.
12701 (tracepoint_finished_step): Upload fast traceframes. Set the
12702 tracepoint hit context's tracepoint type.
12703 (handle_tracepoint_bkpts): New.
12704 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12705 type. Add comment about fast tracepoints.
12706 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12707 non-existing action_str field.
12708 (get_context_regcache): Handle fast tracepoints.
12709 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12710 to the regcache.
12711 (fast_tracepoint_from_jump_pad_address): New.
12712 (fast_tracepoint_from_ipa_tpoint_address): New.
12713 (collecting_t): New.
12714 (force_unlock_trace_buffer): New.
12715 (fast_tracepoint_collecting): New.
12716 (collecting): New.
12717 (gdb_collect): New.
12718 (write_inferior_data_ptr): New.
12719 (target_tp_heap): New.
12720 (target_malloc): New.
12721 (download_agent_expr): New.
12722 (UALIGN): New.
12723 (download_tracepoints): New.
12724 (download_trace_state_variables): New.
12725 (upload_fast_traceframes): New.
12726 (IPA_FIRST_TRACEFRAME): New.
12727 (IPA_NEXT_TRACEFRAME_1): New.
12728 (IPA_NEXT_TRACEFRAME): New.
12729 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12730 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12731 (gdb_jump_pad_buffer_end): New.
12732 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12733 (initialize_tracepoint): Adjust.
12734 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12735 buffer. Initialize the low module.
12736 * utils.c (PREFIX, TOOLNAME): New.
12737 (malloc_failure): Use PREFIX.
12738 (error): In the IPA, an error causes an exit.
12739 (fatal, warning): Use PREFIX.
12740 (internal_error): Use TOOLNAME.
12741 (NUMCELLS): Increase to 10.
12742 * configure, config.in: Regenerate.
12743
d149dd1d
PA
127442010-06-01 Pedro Alves <pedro@codesourcery.com>
12745
12746 * server.c (handle_query) <qSupported>: Do two passes over the
12747 qSupported string to avoid nesting strtok.
12748
f6528abd
JK
127492010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12750
12751 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12752 (CDEPS): New.
12753 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12754 -Wl,--dynamic-list.
12755 * configure: Regenerate.
12756 * proc-service.list: New.
12757
ca2a87a0
JK
127582010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12759
12760 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12761 New comment.
12762
363a6e9f
OS
127632010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12764
12765 * gdbreplay.c (remote_open): Check error return from socket() call by
12766 its equality to -1 not by it being negative.
12767 * remote-utils.c (remote_open): Likewise.
12768
d23b6cb1
PA
127692010-05-23 Pedro Alves <pedro@codesourcery.com>
12770
12771 * config.h: Regenerate.
12772
28d3cf85
MK
127732010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12774
12775 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12776 doesn't provide PTRACE_GET_THREAD_AREA.
12777
fea36a59
MK
127782010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12779
12780 * linux-m68k-low.c: Include <asm/ptrace.h>
12781 (ps_get_thread_area): Implement.
12782
24b066ba
DE
127832010-05-03 Doug Evans <dje@google.com>
12784
12785 * event-loop.c (struct callback_event): New struct.
12786 (callback_list): New global.
12787 (append_callback_event, delete_callback_event): New functions.
12788 (process_callback): New function.
12789 (start_event_loop): Call it.
12790 * remote-utils.c (NOT_SCHEDULED): Define.
12791 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12792 moved out of readchar.
12793 (readchar): Rewrite. Call reschedule before returning.
12794 (reset_readchar): New function.
12795 (remote_close): Call it.
12796 (process_remaining, reschedule): New functions.
12797 * server.h (callback_handler_func): New typedef.
12798 (append_callback_event, delete_callback_event): Declare.
12799
9836d6ea
PA
128002010-05-03 Pedro Alves <pedro@codesourcery.com>
12801
12802 * proc-service.c (ps_pglobal_lookup): Use
12803 thread_db_look_up_one_symbol.
12804 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12805 parameter. Use it instead of all_symbols_looked_up.
12806 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12807 field.
12808 (all_symbols_looked_up): Don't declare.
12809 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12810 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12811 field.
12812 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12813 Set all_symbols_looked_up here.
12814 (thread_db_look_up_one_symbol): New.
12815 (thread_db_get_tls_address): Adjust.
12816 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12817 thread_db object on the heap, and tentatively set it in the
12818 process structure.
12819 (thread_db_init): Don't set all_symbols_looked_up here.
12820 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12821
7984d532
PA
128222010-05-03 Pedro Alves <pedro@codesourcery.com>
12823
12824 * linux-low.c (linux_kill, linux_detach): Adjust.
12825 (status_pending_p_callback): Remove redundant statement. Check
12826 for !TARGET_WAITIKIND_IGNORE, instead of
12827 TARGET_WAITKIND_STOPPED.
12828 (handle_tracepoints): Make sure LWP is locked. Adjust.
12829 (linux_wait_for_event_1): Adjust.
12830 (linux_cancel_breakpoints): New.
12831 (unsuspend_one_lwp): New.
12832 (unsuspend_all_lwps): New.
12833 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12834 (send_sigstop_callback): Change return type to int, add new
12835 `except' parameter and handle it.
12836 (suspend_and_send_sigstop_callback): New.
12837 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12838 pass them down. If SUSPEND, also increment the lwp's suspend
12839 count.
12840 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12841 (need_step_over_p): Don't consider suspended LWPs.
12842 (start_step_over): Adjust.
12843 (proceed_one_lwp): Change return type to int, add new `except'
12844 parameter and handle it.
12845 (unsuspend_and_proceed_one_lwp): New.
12846 (proceed_all_lwps): Use find_inferior instead of
12847 for_each_inferior.
12848 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12849 also decrement the suspend count of LWPs. Pass `except' down,
12850 instead of hacking its suspend count.
12851 (linux_pause_all): Add `freeze' parameter. Adjust.
12852 (linux_unpause_all): New.
12853 (linux_target_ops): Install linux_unpause_all.
12854 * server.c (handle_status): Adjust.
12855 * target.h (struct target_ops): New fields `unpause_all' and
12856 `cancel_breakpoints'. Add new parameter to `pause_all'.
12857 (pause_all): Add new `freeze' parameter.
12858 (unpause_all): New.
12859 (cancel_breakpoints): New.
12860 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12861 cancel breakpoints.
12862 (cmd_qtstart): Pause threads.
12863 (stop_tracing): Pause threads, and cancel breakpoints.
12864 * win32-low.c (win32_target_ops): Adjust.
12865
e471f25b
PA
128662010-05-03 Pedro Alves <pedro@codesourcery.com>
12867
12868 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12869 the inferior right away from here...
12870 (linux_wait_1): ... to here, and adjust to check the thread's
12871 last_resume_kind instead of the lwp's step or stop_expected flags.
12872
1915ef4f
PA
128732010-05-02 Pedro Alves <pedro@codesourcery.com>
12874
12875 * README: Use consistent `GDB' and `GDBserver' spellings.
12876
f9e39928
PA
128772010-05-02 Pedro Alves <pedro@codesourcery.com>
12878
12879 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12880 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12881 (linux_detach_one_lwp): Assume the lwp is stopped.
12882 (any_thread_of): Delete.
12883 (linux_detach): Stop all lwps here. Don't blindly delete all
12884 breakpoints.
12885 (delete_lwp_callback): New.
12886 (linux_mourn): Delete all lwps of the process that is gone.
12887 (linux_wait_1): Don't delete the last lwp of the process here.
12888 * mem-break.h (mark_breakpoints_out): Declare.
12889 * mem-break.c (mark_breakpoints_out): New.
12890 (free_all_breakpoints): Use it.
12891 * server.c (handle_target_event): If the process is gone, mark
12892 breakpoints out.
12893 * thread-db.c (struct thread_db) <create_bp>: New field.
12894 (thread_db_enable_reporting): Fix prototype. Store a thread event
12895 breakpoint reference in the thread_db struct.
12896 (thread_db_load_search): Clear the thread_db object.
12897 (try_thread_db_load_1): Ditto.
12898 (switch_to_process): New.
12899 (disable_thread_event_reporting): Use it.
12900 (remove_thread_event_breakpoints): New.
12901 (thread_db_detach, thread_db_mourn): Use it.
12902
1e7fc18c
PA
129032010-05-01 Pedro Alves <pedro@codesourcery.com>
12904
12905 * linux-low.c (linux_enable_event_reporting): New.
12906 (linux_wait_for_event_1, handle_extended_wait): Use it.
12907
02fc4de7
PA
129082010-04-30 Pedro Alves <pedro@codesourcery.com>
12909
12910 * linux-low.c (linux_kill_one_lwp, linux_kill)
12911 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12912 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12913 SIGSTOP even if the LWP is stopped.
12914 (send_sigstop_callback): New.
12915 (stop_all_lwps): Use send_sigstop_callback instead.
12916 (linux_resume_one_thread): Adjust.
12917 (proceed_one_lwp): Still proceed an LWP that the client has
12918 requested to stop, if we haven't reported it as stopped yet. Make
12919 sure that LWPs the client want stopped, have a pending SIGSTOP.
12920
bc3b5632
DE
129212010-04-26 Doug Evans <dje@google.com>
12922
ae1ada35
DE
12923 * server.c (handle_general_set): Make static.
12924
bc3b5632
DE
12925 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12926 Print received char after testing for error/eof instead of before.
12927 (input_interrupt): Tweak comment.
12928
65730243
DE
129292010-04-23 Doug Evans <dje@google.com>
12930
12931 * server.c (start_inferior): Print inferior argv if --debug.
12932
a8ae7dc0
AR
129332010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12934
12935 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12936 * nto-x86-low.c: Include server.h
12937
1c07cc19
PM
129382010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12939
12940 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12941 be consistent with other sources of this directory.
12942 (init_registers_amd64): Correct name of source file of this function
12943 in the comment.
12944
e0a61e09
PM
129452010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12946
12947 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12948 64-bit executables.
12949
54709339
PM
129502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12951
12952 * win32-i386-low.c: Add 64-bit support.
12953 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12954 (init_registers_amd64): Declare.
12955 (mappings): Add 64-bit version of array.
12956 (init_windows_x86): New function.
12957 (the_low_target): Change init_arch field to init_windows_x86.
12958
e8f0053d
PM
129592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12960
12961 * win32-low.c: Adapt to support also 64-bit architecture.
12962 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12963 (get_image_name): Use SIZE_T type for local variable `done'.
12964 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12965 (toolhelp_get_dll_name): Idem.
12966 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12967 Use uintptr_t typecast to avoid warning.
12968 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12969 (handle_exception): Use phex_nz to avoid warning.
12970 (win32_wait): Remove unused local variable `process'.
12971
c481e77e
PM
129722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12973
12974 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12975 `amd64-avx.o'.
12976
12ea4b69
PM
129772010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12978
12979 * configure.ac: Use `ws2_32' library for srv_mingw.
12980 * configure: Regenerate.
12981 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12982 * remote-utils.c: Likewise.
12983
f6d1620c
L
129842010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12985
12986 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12987 if __x86_64__ is defined.
12988
8e642873
PM
129892010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12990
12991 * configure: Regenerate.
12992
711e434b
PM
129932010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12994
12995 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12996 * target.h (target_ops): New get_tib_address field.
12997 * win32-low.h (win32_thread_info): Add thread_local_base field.
12998 * win32-low.c (child_add_thread): Add tlb argument.
12999 Set thread_local_base field to TLB.
13000 (get_child_debug_event): Adapt to child_add_thread change.
13001 (win32_get_tib_address): New function.
13002 (win32_target_ops): Set get_tib_address field to
13003 win32_get_tib_address.
13004 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13005
505106cd
PA
130062010-04-12 Pedro Alves <pedro@codesourcery.com>
13007
505106cd
PA
13008 * linux-low.c (linux_mourn): Also remove the process.
13009 * server.c (handle_target_event): Don't remove the process here.
13010 * nto-low.c (nto_mourn): New.
13011 (nto_target_ops): Install it.
13012 * spu-low.c (spu_mourn): New.
13013 (spu_target_ops): Install it.
13014 * win32-low.c (win32_mourn): New.
13015 (win32_target_ops): Install it.
13016
e8470a06
PA
130172010-04-12 Pedro Alves <pedro@codesourcery.com>
13018
13019 * server.h (buffer_xml_printf): Remove redundant `;'.
13020
45ba0d02
PA
130212010-04-12 Pedro Alves <pedro@codesourcery.com>
13022
13023 * regcache.c (set_register_cache): Invalidate regcaches before
13024 changing the register cache layout.
13025 (regcache_invalidate_one): Allow a NULL regcache.
13026 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13027 regcaches before changing the register cache layout or the target
13028 regsets.
13029
59e04013
L
130302010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13031
13032 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13033 variable warning on Linux/x86-64.
13034
8336d594
PA
130352010-04-11 Pedro Alves <pedro@codesourcery.com>
13036
13037 GDBserver disconnected tracing support.
13038
13039 * linux-low.c (linux_remove_process): Delete.
13040 (add_lwp): Don't set last_resume_kind here.
13041 (linux_kill): Use `mourn'.
13042 (linux_detach): Use `thread_db_detach', and `mourn'.
13043 (linux_mourn): New.
13044 (linux_attach_lwp_1): Adjust comment.
13045 (linux_attach): last_resume_kind moved the thread_info; adjust.
13046 (status_pending_p_callback): Adjust.
13047 (linux_wait_for_event_1): Adjust.
13048 (count_events_callback, select_singlestep_lwp_callback)
13049 (select_event_lwp_callback, cancel_breakpoints_callback)
13050 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13051 (proceed_one_lwp): Adjust.
13052 (linux_async): Add debug output.
13053 (linux_thread_stopped): New.
13054 (linux_pause_all): New.
13055 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13056 linux_pause_all.
13057 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13058 (thread_db_free): Delete declaration.
13059 (thread_db_detach, thread_db_mourn): Declare.
13060 * thread-db.c (thread_db_init): Use thread_db_mourn.
13061 (thread_db_free): Delete, split in two.
13062 (disable_thread_event_reporting): New.
13063 (thread_db_detach): New.
13064 (thread_db_mourn): New.
13065
13066 * server.h (struct thread_info) <last_resume_kind>: New field.
13067 <attached>: Add comment.
13068 <gdb_detached>: New field.
13069 (handler_func): Change return type to int.
13070 (handle_serial_event, handle_target_event): Ditto.
13071 (gdb_connected): Declare.
13072 (tracing): Delete.
13073 (disconnected_tracing): Declare.
13074 (stop_tracing): Declare.
13075
13076 * server.c (handle_query) <qSupported>: Report support for
13077 disconnected tracing.
13078 (queue_stop_reply_callback): Account for running threads.
13079 (gdb_wants_thread_stopped): New.
13080 (gdb_wants_all_threads_stopped): New.
13081 (gdb_reattached_process): New.
13082 (handle_status): Clear the `gdb_detached' flag of all processes.
13083 In all-stop, stop all threads.
13084 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13085 (process_serial_event): If the remote connection breaks, or if an
13086 exit was forced with "monitor exit", force an event loop exit.
13087 Handle disconnected tracing on detach.
13088 (handle_serial_event): Adjust.
13089 (handle_target_event): If GDB isn't connected, forward events back
13090 to the inferior, unless the last process exited, in which case,
13091 exit gdbserver. Adjust interface.
13092
13093 * remote-utils.c (remote_open): Don't block in accept. Instead
13094 register an event loop source on the listen socket file
13095 descriptor. Refactor bits into ...
13096 (listen_desc): ... this new global.
13097 (gdb_connected): ... this new function.
13098 (enable_async_notification): ... this new function.
13099 (handle_accept_event): ... this new function.
13100 (remote_close): Clear remote_desc.
13101
13102 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13103
13104 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13105 New fields.
13106 (mourn_inferior): Define.
13107 (target_process_qsupported): Avoid the dangling else problem.
13108 (thread_stopped): Define.
13109 (pause_all): Define.
13110 (target_waitstatus_to_string): Declare.
13111 * target.c (target_waitstatus_to_string): New.
13112
13113 * tracepoint.c (tracing): Make extern.
13114 (disconnected_tracing): New.
13115 (stop_tracing): Make extern. Handle tracing stops due to GDB
13116 disconnecting.
13117 (cmd_qtdisconnected): New.
13118 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13119 (handle_tracepoint_general_set): Handle QTDisconnected.
13120
13121 * event-loop.c (event_handler_func): Change return type to int.
13122 (process_event): Bail out if the event handler wants the event
13123 loop to stop.
13124 (handle_file_event): Ditto.
13125 (start_event_loop): Bail out if the event handler wants the event
13126 loop to stop.
13127
13128 * nto-low.c (nto_target_ops): Adjust.
13129 * spu-low.c (spu_wait): Don't remove the process here.
13130 (spu_target_ops): Adjust.
13131 * win32-low.c (win32_wait): Don't remove the process here.
13132 (win32_target_ops): Adjust.
13133
5d267c4c
PA
131342010-04-11 Pedro Alves <pedro@codesourcery.com>
13135
13136 * regcache.c (realloc_register_cache): Invalidate inferior's
13137 regcache before recreating it.
13138
623ccd72
PA
131392010-04-09 Pedro Alves <pedro@codesourcery.com>
13140
13141 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13142
219f2f23
PA
131432010-04-09 Stan Shebs <stan@codesourcery.com>
13144 Pedro Alves <pedro@codesourcery.com>
13145
13146 * server.h (LONGEST): New.
13147 (struct thread_info) <while_stepping>: New field.
13148 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13149 Declare.
13150 (initialize_tracepoint, handle_tracepoint_general_set)
13151 (handle_tracepoint_query, tracepoint_finished_step)
13152 (tracepoint_was_hit, release_while_stepping_state_list):
13153 (current_traceframe): Declare.
13154 * server.c (handle_general_set): Handle tracepoint packets.
13155 (read_memory): New.
13156 (write_memory): New.
13157 (handle_search_memory_1): Use read_memory.
13158 (handle_query): Report support for conditional tracepoints, trace
13159 state variables, and tracepoint sources. Handle tracepoint
13160 queries.
13161 (main): Initialize the tracepoints module.
13162 (process_serial_event): Handle traceframe reads/writes.
13163
13164 * linux-low.c (handle_tracepoints): New.
13165 (linux_wait_1): Call it.
13166 (linux_resume_one_lwp): Handle while-stepping.
13167 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13168 (linux_target_ops): Install them.
13169 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13170 New field.
13171 * linux-x86-low.c (x86_supports_tracepoints): New.
13172 (the_low_target). Install it.
13173
13174 * mem-break.h (delete_breakpoint): Declare.
13175 * mem-break.c (delete_breakpoint): Make external.
13176
13177 * target.h (struct target_ops): Add `supports_tracepoints',
13178 `read_pc', and `write_pc' fields.
13179 (target_supports_tracepoints): Define.
13180 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13181 (phex_nz): New.
13182
13183 * regcache.h (struct regcache) <registers_owned>: New field.
13184 (init_register_cache, regcache_cpy): Declare.
13185 (regcache_read_pc, regcache_write_pc): Declare.
13186 (register_cache_size): Declare.
13187 (supply_regblock): Declare.
13188 * regcache.c (init_register_cache): New.
13189 (new_register_cache): Use it.
13190 (regcache_cpy): New.
13191 (register_cache_size): New.
13192 (supply_regblock): New.
13193 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13194
219f2f23
PA
13195 * tracepoint.c: New.
13196
13197 * Makefile.in (OBS): Add tracepoint.o.
13198 (tracepoint.o): New rule.
13199
3a13a53b
L
132002010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13201
13202 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13203 (i386-mmx.o): New.
13204 (i386-mmx.c): Likewise.
13205 (i386-mmx-linux.o): Likewise.
13206 (i386-mmx-linux.c): Likewise.
13207
13208 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13209 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13210 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13211 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13212
13213 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13214 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13215 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13216
1570b33e
L
132172010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13218
13219 * Makefile.in (clean): Updated.
13220 (i386-avx.o): New.
13221 (i386-avx.c): Likewise.
13222 (i386-avx-linux.o): Likewise.
13223 (i386-avx-linux.c): Likewise.
13224 (amd64-avx.o): Likewise.
13225 (amd64-avx.c): Likewise.
13226 (amd64-avx-linux.o): Likewise.
13227 (amd64-avx-linux.c): Likewise.
13228
13229 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13230 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13231 (srv_amd64_regobj): Add amd64-avx.o.
13232 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13233 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13234 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13235 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13236 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13237 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13238 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13239
13240 * i387-fp.c: Include "i386-xstate.h".
13241 (i387_xsave): New.
13242 (i387_cache_to_xsave): Likewise.
13243 (i387_xsave_to_cache): Likewise.
13244 (x86_xcr0): Likewise.
13245
13246 * i387-fp.h (i387_cache_to_xsave): Likewise.
13247 (i387_xsave_to_cache): Likewise.
13248 (x86_xcr0): Likewise.
13249
13250 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13251 * linux-crisv32-low.c (target_regsets): Likewise.
13252 * linux-m68k-low.c (target_regsets): Likewise.
13253 * linux-mips-low.c (target_regsets): Likewise.
13254 * linux-ppc-low.c (target_regsets): Likewise.
13255 * linux-s390-low.c (target_regsets): Likewise.
13256 * linux-sh-low.c (target_regsets): Likewise.
13257 * linux-sparc-low.c (target_regsets): Likewise.
13258 * linux-xtensa-low.c (target_regsets): Likewise.
13259
13260 * linux-low.c: Include <sys/uio.h>.
13261 (regsets_fetch_inferior_registers): Support nt_type.
13262 (regsets_store_inferior_registers): Likewise.
13263 (linux_process_qsupported): New.
13264 (linux_target_ops): Add linux_process_qsupported.
13265
13266 * linux-low.h (regset_info): Add nt_type.
13267 (linux_target_ops): Add process_qsupported.
13268
13269 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13270 and <sys/uio.h>.
13271 (init_registers_i386_avx_linux): New.
13272 (init_registers_amd64_avx_linux): Likewise.
13273 (xmltarget_i386_linux_no_xml): Likewise.
13274 (xmltarget_amd64_linux_no_xml): Likewise.
13275 (PTRACE_GETREGSET): Likewise.
13276 (PTRACE_SETREGSET): Likewise.
13277 (x86_fill_xstateregset): Likewise.
13278 (x86_store_xstateregset): Likewise.
13279 (use_xml): Likewise.
13280 (x86_linux_update_xmltarget): Likewise.
13281 (x86_linux_process_qsupported): Likewise.
13282 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13283 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13284 init_registers_i386_linux here. Call
13285 x86_linux_update_xmltarget.
13286 (the_low_target): Add x86_linux_process_qsupported.
13287
13288 * server.c (handle_query): Call target_process_qsupported.
13289
13290 * target.h (target_ops): Add process_qsupported.
13291 (target_process_qsupported): New.
13292
fc7238bb
PA
132932010-04-03 Pedro Alves <pedro@codesourcery.com>
13294
13295 * inferiors.c (add_thread): Set last_status kind to
13296 TARGET_WAITKIND_IGNORE.
13297 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13298 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13299 (linux_wait_1): Move `thread' local definition to block that uses
13300 it. Don't NULL initialize `event_child'.
13301 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13302 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13303 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13304
bdabb078
PA
133052010-04-01 Pedro Alves <pedro@codesourcery.com>
13306
13307 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13308 an extended waitstatus, or by a watchpoint.
13309 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13310 thread was stepping or has been stopped by a watchpoint.
13311
d3bbe7a0
PA
133122010-04-01 Pedro Alves <pedro@codesourcery.com>
13313
13314 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13315 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13316 of another, then delete the previous, and validate all
13317 breakpoints.
13318 (validate_inserted_breakpoint): New.
13319 (delete_disabled_breakpoints): New.
13320 (validate_breakpoints): New.
13321 (check_mem_read): Validate breakpoints before trusting their
13322 shadow. Delete disabled breakpoints.
13323 (check_mem_write): Validate breakpoints before trusting they
13324 should be inserted. Delete disabled breakpoints.
13325 * mem-break.h (validate_breakpoints):
13326 * server.c (handle_query): Validate breakpoints when we see a
13327 qSymbol query.
13328
8b07ae33
PA
133292010-04-01 Pedro Alves <pedro@codesourcery.com>
13330
13331 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13332 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13333 if we could tell there's a GDB breakpoint at stop_pc.
13334 (need_step_over_p): Don't do a step over if we find a GDB
13335 breakpoint at the resume PC.
13336
13337 * mem-break.c (struct raw_breakpoint): New.
13338 (enum bkpt_type): New type `gdb_breakpoint'.
13339 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13340 fields. New field `raw'.
13341 (find_raw_breakpoint_at): New.
13342 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13343 breakpoint instead.
13344 (set_breakpoint_at): Adjust.
13345 (delete_raw_breakpoint): New.
13346 (release_breakpoint): New.
13347 (delete_breakpoint): Rename to...
13348 (delete_breakpoint_1): ... this. Add proc parameter. Use
13349 release_breakpoint. Return ENOENT.
13350 (delete_breakpoint): Reimplement.
13351 (find_breakpoint_at): Delete.
13352 (find_gdb_breakpoint_at): New.
13353 (delete_breakpoint_at): Delete.
13354 (set_gdb_breakpoint_at): New.
13355 (delete_gdb_breakpoint_at): New.
13356 (gdb_breakpoint_here): New.
13357 (set_reinsert_breakpoint): Use release_breakpoint.
13358 (uninsert_breakpoint): Rename to ...
13359 (uninsert_raw_breakpoint): ... this.
13360 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13361 (reinsert_raw_breakpoint): Change parameter type to
13362 raw_breakpoint.
13363 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13364 instead.
13365 (check_breakpoints): Adjust. Use release_breakpoint.
13366 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13367 (breakpoint_inserted_here): Ditto.
13368 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13369 Don't trust the breakpoint's shadow if it is not inserted.
13370 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13371 (delete_all_breakpoints): Adjust.
13372 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13373 use delete_breakpoint_1.
13374
13375 * mem-break.h (breakpoints_supported): Delete declaration.
13376 (set_gdb_breakpoint_at): Declare.
13377 (gdb_breakpoint_here): Declare.
13378 (delete_breakpoint_at): Delete.
13379 (delete_gdb_breakpoint_at): Declare.
13380
13381 * server.h (struct raw_breakpoint): Forward declare.
13382 (struct process_info): New field `raw_breakpoints'.
13383
13384 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13385 breakpoints.
13386
6bf5e0ba
PA
133872010-03-24 Pedro Alves <pedro@codesourcery.com>
13388
13389 * linux-low.c (status_pending_p_callback): Fix comment.
13390 (linux_wait_for_event_1): Move most of the internal breakpoint
13391 handling from here...
13392 (linux_wait_1): ... to here.
13393 (count_events_callback): New.
13394 (select_singlestep_lwp_callback): New.
13395 (select_event_lwp_callback): New.
13396 (cancel_breakpoints_callback): New.
13397 (select_event_lwp): New.
13398 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13399 priority to all LWPs that have had events that should be reported
13400 to the client. Cancel breakpoints when about to reporting the
13401 event to the client, not while stopping lwps. No longer cancel
13402 finished single-steps here.
13403 (cancel_finished_single_step): Delete.
13404 (cancel_finished_single_steps): Delete.
13405
414a389f
PA
134062010-03-24 Pedro Alves <pedro@codesourcery.com>
13407
13408 * mem-break.c (enum bkpt_type): New.
13409 (struct breakpoint): New field `type'.
13410 (set_breakpoint_at): Change return type to struct breakpoint
13411 pointer. Set type to `other_breakpoint' by default.
13412 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13413 in the breakpoint list.
13414 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13415 (reinsert_breakpoint): Rename to ...
13416 (reinsert_raw_breakpoint): ... this.
13417 (reinsert_breakpoints_at): Adjust.
13418 * mem-break.h (struct breakpoint): Declare.
13419 (set_breakpoint_at): Change return type to struct breakpoint
13420 pointer.
13421
2280c721
PA
134222010-03-24 Pedro Alves <pedro@codesourcery.com>
13423
13424 * server.c (handle_query): Assign, not compare.
13425
d50171e4
PA
134262010-03-24 Pedro Alves <pedro@codesourcery.com>
13427
13428 Teach linux gdbserver to step-over-breakpoints.
13429
13430 * linux-low.c (can_hardware_single_step): New.
13431 (supports_breakpoints): New.
13432 (handle_extended_wait): If stopping threads, read the stop pc of
13433 the new cloned LWP.
13434 (get_pc): New.
13435 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13436 low target doesn't support retrieving the PC.
13437 (add_lwp): Set last_resume_kind to resume_continue.
13438 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13439 (linux_attach): Don't clear stop_expected. Set the lwp's
13440 last_resume_kind to resume_stop.
13441 (linux_detach_one_lwp): Don't check for removed breakpoints.
13442 (check_removed_breakpoint): Delete.
13443 (status_pending_p): Rename to ...
13444 (status_pending_p_callback): ... this. Don't check for removed
13445 breakpoints. Don't consider threads that are stopped from GDB's
13446 perspective.
13447 (linux_wait_for_lwp): Always read the stop_pc here.
13448 (cancel_breakpoint): New.
13449 (step_over_bkpt): New global.
13450 (linux_wait_for_event_1): Implement stepping over breakpoints.
13451 (gdb_wants_lwp_stopped): New.
13452 (gdb_wants_all_stopped): New.
13453 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13454 single-step traps here. Store the thread's last reported target
13455 wait status.
13456 (send_sigstop): Don't clear stop_expected. Always set it,
13457 instead.
13458 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13459 (cancel_finished_single_step): New.
13460 (cancel_finished_single_steps): New.
13461 (wait_for_sigstop): Don't cancel finished single-step traps here.
13462 (linux_resume_one_lwp): Don't check for removed breakpoints.
13463 Don't set `step' on non-hardware step archs.
13464 (linux_set_resume_request): Ignore resume_stop requests if already
13465 stopping or stopped. Set the lwp's last_resume_kind.
13466 (resume_status_pending_p): Don't check for removed breakpoints.
13467 (need_step_over_p): New.
13468 (start_step_over): New.
13469 (finish_step_over): New.
13470 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13471 requests. Clear the thread's last reported target waitstatus.
13472 Don't use the `suspended' flag. Don't consider pending breakpoints.
13473 (linux_resume): Start a step-over if necessary.
13474 (proceed_one_lwp): New.
13475 (proceed_all_lwps): New.
13476 (unstop_all_lwps): New.
13477 * linux-low.h (struct lwp_info): Rewrite comment for the
13478 `suspended' flag. Add the `stop_pc' field. Delete the
13479 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13480 Add `'last_resume_kind' and `need_step_over' fields.
13481 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13482 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13483 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13484 (set_raw_breakpoint_at): New.
13485 (set_breakpoint_at): Rewrite to use it.
13486 (reinsert_breakpoint_handler): Delete.
13487 (set_reinsert_breakpoint): New.
13488 (reinsert_breakpoint_by_bp): Delete.
13489 (delete_reinsert_breakpoints): New.
13490 (uninsert_breakpoint): Rewrite.
13491 (uninsert_breakpoints_at): New.
13492 (reinsert_breakpoint): Rewrite.
13493 (reinsert_breakpoints_at): New.
13494 (check_breakpoints): Rewrite.
13495 (breakpoint_here): New.
13496 (breakpoint_inserted_here): New.
13497 (check_mem_read): Adjust.
13498 * mem-break.h (breakpoints_supported, breakpoint_here)
13499 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13500 (reinsert_breakpoint_by_bp): Delete declaration.
13501 (delete_reinsert_breakpoints): Declare.
13502 (reinsert_breakpoint): Delete declaration.
13503 (reinsert_breakpoints_at): Declare.
13504 (uninsert_breakpoint): Delete declaration.
13505 (uninsert_breakpoints_at): Declare.
13506 (check_breakpoints): Adjust prototype.
13507 * server.h: Adjust include order.
13508 (struct thread_info): Declare here. Add a `last_status' field.
13509
30ba68cb
MS
135102010-03-23 Michael Snyder <msnyder@vmware.com>
13511
13512 * server.c (crc32): New function.
13513 (handle_query): Add handling for 'qCRC:' request.
13514
b9a881c2
PA
135152010-03-23 Pedro Alves <pedro@codesourcery.com>
13516
13517 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13518 lwp had been stopped by a watchpoint.
13519
e92d13d5
PA
135202010-03-16 Pedro Alves <pedro@codesourcery.com>
13521
13522 * server.h (internal_error): Declare.
13523 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13524 * utils.c (internal_error): New function.
13525
64daa791
AS
135262010-03-15 Andreas Schwab <schwab@redhat.com>
13527
13528 * configure.srv: Fix typo setting srv_regobj.
13529
f52cd8cd
PA
135302010-03-15 Pedro Alves <pedro@codesourcery.com>
13531
13532 * linux-low.c (fetch_register): Avoid passing a non string literal
13533 format to `error'.
13534 (usr_store_inferior_registers): Ditto.
13535
93ae6fdc
PA
135362010-03-14 Pedro Alves <pedro@codesourcery.com>
13537
13538 * linux-low.c (linux_write_memory): Bail out early if peeking
13539 memory failed.
13540
c3adc08c
PA
135412010-03-14 Pedro Alves <pedro@codesourcery.com>
13542
13543 * linux-low.h (struct lwp_info): New fields
13544 `stopped_by_watchpoint' and `stopped_data_address'.
13545 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13546 here, and cache them in the lwp object.
13547 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13548 directly.
13549 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13550 field.
13551 (linux_stopped_by_watchpoint): Rewrite.
13552 (linux_stopped_data_address): Rewrite.
13553
bce522a2
PA
135542010-03-06 Simo Melenius <simo.melenius@iki.fi>
13555
13556 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13557 switching the current inferior, not before.
13558
90884b2b
L
135592010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13560
13561 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13562 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13563 i386-linux.c and amd64-linux.c.
13564 (reg-i386.o): Removed.
13565 (reg-i386.c): Likewise.
13566 (reg-i386-linux.o): Likewise.
13567 (reg-i386-linux.c): Likewise.
13568 (reg-x86-64.o): Likewise.
13569 (reg-x86-64.c): Likewise.
13570 (reg-x86-64-linux.o): Likewise.
13571 (reg-x86-64-linux.c): Likewise.
13572 (i386.o): New.
13573 (i386.c): Likewise.
13574 (i386-linux.o): Likewise.
13575 (i386-linux.c): Likewise.
13576 (amd64.o): Likewise.
13577 (amd64.c): Likewise.
13578 (amd64-linux.o): Likewise.
13579 (amd64-linux.c): Likewise.
13580
13581 * configure.srv (srv_i386_regobj): New.
13582 (srv_i386_linux_regobj): Likewise.
13583 (srv_amd64_regobj): Likewise.
13584 (srv_amd64_linux_regobj): Likewise.
13585 (srv_i386_32bit_xmlfiles): Likewise.
13586 (srv_i386_64bit_xmlfiles): Likewise.
13587 (srv_i386_xmlfiles): Likewise.
13588 (srv_amd64_xmlfiles): Likewise.
13589 (srv_i386_linux_xmlfiles): Likewise.
13590 (srv_amd64_linux_xmlfiles): Likewise.
13591 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13592 srv_xmlfiles to $srv_i386_xmlfiles.
13593 (i[34567]86-*-mingw32ce*): Likewise.
13594 (i[34567]86-*-mingw*): Likewise.
13595 (i[34567]86-*-nto*): Likewise.
13596 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13597 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13598 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13599 (x86_64-*-linux*): Likewise.
13600
13601 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13602 (init_registers_amd64_linux): New.
13603 (x86_arch_setup): Replace init_registers_x86_64_linux with
13604 init_registers_amd64_linux.
13605
193f13e6
MK
136062010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13607
13608 * configure.ac: Check for libdl. If it is not available link against
13609 static libthread_db.
13610 * configure: Regenerate.
13611
85d721b8
PA
136122010-02-22 Pedro Alves <pedro@codesourcery.com>
13613
13614 PR9605
13615
13616 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13617 handing a read watchpoint.
13618 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13619
6076632b
DE
136202010-02-12 Doug Evans <dje@google.com>
13621
13622 * linux-low.c (linux_supports_tracefork_flag): Document.
13623 (linux_look_up_symbols): Add comment.
13624
3327ccf7
L
136252010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13626
13627 * regcache.c (supply_register): Clear regcache if buf is NULL.
13628
0718675c 136292010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13630 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13631
13632 * inferiors.c (find_inferior): Add function documentation.
13633 (unloaded_dll): Handle the case where the unloaded dll has not
13634 been previously registered in the dll list.
13635
177321bd
DJ
136362010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13637
13638 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13639 (thumb2_breakpoint): New.
13640 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13641
2b009048
DJ
136422010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13643
13644 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13645 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13646 breakpoints.
13647
3be029c7
PA
136482010-01-21 Pedro Alves <pedro@codesourcery.com>
13649
13650 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13651
18f5de3b
JK
136522010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13653
13654 * linux-s390-low.c (s390_collect_ptrace_register)
13655 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13656
3743bb4f
DE
136572010-01-21 Doug Evans <dje@google.com>
13658
14ce3065
DE
13659 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13660 (PTRACE_ARG4_TYPE): New macro.
13661 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13662 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13663 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13664 (usr_store_inferior_registers): Ditto.
13665 (linux_read_memory, linux_write_memory): Ditto.
13666 (linux_test_for_tracefork): Ditto.
13667
3743bb4f
DE
13668 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13669 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13670
8b315be5
PA
136712010-01-21 Pedro Alves <pedro@codesourcery.com>
13672
13673 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13674 target.
13675
85492558
PA
136762010-01-21 Pedro Alves <pedro@codesourcery.com>
13677
13678 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13679 prototype to take a regcache. Adjust.
13680
442ea881
PA
136812010-01-20 Pedro Alves <pedro@codesourcery.com>
13682
13683 * regcache.h (struct thread_info): Forward declare.
13684 (struct regcache): New.
13685 (new_register_cache): Adjust prototype.
13686 (get_thread_regcache): Declare.
13687 (free_register_cache): Adjust prototype.
13688 (registers_to_string, registers_from_string): Ditto.
13689 (supply_register, supply_register_by_name, collect_register)
13690 (collect_register_as_string, collect_register_by_name): Ditto.
13691 * regcache.c (struct inferior_regcache_data): Delete.
13692 (get_regcache): Rename to ...
13693 (get_thread_regcache): ... this. Adjust. Switch inferior before
13694 fetching registers.
13695 (regcache_invalidate_one): Adjust.
13696 (regcache_invalidate): Fix prototype.
13697 (new_register_cache): Return the new register cache.
13698 (free_register_cache): Change prototype.
13699 (realloc_register_cache): Adjust.
13700 (registers_to_string): Change prototype to take a regcache. Adjust.
13701 (registers_from_string): Ditto.
13702 (register_data): Ditto.
13703 (supply_register): Ditto.
13704 (supply_register_by_name): Ditto.
13705 (collect_register): Ditto.
13706 (collect_register_as_string): Ditto.
13707 (collect_register_by_name): Ditto.
13708 * server.c (process_serial_event): Adjust.
13709 * linux-low.h (regset_fill_func, regset_store_func): Change
13710 prototype.
13711 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13712 Change prototype.
13713 * linux-low.c (get_stop_pc): Adjust.
13714 (check_removed_breakpoint): Adjust.
13715 (linux_wait_for_event): Adjust.
13716 (linux_resume_one_lwp): Adjust.
13717 (fetch_register): Add regcache parameter. Adjust.
13718 (usr_store_inferior_registers): Ditto.
13719 (regsets_fetch_inferior_registers): Ditto.
13720 (regsets_store_inferior_registers): Ditto.
13721 (linux_fetch_registers, linux_store_registers): Ditto.
13722 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13723 regcache. Adjust.
43aaf8b6
PA
13724 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13725 Ditto.
442ea881
PA
13726 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13727 prototype to take a regcache.
13728 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13729 * remote-utils.c (convert_ascii_to_int, outreg)
13730 (prepare_resume_reply): Change prototype to take a regcache.
13731 Adjust.
13732 * target.h (struct target_ops) <fetch_registers, store_registers>:
13733 Change prototype to take a regcache.
13734 (fetch_inferior_registers, store_inferior_registers): Change
13735 prototype to take a regcache. Adjust.
13736 * proc-service.c (ps_lgetregs): Adjust.
13737 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13738 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13739 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13740 take a regcache. Adjust.
13741 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13742 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13743 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13744 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13745 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13746 (cris_cannot_fetch_register):
13747 (cris_breakpoint_at): Change prototype to take a regcache.
13748 Adjust.
13749 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13750 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13751 to take a regcache. Adjust.
13752 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13753 Adjust.
13754 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13755 take a regcache. Adjust.
13756 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13757 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13758 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13759 * linux-mips-low.c (mips_get_pc):
13760 (mips_set_pc): Change prototype to take a regcache. Adjust.
13761 (mips_reinsert_addr): Adjust.
13762 (mips_collect_register): Change prototype to take a regcache.
13763 Adjust.
13764 (mips_supply_register):
13765 (mips_collect_register_32bit, mips_supply_register_32bit)
13766 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13767 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13768 * linux-ppc-low.c (ppc_supply_ptrace_register)
13769 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13770 (parse_spufs_run): Adjust.
13771 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13772 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13773 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13774 take a regcache. Adjust.
13775 * linux-s390-low.c (s390_collect_ptrace_register)
13776 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13777 (s390_set_pc): Change prototype to take a regcache. Adjust.
13778 (s390_arch_setup): Adjust.
13779 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13780 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13781 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13782 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13783 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13784 regcache. Adjust.
13785 (sparc_breakpoint_at): Adjust.
13786 * linux-xtensa-low.c (xtensa_fill_gregset):
13787 (xtensa_store_gregset):
13788 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13789 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13790 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13791 prototype to take a regcache. Adjust.
13792 * win32-arm-low.c (arm_fetch_inferior_register)
13793 (arm_store_inferior_register): Change prototype to take a
13794 regcache. Adjust.
13795 * win32-i386-low.c (i386_fetch_inferior_register)
13796 (i386_store_inferior_register): Change prototype to take a
13797 regcache. Adjust.
13798 * win32-low.c (child_fetch_inferior_registers)
13799 (child_store_inferior_registers): Change prototype to take a
13800 regcache. Adjust.
13801 (win32_wait): Adjust.
13802 (win32_fetch_inferior_registers): Change prototype to take a
13803 regcache. Adjust.
13804 (win32_store_inferior_registers): Adjust.
13805 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13806 store_inferior_register>: Change prototype to take a regcache.
13807
60c3d7b0
DE
138082010-01-20 Doug Evans <dje@google.com>
13809
13810 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13811 #ifdef.
13812 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13813 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13814
dc146f7c
VP
138152010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13816
13817 * linux-low.c (linux_core_of_thread): New.
13818 (compare_ints, show_process, list_threads): New.
13819 (linux_qxfer_osdata): Report threads and cores.
13820 (linux_target_op): Register linux_core_of_thread.
13821 * remote-utils.c (prepare_resume_reply): Report the core.
13822 (buffer_xml_printf): Support %d specifier.
13823 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13824 New.
13825 (handle_query): Handle qXfer:threads. Announce availability
13826 thereof.
13827 * target.h (struct target_ops): New field core_of_thread.
13828
7803799a
UW
138292010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13830
13831 * Makefile.in (clean): Remove new generated files.
13832 (reg-s390.o, reg-s390.c): Remove rules.
13833 (reg-s390x.o, reg-s390x.c): Likewise.
13834 (s390-linux32.o, s390-linux32.c): Add rules.
13835 (s390-linux64.o, s390-linux64.c): Likewise.
13836 (s390x-linux64.o, s390x-linux64.c): Likewise.
13837 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13838 * linux-s390-low.c: Include <elf.h>.
13839 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13840 (init_registers_s390): Remove prototype.
13841 (init_registers_s390x): Likewise.
13842 (init_registers_s390_linux32): Add prototype.
13843 (init_registers_s390_linux64): Likewise.
13844 (init_registers_s390x_linux64): Likewise.
13845 (s390_num_regs_3264): New define.
13846 (s390_regmap_3264): New global variable.
13847 (s390_cannot_fetch_register): Remove obsolete check.
13848 (s390_cannot_store_register): Likewise.
13849 (s390_collect_ptrace_register): Handle upper/lower register halves.
13850 (s390_supply_ptrace_register): Likewise.
13851 (s390_fill_gregset): Update to register number changes.
13852 (s390_get_hwcap): New routine.
13853 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13854 Install appropriate regmap and register set.
13855
6e7ffa39
JB
138562010-01-01 Joel Brobecker <brobecker@adacore.com>
13857
13858 * server.c (gdbserver_version): Update copyright year to 2010.
13859 * gdbreplay.c (gdbreplay_version): Likewise.
13860
957f3f49
DE
138612009-12-28 Doug Evans <dje@google.com>
13862
13863 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13864 elf/external.h. Include <elf.h> instead but only if necessary.
13865
ca5c370d
PA
138662009-12-28 Pedro Alves <pedro@codesourcery.com>
13867
13868 * linux-low.c (linux_remove_process): Remove `detaching'
13869 parameter. Don't release/detach from thread_db here.
13870 (linux_kill): Release/detach from thread_db here, ...
13871 (linux_detach): ... and here, before actually detaching.
13872 (linux_wait_1): ... and here, when a process exits.
13873 * thread-db.c (any_thread_of): New.
13874 (thread_db_free): Switch the current inferior to a thread of the
13875 passed in process.
13876
4ee62156
DE
138772009-12-21 Doug Evans <dje@google.com>
13878
d90e6a88
DE
13879 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13880
c5f62d5f
DE
13881 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13882 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13883 warning ifndef __NR_tkill. Move setting of errno there too.
13884 Delete unnecessary resetting of errno after syscall.
13885 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13886
10e86dd7
DE
13887 * configure.ac: Check for dladdr.
13888 * config.in: Regenerate.
13889 * configure: Regenerate.
13890 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13891 (try_thread_db_load): Update.
13892
4ee62156
DE
13893 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13894
00f515da
DE
138952009-12-18 Doug Evans <dje@google.com>
13896
e9464885
DE
13897 * event-loop.c: Include unistd.h if it exists.
13898
07d4f67e
DE
13899 * linux-low.c (my_waitpid): Move definition away from being in
13900 between linux_tracefork_child/linux_test_for_tracefork.
13901
00f515da
DE
13902 * gdb_proc_service.h (psaddr_t): Fix type.
13903 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13904 signature to match glibc.
13905
1de1badb
DE
139062009-12-16 Doug Evans <dje@google.com>
13907
13908 * linux-low.c (linux_read_memory): Fix argument to read.
13909
aeeb81d1
PA
139102009-11-26 Pedro Alves <pedro@codesourcery.com>
13911
13912 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13913 events, don't leave current_inferior pointing at null.
13914
10357975
PA
139152009-11-26 Pedro Alves <pedro@codesourcery.com>
13916
13917 * win32-low.c (LOG): Delete.
13918 (OUTMSG): Output to stderr.
13919 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13920 on compile time LOG macro.
13921 (win32_wait): Fix debug output.
13922
cf6e3471
PA
139232009-11-26 Pedro Alves <pedro@codesourcery.com>
13924
13925 * win32-low.c (win32_add_one_solib): If the dll name is
13926 "ntdll.dll", prepend the system directory to the dll path.
13927
0c85e18e
MK
139282009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13931
9ac544ce 139322009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13933 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13934
13935 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13936 * configure.ac: Check for __mcoldfire__ and set
13937 gdb_cv_m68k_is_coldfire.
13938 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13939 reg-cf.o and reg-m68k.o.
13940 * configure: Regenerated.
13941
fd7dd3e6
PA
139422009-11-16 Pedro Alves <pedro@codesourcery.com>
13943
13944 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13945 Pass it to thread_db_free.
13946 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13947 proper `detaching' argument to linux_remove_process.
13948 * linux-low.h (thread_db_free): Add `detaching' parameter.
13949 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13950 to thread_db_free.
13951 (thread_db_free): Add `detaching' parameter. Only
13952 call td_ta_clear_event if detaching from process.
13953
75aa492e
MK
139542009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13955
13956 * thread-db.c (thread_db_free): Fix typo.
13957
21e1bee4
PP
139582009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13959
13960 PR gdb/10838
13961 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13962
8838b45e
NS
139632009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13964
13965 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13966 with an i686 compiler.
13967 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13968 needed.
13969 * configure: Rebuilt.
13970
8a35fb51
SL
139712009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13972
13973 PR gdb/10783
13974
13975 * server.c (handle_search_memory_1): Correct read_addr initialization
13976 in loop for searching subsequent chunks.
13977
96f15937
PP
139782009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13979
13980 * configure.ac: New --with-libthread-db option.
13981 * thread-db.c: Allow direct dependence on libthread_db.
13982 (thread_db_free): Adjust.
13983 * config.in: Regenerate.
13984 * configure: Likewise.
889bf7c5 13985
5f7d1694
PP
139862009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13987
13988 PR gdb/10757
13989 * thread-db.c (attach_thread): New function.
13990 (maybe_attach_thread): Return success/failure.
13991 (find_new_threads_callback): Adjust.
889bf7c5
PA
13992 (thread_db_find_new_threads): Loop until no new threads.
13993
88e3b899
PA
139942009-10-13 Pedro Alves <pedro@codesourcery.com>
13995
13996 * proc-service.c (ps_lgetregs): Formatting.
13997
cdbfd419
PP
139982009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13999
14000 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14001 * configure.ac: Adjust.
14002 * linux-low.h (struct process_info_private): Move members to struct
14003 thread_db.
14004 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14005 * linux-low.c (linux_remove_process): Adjust.
14006 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14007 * server.c (handle_query): Move code ...
14008 (handle_monitor_command): ... here. New function.
14009 * target.h (struct target_ops): New member.
14010 * thread-db.c (struct thread_db): New.
14011 (libthread_db_search_path): New variable.
14012 (thread_db_create_event, thread_db_enable_reporting)
14013 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14014 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14015 (try_thread_db_load_1, dladdr_to_soname): New functions.
14016 (try_thread_db_load, thread_db_load_search): New functions.
14017 (thread_db_init): Search for libthread_db.
14018 (thread_db_free): New function.
14019 (thread_db_handle_monitor_command): Likewise.
14020 * config.in: Regenerate.
14021 * configure: Regenerate.
889bf7c5 14022
4168d2d6
UW
140232009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14024
14025 * spu-low.c (spu_kill): Wait for inferior to terminate.
14026 Call clear_inferiors.
14027 (spu_detach): Call clear_inferiors.
14028
81ecdfbb
RW
140292009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14030
14031 * aclocal.m4: Regenerate.
14032 * config.in: Likewise.
14033 * configure: Likewise.
14034
0b9ff2c0
UW
140352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14036
14037 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14038 (parse_spufs_run): New function.
14039 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14040 (ppc_breakpoint_at): Handle SPU breakpoints.
14041
efcbbd14
UW
140422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14043
14044 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14045 (SPUFS_MAGIC): Define.
14046 (spu_enumerate_spu_ids): New function.
14047 (linux_qxfer_spu): New function.
14048 (linux_target_ops): Install linux_qxfer_spu.
14049
f4d9bade
UW
140502009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14051
14052 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14053 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14054 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14055 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14056 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14057 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14058 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14059 (init_registers_powerpc_cell32l): Add prototype.
14060 (init_registers_powerpc_cell64l): Likewise.
14061 (ppc_arch_setup): Detect Cell/B.E. architecture.
14062
96e946ca
RW
140632009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14064
14065 * Makefile.in (datarootdir): New variable.
14066
58d6951d
DJ
140672009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14068
14069 * linux-low.c (linux_write_memory): Update debugging output.
14070 * Makefile.in (clean): Add new descriptions.
14071 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14072 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14073 * configure.srv: Add new files for arm*-*-linux*.
14074 * linux-arm-low.c: Add new declarations.
14075 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14076 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14077 (HWCAP_VFPv3D16): New.
14078 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14079 instead of __IWMMXT__.
14080 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14081 (arm_arch_setup): New.
14082 (target_regsets): Remove #ifdef. Add VFP regset.
14083 (the_low_target): Use arm_arch_setup.
14084
12b42a12
DJ
140852009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14086
14087 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14088 the main thread again.
14089
ac8c974e
AR
140902009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14091
14092 Adding Neutrino gdbserver.
14093 * configure: Regenerated.
14094 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14095 * configure.srv (i[34567]86-*-nto*): New target.
14096 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14097 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14098 (nto_comctrl) [__QNX__]: New function.
14099 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14100
4424e0c3 141012009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14102
14103 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14104 srv_tgtobj.
14105
912cf4ba
PA
141062009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14107 Pedro Alves <pedro@codesourcery.com>
14108
14109 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14110 don't support CONTEXT_EXTENDED_REGISTERS.
14111 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14112 (the_low_target): Install them.
14113 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14114 failing with ERROR_PIPE_NOT_CONNECTED.
14115
aa5ca48f
DE
141162009-06-30 Doug Evans <dje@google.com>
14117 Pierre Muller <muller@ics.u-strasbg.fr>
14118
14119 Add h/w watchpoint support to x86-linux, win32-i386.
14120 * Makefile.in (SFILES): Add i386-low.c
14121 (i386_low_h): Define.
14122 (i386-low.o): Add dependencies.
14123 (linux-x86-low.o): Add i386-low.h dependency.
14124 (win32-i386-low.o): Ditto.
14125 * i386-low.c: New file.
14126 * i386-low.h: New file.
14127 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14128 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14129 * linux-low.c (linux_add_process): Initialize arch_private.
14130 (linux_remove_process): Free arch_private.
14131 (add_lwp): Initialize arch_private.
14132 (delete_lwp): Free arch_private.
14133 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14134 provided.
14135 * linux-low.h (process_info_private): New member arch_private.
14136 (lwp_info): New member arch_private.
14137 (linux_target_ops): New members new_process, new_thread,
14138 prepare_to_resume.
14139 (ptid_of): New macro.
14140 * linux-x86-low.c: Include stddef.h, i386-low.h.
14141 (arch_process_info): New struct.
14142 (arch_lwp_info): New struct.
14143 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14144 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14145 (i386_dr_low_get_status): New function.
14146 (x86_insert_point, x86_remove_point): New functions.
14147 (x86_stopped_by_watchpoint): New function.
14148 (x86_stopped_data_address): New function.
14149 (x86_linux_new_process, x86_linux_new_thread): New functions.
14150 (x86_linux_prepare_to_resume): New function.
14151 (the_low_target): Add entries for insert_point, remove_point,
14152 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14153 prepare_to_resume.
14154 * server.c (debug_hw_points): New global.
14155 (monitor_show_help): Document set debug-hw-points.
14156 (handle_query): Process "set debug-hw-points".
14157 * server.h (debug_hw_points): Declare.
14158 (paddress): Declare.
14159 * utils.c (NUMCELLS, CELLSIZE): New macros.
14160 (get_sell, xsnprintf, paddress): New functions.
14161 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14162 remove_point, stopped_by_watchpoint, stopped_data_address.
14163 * win32-i386-low.c: Include i386-low.h.
14164 (debug_reg_state): Replaces dr.
14165 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14166 (i386_dr_low_get_status): New function.
14167 (i386_insert_point, i386_remove_point): New functions.
14168 (i386_stopped_by_watchpoint): New function.
14169 (i386_stopped_data_address): New function.
14170 (i386_initial_stuff): Update.
14171 (get_thread_context,set_thread_context,i386_thread_added): Update.
14172 (the_low_target): Add entries for insert_point,
14173 remove_point, stopped_by_watchpoint, stopped_data_address.
14174 * win32-low.c (win32_insert_watchpoint): New function.
14175 (win32_remove_watchpoint): New function.
14176 (win32_stopped_by_watchpoint): New function.
14177 (win32_stopped_data_address): New function.
14178 (win32_target_ops): Add entries for insert_watchpoint,
14179 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14180 * win32-low.h (win32_target_ops): New members insert_point,
14181 remove_point, stopped_by_watchpoint, stopped_data_address.
14182
d993e290
PA
141832009-06-25 Pedro Alves <pedro@codesourcery.com>
14184
14185 * server.c (process_serial_event): Re-return unsupported, not
14186 error, if the type isn't recognized. Re-allow supporting only
14187 insert or remove packets. Also call require_running for
14188 breakpoints. Add missing break statement to default case. Tidy.
14189 * target.h (struct target_ops): Rename insert_watchpoint to
14190 insert_point, and remove_watchpoint to remove_point.
14191
14192 * linux-low.h (struct linux_target_ops): Likewise.
14193 * linux-low.c (linux_insert_watchpoint): Rename to ...
14194 (linux_insert_point): ... this. Adjust.
14195 (linux_remove_watchpoint): Rename to ...
14196 (linux_remove_point): ... this. Adjust.
14197 (linux_target_ops): Adjust.
14198 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14199 (cris_insert_point): ... this.
14200 (cris_remove_watchpoint): Rename to ...
14201 (cris_remove_point): ... this.
14202 (the_low_target): Adjust.
14203
0f54c268
PM
142042009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14205
14206 * server.c (handle_v_kill): Pass signal_pid to
14207 kill_inferior if multi_process is zero.
14208
c6314022
AR
142092009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14210
14211 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14212 * target.h (target_ops): Comment for *_watchpoint to make it clear
14213 the functions can get types '0' and '1'.
14214
4463ce24
AR
142152009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14216
14217 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14218 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14219 * regcache.c (get_regcache): Likewise.
14220 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14221 * win32-low.c (child_fetch_inferior_registers): Remove check for
14222 regno 0.
14223
cf8fd78b
PA
142242009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14225 Pedro Alves <pedro@codesourcery.com>
14226
14227 * target.h (struct target_ops) <supports_multi_process>: New
14228 callback.
14229 (target_supports_multi_process): New.
14230 * server.c (handle_query): Even if GDB reports support, only
14231 enable multi-process if the target also supports it. Report
14232 multi-process support only if the target backend supports it.
14233 * linux-low.c (linux_supports_multi_process): New function.
14234 (linux_target_ops): Install it as target_supports_multi_process
14235 callback.
14236
47c0c975
DE
142372009-05-24 Doug Evans <dje@google.com>
14238
e09875d4
DE
14239 Global renaming of find_thread_pid to find_thread_ptid.
14240 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14241 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14242 All callers updated.
14243
e27d73f6
DE
14244 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14245 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14246 directly.
14247
47c0c975
DE
14248 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14249 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14250 (linux_resume_one_lwp): Ditto.
14251
2acc282a
DE
142522009-05-23 Doug Evans <dje@google.com>
14253
14254 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14255 from struct inferior_list_entry * to struct lwp_info *.
14256 All callers updated.
14257
9f1036c1
DE
142582009-05-13 Doug Evans <dje@google.com>
14259
14260 * linux-x86-low.c: Don't include assert.h.
14261 (x86_siginfo_fixup): Use fatal, not assert.
14262 (x86_arch_setup): Fix comment.
14263
d0722149
DE
142642009-05-12 Doug Evans <dje@google.com>
14265
14266 Biarch support for i386/amd64 gdbserver.
14267 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14268 Add linux-x86-low.c.
14269 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14270 (linux-x86-low.o): Add.
14271 * linux-x86-64-low.c: Delete.
14272 * linux-i386-low.c: Delete.
14273 * linux-x86-low.c: New file.
14274 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14275 linux-x86-low.o.
14276 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14277 linux-x86-low.o.
14278 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14279 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14280 (linux_child_pid_to_exec_file): New function.
14281 (elf_64_header_p, elf_64_file_p): New functions.
14282 (siginfo_fixup): New function.
14283 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14284 give target a chance to convert layout.
14285 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14286 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14287
fdeb2a12
DE
142882009-05-07 Doug Evans <dje@google.com>
14289
14290 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14291 (regsets_store_inferior_registers): Ditto.
14292
a6dbe5df
PA
142932009-05-06 Pedro Alves <pedro@codesourcery.com>
14294
14295 PR server/10048
14296
14297 * linux-low.c (must_set_ptrace_flags): Delete.
14298 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14299 of the global.
14300 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14301 `lwp->must_set_ptrace_flags' instead.
ba42693b 14302 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14303 (linux_wait_1): ... not here.
14304
5091eb23
DE
143052009-04-30 Doug Evans <dje@google.com>
14306
9f767825
DE
14307 * inferiors.c (started_inferior_callback): New function.
14308 (attached_inferior_callback): New function.
14309 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14310 * server.c (print_started_pid, print_attached_pid): New functions.
14311 (detach_or_kill_for_exit): New function.
14312 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14313 * server.h (have_started_inferiors_p): Declare.
14314 (have_attached_inferiors_p): Declare.
14315
5091eb23
DE
14316 * inferiors.c (remove_process): Fix memory leak, free process.
14317 * linux-low.c (linux_remove_process): New function.
14318 (linux_kill): Call it instead of remove_process.
14319 (linux_detach, linux_wait_1): Ditto.
14320
155c8968
PA
143212009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14322
14323 * configure.srv: Add x86 Windows CE target.
14324
7fe519cb
UW
143252009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14326
14327 * inferiors.c (get_thread_process): Make global.
14328 * server.h (get_thread_process): Add prototype.
14329 * thread-db.c (find_one_thread): Use get_thread_process
14330 instead of current_process.
14331 (thread_db_get_tls_address): Do not crash if called when
14332 thread layer is not yet initialized.
14333
5472f405
UW
143342009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14335
14336 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14337 * spu-low.c (current_tid): Rename to ...
14338 (current_ptid): ... this.
14339 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14340 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14341 ptid_get_lwp (current_ptid) instead of current_tid.
14342 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14343 instead of current_tid. Use find_process_pid to verify pid
14344 argument is valid. Pass proper argument to remove_process.
14345 (spu_thread_alive): Compare current_ptid instead of current_tid.
14346 (spu_resume): Likewise.
14347
55ac2b99
PA
143482009-04-02 Pedro Alves <pedro@codesourcery.com>
14349
14350 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14351 variable.
14352
95954743
PA
143532009-04-01 Pedro Alves <pedro@codesourcery.com>
14354
14355 Implement the multiprocess extensions, and add linux multiprocess
14356 support.
14357
14358 * server.h (ULONGEST): Declare.
14359 (struct ptid, ptid_t): New.
14360 (minus_one_ptid, null_ptid): Declare.
14361 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14362 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14363 (struct inferior_list_entry): Change `id' type from unsigned from
14364 to ptid_t.
14365 (struct sym_cache, struct breakpoint, struct
14366 process_info_private): Forward declare.
14367 (struct process_info): Declare.
14368 (current_process): Declare.
14369 (all_processes): Declare.
14370 (initialize_inferiors): Declare.
14371 (add_thread): Adjust to use ptid_t.
14372 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14373 (add_process, remove_process, find_thread_pid): Declare.
14374 (find_inferior_id): Adjust to use ptid_t.
14375 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14376 (multi_process): Declare.
14377 (push_event): Adjust to use ptid_t.
14378 (read_ptid, write_ptid): Declare.
14379 (prepare_resume_reply): Adjust to use ptid_t.
14380 (clear_symbol_cache): Declare.
14381 * inferiors.c (all_processes): New.
14382 (null_ptid, minus_one_ptid): New.
14383 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14384 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14385 (add_thread): Change unsigned long to ptid. Remove gdb_id
14386 parameter. Adjust.
14387 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14388 (gdb_id_to_thread): Rename to ...
14389 (find_thread_pid): ... this. Change unsigned long to ptid.
14390 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14391 (loaded_dll, pull_pid_from_list): Adjust.
14392 (add_process, remove_process, find_process_pid)
14393 (get_thread_process, current_process, initialize_inferiors): New.
14394 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14395 (struct target_waitstatus) <related_pid>: Ditto.
14396 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14397 return type to int.
14398 (struct target_ops) <join>: Add `pid' argument.
14399 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14400 (struct target_ops) <wait>: Add `ptid' field. Change return type
14401 to ptid.
14402 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14403 (mywait): Add `ptid' argument. Change return type to ptid_t.
14404 (target_pid_to_str): Declare.
14405 * target.c (set_desired_inferior): Adjust to use ptids.
14406 (mywait): Add new `ptid' argument. Adjust.
14407 (target_pid_to_str): New.
14408 * mem-break.h (free_all_breakpoints): Declare.
14409 * mem-break.c (breakpoints): Delelete.
14410 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14411 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14412 to use per-process breakpoint list.
14413 (free_all_breakpoints): New.
14414 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14415 (symbol_cache, all_symbols_looked_up): Delete.
14416 (hexchars): New.
14417 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14418 read_ptid): New.
14419 (prepare_resume_reply): Change ptid argument's type from unsigned
14420 long to ptid_t. Adjust. Implement W;process and X;process.
14421 (free_sym_cache, clear_symbol_cache): New.
14422 (look_up_one_symbol): Adjust to per-process symbol cache. *
14423 * server.c (cont_thread, general_thread, step_thread): Change type
14424 to ptid_t.
14425 (attached): Delete.
14426 (multi_process): New.
14427 (last_ptid): Change type to ptid_t.
14428 (struct vstop_notif) <ptid>: Change type to ptid_t.
14429 (queue_stop_reply, push_event): Change `ptid' argument's type to
14430 ptid_t.
14431 (discard_queued_stop_replies): Add `pid' argument.
14432 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14433 changes. Don't reference the `attached' global.
14434 (attach_inferior): Adjust to mywait interface changes.
14435 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14436 features. Handle and report "multiprocess+". Handle
14437 "qAttached:PID".
14438 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14439 changes.
14440 (handle_v_kill): New.
14441 (handle_v_stopped): Adjust to use target_pid_to_str.
14442 (handle_v_requests): Allow multiple attaches and runs when
14443 multiprocess extensions are in effect. Handle "vKill".
14444 (myresume): Adjust to use ptids.
14445 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14446 (handle_status): Adjust to discard_queued_stop_replies interface
14447 change.
14448 (first_thread_of, kill_inferior_callback)
14449 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14450 (main): Call initialize_inferiors. Adjust to use ptids, killing
14451 and detaching from all inferiors. Handle multiprocess packet
14452 variants.
14453 * linux-low.h: Include gdb_proc_service.h.
14454 (struct process_info_private): New.
14455 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14456 <lwpid_of>: Use ptid_get_lwp.
14457 (get_lwp_thread): Adjust.
14458 (struct lwp_info): Add `dead' member.
14459 (find_lwp_pid): Declare.
14460 * linux-low.c (thread_db_active): Delete.
14461 (new_inferior): Adjust comment.
14462 (inferior_pid): Delete.
14463 (linux_add_process): New.
14464 (handle_extended_wait): Adjust.
14465 (add_lwp): Change unsigned long to ptid.
14466 (linux_create_inferior): Add process to processes table. Adjust
14467 to use ptids. Don't set new_inferior here.
14468 (linux_attach_lwp): Rename to ...
14469 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14470 it. Adjust to use ptids.
14471 (linux_attach_lwp): New.
14472 (linux_attach): Add process to processes table. Don't set
14473 new_inferior here.
14474 (struct counter): New.
14475 (second_thread_of_pid_p, last_thread_of_process_p): New.
14476 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14477 multiple processes.
14478 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14479 processes. Remove process from process table.
14480 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14481 to multiple processes.
14482 (any_thread_of): New.
14483 (linux_detach): Add `pid' argument, and handle it. Remove process
14484 from processes table.
14485 (linux_join): Add `pid' argument. Handle it.
14486 (linux_thread_alive): Change unsighed long argument to ptid_t.
14487 Consider dead lwps as not being alive.
14488 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14489 threads we're not interested in.
14490 (same_lwp, find_lwp_pid): New.
14491 (linux_wait_for_lwp): Change `pid' argument's type from int to
14492 ptid_t. Adjust.
14493 (linux_wait_for_event): Rename to ...
14494 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14495 from int to ptid_t. Adjust.
14496 (linux_wait_for_event): New.
14497 (linux_wait_1): Add `ptid' argument. Change return type to
14498 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14499 that exit from the process table.
14500 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14501 Adjust.
14502 (mark_lwp_dead): New.
14503 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14504 stopping all threads, mark its main lwp as dead.
14505 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14506 ptids.
14507 (fetch_register, usr_store_inferior_registers)
14508 (regsets_fetch_inferior_registers)
14509 (regsets_store_inferior_registers, linux_read_memory)
14510 (linux_write_memory): Inline `inferior_pid'.
14511 (linux_look_up_symbols): Adjust to use per-process
14512 `thread_db_active'.
14513 (linux_request_interrupt): Adjust to use ptids.
14514 (linux_read_auxv): Inline `inferior_pid'.
14515 (initialize_low): Don't reference thread_db_active.
14516 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14517 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14518 (ps_getpid): Return the pid of the current inferior.
14519 * thread-db.c (proc_handle, thread_agent): Delete.
14520 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14521 per-process data.
14522 (find_one_thread): Change argument type to ptid_t. Adjust to
14523 per-process data.
14524 (maybe_attach_thread): Adjust to per-process data and ptids.
14525 (thread_db_find_new_threads): Ditto.
14526 (thread_db_init): Ditto.
14527 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14528 processes table. Adjust to use ptids.
14529 (spu_kill, spu_detach): Adjust interface. Remove process from
14530 processes table.
14531 (spu_join, spu_thread_alive): Adjust interface.
14532 (spu_wait): Adjust interface. Remove process from processes
14533 table. Adjust to use ptids.
14534 * win32-low.c (current_inferior_tid): Delete.
14535 (current_inferior_ptid): New.
14536 (debug_event_ptid): New.
14537 (thread_rec): Take a ptid. Adjust.
14538 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14539 (child_delete_thread): Ditto.
14540 (do_initial_child_stuff): Add `attached' argument. Add process to
14541 processes table.
14542 (child_fetch_inferior_registers, child_store_inferior_registers):
14543 Adjust.
14544 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14545 (win32_attach): Pass 1 to do_initial_child_stuff.
14546 (win32_kill): Adjust interface. Remove process from processes
14547 table.
14548 (win32_detach): Ditto.
14549 (win32_join): Adjust interface.
14550 (win32_thread_alive): Take a ptid.
14551 (win32_resume): Adjust to use ptids.
14552 (get_child_debug_event): Ditto.
14553 (win32_wait): Adjust interface. Remove exiting process from
14554 processes table.
14555
bd99dc85
PA
145562009-04-01 Pedro Alves <pedro@codesourcery.com>
14557
14558 Non-stop mode support.
14559
14560 * server.h (non_stop): Declare.
14561 (gdb_client_data, handler_func): Declare.
14562 (delete_file_handler, add_file_handler, start_event_loop):
14563 Declare.
14564 (handle_serial_event, handle_target_event, push_event)
14565 (putpkt_notif): Declare.
14566 * target.h (enum resume_kind): New.
14567 (struct thread_resume): Replace `step' field by `kind' field.
14568 (TARGET_WNOHANG): Define.
14569 (struct target_ops) <wait>: Add `options' argument.
14570 <supports_non_stop, async, start_non_stop>: New fields.
14571 (target_supports_non_stop, target_async): New.
14572 (start_non_stop): Declare.
14573 (mywait): Add `options' argument.
14574 * target.c (mywait): Add `options' argument. Print child exit
14575 notifications here.
14576 (start_non_stop): New.
14577 * server.c (non_stop, own_buf, mem_buf): New globals.
14578 (struct vstop_notif): New.
14579 (notif_queue): New global.
14580 (queue_stop_reply, push_event, discard_queued_stop_replies)
14581 (send_next_stop_reply): New.
14582 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14583 interface changes.
14584 (attach_inferior): In non-stop mode, don't wait for the target
14585 here.
14586 (handle_general_set): Handle QNonStop.
14587 (handle_query): When handling qC, return the current general
14588 thread, instead of the first thread of the list.
14589 (handle_query): If the backend supports non-stop mode, include
14590 QNonStop+ in the qSupported query response.
14591 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14592 and non-stop mode.
14593 (handle_v_attach, handle_v_run): Handle non-stop mode.
14594 (handle_v_stopped): New.
14595 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14596 (myresume): Adjust to use resume_kind. Handle non-stop.
14597 (queue_stop_reply_callback): New.
14598 (handle_status): Handle non-stop mode.
14599 (main): Clear non_stop flag on reconnection. Use the event-loop.
14600 Refactor serial protocol handling from here ...
14601 (process_serial_event): ... to this new function. When GDB
14602 selects any thread, select one here. In non-stop mode, wait until
14603 GDB acks all pending events before exiting.
14604 (handle_serial_event, handle_target_event): New.
14605 * remote-utils.c (remote_open): Install remote_desc in the event
14606 loop.
14607 (remote_close): Remove remote_desc from the event loop.
14608 (putpkt_binary): Rename to...
14609 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14610 (putpkt_binary): New as wrapper around putpkt_binary_1.
14611 (putpkt_notif): New.
14612 (prepare_resume_reply): In non-stop mode, don't change the
14613 general_thread.
14614 * event-loop.c: New.
14615 * Makefile.in (OBJ): Add event-loop.o.
14616 (event-loop.o): New rule.
14617
14618 * linux-low.h (pid_of): Moved here.
14619 (lwpid_of): New.
14620 (get_lwp_thread): Use lwpid_of.
14621 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14622 * linux-low.c (pid_of): Delete.
14623 (inferior_pid): Use lwpid_of.
14624 (linux_event_pipe): New.
14625 (target_is_async_p): New.
14626 (delete_lwp): New.
14627 (handle_extended_wait): Use lwpid_of.
14628 (add_lwp): Don't set lwpid field.
14629 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14630 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14631 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14632 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14633 first. Adjust to linux_wait_for_event interface changes. Use
14634 lwpid_of.
14635 (linux_detach): Don't delete the main lwp here.
14636 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14637 (status_pending_p): Don't consider explicitly suspended lwps.
14638 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14639 pointer. Add OPTIONS argument. Change return type to int. Use
14640 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14641 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14642 pointer. Add status pointer argument. Return a pid instead of a
14643 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14644 changes. In non-stop mode, don't switch to a random thread.
14645 (linux_wait): Rename to...
14646 (linux_wait_1): ... this. Add target_options argument, and handle
14647 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14648 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14649 clean exit and signal exit code. Don't stop all threads in
14650 non-stop mode. In all-stop mode, only stop all threads when
14651 reporting a stop to GDB. Handle explicit thread stop requests.
14652 (async_file_flush, async_file_mark): New.
14653 (linux_wait): New.
14654 (send_sigstop): Use lwpid_of.
14655 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14656 interface changes. In non-stop mode, don't switch to a random
14657 thread.
14658 (linux_resume_one_lwp): Use lwpid_of.
14659 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14660 (linux_resume_one_thread): ... this. Handle resume_stop. In
14661 non-stop mode, don't look for pending flag in all threads.
14662 (resume_status_pending_p): Don't consider explicitly suspended
14663 threads.
14664 (my_waitpid): Reimplement. Emulate __WALL.
14665 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14666 Use lwpid_of.
14667 (sigchld_handler, linux_supports_non_stop, linux_async)
14668 (linux_start_non_stop): New.
14669 (linux_target_ops): Register linux_supports_non_stop, linux_async
14670 and linux_start_non_stop.
14671 (initialize_low): Install SIGCHLD handler.
14672 * thread-db.c (thread_db_create_event, find_one_thread)
14673 (thread_db_get_tls_address): Use lwpid_of.
14674 * win32-low.c (win32_detach): Adjust to use resume_kind.
14675 (win32_wait): Add `options' argument.
14676 * spu-low.c (spu_resume): Adjust to use resume_kind.
14677 (spu_wait): Add `options' argument.
14678
5b1c542e
PA
146792009-04-01 Pedro Alves <pedro@codesourcery.com>
14680
14681 Decouple target code from remote protocol.
14682
14683 * target.h (enum target_waitkind): New.
14684 (struct target_waitstatus): New.
14685 (struct target_ops) <wait>: Return an unsigned long. Take a
14686 target_waitstatus pointer instead of a char pointer.
14687 (mywait): Likewise.
14688 * target.c (mywait): Change prototype to return an unsigned long.
14689 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14690 * server.h (thread_from_wait, old_thread_from_wait): Delete
14691 declarations.
14692 (prepare_resume_reply): Change prototype to take a
14693 target_waitstatus.
14694 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14695 (last_status, last_ptid): New.
14696 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14697 pid instead of a signal.
14698 (attach_inferior): Remove "status" and "signal" parameters.
14699 Adjust.
14700 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14701 not as an address.
14702 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14703 (handle_v_requests, myresume): Remove "status" and "signal"
14704 parameters. Adjust.
14705 (handle_status): New.
14706 (main): Delete local `status'. Adjust.
14707 * remote-utils.c: Include target.h.
14708 (prepare_resume_reply): Change prototype to take a
14709 target_waitstatus. Adjust.
14710
14711 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14712 interface.
14713 * spu-low.c (spu_wait): Adjust.
14714 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14715 Delete.
14716 (win32_wait): Adjust.
14717
2bd7c093
PA
147182009-04-01 Pedro Alves <pedro@codesourcery.com>
14719
14720 * target.h (struct thread_resume): Delete leave_stopped member.
14721 (struct target_ops): Add a `n' argument to the `resume' callback.
14722 * server.c (start_inferior): Adjust.
14723 (handle_v_cont, myresume): Adjust.
14724 * linux-low.c (check_removed_breakpoint): Adjust to resume
14725 interface change, and to removed leave_stopped field.
14726 (resume_ptr): Delete.
14727 (struct thread_resume_array): New.
14728 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14729 resume interface change.
14730 (linux_continue_one_thread, linux_queue_one_thread)
14731 (resume_status_pending_p): Check if the resume field is NULL
14732 instead of checking the leave_stopped member.
14733 (linux_resume): Adjust to the target resume interface change.
14734 * spu-low.c (spu_resume): Adjust to the target resume interface
14735 change.
14736 * win32-low.c (win32_detach, win32_resume): Ditto.
14737
c35fafde
PA
147382009-04-01 Pedro Alves <pedro@codesourcery.com>
14739
14740 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14741 flag.
14742 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14743 pending.
14744 (linux_continue_one_thread): Only preserve the stepping flag if
14745 there's a pending breakpoint.
14746
0a59d50b
PA
147472009-03-31 Pedro Alves <pedro@codesourcery.com>
14748
14749 * server.c (main): After the inferior having exited, call
14750 remote_close before exiting gdbserver.
14751
f04c6d38
TJB
147522009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14753
14754 Fix size of FPSCR in Power 7 processors.
14755 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14756 (PPC_FEATURE_HAS_DFP): New #define.
14757 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14758 size of the FPSCR.
14759
78e5cee6
PA
147602009-03-23 Pedro Alves <pedro@codesourcery.com>
14761
14762 * server.c (handle_query) Whitespace and formatting.
14763
1b3f6016
PA
147642009-03-22 Pedro Alves <pedro@codesourcery.com>
14765
14766 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14767 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14768 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14769 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14770 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14771 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14772 Makefile.in, configure.ac: Fix whitespace throughout.
14773 * configure: Regenerate.
14774
a07b2135
PA
147752009-03-22 Pedro Alves <pedro@codesourcery.com>
14776
14777 * inferiors.c (find_inferior): Make it safe for the callback
14778 function to delete the currently iterated inferior.
14779
67cc2626
PA
147802009-03-22 Pedro Alves <pedro@codesourcery.com>
14781
14782 * Makefile.in (linuw_low_h): Move higher.
14783 (thread-db.o): Depend on $(linux_low_h).
14784
54a0b537
PA
147852009-03-17 Pedro Alves <pedro@codesourcery.com>
14786
14787 Rename "process" to "lwp" throughout.
14788
14789 * linux-low.c (all_processes): Rename to...
14790 (all_lwps): ... this.
14791 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14792 (add_process): Rename to ...
14793 (add_lwp): ... this. Adjust.
14794 (linux_create_inferior): Adjust.
14795 (linux_attach_lwp): Adjust.
14796 (linux_attach): Adjust.
14797 (linux_kill_one_process): Rename to ...
14798 (linux_kill_one_lwp): ... this. Adjust.
14799 (linux_kill): Adjust.
14800 (linux_detach_one_process): Rename to ...
14801 (linux_detach_one_lwp): ... this. Adjust.
14802 (linux_detach): Adjust.
14803 (check_removed_breakpoint): Adjust.
14804 (status_pending_p): Adjust.
14805 (linux_wait_for_process): Rename to ...
14806 (linux_wait_for_lwp): ... this. Adjust.
14807 (linux_wait_for_event): Adjust.
14808 (send_sigstop): Adjust.
14809 (wait_for_sigstop): Adjust.
14810 (stop_all_processes): Rename to ...
14811 (stop_all_lwps): ... this.
14812 (linux_resume_one_process): Rename to ...
14813 (linux_resume_one_lwp): ... this. Adjust.
14814 (linux_set_resume_request, linux_continue_one_thread)
14815 (linux_queue_one_thread, resume_status_pending_p)
14816 (usr_store_inferior_registers, regsets_store_inferior_registers)
14817 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14818 Adjust.
14819 * linux-low.h (get_process): Rename to ...
14820 (get_lwp): ... this. Adjust.
14821 (get_thread_process): Rename to ...
14822 (get_thread_lwp): ... this. Adjust.
14823 (get_process_thread): Rename to ...
14824 (get_lwp_thread): ... this. Adjust.
14825 (struct process_info): Rename to ...
14826 (struct lwp_info): ... this.
14827 (all_processes): Rename to ...
14828 (all_lwps): ... this.
14829 * proc-service.c (ps_lgetregs): Adjust.
14830 * thread-db.c (thread_db_create_event, find_one_thread)
14831 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14832
0b16c5cf
PA
148332009-03-14 Pedro Alves <pedro@codesourcery.com>
14834
14835 * server.c (handle_query): Handle "qAttached".
14836
32de4b9d
NS
148372009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14838
14839 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14840 GPLv3, update license URL.
14841
2aecd87f
DE
148422009-03-01 Doug Evans <dje@google.com>
14843
93efd302 14844 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14845 (server_h): Add gdb_signals.h.
14846 (signals.o): Update.
14847 * server.h (target_signal_from_host,target_signal_to_host_p)
14848 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14849
86b1f9c5
PM
148502009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14851
14852 * remote-utils.c (getpkt): Also generate remote-debug
14853 information if noack_mode is set.
14854
4aa995e1
PA
148552009-02-06 Pedro Alves <pedro@codesourcery.com>
14856
14857 * server.c (handle_query): Report qXfer:siginfo:read and
14858 qXfer:siginfo:write as supported and handle them.
14859 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14860 * linux-low.c (linux_xfer_siginfo): New.
14861 (linux_target_ops): Set it.
14862
62709adf
PA
148632009-01-26 Pedro Alves <pedro@codesourcery.com>
14864
14865 * server.c (gdbserver_usage): Mention --remote-debug.
14866 (main): Accept '--remote-debug' switch.
14867
aef93bd7
DE
148682009-01-18 Doug Evans <dje@google.com>
14869
14870 * regcache.c (new_register_cache): No need to check result of xcalloc.
14871 * server.c (handle_search_memory): Back out calls to xmalloc,
14872 result is checked and error is returned to user upon failure.
14873 (handle_query): Ditto. Add more checks for result of malloc.
14874 (handle_v_cont): Check result of malloc, report error back to
14875 user upon failure.
14876 (handle_v_run): Ditto. Call freeargv.
14877 * server.h (freeargv): Declare.
14878 * utils.c (freeargv): New fn.
14879
54363045
DE
148802009-01-15 Doug Evans <dje@google.com>
14881
f626972c
DE
14882 * gdbreplay.c (perror_with_name): Make arg const char *.
14883 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14884 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14885 * utils.c (perror_with_name): Make arg const char *.
54363045 14886
18aae699
PA
148872009-01-14 Pedro Alves <pedro@codesourcery.com>
14888
14889 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14890 when handling a EXIT_PROCESS_DEBUG_EVENT.
14891
ff703abe
JB
148922009-01-06 Joel Brobecker <brobecker@adacore.com>
14893
14894 * gdbreplay.c (gdbreplay_version): Update copyright year.
14895 * server.c (gdbserver_version): Likewise.
14896
f21cc1a2 148972009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14898
14899 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14900 (handle_extended_wait): Improve comment.
0e21c1ec 14901
bca929d3
DE
149022008-12-13 Doug Evans <dje@google.com>
14903
14904 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14905 * server.h (ATTR_MALLOC): New macro.
14906 (xmalloc,xcalloc,xstrdup): Declare.
14907 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14908 * inferiors.c: Ditto.
14909 * linux-low.c: Ditto.
14910 * mem-break.c: Ditto.
14911 * regcache.c: Ditto.
14912 * remote-utils.c: Ditto.
14913 * server.c: Ditto.
14914 * target.c: Ditto.
14915 * win32-low.c: Ditto.
14916
97438e3f
DE
149172008-12-12 Doug Evans <dje@google.com>
14918
896c7fbb
DE
14919 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14920 in debugging printf.
14921
97438e3f
DE
14922 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14923
e3b886f8
DE
149242008-12-09 Doug Evans <dje@google.com>
14925
14926 * linux-low.h (struct process_info): Delete member tid, unused.
14927 * thread-db.c (find_one_thread): Update.
14928 (maybe_attach_thread): Update.
14929
07e059b5
VP
149302008-12-02 Pedro Alves <pedro@codesourcery.com>
14931
889bf7c5
PA
14932 * target.h (struct target_ops): Add qxfer_osdata member.
14933 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14934 and dirent.h.
14935 (linux_qxfer_osdata): New functions.
14936 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14937 callback.
14938 * server.c (handle_query): Handle "qXfer:osdata:read:".
14939 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14940 (buffer_xml_printf): New functions.
14941 * server.h (struct buffer): New.
14942 (buffer_grow_str, buffer_grow_str0): New macros.
14943 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14944 (buffer_xml_printf): Declare.
07e059b5 14945
4cab47ab
DE
149462008-11-24 Doug Evans <dje@google.com>
14947
14948 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14949
f142445f
DJ
149502008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14951
14952 * server.c (handle_v_run): Always use the supplied argument list.
14953
d0107bb6 149542008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14955
d0107bb6
BW
14956 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14957 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14958
2c4ad781
TJB
149592008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14960
14961 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14962 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14963 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14964 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14965 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14966 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14967 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14968 XML target descriptions.
14969 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14970 when inferior is running on an ISA 2.05 or later processor. Add
14971 special case to return offset for full 64-bit slot of FPSCR when
14972 in 32-bits.
14973
dfb64f85
DJ
149742008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14975
14976 * Makefile.in (SFILES, clean): Added sparc64 files.
14977 (reg-sparc64.o, reg-sparc64.c): New.
14978 * configure.srv (sparc*-*-linux*): New configuration.
14979 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14980 syscall arguments for SPARC.
14981 (regsets_store_inferior_registers): Likewise.
14982 * linux-sparc-low.c: New file.
14983
66b6e1dd
DE
149842008-10-21 Doug Evans <dje@google.com>
14985
14986 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14987 (READLINE_DIR,READLINE_DEP): Delete.
14988 (INTERNAL_CFLAGS): Update.
14989 (LINTFLAGS): Update.
14990
9b710a42
PA
149912008-10-10 Pedro Alves <pedro@codesourcery.com>
14992
14993 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14994 whole argv from the last run, not just argv[0].
14995
5822d809
PA
149962008-09-08 Pedro Alves <pedro@codesourcery.com>
14997
14998 * regcache.c (new_register_cache): Return NULL if the register
14999 cache size isn't known yet.
15000 (free_register_cache): Avoid dereferencing a NULL regcache.
15001
74aac56f
DJ
150022008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15003
15004 * configure.srv: Merge MIPS and MIPS64.
15005
400b20f5
MR
150062008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15007
15008 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15009
677c5bb1
LM
150102008-08-18 Luis Machado <luisgpm@br.ibm.com>
15011
15012 * Makefile.in: Add required vsx dependencies.
15013
15014 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15015 Declare init_registers_powerpc_vsx32l.
15016 Declare init_registers_powerpc_vsx64l.
15017 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15018 (ppc_arch_setup): Check for VSX in hwcap.
15019 (ppc_fill_vsxregset): New function.
15020 (ppc_store_vsxregset): New function.
15021 Add new VSX entry in regset_info target_regsets.
15022
15023 * configure.srv: Add new VSX dependencies.
15024
a6f3e723
SL
150252008-08-12 Pedro Alves <pedro@codesourcery.com>
15026
15027 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15028 (remote_open): Set or clear transport_is_reliable.
15029 (putpkt_binary): Don't expect acks in noack mode.
15030 (getpkt): Don't send ack/nac in noack mode.
15031 * server.c (handle_general_set): Handle QStartNoAckMode.
15032 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15033 qSupported.
15034 (main): Reset noack_mode on every connection.
15035 * server.h (noack_mode): Declare.
15036
a417dc56
RW
150372008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15038
15039 * Makefile.in (GDBREPLAY_OBS): New variable.
15040 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15041
3221518c
UW
150422008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15043 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15046 (usr_store_inferior_registers): Likewise.
15047 (regsets_store_inferior_registers): Likewise.
15048
ec56be1b
PA
150492008-07-31 Rolf Jansen <rj@surtec.com>
15050 Pedro Alves <pedro@codesourcery.com>
15051
15052 * configure.ac: Check for memmem declaration.
15053 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15054 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15055 (disable_packet_qfThreadInfo): Unconditionally compile.
15056 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15057 * configure, config.in: Regenerate.
15058
2fe5e3ff
DE
150592008-07-28 Doug Kwan <dougkwan@google.com>
15060
15061 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15062 (linux_write_memory): Remove declaration of errno.
15063
836acd6d
UW
150642008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15065
15066 * linux-low.c (handle_extended_wait): Do not use "status"
15067 variable uninitialized.
15068
aeba519e
PA
150692008-07-07 Pedro Alves <pedro@codesourcery.com>
15070
15071 * server.c (handle_v_attach): Inhibit reporting dll changes.
15072
db42f210
PA
150732008-06-27 Pedro Alves <pedro@codesourcery.com>
15074
15075 * remote-utils.c (prepare_resume_reply): If requested, don't
15076 output "thread:TID" in the T stop reply.
15077
15078 * server.c (disable_packet_vCont, disable_packet_Tthread)
15079 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15080 (handle_query): If requested, disable support for qC, qfThreadInfo
15081 and qsThreadInfo.
15082 (handle_v_requests): If requested, disable support for vCont.
15083 (gdbserver_show_disableable): New.
15084 (main): Handle --disable-packet and --disable-packet=LIST.
15085
15086 * server.h (disable_packet_vCont, disable_packet_Tthread)
15087 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15088
8e4c5421
CD
150892008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15090
15091 * server.c (gdbserver_usage): Mention --version.
15092
6e23a804
DJ
150932008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15094
15095 * Makefile.in (gdbreplay.o): New rule.
15096
90aa6a40
JM
150972008-06-06 Joseph Myers <joseph@codesourcery.com>
15098
15099 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15100 message, not gdbserver.
15101
c16158bc 151022008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15103 Nathan Sidwell <nathan@codesourcery.com>
15104 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15105
15106 * acinclude.m4: Include ../../config/acx.m4.
15107 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15108 * configure, config.in: Regenerate.
15109 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15110 * server.c (gdbserver_version): Print PKGVERSION.
15111 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15112 (main): Adjust gdbserver_usage calls.
15113 * gdbreplay.c (version, host_name): Add declarations.
15114 (gdbreplay_version, gdbreplay_usage): New.
15115 (main): Accept --version and --help options.
15116
aeb75bf5
DJ
151172008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15118
15119 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15120 (arm_breakpoint_at): Handle Thumb.
15121 (the_low_target): Add comment.
15122
76b233dd
UW
151232008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15124
15125 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15126
08388c79
DE
151272008-05-09 Doug Evans <dje@google.com>
15128
a3c83fae
DE
15129 * server.h (decode_search_memory_packet): Declare.
15130 * remote-utils.c (decode_search_memory_packet): New fn.
15131 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15132 (handle_search_memory): New fn.
15133 (handle_query): Process qSearch:memory packets.
15134
bb9c3d36
UW
151352008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15136
15137 * regcache.c (registers_length): Remove.
15138 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15139 full register packet.
15140 * regcache.h (registers_length): Remove prototype.
15141 * server.h (PBUFSIZ): Define to 16384.
15142
7284e1be
UW
151432008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15144
15145 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15146 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15147 powerpc-64l.o, and powerpc-altivec64l.o.
15148 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15149 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15150 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15151 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15152 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15153 to srv_xmlfiles.
15154
15155 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15156 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15157 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15158 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15159 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15160 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15161 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15162 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15163 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15164 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15165 (clean): Update.
15166
15167 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15168 (init_registers_powerpc_32l): ... this new prototype.
15169 (init_registers_powerpc_32): Remove, replace by ...
15170 (init_registers_powerpc_altivec32l): ... this new prototype.
15171 (init_registers_powerpc_e500): Remove, replace by ...
15172 (init_registers_powerpc_e500l): ... this new prototype.
15173 (init_registers_ppc64): Remove, replace by ...
15174 (init_registers_powerpc_64l): ... this new prototype.
15175 (init_registers_powerpc_64): Remove, replace by ...
15176 (init_registers_powerpc_altivec64l): ... this new prototype.
15177 (ppc_num_regs): Set to 73.
15178 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15179 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15180 (ppc_cannot_store_register): Handle orig_r3 and trap.
15181 (ppc_arch_setup): Update init_registers_... calls.
15182 (ppc_fill_gregset): Handle orig_r3 and trap.
15183
15184 * inferiors.c (clear_inferiors): Reset current_inferior.
15185
fdc59709
PB
151862008-04-23 Paolo Bonzini <bonzini@gnu.org>
15187
889bf7c5
PA
15188 * acinclude.m4: Add override.m4.
15189 * configure: Regenerate.
fdc59709 15190
c9b2f845
UW
151912008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15192
15193 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15194 initial call to init_register_ppc64.
15195
550512b8
UW
151962008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15197
43aaf8b6
PA
15198 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15199 single powerpc*-*-linux* case.
550512b8
UW
15200 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15201
b6430ec3
UW
152022008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15203
15204 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15205 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15206 from reg_xmlfiles.
15207 * linux-ppc-low.c: Include <elf.h>.
15208 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15209 (ppc_hwcap): New global variable.
15210 (ppc_regmap): Remove __SPE__ #ifdef sections.
15211 (ppc_regmap_e500): New global variable.
15212 (ppc_cannot_store_register): Update __SPE__ special case.
15213 (ppc_get_hwcap): New function.
15214 (ppc_arch_setup): Use it to determine whether inferior supports
15215 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15216 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15217 Do not access registers if target does not support AltiVec.
15218 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15219 Do not access registers if target does not support SPE.
15220 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15221
52fa2412
UW
152222008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15223
15224 * linux-low.c (disabled_regsets, num_regsets): New.
15225 (use_regsets_p): Delete.
15226 (linux_wait_for_process): Clear disabled_regsets.
15227 (regsets_fetch_inferior_registers): Check and set it.
15228 (regsets_store_inferior_registers): Likewise.
15229 (linux_fetch_registers, linux_store_registers): Do not use
15230 use_regsets_p.
15231 (initialize_low): Allocate disabled_regsets.
15232
e28b3332
DJ
152332008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15234
15235 * Makefile.in (LIBOBJS): New.
15236 (OBS): Use LIBOBJS.
15237 (memmem.o): New rule.
15238 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15239 * configure: Regenerated.
15240
4536995d
UW
152412008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15242
15243 * server.c (handle_query): Never return "unsupported" for
15244 qXfer:features:read queries.
15245
221c031f
UW
152462008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15247
15248 * server.c (get_features_xml): Fix inverted condition.
15249 (handle_query): Always support qXfer:feature:read.
15250
ccd213ac
DJ
152512008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15252
15253 * server.c (wrapper_argv): New.
15254 (start_inferior): Handle wrapper_argv. If set, expect an extra
15255 trap.
15256 (gdbserver_usage): Document --wrapper.
15257 (main): Parse --wrapper.
15258
6fe305f7
UW
152592008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15260
15261 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15262 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15263 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15264 (ppc_set_pc): Likewise.
15265 (ppc_arch_setup): New function.
15266 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15267 of collect_register.
889bf7c5 15268 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15269
5b0a002e
UW
152702008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15271
15272 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15273 instead of linux-ppc64-low.o.
15274 * linux-ppc64-low.c: Remove file.
15275 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15276 (linux-ppc64-low.o): Remove rule.
15277
15278 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15279 (init_registers_powerpc_64): Likewise.
15280 (ppc_regmap): Conditionally define depending on __powerpc64__.
15281 (ppc_cannot_store_register): Do not special-case "fpscr" when
15282 compiled on __powerpc64__.
15283 (ppc_collect_ptrace_register): New function.
15284 (ppc_supply_ptrace_register): New function.
15285 (ppc_breakpoint): Change type to "unsigned int".
15286 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15287 (the_low_target): Conditionally provide initializers for the
889bf7c5 15288 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15289 collect_ptrace_register and supply_ptrace_register members.
15290
9b4b61c8
UW
152912008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15292
15293 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15294 * server.c (gdbserver_xmltarget): Define.
15295 (get_features_xml): Use it to replace "target.xml" and arch_string.
15296
15297 * configure.srv: Remove srv_xmltarget. Add XML files that were
15298 mentioned there to srv_xmlfiles instead. Remove conditional tests
15299 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15300 srv_xmlfiles and srv_regobj to include all possible choices.
15301 * configure.ac (srv_xmltarget): Remove.
15302 (srv_xmlfiles): Do not add "target.xml".
15303 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15304 checks for supplementary target information.
15305 * configure: Regenerate.
15306 * Makefile.in (XML_TARGET): Remove.
15307 (target.xml): Remove rule.
15308 (clean): Do not clean up target.xml.
15309 (.PRECIOUS): Do not mention target.xml.
15310
15311 * target.h (struct target_ops): Remove arch_string member.
15312 * linux-low.c (linux_arch_string): Remove.
15313 (linux_target_ops): Remove arch_string initializer.
15314 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15315 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15316 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15317 * spu-low.c (spu_arch_string): Remove.
15318 (spu_target_ops): Remove arch_string initializer.
15319 * win32-low.c (win32_arch_string): Remove.
15320 (win32_target_ops): Remove arch_string initializer.
15321 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15322 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15323 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15324
ee1a7ae4
UW
153252008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15326
15327 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15328 by collect_ptrace_register and supply_ptrace_register hooks.
15329 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15330 instead of checking for the_low_target.left_pad_xfer.
15331 (usr_store_inferior_registers): Use collect_ptrace_register callback
15332 instead of checking for the_low_target.left_pad_xfer.
15333
15334 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15335 (s390_supply_ptrace_register): Likewise.
15336 (s390_fill_gregset): Call s390_collect_ptrace_register.
15337 (the_low_target): Update.
15338
15339 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15340 (ppc_supply_ptrace_register): Likewise.
15341 (the_low_target): Update.
15342
15343 * linux-i386-low.c (the_low_target): Update.
15344 * linux-x86-64-low.c (the_low_target): Update.
15345
d61ddec4
UW
153462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15347
15348 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15349 reg-s390.o and reg-s390x.o.
15350
15351 * linux-low.c (new_inferior): New global variable.
15352 (linux_create_inferior, linux_attach): Set it.
15353 (linux_wait_for_process): Call the_low_target.arch_setup after the
15354 target has stopped for the first time.
15355 (initialize_low): Do not call the_low_target.arch_setup.
15356
15357 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15358 (s390_set_pc): Likewise.
15359 (s390_arch_setup): New function.
15360 (the_low_target): Use s390_arch_setup as arch_setup routine.
15361
15362 * regcache.c (realloc_register_cache): New function.
15363 (set_register_cache): Call it for each existing regcache.
15364
d05b4ac3
UW
153652008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15366
15367 * server.h (init_registers): Remove prototype.
15368
15369 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15370 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15371 instead of init_registers ().
15372 * linux-arm-low.c (init_registers_arm): Add prototype.
15373 (init_registers_arm_with_iwmmxt): Likewise.
15374 (the_low_target): Add initializer for arch_setup field.
15375 * linux-cris-low.c (init_registers_cris): Add prototype.
15376 (the_low_target): Add initializer for arch_setup field.
15377 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15378 (the_low_target): Add initializer for arch_setup field.
15379 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15380 (the_low_target): Add initializer for arch_setup field.
15381 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15382 (the_low_target): Add initializer for arch_setup field.
15383 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15384 (the_low_target): Add initializer for arch_setup field.
15385 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15386 (the_low_target): Add initializer for arch_setup field.
15387 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15388 (init_registers_mips64_linux): Likewise.
15389 (the_low_target): Add initializer for arch_setup field.
15390 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15391 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15392 (the_low_target): Add initializer for arch_setup field.
15393 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15394 (init_registers_powerpc_64): Likewise.
15395 (the_low_target): Add initializer for arch_setup field.
15396 * linux-s390-low.c (init_registers_s390): Add prototype.
15397 (init_registers_s390x): Likewise.
15398 (the_low_target): Add initializer for arch_setup field.
15399 * linux-sh-low.c (init_registers_sh): Add prototype.
15400 (the_low_target): Add initializer for arch_setup field.
15401 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15402 (the_low_target): Add initializer for arch_setup field.
15403 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15404 (the_low_target): Add initializer for arch_setup field.
15405
15406 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15407 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15408 instead of init_registers ().
15409 * win32-arm-low.c (init_registers_arm): Add prototype.
15410 (the_low_target): Add initializer for arch_setup field.
15411 * win32-i386-low.c (init_registers_i386): Add prototype.
15412 (the_low_target): Add initializer for arch_setup field.
15413
15414 * spu-low.c (init_registers_spu): Add prototype.
15415 (initialize_low): Call initialie_registers_spu () instead of
15416 initialize_registers ().
15417
fd96d250
PA
154182008-02-19 Pedro Alves <pedro@codesourcery.com>
15419
15420 * server.c (handle_v_requests): When handling the vRun and vAttach
15421 packets, if already debugging a process, don't kill it. Return an
15422 error instead.
15423
d41b6bb4
DJ
154242008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15425
15426 * server.c (handle_query): Correct length check.
15427
5ac588cf
PA
154282008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15429
15430 * win32-low.c (do_initial_child_stuff): Add process handle
15431 parameter. Set current_process_handle and current_process_id from the
15432 parameters. Clear globals.
15433 (win32_create_inferior): Don't set current_process_handle and
15434 current_process_id here. Instead pass them on the call to
15435 do_initial_child_stuff.
15436 (win32_attach): Likewise.
15437 (win32_clear_inferiors): New.
15438 (win32_kill): Don't close the current process handle or the
15439 current thread handle here. Instead call win32_clear_inferiors.
15440 (win32_detach): Don't open a new handle to the process. Call
15441 win32_clear_inferiors.
15442 (win32_join): Don't rely on current_process_handle; open a new
15443 handle using the process id.
15444 (win32_wait): Call win32_clear_inferiors when the inferior process
15445 has exited.
15446
ecd7ecbc
DJ
154472008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15448
15449 * server.c (monitor_show_help): Add "exit".
15450
1525d545
MG
154512008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15452
ecd7ecbc 15453 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15454 (clean): Add reg-xtensa.c.
15455 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15456 * configure.srv (xtensa*-*-linux*) New target.
15457 * linux-xtensa-low.c: New.
15458 * xtensa-xtregs.c: New.
1525d545 15459
59a016f0
PA
154602008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15461
15462 * hostio.c: Don't include errno.h.
15463 (errno_to_fileio_errno): Move to hostio-errno.
15464 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15465 error number outputting to the target->hostio_last_error callback.
15466 (hostio_packet_error): Use FILEIO_EINVAL directly.
15467 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15468 calls to hostio_error.
15469 * hostio-errno.c: New.
15470 * server.h (hostio_last_error_from_errno): Declare.
15471 * target.h (target_ops): Add hostio_last_error member.
15472 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15473 as hostio_last_error handler.
889bf7c5 15474 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15475 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15476 (wince_hostio_last_error): New functions.
15477 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15478 as hostio_last_error handler.
15479 (win32_target_ops) [!_WIN32_WCE]: Register
15480 hostio_last_error_from_errno as hostio_last_error handler.
15481 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15482 (hostio-errno.o): New rule.
15483 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15484 * configure.srv (srv_hostio_err_objs): New variable. Default to
15485 hostio-errno.o.
15486 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15487 * configure: Regenerate.
15488
2d717e4f
DJ
154892008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15490
15491 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15492 (linux_kill, linux_detach): Clean up the process list.
15493 * remote-utils.c (remote_open): Improve port number parsing.
15494 (putpkt_binary, input_interrupt): Only send interrupts if the target
15495 is running.
15496 * server.c (extended_protocol): Make static.
15497 (attached): Define earlier.
15498 (exit_requested, response_needed, program_argv): New variables.
15499 (target_running): New.
15500 (start_inferior): Clear attached here.
15501 (attach_inferior): Set attached here.
15502 (require_running): Define.
15503 (handle_query): Use require_running and target_running. Implement
15504 "monitor exit".
15505 (handle_v_attach, handle_v_run): New.
15506 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15507 (gdbserver_usage): Update.
15508 (main): Redo argument parsing. Handle --debug and --multi. Handle
15509 --attach along with other options or after the port. Save
15510 program_argv. Support no initial program. Resynchronize
15511 communication with GDB after an error. Handle "monitor exit".
15512 Use require_running and target_running. Always allow the extended
15513 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15514 restart in extended mode.
15515 * README: Refer to the GDB manual. Update --attach usage.
15516
7407e2de
AS
155172007-12-20 Andreas Schwab <schwab@suse.de>
15518
15519 * linux-low.c (STACK_SIZE): Define.
15520 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15521 (linux_test_for_tracefork): Likewise.
15522
b65d95c5
DJ
155232007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15524
15525 * linux-low.c (linux_wait_for_event): Update messages. Do not
15526 reinsert auto-delete breakpoints.
15527 * mem-break.c (struct breakpoint): Change return type of handler to
15528 int.
15529 (set_breakpoint_at): Update handler type.
15530 (reinsert_breakpoint_handler): Return 1 instead of calling
15531 delete_breakpoint.
15532 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15533 setting a new one.
15534 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15535 * mem-break.h (set_breakpoint_at): Update handler type.
15536 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15537 * win32-low.c (auto_delete_breakpoint): New.
15538 (get_child_debug_event): Use it.
15539
4e799345
DJ
155402007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * configure.ac: Check for pread and pwrite.
15543 * hostio.c (handle_pread): Fall back to lseek and read.
15544 (handle_pwrite): Fall back to lseek and write.
15545 * config.in, configure: Regenerated.
15546
27524b67
DJ
155472007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15548
15549 * server.c (myresume): Add own_buf argument.
15550 (main): Update calls.
15551
a20d5e98
DJ
155522007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15553
15554 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15555 * remote-utils.c (remote_open): Do not call disable_async_io.
15556 (block_async_io): Delete.
15557 (unblock_async_io): Make static.
15558 (initialize_async_io): New.
15559 * server.c (handle_v_cont): Handle async I/O here.
15560 (myresume): Likewise. Move other common resume tasks here...
15561 (main): ... from here. Call initialize_async_io. Disable async
15562 I/O before the main loop.
15563 * server.h (initialize_async_io): Declare.
15564 (block_async_io, unblock_async_io): Delete prototypes.
15565 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15566
b79d787e
DJ
155672007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15568
15569 * remote-utils.c (readchar): Allow binary data in received messages.
15570
d97903b2
PA
155712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15572
15573 * win32-low.c (attaching): New global.
15574 (win32_create_inferior): Clear the `attaching' global.
15575 (win32_attach): Set the `attaching' global.
15576 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15577 attaching. Only set a breakpoint at the entry point if not
15578 attaching.
15579
311de423
PA
155802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15581
15582 * server.c (main): Don't report dll events on the initial
15583 connection on attaches.
15584
6c2d16d2
PA
155852007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15586
15587 * server.c (main): Relax numerical bases supported for the pid of
15588 the --attach command line argument.
15589
5ca906e6
PA
155902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15591
15592 * win32-low.c (win32_attach): Call OpenProcess before
15593 DebugActiveProcess, not after. Add last error output to error
15594 call.
15595
9c6c8194
PA
155962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15597
15598 * win32-low.c (win32_get_thread_context)
15599 (win32_set_thread_context): New functions.
15600 (thread_rec): Use win32_get_thread_context.
15601 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15602 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15603 field.
15604
4d5d1aaa
PA
156052007-12-03 Leo Zayas
15606 Pedro Alves <pedro_alves@portugalmail.pt>
15607
15608 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15609 global variables.
15610 (child_add_thread): Minor cleanup.
15611 (child_continue): Resume artificially suspended threads before
15612 calling ContinueDebugEvent.
15613 (suspend_one_thread): New.
15614 (fake_breakpoint_event): New.
15615 (get_child_debug_event): Change return type to int. Check here if
15616 gdb sent an interrupt request. If a soft interrupt was requested,
15617 fake a breakpoint event. Return 0 if there is no event to handle,
15618 and 1 otherwise.
15619 (win32_wait): Don't check here if gdb sent an interrupt request.
15620 Ensure there is a valid event to handle.
15621 (win32_request_interrupt): Add soft interruption method as last
15622 resort.
15623
c436e841
PA
156242007-12-03 Leo Zayas
15625 Pedro Alves <pedro_alves@portugalmail.pt>
15626
15627 * win32-low.h (win32_thread_info): Add descriptions to the
15628 structure members. Replace `suspend_count' counter by a
15629 `suspended' flag.
15630 * win32-low.c (thread_rec): Update condition of when to get the
15631 context from the inferior. Rely on ContextFlags being set if it
15632 has already been retrieved. Only suspend the inferior thread if
15633 we haven't already. Warn if that fails.
15634 (continue_one_thread): s/suspend_count/suspended/. Only call
15635 ResumeThread once. Warn if that fails.
15636
e7b5fa67
PA
156372007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15638
15639 * win32-low.c (win32_wait): Don't read from the inferior when it
15640 has already exited.
15641
a385171d
PA
156422007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15643
15644 * Makefile.in (win32_low_h): New variable.
15645 (win32-low.o): Add dependency on $(win32_low_h).
15646 (win32-arm-low.o, win32-i386-low.o): New rules.
15647
f80c84b3
DJ
156482007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15649
15650 * hostio.c: Correct copyright year.
15651
a6b151f1
DJ
156522007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15653
15654 * Makefile.in (OBS): Add hostio.o.
15655 (hostio.o): New rule.
15656 * server.h (handle_vFile): Declare.
15657 * hostio.c: New file.
15658 * server.c (handle_v_requests): Take packet_len and new_packet_len
15659 for binary packets. Call handle_vFile.
15660 (main): Update call to handle_v_requests.
15661
f9387fc3
DJ
156622007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15663
15664 * linux-low.c: Include <sched.h>.
15665
51c2684e
DJ
156662007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15667
15668 * linux-low.c (linux_tracefork_grandchild): New.
15669 (linux_tracefork_child): Use clone.
15670 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15671
75f83163
JB
156722007-10-31 Joel Brobecker <brobecker@adacore.com>
15673
15674 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15675
da5898ce
DJ
156762007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15677
15678 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15679
24a09b5f
DJ
156802007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15681
15682 * inferiors.c (change_inferior_id): Delete.
15683 (add_pid_to_list, pull_pid_from_list): New.
15684 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15685 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15686 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15687 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15688 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15689 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15690 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15691 (using_threads): Always set to 1.
15692 (handle_extended_wait): New.
15693 (add_process): Do not set TID.
15694 (linux_create_inferior): Set must_set_ptrace_flags.
15695 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15696 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15697 (linux_thread_alive): Rename TID argument to LWPID.
15698 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15699 (linux_wait_for_event): Do not use TID or check using_threads. Update
15700 call to dead_thread_notify. Call handle_extended_wait.
15701 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15702 (send_sigstop): Delete sigstop_sent.
15703 (wait_for_sigstop): Avoid TID.
15704 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15705 (linux_test_for_tracefork): New.
15706 (linux_lookup_signals): Use thread_db_active and
15707 linux_supports_tracefork_flag.
15708 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15709 * linux-low.h (get_process_thread): Avoid TID.
15710 (struct process_ifo): Move thread_known and tid to the end. Remove
15711 sigstop_sent.
15712 (linux_attach_lwp, thread_db_init): Update prototypes.
15713 * server.h (change_inferior_id): Delete prototype.
15714 (add_pid_to_list, pull_pid_from_list): New prototypes.
15715 * thread-db.c (thread_db_use_events): New.
15716 (find_first_thread): Rename to...
15717 (find_one_thread): ...this. Update callers and messages. Do not
15718 call fatal. Check thread_db_use_events. Do not call
15719 change_inferior_id or new_thread_notify.
15720 (maybe_attach_thread): Update. Do not call new_thread_notify.
15721 (thread_db_init): Set thread_db_use_events. Check use_events.
15722 * utils.c (fatal, warning): Correct message prefix.
15723
30ed0a8f
DJ
157242007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * Makefile.in (clean): Remove new files.
15727 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15728 (powerpc-64.o, powerpc-64.c): New rules.
15729 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15730 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15731 with SPE.
15732 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15733 SPE targets.
15734 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15735 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15736 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15737 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15738 (target_regsets): Add AltiVec and SPE register sets.
15739 * configure.ac: Check for AltiVec and SPE.
15740 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15741 (ppc_fill_vrregset, ppc_store_vrregset): New.
15742 (target_regsets): Add AltiVec register set.
15743 * configure: Regenerated.
15744
fd462a61
DJ
157452007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15746
15747 * linux-low.c (O_LARGEFILE): Define.
15748 (linux_read_memory): Use /proc/PID/mem.
15749 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15750 * configure, config.in: Regenerated.
15751
69f223ed
DJ
157522007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (linux_wait_for_event): Do not pass signals while
15755 single-stepping.
15756
aec18585
PA
157572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15758
15759 * win32-low.c (create_process): New.
15760 (win32_create_inferior): Use create_process instead of
15761 CreateProcess. If create_process failed retry appending an ".exe"
15762 suffix. Store the GetLastError result immediatelly after
15763 create_process calls and use it on the call to error.
15764
34d86ddd
PA
157652007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15766
15767 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15768
5a0e3bd0
JB
157692007-08-23 Joel Brobecker <brobecker@adacore.com>
15770
15771 * configure.ac: Switch license to GPLv3.
15772
f88c79e6
MS
157732007-08-01 Michael Snyder <msnyder@access-company.com>
15774
15775 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15776
6b3d9b83
PA
157772007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15778
15779 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15780 typedef.
15781 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15782 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15783 CloseToolhelp32Snapshot.
15784 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15785 CloseToolhelp32Snapshot.
15786
c588c53c
MS
157872007-07-27 Michael Snyder <michael.snyder@access-company.com>
15788
15789 * server.c (main): Check for inferior exit before main loop.
15790
aa0403d9
PA
157912007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15792
15793 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15794 instead of on tmp_desc.
15795
255e7678
DJ
157962007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15797 Daniel Jacobowitz <dan@codesourcery.com>
15798
15799 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15800 (add_thread): Minor cleanups.
15801 (clear_inferiors): Move lower in the file. Clear the DLL
15802 list.
15803 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15804 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15805 (xml_escape_text): New.
15806 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15807 for qSupported.
15808 (handle_v_cont): Report errors.
15809 (gdbserver_version): Update.
15810 (main): Correct size of own_buf. Do not report initial DLL events.
15811 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15812 (unloaded_dll, xml_escape_text): New.
15813 * win32-low.c (enum target_waitkind): Update comments.
15814 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15815 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15816 (win32_EnumProcessModules, win32_GetModuleInformation)
15817 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15818 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15819 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15820 (win32_Module32First, win32_Module32Next, load_toolhelp)
15821 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15822 (get_child_debug_event): Handle DLL events.
15823 (win32_wait): Likewise.
15824
0d37add9
DJ
158252007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15826
15827 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15828 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15829
45e2715e
PA
158302007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15831
15832 * win32-low.c (handle_output_debug_string): Ignore event if not
15833 waiting.
15834
c5674cf1
PA
158352007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15836
15837 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15838
2bbe3cc1
DJ
158392007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15842
ae13219e
DJ
158432007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15844
15845 * inferiors.c (change_inferior_id): Add comment.
15846 * linux-low.c (check_removed_breakpoint): Add an early
15847 prototype. Improve debug output.
15848 (linux_attach): Doc update.
15849 (linux_detach_one_process, linux_detach): Clean up before releasing
15850 each process.
15851 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15852 * linux-low.h (struct process_info): Doc improvement.
15853 * mem-break.c (delete_all_breakpoints): New.
15854 * mem-break.h (delete_all_breakpoints): New prototype.
15855 * thread-db.c (find_first_thread): New.
15856 (thread_db_create_event): Call it instead of
15857 thread_db_find_new_threads. Clean up unused variables.
15858 (maybe_attach_thread): Remove first thread handling.
15859 (thread_db_find_new_threads): Use find_first_thread.
15860 (thread_db_get_tls_address): Likewise.
15861
4105de34
DJ
158622007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15863
15864 * thread-db.c (thread_db_find_new_threads): Add prototype.
15865 (thread_db_create_event): Check for the main thread before adding
15866 a new thread.
15867 (maybe_attach_thread): Only enable event reporting if TID == 0.
15868 (thread_db_get_tls_address): Check for new threads.
15869
2b876972
DJ
158702007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * linux-low.c (linux_create_inferior): Try execv before execvp.
15873 * spu-low.c (spu_create_inferior): Likewise.
15874
7a245884
DJ
158752007-06-13 Mike Frysinger <vapier@gentoo.org>
15876
15877 * linux-low.c (linux_create_inferior): Change execv to execvp.
15878 * spu-low.c (spu_create_inferior): Likewies.
15879
117ce543
DJ
158802007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15881
15882 * Makefile.in (clean): Clean new files instead of deleted ones.
15883 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15884 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15885 rules.
15886 * configure.srv: Specify XML files and new regformats for MIPS and
15887 MIPS64 GNU/Linux.
15888 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15889 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15890 an entry for the restart register.
15891 (mips_cannot_fetch_register, mips_cannot_store_register)
15892 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15893 register names to match the XML descriptions.
15894 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15895 restart register instead of $0.
15896
0e7f50da
UW
158972007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15898 Markus Deuling <deuling@de.ibm.com>
15899
15900 * remote-utils.c (decode_xfer_write): New function.
15901 * server.h (decode_xfer_write): Add prototype.
15902 * server.c (handle_query): Add PACKET_LEN argument. Support
15903 qXfer:spu:read and qXfer:spu:write packets.
15904 (main): Pass packet_len to handle_query.
15905 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15906 * target.h (target_ops): Add qxfer_spu.
15907
374c1d38
UW
159082007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15909
15910 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15911 accessing non-seekable spufs files.
15912
bb63802a
UW
159132007-05-16 Markus Deuling <deuling@de.ibm.com>
15914
889bf7c5 15915 * server.c (handle_query): Add reply for qC packet.
bb63802a 15916
7390519e
PA
159172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15918 Leo Zayas <lerele@champenstudios@com>
15919
15920 * server.h (check_remote_input_interrupt_request): New function.
15921 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15922 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15923 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15924 (check_remote_input_interrupt_request): New function.
15925 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15926 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15927 winapi_GenerateConsoleCtrlEvent): New typedefs.
15928 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15929 to 250 ms.
15930 (win32_wait): Check for remote interrupt request
15931 with check_remote_input_interrupt_request.
15932 (win32_request_interrupt): New function.
15933 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15934
34b34921
PA
159352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15936
15937 * win32-low.c (debug_registers_changed,
15938 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15939 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15940 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15941 (thread_rec): Get context using the low target.
15942 (child_add_thread): Call thread_added on the low target,
15943 which does the same thing.
15944 (regptr): Delete.
15945 (do_initial_child_stuff): Remove debug registers references.
15946 Set context using the low target. Resume threads after
15947 setting the contexts.
15948 (child_continue): Remove dead variable. Remove debug
15949 registers references.
15950 (child_fetch_inferior_registers): Go through the low target.
15951 (do_child_store_inferior_registers): Remove.
15952 (child_store_inferior_registers): Go through the low target.
15953 (win32_resume): Remove debug registers references.
15954 Set context using the low target.
15955 (handle_exception): Change return type to void. Don't record
15956 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15957 first chance exception.
889bf7c5 15958 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15959 goto loop. Always return after waiting for debug event.
15960 (win32_wait): Convert to switch statement. Handle spurious
15961 events.
15962
15963 * win32-i386-low.c (debug_registers_changed,
15964 debug_registers_used): New.
15965 (initial_stuff): Rename to ...
15966 (i386_initial_stuff): ... this. Clear debug registers
15967 state variables.
15968 (store_debug_registers): Delete.
15969 (i386_get_thread_context): New.
15970 (load_debug_registers): Delete.
15971 (i386_set_thread_context): New.
15972 (i386_thread_added): New.
15973 (single_step): Rename to ...
15974 (i386_single_step): ... this.
15975 (do_fetch_inferior_registers): Rename to ...
15976 (i386_fetch_inferior_register): ... this.
15977 (i386_store_inferior_register): New.
15978 (the_low_target): Adapt to new interface.
15979
15980 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15981 (arm_get_thread_context): New.
15982 (arm_set_thread_context): New.
15983 (regptr): New.
15984 (do_fetch_inferior_registers): Rename to ...
15985 (arm_fetch_inferior_register): ... this.
15986 (arm_store_inferior_register): New.
15987 (arm_wince_breakpoint): Reimplement as unsigned long.
15988 (arm_wince_breakpoint_len): Define.
15989 (the_low_target): Adapt to new interface.
15990
15991 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15992 load_debug_registers. Add get_thread_context, set_thread_context,
15993 thread_added and store_inferior_register. Rename
15994 fetch_inferior_registers to fetch_inferior_register.
15995 (regptr): Remove declaration.
15996
dd6953e1
PA
159972007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15998
15999 * linux-low.c (linux_detach): Change return type to int. Return 0.
16000 * spu-low.c (spu_detach): Likewise.
16001
444d6139
PA
160022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16003
16004 * target.h (target_ops): Change return type of detach to int.
16005 Add join.
16006 (join_inferior): New.
16007 * server.c (main): Don't skip detach support on mingw32.
16008 If the inferior doesn't support detaching return error.
16009 Call join_inferior instead of using waitpid.
16010 * linux-low.c (linux_join): New.
16011 (linux_target_op): Add linux_join.
16012 * spu-low.c (spu_join): New.
16013 (spu_target_ops): Add spu_join.
16014 * win32-low.c (win32_detach): Adapt to new interface.
16015 Reopen current_process_handle before detaching. Issue a child
16016 resume before detaching.
16017 (win32_join): New.
16018 (win32_target_op): Add win32_join.
16019
1d5315fe
PA
160202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16021
16022 * win32-low.c (win32-attach): Fix return value.
16023 * target.h (target_ops): Describe ATTACH return values.
16024
bf914831
PA
160252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16026
16027 * win32-low.c (GETPROCADDRESS): Define.
16028 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16029 (winapi_DebugSetProcessKillOnExit): Likewise.
16030 (win32_create_inferior): Force usage of ansi CreateProcessA.
16031 (win32_attach): Use GETPROCADDRESS.
16032 (win32_detach): Likewise.
16033
f72f3e60
PA
160342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16035
16036 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16037
ed50f18f
PA
160382007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16039
16040 * win32-low.c: Commit leftover changes from 2007-03-29.
16041
0c2ead7e
DJ
160422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16045 fields short instead of int. Add explicit padding.
16046 (i387_cache_to_fsave): Remove unnecessary casts.
16047 (i387_fsave_to_cache): Doc fix.
16048 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16049
73725ff3
DJ
160502007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16051
16052 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16053 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16054
d99f33d8
PA
160552007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16056
16057 * configure.srv (arm*-*-mingw32ce*): Move near the other
16058 arm targets.
16059
68070c10
PA
160602007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16061
2482afc6 16062 * configure.ac: Add errno checking.
68070c10
PA
16063 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16064 sys/file.h and malloc.h.
16065 (AC_CHECK_DECLS): Add perror.
16066 (srv_mingwce): Handle.
2482afc6 16067 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16068 win32-i386-low.o to srv_tgtobj.
16069 (i[34567]86-*-mingw*): Likewise.
16070 (arm*-*-mingw32ce*): Add case.
16071 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16072 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16073 [__MINGW32CE__] (strerror): New function.
16074 [__MINGW32CE__] (errno): Define to GetLastError.
16075 [__MINGW32CE__] (COUNTOF): New macro.
16076 (remote_open): Remove extra close call.
16077 * mem-break.c (delete_breakpoint_at): New function.
16078 * mem-break.h (delete_breakpoint_at): Declare.
16079 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16080 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16081 [USE_WIN32API] (read, write): Add char* casts.
16082 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16083 * server.h: Include wincecompat.h on Windows CE.
16084 [HAVE_ERRNO_H]: Check.
16085 (perror): Declare if not declared.
16086 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16087 (perror_with_name): Remove errno declaration.
16088 * wincecompat.h: New.
16089 * wincecompat.c: New.
16090 * win32-low.h: New.
16091 * win32-arm-low.c: New.
16092 * win32-i386-low.c: New.
16093 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16094 (OUTMSG2): Make it safe.
16095 (_T): New macro.
16096 (COUNTOF): New macro.
16097 (NUM_REGS): Get it from the low target.
16098 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16099 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16100 (thread_rec): Let low target handle debug registers.
16101 (child_add_thread): Likewise.
16102 (child_init_thread_list): Likewise.
16103 (continue_one_thread): Likewise.
16104 (regptr): New.
16105 (do_child_fetch_inferior_registers): Move to ...
16106 * win32-i386-low.c: ... here, and rename to ...
16107 (do_fetch_inferior_registers): ... this.
889bf7c5 16108 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16109 Go through the low target.
16110 (do_child_store_inferior_registers): Use regptr.
16111 (strwinerror): New function.
16112 (win32_create_inferior): Handle Windows CE.
16113 Use strwinerror instead of strerror on Windows error
16114 codes. Add program to the error output.
16115 Don't close the main thread handle on Windows CE.
16116 (win32_attach): Use coredll.dll on Windows CE.
16117 (win32_kill): Close current process and current
16118 thread handles.
16119 (win32_detach): Use coredll.dll on Windows CE.
16120 (win32_resume): Let low target handle debug registers, and
16121 step request.
16122 (handle_exception): Add/Remove initial breakpoint. Avoid
16123 non-existant WSTOPSIG on Windows CE.
16124 (win32_read_inferior_memory): Cast to remove warning.
16125 (win32_arch_string): Go through the low target.
16126 (initialize_low): Call set_breakpoint_data with the low
16127 target's breakpoint.
16128 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16129 FOP_REGNUM, mappings): Move to ...
16130 * win32-i386-low.c: ... here.
16131 * win32-low.c (win32_thread_info): Move to ...
16132 * win32-low.h: ... here.
16133 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16134 win32-arm-low.c and wincecompat.c.
16135 (all:): Add $EXEEXT.
16136 (install-only:): Likewise.
16137 (gdbserver:): Likewise.
16138 (gdbreplay:): Likewise.
16139 * config.in: Regenerate.
16140 * configure: Regenerate.
16141
41093d81
PA
161422007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16143
16144 * win32-low.c: Rename typedef thread_info to
16145 win32_thread_info throughout.
16146
544afa54
PA
161472007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16148
16149 * win32-i386-low.c: Rename to ...
16150 * win32-low.c: ... this.
16151 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16152 * Makefile.in: Likewise.
16153
bce7165d
PA
161542007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16155
16156 * remote-utils.c (monitor_output): Constify msg parameter.
16157 * server.h (monitor_output): Likewise.
16158 * win32-i386-low.c (handle_output_debug_string): New.
16159 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16160 handle_output_debug_string.
16161 (get_child_debug_event): Likewise.
16162
506c7aa0
DJ
161632007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16164
16165 * server.c (main): Correct strtoul check.
16166
42c81e2a
DJ
161672007-03-27 Jon Ringle <jon@ringle.org>
16168
16169 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16170
9453113a
DJ
161712007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16172
16173 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16174
64a69107
DJ
161752007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * terminal.h: Check HAVE_SGTTY_H.
16178
161792007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16180
16181 * remote-utils.c (remote_open): Print out the assigned port number.
16182
c74d0ad8
DJ
161832007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16184
16185 * remote-utils.c (monitor_output): New function.
16186 * server.c (debug_threads): Define here.
16187 (monitor_show_help): New function.
16188 (handle_query): Handle qRcmd.
16189 (main): Do not handle 'd' packet.
16190 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16191 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16192 of debug_threads.
16193
de7c3b4a
PA
161942007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16195
16196 * Makefile.in (EXEEXT): New.
16197 (clean): Use $(EXEEXT).
16198
ef57601b
PA
161992007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16200
16201 * target.h (target_ops): Rename send_signal to request_interrupt,
16202 and remove enum target_signal parameter.
16203 * linux-low.c (linux_request_interrupt): Rename from
16204 linux_send_signal, and always send SIGINT.
16205 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16206 and always send SIGINT.
16207 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16208 of send_signal.
16209 (input_interrupt): Likewise.
16210
820f2bda
PA
162112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16212
16213 * server.c (get_features_xml): Check if target implemented
16214 arch_string.
16215 * win32-i386-low.c (win32_arch_string): New.
16216 (win32_target_ops): Add win32_arch_string as arch_string member.
16217
ab39bf24
UW
162182007-02-22 Markus Deuling <deuling@de.ibm.com>
16219
16220 * spu-low.c (spu_arch_string): New.
16221 (spu_target_ops): Add spu_arch_string.
16222
61ff6e04
DJ
162232007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16226 * configure.ac: Do not check for terminal.h.
16227 * configure, config.in: Regenerated.
16228
fb1e4ffc
DJ
162292007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16230
16231 * Makefile.in (OBS): Add $(XML_BUILTIN).
16232 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16233 (clean): Update.
16234 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16235 (arm-with-iwmmxt.c): New.
16236 * config.in, configure: Regenerate.
16237 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16238 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16239 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16240 (arm*-*-linux*): Add iWMMXt and regset support.
16241 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16242 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16243 (arm_store_wmmxregset, target_regsets): New.
16244 * server.c (get_features_xml): Take annex argument. Check builtin
16245 XML documents.
16246 (handle_query): Handle multiple annexes.
16247
0f48aa01
DJ
162482007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16249
16250 * remote-utils.c [USE_WIN32API] (read, write): Define.
16251 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16252 write.
16253
23181151
DJ
162542007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16255
16256 * linux-i386-low.c (the_low_target): Set arch_string.
16257 * linux-x86-64-low.c (the_low_target): Likewise.
16258 * linux-low.c (linux_arch_string): New.
16259 (linux_target_ops): Add it.
16260 * linux-low.h (struct linux_target_ops): Add arch_string.
16261 * server.c (write_qxfer_response): Use const void * for DATA.
16262 (get_features_xml): New.
16263 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16264 * target.h (struct target_ops): Add arch_string method.
16265
9d606399
DJ
162662007-01-03 Denis Pilat <denis.pilat@st.com>
16267 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * linux-low.c (linux_kill): Handle being called with no threads.
16270 * win32-i386-low.c (win32_kill): Likewise.
16271 (get_child_debug_event): Clear current_process_handle.
16272
162732006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16274 Daniel Jacobowitz <dan@codesourcery.com>
16275
16276 * remote-utils.c (remote_open): Check the type of specified
16277 serial port devices before opening them.
16278 * server.c (main): Kill the inferior if an error occurs during
16279 the first remote_open.
16280
a5e13d24
DJ
162812006-12-05 Markus Deuling <deuling@de.ibm.com>
16282
16283 * README: Update supported targets.
16284
186947f7
DJ
162852006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16286
16287 * Makefile.in (clean): Remove reg-mips64.c.
16288 (reg-mips64.c, reg-mips64.o): New rules.
16289 * configure.srv: Handle mips64. Include regset support for mips.
16290 * linux-mips-low.c (union mips_register): New.
16291 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16292 (mips_breakpoint, mips_breakpoint_at): Use int.
16293 (mips_collect_register, mips_supply_register)
16294 (mips_collect_register_32bit, mips_supply_register_32bit)
16295 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16296 (mips_store_fpregset, target_regsets): New.
16297 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16298
a13e2c95
UW
162992006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16300
16301 * configure.srv: Add target "spu*-*-*".
16302 * Makefile.in (clean): Remove reg-spu.c.
16303 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16304 * spu-low.c: New file.
16305
cb7283db
DJ
163062006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16307
16308 * configure.ac: Correct td_thr_tls_get_addr test.
16309 * configure: Regenerated.
16310
89be2091
DJ
163112006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16312
16313 * linux-low.c (linux_wait_for_event): Reformat. Use the
16314 pass_signals array.
16315 * remote-utils.c (decode_address_to_semicolon): New.
16316 * server.c (pass_signals, handle_general_set): New.
16317 (handle_query): Mention QPassSignals for qSupported.
16318 (main): Call handle_general_set.
16319 * server.h (pass_signals, decode_address_to_semicolon): New.
16320
000ef4f0
DJ
163212006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16322
16323 * server.c (handle_query): Correct error handling for read_auxv.
16324
b7149293
UW
163252005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16326
16327 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16328 and srv_linux_thread_db to yes.
16329 * linux-s390-low.c (s390_fill_gregset): New function.
16330 (target_regsets): Define data structure.
16331
dae5f5cf
DJ
163322006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16333
16334 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16335 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16336 * config.in, configure: Regenerated.
16337 * inferiors.c (gdb_id_to_thread): New function.
16338 (gdb_id_to_thread_id): Use it.
16339 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16340 * linux-low.h (struct process_info): Add th member.
16341 (thread_db_get_tls_address): New prototype.
16342 * remote-utils.c (decode_address): Make non-static.
16343 * server.c (handle_query): Handle qGetTLSAddr.
16344 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16345 * target.h (struct target_ops): Add get_tls_address.
16346 * thread-db.c (maybe_attach_thread): Save the thread handle.
16347 (thread_db_get_tls_address): New.
16348
32ca6d61
DJ
163492006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16350
16351 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16352 (linux_resume_one_process): Take a siginfo_t *. Update all
16353 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16354 (struct pending_signals): Add a siginfo_t.
16355 (linux_wait_for_process): Always set last_status.
16356 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16357 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16358 * linux-low.h (struct process_info): Add last_status.
16359
5ffff7c1
DJ
163602006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16361
16362 * remote-utils.c (try_rle): New function.
16363 (putpkt_binary): Use it.
16364
8695c747
DJ
163652006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16366
16367 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16368 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16369 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16370 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16371 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16372 point registers.
16373
290fadea
RS
163742006-08-08 Richard Sandiford <richard@codesourcery.com>
16375
16376 * server.c (terminal_fd): New variable.
16377 (old_foreground_pgrp): Likewise.
16378 (restore_old_foreground_pgrp): New function.
16379 (start_inferior): Record the terminal file descriptor in terminal_fd
16380 and its original foreground group in old_foreground_pgrp. Register
16381 restore_old_foreground_pgrp with atexit().
16382
9f2e1e63
DJ
163832006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16384
16385 * server.c (handle_query): Correct qPart to qXfer.
16386
b80864fb
DJ
163872006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16388
16389 * configure.ac: Check for more headers which are missing on
16390 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16391 * configure.srv: Add Cygwin and mingw32.
16392 * remote-utils.c: Don't include headers unconditionally which
16393 are missing on mingw32. Include <winsock.h> for mingw32.
16394 (remote_open): Adjust for mingw32 support. Flush
16395 standard error after writing to it.
16396 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16397 (unblock_async_io, enable_async_io, disable_async_io)
16398 (readchar, getpkt): Update for Winsock support.
16399 (prepare_resume_reply): Expect a protocol signal number.
16400 * server.c: Disable <sys/wait.h> on mingw32.
16401 (start_inferior): Adjust for mingw32 support. Flush
16402 standard error after writing to it.
16403 (attach_inferior): Likewise. Use protocol signal
16404 numbers.
16405 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16406 and names.
16407 * win32-i386-low.c: New file.
16408 * Makefile.in (XM_CLIBS): Set.
16409 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16410 (win32-i386-low.o): New dependency rule.
16411 * linux-low.c (linux_wait): Use target signal numbers.
16412 * target.h (struct target_ops): Doc fix.
16413 * server.h (target_signal_to_name): New prototype.
16414 * gdbreplay.c: Don't include headers unconditionally which
16415 are missing on mingw32. Include <winsock.h> for mingw32.
16416 (remote_close, remote_open): Adjust for Winsock support.
16417 * configure, config.in: Regenerated.
16418
0876f84a
DJ
164192006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16420
16421 * server.c (decode_xfer_read, write_qxfer_response): New.
16422 (handle_query): Take a packet length argument. Handle
16423 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16424 the qSupported response.
16425 (main): Update call to handle_query.
16426
01f9e8fa
DJ
164272006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16428
16429 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16430 (putpkt_binary): Renamed from putpkt and adjusted for binary
16431 data.
16432 (putpkt): New wrapper for putpkt_binary.
16433 (readchar): Don't mask off the high bit.
16434 (decode_X_packet): New function.
16435 * server.c (main): Call putpkt_binary if a handler sets the packet
16436 length. Save the length of the incoming packet. Handle 'X'.
16437 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16438
be2a5f71
DJ
164392006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16440
16441 * server.c (handle_query): Handle qSupported.
16442
ea025f5f
DJ
164432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16444
16445 * remote-utils.c (all_symbols_looked_up): New variable.
16446 (look_up_one_symbol): Check it.
16447 * server.h (look_up_one_symbol): New declaration.
16448 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16449
9308fc88
DJ
164502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16453 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16454 (PTRACE_GET_THREAD_AREA): Define.
16455 (ps_get_thread_area): New function.
16456
52fb6437
NS
164572006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16458
16459 * configure.srv (m68k*-*-uclinux*): New target.
16460 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16461 (linux_resume_one_process): Remove extraneous cast.
16462 (linux_read_offsets): New.
16463 (linux_target_op): Add linux_read_offsets on mmuless systems.
16464 * server.c (handle_query): Add qOffsets logic.
16465 * target.h (struct target_ops): Add read_offsets.
16466
21b0f40c
DJ
164672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16468
16469 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16470 (PTRACE_GET_THREAD_AREA): Define.
16471 (ps_get_thread_area): New function.
16472 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16473 (linux-x86-64-low.o): Update.
16474
0050a760
DJ
164752006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16476
16477 * configure.ac: Remove checks for prfpregset_t.
16478 * gdb_proc_service.h: New file.
16479 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16480 new "gdb_proc_service.h".
16481 * proc-service.c: Likewise.
16482 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16483 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16484 * Makefile.in (gdb_proc_service_h): Updated.
16485 * configure, config.in: Regenerated.
16486
b92a518e
DJ
164872006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16488
16489 * remote-utils.c (prepare_resume_reply): Move declaration
16490 of gdb_id_from_wait to the top of the block.
16491
545587ee
DJ
164922006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16493
16494 * linux-low.c (regsets_store_inferior_registers): Read the regset
16495 from the target before filling it.
16496
9db87ebd
DJ
164972006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16498
16499 * server.c (attach_inferior): Return SIGTRAP for a successful
16500 attach.
16501
dd24457d
DJ
165022006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16503
16504 * Makefile.in (OBS): Add version.o.
16505 (STAGESTUFF): Delete.
16506 (version.o): Add dependencies.
16507 (version.c): Replace rule.
16508 (clean): Remove version.c.
16509 * server.c (gdbserver_version): New.
16510 (gdbserver_usage): Use printf.
16511 (main): Handle --version and --help.
16512 * server.h (version, host_name): Add declarations.
16513
6f0f660e
EZ
165142005-12-23 Eli Zaretskii <eliz@gnu.org>
16515
889bf7c5
PA
16516 * linux-arm-low.c:
16517 * linux-arm-low.c:
16518 * inferiors.c:
16519 * i387-fp.h:
16520 * i387-fp.c:
16521 * gdbreplay.c:
16522 * regcache.c:
16523 * proc-service.c:
16524 * mem-break.h:
16525 * mem-break.c:
16526 * linux-x86-64-low.c:
16527 * linux-sh-low.c:
16528 * linux-s390-low.c:
16529 * linux-ppc64-low.c:
16530 * linux-ppc-low.c:
16531 * linux-mips-low.c:
16532 * linux-m68k-low.c:
16533 * linux-m32r-low.c:
16534 * linux-low.h:
16535 * linux-low.c:
16536 * linux-ia64-low.c:
16537 * linux-i386-low.c:
16538 * linux-crisv32-low.c:
16539 * thread-db.c:
16540 * terminal.h:
16541 * target.h:
16542 * target.c:
16543 * server.h:
16544 * server.c:
16545 * remote-utils.c:
16546 * regcache.h:
16547 * utils.c:
16548 * Makefile.in:
16549 * configure.ac:
6f0f660e
EZ
16550 * gdbserver.1: Add (C) after Copyright. Update the FSF
16551 address.
16552
9d1fb177
DJ
165532005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16554
16555 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16556 (arm_breakpoint_at): Recognize both breakpoints.
16557 (the_low_target): Use the correct breakpoint instruction.
16558
011a70c2
DJ
165592005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16560
16561 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16562 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16563 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16564 (the_low_target): Update.
16565
7fb85e41
AS
165662005-10-25 Andreas Schwab <schwab@suse.de>
16567
16568 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16569
16570 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16571 (ia64_num_regs): Reduce to 462.
16572
3db0444b
DJ
165732005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16574
16575 * acinclude.m4: Correct quoting.
16576 * aclocal.m4: Regenerated.
16577
16578 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16579 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16580 (thread_db_init): Call thread_db_err_str.
16581 * configure.ac: Check for TD_VERSION.
16582 * config.in, configure: Regenerated.
16583
bee0189a
DJ
165842005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16585
16586 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16587
e9d25b98
DJ
165882005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16589
16590 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16591 is not available. Define HAVE_PTRACE_GETREGS if it is.
16592 * config.in, configure: Regenerated.
16593 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16594 * linux-i386-low.c, linux-m68k-low.c: Update to use
16595 HAVE_PTRACE_GETREGS.
16596 * linux-low.c (regsets_fetch_inferior_registers)
16597 (regsets_store_inferior_registers): Only return 0 if we processed
16598 GENERAL_REGS.
16599 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16600 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16601
a06660f7
DJ
166022005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16603
16604 * inferiors.c (struct thread_info): Add gdb_id.
16605 (add_thread): Add gdb_id argument.
16606 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16607 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16608 calls to add_thread.
16609 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16610 * server.c (handle_query): Use thread_to_gdb_id.
16611 (handle_v_cont, main): Use gdb_id_to_thread_id.
16612 * server.h (add_thread): Update prototype.
16613 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16614 prototypes.
16615
5a1f5858
DJ
166162005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16617
16618 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16619 left-padded registers.
16620 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16621 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16622
e122f1f5
SE
166232005-07-01 Steve Ellcey <sje@cup.hp.com>
16624
16625 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16626 * configure: Regenerate.
16627 * config.in: Regenerate.
16628 * server.h (NEED_DECLARATION_STRERROR):
16629 Replace with !HAVE_DECL_STRERROR.
16630
d592fa2f
DJ
166312005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16632
16633 * linux-low.c (linux_wait, linux_send_signal): Don't test
16634 an unsigned long variable for > 0 if it could be MAX_ULONG.
16635 * server.c (myresume): Likewise.
16636 * target.c (set_desired_inferior): Likewise.
16637
ccbd4912
MK
166382005-06-13 Mark Kettenis <kettenis@gnu.org>
16639
16640 * configure.ac: Simplify and improve check for socklen_t.
16641 * configure, config.in: Regenerate.
16642
f450004a
DJ
166432005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16644
16645 * acconfig.h: Remove.
16646 * configure.ac: Add a test for socklen_t. Use three-argument
16647 AC_DEFINE throughout.
16648 * config.in: Regenerated using autoheader 2.59.
16649 * configure: Regenerated.
16650
16651 * gdbreplay.c (socklen_t): Provide a default.
16652 (remote_open): Use socklen_t.
16653 * remote-utils.c (socklen_t): Provide a default.
16654 (remote_open): Use socklen_t.
16655 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16656 unsigned char.
16657
16658 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16659 char for buffers.
16660 * linux-low.c (linux_read_memory, linux_write_memory)
16661 (linux_read_auxv): Likewise.
16662 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16663 (check_mem_write): Likewise.
16664 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16665 Likewise.
16666 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16667 (registers_from_string, register_data): Likewise.
16668 * server.c (handle_query, main): Likewise.
16669 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16670 (decode_M_packet): Likewise.
16671 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16672 * target.h (struct target_ops): Update read_memory, write_memory,
16673 and read_auxv.
16674 (read_inferior_memory, write_inferior_memory): Update.
16675 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16676 to unsigned char *.
16677 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16678 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16679 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16680 linux-s390-low.c, linux-sh-low.c: Update for changes in
16681 read_inferior_memory and the_low_target->breakpoint.
16682
eee84df1
DJ
166832005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16684
16685 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16686 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16687 * configure.srv: Add powerpc64-*-linux*.
16688 * linux-ppc64-low.c: New file.
16689
45b134e5
OF
166902005-05-23 Orjan Friberg <orjanf@axis.com>
16691
16692 * linux-cris-low.c: New file with support for CRIS.
16693 * linux-crisv32-low.c: Ditto for CRISv32.
16694 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16695 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16696 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16697 reg-crisv32.o, and reg-crisv32.c to make rules.
16698 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16699 recognized targets.
16700
48d93c75
UW
167012005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16702
16703 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16704 of sizeof (PTRACE_XFER_TYPE).
16705 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16706
e013ee27
OF
167072005-05-12 Orjan Friberg <orjanf@axis.com>
16708
889bf7c5 16709 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16710 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16711 pointers for hardware watchpoint support.
16712 * linux-low.h (struct linux_target_ops): Ditto.
16713 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16714 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16715 to linux_target_ops.
16716 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16717 reply packet.
16718 * server.c (main): Recognize 'Z' and 'z' packets.
16719
b0ded00b
UW
167202005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16721
16722 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16723 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16724 (the_low_target): Add new members.
16725
8643e2ad
DJ
167262005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16727
16728 * proc-service.c (ps_lgetregs): Search all_processes instead of
16729 all_threads.
16730
fc620387
DJ
167312005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16732
16733 * server.c (start_inferior): Change return type to int.
16734 (attach_inferior): Change sigptr to int *.
16735 (handle_v_cont, handle_v_requests): Change signal to int *.
16736 (main): Change signal to int.
16737
167382005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16739
16740 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16741 * configure.srv: Add m32r*-*-linux*.
16742 * linux-m32r-low.c: New file.
16743
e0e76420
DJ
167442005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16745
16746 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16747
a1928bad
DJ
167482005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16749
16750 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16751 Take unsigned long arguments for PIDs.
16752 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16753 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16754 (wait_for_sigstop, linux_resume_one_process)
16755 (regsets_fetch_inferior_registers, linux_send_signal)
16756 (linux_read_auxv): Likewise. Update the types of variables holding
16757 PIDs. Update format string specifiers.
16758 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16759 * remote-utils.c (prepare_resume_reply): Likewise.
16760 * server.c (cont_thread, general_thread, step_thread)
16761 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16762 unsigned long.
16763 (handle_query): Update format specifiers.
16764 (handle_v_cont, main): Use strtoul for thread IDs.
16765 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16766 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16767 (general_thread, step_thread, thread_from_wait)
16768 (old_thread_from_wait): Update.
16769 * target.h (struct thread_resume): Use unsigned long for THREAD.
16770 (struct target_ops): Use unsigned long for arguments to attach and
16771 thread_alive.
16772
dcdb98d2
DJ
167732005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * acinclude.m4: Include bfd/bfd.m4 directly.
16776 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16777 <agriffis@toolchain.org>.
16778 * aclocal.m4, configure: Regenerated.
16779
bec39cab
AC
167802005-01-07 Andrew Cagney <cagney@gnu.org>
16781
16782 * configure.ac: Rename configure.in, require autoconf 2.59.
16783 * configure: Re-generate.
16784
434c4c77
DJ
167852004-12-08 Daniel Jacobowitz <dan@debian.org>
16786
16787 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16788 LIBS when finished.
16789 * aclocal.m4: Regenerated.
16790 * configure: Regenerated.
16791
db1d3e1b
AS
167922004-11-21 Andreas Schwab <schwab@suse.de>
16793
16794 * linux-m68k-low.c (m68k_num_gregs): Define.
16795 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16796 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16797 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16798 (m68k_breakpoint_at): New. Add to the_low_target.
16799
16800 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16801 srv_linux_thread_db to yes.
16802
43360365
JB
168032004-10-20 Joel Brobecker <brobecker@gnat.com>
16804
16805 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16806 (ARCH_SET_FS): Likewise.
16807 (ARCH_GET_FS): Likewise.
16808 (ARCH_GET_GS): Likewise.
16809
fd500816
DJ
168102004-10-16 Daniel Jacobowitz <dan@debian.org>
16811
16812 * linux-i386-low.c (ps_get_thread_area): New.
16813 * linux-x86-64-low.c (ps_get_thread_area): New.
16814 * linux-low.c: Include <sys/syscall.h>.
16815 (linux_kill_one_process): Don't kill the first thread here.
16816 (linux_kill): Kill the first thread here.
16817 (kill_lwp): New function.
16818 (send_sigstop, linux_send_signal): Use it.
16819 * proc-service.c: Clean up #ifdefs.
16820 (fpregset_info): Delete.
16821 (ps_lgetregs): Update and enable implementation.
16822 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16823 implementations.
16824 * remote-utils.c (struct sym_cache, symbol_cache): New.
16825 (input_interrupt): Print a clearer message.
16826 (async_io_enabled): New variable.
16827 (enable_async_io, disable_async_io): Use it. Update comments.
16828 (look_up_one_symbol): Use the symbol cache.
16829 * thread-db.c (thread_db_look_up_symbols): New function.
16830 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16831
f6de3c42
DJ
168322004-10-16 Daniel Jacobowitz <dan@debian.org>
16833
16834 * configure.in: Test for -rdynamic.
16835 * configure: Regenerated.
16836 * Makefile (INTERNAL_LDFLAGS): New.
16837 (gdbserver, gdbreplay): Use it.
16838
2c0fc042
AC
168392004-09-02 Andrew Cagney <cagney@gnu.org>
16840
16841 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16842
075b3282
DJ
168432004-03-23 Daniel Jacobowitz <drow@mvista.com>
16844
16845 * linux-low.c (linux_wait): Clear all_processes list also.
16846
fa6a77dc
DJ
168472004-03-12 Daniel Jacobowitz <drow@mvista.com>
16848
16849 * linux-low.c: Include <errno.h>. Remove extern declaration of
16850 errno.
16851
6d782a97
DJ
168522004-03-12 Daniel Jacobowitz <drow@mvista.com>
16853
16854 * gdbreplay.c, server.h, utils.c: Update copyright years.
16855
3a7fb99b
DJ
168562004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16857
16858 * server.c (main): Print child status or termination signal from
16859 variable 'signal', not 'sig'.
16860
c3e735a6
DJ
168612004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16862
16863 * linux-low.c (linux_read_memory): Change return type to
16864 int. Check for and return error from ptrace().
16865 * target.c (read_inferior_memory): Change return type to int. Pass
16866 back return status from the_target->read_memory().
16867 * target.h (struct target_ops): Adapt *read_memory() prototype.
16868 Update comment.
16869 (read_inferior_memory): Adapt prototype.
16870 * server.c (main): Return an error packet if
16871 read_inferior_memory() returns an error.
16872
a59d1c82
DJ
168732004-03-04 Daniel Jacobowitz <drow@mvista.com>
16874
16875 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16876 Unify with other clean targets.
16877
dc3f8883
DJ
168782004-02-29 Daniel Jacobowitz <drow@mvista.com>
16879
16880 * server.c (handle_v_cont): Call set_desired_inferior.
16881
89a208da
DJ
168822004-02-29 Daniel Jacobowitz <drow@mvista.com>
16883
16884 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16885
62ea82f5
DJ
168862004-02-29 Daniel Jacobowitz <drow@mvista.com>
16887
16888 * linux-low.c (linux_wait): Unblock async I/O.
16889 (linux_resume): Block and enable async I/O.
16890 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16891 * server.h (block_async_io, unblock_async_io): Add prototypes.
16892
6910d122
DJ
168932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16894
16895 * remote-utils.c (remote_open): Print a status notice after
16896 opening a TCP port.
16897 * server.c (attach_inferior): Print a status notice after
16898 attaching.
16899
169002004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16901
16902 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16903
c89dc5d4
DJ
169042004-02-26 Daniel Jacobowitz <drow@mvista.com>
16905
16906 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16907 error packet.
16908 * server.c, target.h: Update copyright years.
16909
4b8dad4a
RM
169102004-02-25 Roland McGrath <roland@redhat.com>
16911
16912 * target.h (struct target_ops): New member `read_auxv'.
16913 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16914 * linux-low.c (linux_read_auxv): New function.
16915 (linux_target_ops): Initialize `read_auxv' member to that.
16916
d7446758
JB
169172004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16918
16919 Committed by Jim Blandy <jimb@redhat.com>.
16920
16921 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16922 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16923 instead of GPR_SIZE to distiguish s390 and s390x targets.
16924
5544ad89
DJ
169252004-01-31 Daniel Jacobowitz <drow@mvista.com>
16926
16927 * linux-low.c: Update copyright year.
16928 (check_removed_breakpoint): Clear pending_is_breakpoint.
16929 (linux_set_resume_request, linux_queue_one_thread)
16930 (resume_status_pending_p): New functions.
16931 (linux_continue_one_thread): Use process->resume.
16932 (linux_resume): Only resume threads if there are no pending events.
16933 * linux-low.h (struct process_info): Add resume request
16934 pointer.
16935
2a68b70e
DJ
169362004-01-30 Daniel Jacobowitz <drow@mvista.com>
16937
16938 * regcache.c (new_register_cache): Clear the allocated register
16939 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16940
64386c31
DJ
169412003-10-13 Daniel Jacobowitz <drow@mvista.com>
16942
16943 * linux-low.c (linux_resume): Take a struct thread_resume *
16944 argument.
16945 (linux_wait): Update call.
16946 (resume_ptr): New static variable.
16947 (linux_continue_one_thread): Renamed from
16948 linux_continue_one_process. Use resume_ptr.
16949 (linux_resume): Use linux_continue_one_thread.
16950 * server.c (handle_v_cont, handle_v_requests): New functions.
16951 (myresume): New function.
16952 (main): Handle 'v' case.
16953 * target.h (struct thread_resume): New type.
16954 (struct target_ops): Change argument of "resume" to struct
16955 thread_resume *.
16956 (myresume): Delete macro.
16957
c938e9b0
L
169582003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16959
16960 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16961 (uninstall): Support DESTDIR.
16962
7f313d07
BC
16963Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16964
16965 * configure.srv: Add xscale*linux copy of arm*linux entry.
16966
3b2fc2ea
DJ
169672003-07-24 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * linux-arm-low.c (arm_reinsert_addr): New function.
16970 (the_low_target): Add arm_reinsert_addr.
16971
1c0a559e
MK
169722003-07-08 Mark Kettenis <kettenis@gnu.org>
16973
16974 * mem-break.c: Remove whitespace at end of file.
16975
43d5792c
DJ
169762003-06-28 Daniel Jacobowitz <drow@mvista.com>
16977
16978 * configure.in: Check whether we need to prototype strerror.
16979 * server.h: Optionally prototype strerror.
16980 * gdbreplay.c (perror_with_name): Use strerror.
16981 * linux-low.c (linux_attach_lwp): Use strerror.
16982 * utils.c (perror_with_name): Use strerror.
16983 * config.in, configure: Regenerated.
16984
c8a86edf
DJ
169852003-06-28 Daniel Jacobowitz <drow@mvista.com>
16986
16987 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16988 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16989
73d37363
DJ
169902003-06-20 Daniel Jacobowitz <drow@mvista.com>
16991
16992 * Makefile.in (SFILES): Update.
16993 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16994 low-sun3.c: Remove files.
16995
6ad8ae5c
DJ
169962003-06-17 Daniel Jacobowitz <drow@mvista.com>
16997
16998 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16999 (linux_detach_one_process, linux_detach): New functions.
17000 (linux_target_ops): Add linux_detach.
17001 * server.c (main): Handle 'D' packet.
17002 * target.h (struct target_ops): Add "detach" member.
17003 (detach_inferior): Define.
17004
1581182a
MK
170052003-06-13 Mark Kettenis <kettenis@gnu.org>
17006
17007 From Kelley Cook <kelleycook@wideopenwest.com>:
17008 * configure.srv: Accept i[34567]86 variants.
17009
e5379b03
DJ
170102003-06-05 Daniel Jacobowitz <drow@mvista.com>
17011
17012 * linux-low.c (linux_wait_for_event): Correct comment typos.
17013 (linux_resume_one_process): Call check_removed_breakpoint.
17014 (linux_send_signal): New function.
17015 (linux_target_ops): Add linux_send_signal.
17016 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17017 of kill.
17018 * target.h (struct target_ops): Add send_signal.
17019
2ff29de4
JB
170202003-05-29 Jim Blandy <jimb@redhat.com>
17021
17022 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17023 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17024 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17025 away part of the register's value.
17026
254787d4
DJ
170272003-03-26 Daniel Jacobowitz <drow@mvista.com>
17028
17029 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17030 (linux_wait_for_event, linux_init_signals): Likewise.
17031
94e10508
DJ
170322003-03-17 Daniel Jacobowitz <drow@mvista.com>
17033
17034 * configure.in: Check for stdlib.h.
17035 * configure: Regenerated.
17036 * config.in: Regenerated.
17037
4c0711e0
DJ
170382003-01-04 Andreas Schwab <schwab@suse.de>
17039
17040 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17041
ef66e766
AC
170422003-01-02 Andrew Cagney <ac131313@redhat.com>
17043
17044 * Makefile.in: Remove obsolete code.
17045
a1358604
DJ
170462002-11-20 Daniel Jacobowitz <drow@mvista.com>
17047
17048 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17049 defined(PT_FPR0_HI).
17050
23ce3b1c
DJ
170512002-11-17 Stuart Hughes <seh@zee2.com>
17052
17053 * linux-arm-low.c (arm_num_regs): Increase.
17054 (arm_regmap): Include status register.
17055
170562002-11-17 Daniel Jacobowitz <drow@mvista.com>
17057
17058 * linux-low.c (register_addr): Remove incorrect -1 check.
17059
a9fa9f7d
DJ
170602002-08-29 Daniel Jacobowitz <drow@mvista.com>
17061
17062 * linux-low.c (linux_create_inferior): Call setpgid. Return
17063 the new PID.
17064 (unstopped_p, linux_signal_pid): Remove.
17065 (linux_target_ops): Remove linux_signal_pid.
17066 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17067 global instead of target method.
17068 * target.h (struct target_ops): Remove signal_pid. Update comment
17069 for create_inferior.
17070 * server.c (signal_pid): New variable.
17071 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17072 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17073 (attach_inferior): Set signal_pid.
17074
17574093
DJ
170752002-08-23 Daniel Jacobowitz <drow@mvista.com>
17076
17077 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17078
170792002-08-20 Jim Blandy <jimb@redhat.com>
17080
17081 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17082 default for this.
17083
170842002-08-01 Andrew Cagney <cagney@redhat.com>
17085
17086 * Makefile.in: Make chill references obsolete.
17087
170882002-07-24 Kevin Buettner <kevinb@redhat.com>
17089
17090 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17091 * configure: Regenerate.
17092 * config.in: Regenerate.
17093
170942002-07-09 David O'Brien <obrien@FreeBSD.org>
17095
17096 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17097 (perror_with_name, remote_close, remote_open, expect, play): Static.
17098
170992002-07-04 Michal Ludvig <mludvig@suse.cz>
17100
4b8dad4a 17101 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17102 byte offsets instead of an array of indexes.
17103 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17104
171052002-06-13 Daniel Jacobowitz <drow@mvista.com>
17106
17107 * regcache.c: Add comment.
17108
171092002-06-11 Daniel Jacobowitz <drow@mvista.com>
17110
17111 * thread-db.c: New file.
17112 * proc-service.c: New file.
17113 * acinclude.m4: New file.
17114 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17115 proc-service.o, and thread-db.o.
17116 (linux-low.o): Add USE_THREAD_DB.
17117 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17118 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17119 * aclocal.m4: Regenerated.
17120 * config.in: Regenerated.
17121 * configure: Regenerated.
17122 * configure.in: Check for proc_service.h, sys/procfs.h,
17123 thread_db.h, and linux/elf.h headrs.
17124 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17125 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17126 Check for -lthread_db and thread support.
17127 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17128 PowerPC, and SuperH.
17129 * i387-fp.c: Constify arguments.
17130 * i387-fp.h: Likewise.
17131 * inferiors.c: (struct thread_info): Renamed from
17132 `struct inferior_info'. Remove PID member. Use generic inferior
17133 list header. All uses updated.
17134 (inferiors, signal_pid): Removed.
17135 (all_threads): New variable.
17136 (get_thread): Define.
17137 (add_inferior_to_list): New function.
17138 (for_each_inferior): New function.
17139 (change_inferior_id): New function.
17140 (add_inferior): Removed.
17141 (remove_inferior): New function.
17142 (add_thread): New function.
17143 (free_one_thread): New function.
17144 (remove_thread): New function.
17145 (clear_inferiors): Use for_each_inferior and free_one_thread.
17146 (find_inferior): New function.
17147 (find_inferior_id): New function.
17148 (inferior_target_data): Update argument type.
17149 (set_inferior_target_data): Likewise.
17150 (inferior_regcache_data): Likewise.
17151 (set_inferior_regcache_data): Likewise.
17152 * linux-low.c (linux_bp_reinsert): Remove.
17153 (all_processes, stopping_threads, using_thrads)
17154 (struct pending_signals, debug_threads, pid_of): New.
17155 (inferior_pid): Replace with macro.
17156 (struct inferior_linux_data): Remove.
17157 (get_stop_pc, add_process): New functions.
17158 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17159 Use add_process and add_thread.
17160 (linux_attach_lwp): New function, based on old linux_attach. Use
17161 add_process and add_thread. Set stop_expected for new threads.
17162 (linux_attach): New function.
17163 (linux_kill_one_process): New function.
17164 (linux_kill): Kill all LWPs.
17165 (linux_thread_alive): Use find_inferior_id.
17166 (check_removed_breakpoints, status_pending_p): New functions.
17167 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17168 Update. Use WNOHANG. Wait for cloned processes also. Update process
17169 struct for the found process.
17170 (linux_wait_for_event): New function.
17171 (linux_wait): Use it. Support LWPs.
17172 (send_sigstop, wait_for_sigstop, stop_all_processes)
17173 (linux_resume_one_process, linux_continue_one_process): New functions.
17174 (linux_resume): Support LWPs.
17175 (REGISTER_RAW_SIZE): Remove.
17176 (fetch_register): Use register_size instead. Call supply_register.
17177 (usr_store_inferior_registers): Likewise. Call collect_register.
17178 Fix recursive case.
17179 (regsets_fetch_inferior_registers): Improve error message.
17180 (regsets_store_inferior_registers): Add debugging.
17181 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17182 (unstopped_p, linux_signal_pid): New functions.
17183 (linux_target_ops): Add linux_signal_pid.
17184 (linux_init_signals): New function.
17185 (initialize_low): Call it. Initialize using_threads.
17186 * regcache.c (inferior_regcache_data): Add valid
17187 flag.
17188 (get_regcache): Fetch registers lazily. Add fetch argument
17189 and update all callers.
17190 (regcache_invalidate_one, regcache_invalidate): New
17191 functions.
17192 (new_register_cache): Renamed from create_register_cache.
17193 Return the new regcache.
17194 (free_register_cache): Change argument to a void *.
17195 (registers_to_string, registers_from_string): Call get_regcache
17196 with fetch flag set.
17197 (register_data): Make static. Pass fetch flag to get_regcache.
17198 (supply_register): Call get_regcache with fetch flag clear.
17199 (collect_register): Call get_regcache with fetch flag set.
17200 (collect_register_as_string): New function.
17201 * regcache.h: Update.
17202 * remote-utils.c (putpkt): Flush after debug output and use
17203 stderr.
17204 Handle input interrupts while waiting for an ACK.
17205 (input_interrupt): Use signal_pid method.
17206 (getpkt): Flush after debug output and use stderr.
17207 (outreg): Use collect_register_as_string.
17208 (new_thread_notify, dead_thread_notify): New functions.
17209 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17210 and general_thread.
17211 (look_up_one_symbol): Flush after debug output.
17212 * server.c (step_thread, server_waiting): New variables.
17213 (start_inferior): Don't use signal_pid. Update call to mywait.
17214 (attach_inferior): Update call to mywait.
17215 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17216 (main): Don't fetch/store registers explicitly. Use
17217 set_desired_inferior. Support proposed ``Hs'' packet. Update
17218 calls to mywait.
17219 * server.h: Update.
17220 (struct inferior_list, struct_inferior_list_entry): New.
17221 * target.c (set_desired_inferior): New.
17222 (write_inferior_memory): Constify.
17223 (mywait): New function.
17224 * target.h: Update.
17225 (struct target_ops): New signal_pid method.
17226 (mywait): Removed macro, added prototype.
17227
17228 * linux-low.h (regset_func): Removed.
17229 (regset_fill_func, regset_store_func): New.
17230 (enum regset_type): New.
17231 (struct regset_info): Add type field. Use new operation types.
17232 (struct linux_target_ops): stop_pc renamed to get_pc.
17233 Add decr_pc_after_break and breakpoint_at.
17234 (get_process, get_thread_proess, get_process_thread)
17235 (strut process_info, all_processes, linux_attach_lwp)
17236 (thread_db_init): New.
17237
17238 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17239 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17240 (the_low_target): Add new members.
17241 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17242 (i386_store_fpxregset): Constify.
17243 (target_regsets): Add new kind identifier.
17244 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17245 (i386_set_pc): Add debugging.
17246 (i386_breakpoint_at): New function.
17247 (the_low_target): Add new members.
17248 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17249 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17250 (mips_breakpoint_at): New.
17251 (the_low_target): Add new members.
17252 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17253 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17254 (the_low_target): Add new members.
17255 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17256 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17257 (the_low_target): Add new members.
17258 * linux-x86-64-low.c (target_regsets): Add new kind
17259 identifier.
17260
172612002-05-15 Daniel Jacobowitz <drow@mvista.com>
17262
17263 From Martin Pool <mbp@samba.org>:
17264 * server.c (gdbserver_usage): New function.
17265 (main): Call it.
17266
172672002-05-14 Daniel Jacobowitz <drow@mvista.com>
17268
17269 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17270 stop_at -> stop_pc.
17271
172722002-05-04 Andrew Cagney <ac131313@redhat.com>
17273
17274 * Makefile.in: Remove obsolete code.
17275
172762002-04-24 Michal Ludvig <mludvig@suse.cz>
17277
17278 * linux-low.c (regsets_fetch_inferior_registers),
17279 (regsets_store_inferior_registers): Removed cast to int from
17280 ptrace() calls.
17281 * regcache.h: Added declaration of struct inferior_info.
17282
172832002-04-20 Daniel Jacobowitz <drow@mvista.com>
17284
17285 * inferiors.c (struct inferior_info): Add regcache_data.
17286 (add_inferior): Call create_register_cache.
17287 (clear_inferiors): Call free_register_cache.
17288 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17289 * regcache.c (struct inferior_regcache_data): New.
17290 (registers): Remove.
17291 (get_regcache): New function.
17292 (create_register_cache, free_register_cache): New functions.
17293 (set_register_cache): Don't initialize the register cache here.
17294 (registers_to_string, registers_from_string, register_data): Call
17295 get_regcache.
17296 * regcache.h: Add prototypes.
17297 * server.h: Likewise.
17298
172992002-04-20 Daniel Jacobowitz <drow@mvista.com>
17300
17301 * mem-break.c: New file.
17302 * mem-break.h: New file.
17303 * Makefile.in: Add mem-break.o rule; update server.h
17304 dependencies.
17305 * inferiors.c (struct inferior_info): Add target_data
17306 member.
17307 (clear_inferiors): Free target_data member if set.
17308 (inferior_target_data, set_inferior_target_data): New functions.
17309 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17310 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17311 * linux-low.c (linux_bp_reinsert): New variable.
17312 (struct inferior_linux_data): New.
17313 (linux_create_inferior): Use set_inferior_target_data.
17314 (linux_attach): Likewise. Call add_inferior.
17315 (linux_wait_for_one_inferior): New function.
17316 (linux_wait): Call it.
17317 (linux_write_memory): Add const.
17318 (initialize_low): Call set_breakpoint_data.
17319 * linux-low.h (struct linux_target_ops): Add breakpoint
17320 handling members.
17321 * server.c (attach_inferior): Remove extra add_inferior
17322 call.
17323 * server.h: Include mem-break.h. Update inferior.c
17324 prototypes.
17325 * target.c (read_inferior_memory)
17326 (write_inferior_memory): New functions.
17327 * target.h (read_inferior_memory)
17328 (write_inferior_memory): Change macros to prototypes.
17329 (struct target_ops): Update comments. Add const to write_memory
17330 definition.
17331
173322002-04-11 Daniel Jacobowitz <drow@mvista.com>
17333
17334 * linux-low.c (usr_store_inferior_registers): Support
17335 registers which are allowed to fail to store.
17336 * linux-low.h (linux_target_ops): Likewise.
17337 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17338 (ppc_cannot_store_register): FPSCR may not be storable.
17339
173402002-04-09 Daniel Jacobowitz <drow@mvista.com>
17341
17342 * server.h: Include <string.h> if HAVE_STRING_H.
17343 * ChangeLog: Correct paths in last ChangeLog entry.
17344
173452002-04-09 Daniel Jacobowitz <drow@mvista.com>
17346
17347 * linux-low.h: Remove obsolete prototypes.
17348 (struct linux_target_ops): New.
17349 (extern the_low_target): New.
17350 * linux-low.c (num_regs, regmap): Remove declarations.
17351 (register_addr): Use the_low_target explicitly.
17352 (fetch_register): Likewise.
17353 (usr_fetch_inferior_registers): Likewise.
17354 (usr_store_inferior_registers): Likewise.
17355 * linux-arm-low.c (num_regs): Remove.
17356 (arm_num_regs): Define.
17357 (arm_regmap): Renamed from regmap, made static.
17358 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17359 made static.
17360 (arm_cannot_store_register): Renamed from cannot_store_register,
17361 made static.
17362 (the_low_target): New.
17363 * linux-i386-low.c (num_regs): Remove.
17364 (i386_num_regs): Define.
17365 (i386_regmap): Renamed from regmap, made static.
17366 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17367 made static.
17368 (i386_cannot_store_register): Renamed from cannot_store_register,
17369 made static.
17370 (the_low_target): New.
17371 * linux-ia64-low.c (num_regs): Remove.
17372 (ia64_num_regs): Define.
17373 (ia64_regmap): Renamed from regmap, made static.
17374 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17375 made static.
17376 (ia64_cannot_store_register): Renamed from cannot_store_register,
17377 made static.
17378 (the_low_target): New.
17379 * linux-m68k-low.c (num_regs): Remove.
17380 (m68k_num_regs): Define.
17381 (m68k_regmap): Renamed from regmap, made static.
17382 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17383 made static.
17384 (m68k_cannot_store_register): Renamed from cannot_store_register,
17385 made static.
17386 (the_low_target): New.
17387 * linux-mips-low.c (num_regs): Remove.
17388 (mips_num_regs): Define.
17389 (mips_regmap): Renamed from regmap, made static.
17390 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17391 made static.
17392 (mips_cannot_store_register): Renamed from cannot_store_register,
17393 made static.
17394 (the_low_target): New.
17395 * linux-ppc-low.c (num_regs): Remove.
17396 (ppc_num_regs): Define.
17397 (ppc_regmap): Renamed from regmap, made static.
17398 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17399 made static.
17400 (ppc_cannot_store_register): Renamed from cannot_store_register,
17401 made static.
17402 (the_low_target): New.
17403 * linux-s390-low.c (num_regs): Remove.
17404 (s390_num_regs): Define.
17405 (s390_regmap): Renamed from regmap, made static.
17406 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17407 made static.
17408 (s390_cannot_store_register): Renamed from cannot_store_register,
17409 made static.
17410 (the_low_target): New.
17411 * linux-sh-low.c (num_regs): Remove.
17412 (sh_num_regs): Define.
17413 (sh_regmap): Renamed from regmap, made static.
17414 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17415 made static.
17416 (sh_cannot_store_register): Renamed from cannot_store_register,
17417 made static.
17418 (the_low_target): New.
17419 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17420 (the_low_target): New.
17421
174222002-04-09 Daniel Jacobowitz <drow@mvista.com>
17423
17424 * Makefile.in: Add stamp-h target.
17425 * configure.in: Create stamp-h.
17426 * configure: Regenerated.
17427
174282002-04-09 Daniel Jacobowitz <drow@mvista.com>
17429
17430 * inferiors.c: New file.
17431 * target.c: New file.
17432 * target.h: New file.
17433 * Makefile.in: Add target.o and inferiors.o. Update
17434 dependencies.
17435 * linux-low.c (inferior_pid): New static variable,
17436 moved from server.c.
17437 (linux_create_inferior): Renamed from create_inferior.
17438 Call add_inferior. Return 0 on success instead of a PID.
17439 (linux_attach): Renamed from myattach.
17440 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17441 (linux_thread_alive): Renamed from mythread_alive.
17442 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17443 child dies.
17444 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17445 (regsets_store_inferior_registers): Correct error message.
17446 Add missing ``return 0''.
17447 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17448 (linux_store_registers): Renamed from store_inferior_registers.
17449 (linux_read_memory): Renamed from read_inferior_memory.
17450 (linux_write_memory): Renamed from write_inferior_memory.
17451 (linux_target_ops): New structure.
17452 (initialize_low): Call set_target_ops ().
17453 * remote-utils.c (unhexify): New function.
17454 (hexify): New function.
17455 (input_interrupt): Send signals to ``signal_pid''.
17456 * server.c (inferior_pid): Remove.
17457 (start_inferior): Update create_inferior call.
17458 (attach_inferior): Call add_inferior.
17459 (handle_query): New function.
17460 (main): Call handle_query for `q' packets.
17461 * server.h: Include "target.h". Remove obsolete prototypes.
17462 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17463
174642002-04-09 Daniel Jacobowitz <drow@mvista.com>
17465
17466 * Makefile.in: Add WARN_CFLAGS. Update configury
17467 dependencies.
17468 * configure.in: Check for <string.h>
17469 * configure: Regenerate.
17470 * config.in: Regenerate.
17471 * gdbreplay.c: Include needed system headers.
17472 (remote_open): Remove strchr prototype.
17473 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17474 * regcache.c (supply_register): Change buf argument to const void *.
17475 (supply_register_by_name): Likewise.
17476 (collect_register): Change buf argument to void *.
17477 (collect_register_by_name): Likewise.
17478 * regcache.h: Add missing prototypes.
17479 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17480 * server.c (handle_query): New function.
17481 (attached): New static variable, moved out of main.
17482 (main): Quiet longjmp clobber warnings.
17483 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17484 * utils.c (error): Remove NORETURN.
17485 (fatal): Likewise.
This page took 3.760027 seconds and 4 git commands to generate.