Arm: Add xml unit tests
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
166a82be
AH
12019-07-10 Alan Hayward <alan.hayward@arm.com>
2
3 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4 Move counter inside for.
5 (arm_read_description): Check ptrace earlier.
6 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
7
268a13a5
TT
82019-07-09 Tom Tromey <tom@tromey.com>
9
10 * configure: Rebuild.
11 * configure.ac: Change common to gdbsupport.
12 * acinclude.m4: Change common to gdbsupport.
13 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
14 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
15 common to gdbsupport.
16 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
17 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
18 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
19 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
20 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
21 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
22 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
23 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
24 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
25 common to gdbsupport.
26
350fab54
AH
272019-07-04 Alan Hayward <alan.hayward@arm.com>
28
29 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
30 defines.
31 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
32
2b40fda7
AH
332019-07-04 Alan Hayward <alan.hayward@arm.com>
34
35 * configure.srv: Remove legacy xml.
36 * linux-aarch64-low.c (initialize_low_arch): Remove
37 initialize_low_tdesc call.
38 * linux-aarch64-tdesc-selftest.c: Remove file.
39 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
40 * linux-x86-low.c (initialize_low_arch): Remove
41 initialize_low_tdesc call.
42 * linux-x86-tdesc-selftest.c: Remove file.
43 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
44
7d10623d
TV
452019-06-20 Tom de Vries <tdevries@suse.de>
46
47 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
48 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
49
8d6a48df
TV
502019-06-19 Tom de Vries <tdevries@suse.de>
51
52 * debug.h (debug_write): Change return type to ssize_t.
53 * debug.c (debug_write): Same.
54
73cc7272
TT
552019-06-14 Tom Tromey <tom@tromey.com>
56
57 * configure.ac: Use new path to gnulib.
58 * configure: Rebuild.
59 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
60 to gnulib.
61
08f10e02
TT
622019-06-11 Tom Tromey <tom@tromey.com>
63
64 * Makefile.in (SFILES): Add alloc.c.
65 (OBS): Add alloc.o.
66 (IPA_OBJS): Add alloc-ipa.o.
67 (alloc-ipa.o): New target.
68 (%.o: ../%.c): New pattern rule.
69
422186a9
TT
702019-06-10 Tom Tromey <tromey@adacore.com>
71
72 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
73 end warning with a newline.
74 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
75 newline.
76 * thread-db.c (attach_thread): Don't end warning with a newline.
77 (thread_db_notice_clone): Likewise.
78 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
79 newline.
80 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
81 end warning with a newline.
82
b02f78f9
PA
832019-06-04 Pedro Alves <palves@redhat.com>
84
85 * server.c (captured_main): Use make_unique_xstrdup.
86
88ed7edb
TT
872019-06-02 Tom Tromey <tom@tromey.com>
88
89 * gdbreplay.c (fromhex): Remove.
90 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
91
33a6bc35
TT
922019-05-29 Tom Tromey <tromey@adacore.com>
93
94 * configure: Rebuild.
95
e90a813d
KB
962019-05-06 Kevin Buettner <kevinb@redhat.com>
97
98 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
99 sign extension code on 32-bit builds.
100
353ea2d1
EZ
1012019-05-03 Eli Zaretskii <eliz@gnu.org>
102
103 * remote-utils.c:
104 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
105
b494cdff
TT
1062019-04-19 Tom Tromey <tom@tromey.com>
107
108 * server.c (struct vstop_notif): Derive from notif_event.
109 <base>: Remove.
110 (queue_stop_reply): Update.
111 (remove_all_on_match_ptid): Change type. Rewrite.
112 (discard_queued_stop_replies): Rewrite.
113 (in_queued_stop_replies_ptid): Change type.
114 (in_queued_stop_replies): Rewrite.
115 (notif_stop): Update.
116 (queue_stop_reply_callback): Update.
117 (captured_main): Don't call initialize_notif.
118 (push_stop_notification): Update.
119 * notif.c (notif_write_event, handle_notif_ack)
120 (notif_event_enque, notif_push): Update.
121 (notif_event_xfree, initialize_notif): Remove.
122 * notif.h (struct notif_event): Include <list>, not
123 "common/queue.h".
124 (struct notif_server) <queue>: Now a std::list.
125 (notif_event_p): Remove typedef.
126 (initialize_notif): Don't declare.
127 (struct notif_event): Add virtual destructor.
128
a7e559cc
AH
1292019-04-17 Alan Hayward <alan.hayward@arm.com>
130
131 * ax.c (ax_vdebug): Call debug_printf.
132 * debug.c (debug_write): New function.
133 * debug.h (debug_write): New declaration.
134 * linux-low.c (sigchld_handler): Call debug_write.
135
aeb2e706
AH
1362019-04-17 Alan Hayward <alan.hayward@arm.com>
137
138 * debug.c (debug_set_output): New function.
139 (debug_vprintf): Send output to debug_file.
140 (debug_flush): Likewise.
141 * debug.h (debug_set_output): New declaration.
142 * server.c (handle_monitor_command): Add debug-file option.
143 (captured_main): Likewise.
144
c1bc0935
AH
1452019-04-17 Alan Hayward <alan.hayward@arm.com>
146
147 * debug.c (remote_debug): Add definition.
148 * debug.h (remote_debug): Add declaration.
149 * hostio.c (remote_debug): Remove declaration.
150 * remote-utils.c (struct ui_file): Likewise.
151 (remote_debug): Likewise.
152 * remote-utils.h (remote_debug): Likewise,
153 * server.c (remote_debug): Remove definition.
154
3f52fdbc
KB
1552019-04-10 Kevin Buettner <kevinb@redhat.com>
156
157 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
158 when using a 64-bit gdbserver.
159
b0319eaa
TT
1602019-04-09 Tom Tromey <tromey@adacore.com>
161
162 * linux-low.c (select_event_lwp): Use find_thread_in_random.
163
eedc3f4f
TT
1642019-04-08 Tom Tromey <tom@tromey.com>
165
166 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
167 throw.
168 (linux_resume_one_lwp): Likewise.
169
230d2906
TT
1702019-04-08 Tom Tromey <tom@tromey.com>
171
172 * gdbreplay.c: Update.
173 * linux-low.c: Update.
174 * server.c: Update.
175
a70b8144
TT
1762019-04-08 Tom Tromey <tom@tromey.com>
177
178 * server.c: Use C++ exception handling.
179 * linux-low.c: Use C++ exception handling.
180 * gdbreplay.c: Use C++ exception handling.
181
3d6e9d23
TT
1822019-04-08 Tom Tromey <tom@tromey.com>
183
184 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
185 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
186 (captured_main, main): Update.
187 * gdbreplay.c (main): Update.
188
0570503d
PFC
1892019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
190
191 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
192 value in argument pointer, return 1 if the entry is found and 0
193 otherwise. Move comment.
194 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
195 * linux-low.h (linux_get_auxv): Declare.
196 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
197
227a9e65
TT
1982019-04-05 Tom Tromey <tromey@adacore.com>
199
200 * server.c (gdbserver_usage): Use upper-case for metasyntactic
201 variables.
202
69f4c9cc
AH
2032019-03-28 Alan Hayward <alan.hayward@arm.com>
204
205 * linux-low.c (AT_HWCAP2): Add define if not already included.
206
974c89e0
AH
2072019-03-26 Alan Hayward <alan.hayward@arm.com>
208
209 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
210 (aarch64_arch_setup): Call linux_get_hwcap.
211 * linux-arm-low.c (arm_get_hwcap): Remove function.
212 (arm_read_description): Call linux_get_hwcap.
213 * linux-low.c (linux_get_auxv): New function.
214 (linux_get_hwcap): Likewise.
215 (linux_get_hwcap2): Likewise.
216 * linux-low.h (linux_get_hwcap): New declaration.
217 (linux_get_hwcap2): Likewise.
218 * linux-ppc-low.c (ppc_get_auxv): Remove function.
219 (ppc_arch_setup): Call linux_get_hwcap.
220 * linux-s390-low.c (s390_get_hwcap): Remove function.
221 (s390_arch_setup): Call linux_get_hwcap.
222
1ef53e6b
AH
2232019-03-22 Alan Hayward <alan.hayward@arm.com>
224 Jiong Wang <jiong.wang@arm.com>
225
226 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
227 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
228 to fail.
229 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
230
ee4fbcfa
AH
2312019-03-22 Alan Hayward <alan.hayward@arm.com>
232 Jiong Wang <jiong.wang@arm.com>
233
234 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
235 (aarch64_get_hwcap): New function.
236 (aarch64_arch_setup): Read APIA hwcap.
237
6dc0ebde
AH
2382019-03-22 Alan Hayward <alan.hayward@arm.com>
239 Jiong Wang <jiong.wang@arm.com>
240
241 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
242 (initialize_low_tracepoint): Likewise.
243 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
244 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
245 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
246 (aarch64_linux_read_description): Likewise.
247 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
248
1163a4b7
JB
2492019-03-12 John Baldwin <jhb@FreeBSD.org>
250
251 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
252 i386_create_target_description for 'segments' parameter.
253 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
254 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
255 * win32-i386-low.c (i386_arch_setup): Likewise.
256
d3a70e03
TT
2572019-03-12 Tom Tromey <tromey@adacore.com>
258
259 * linux-low.c (iterate_over_lwps): Update.
260
37991b4f
TT
2612019-03-06 Tom Tromey <tom@tromey.com>
262
263 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
264 (captured_main): Use SCOPE_EXIT.
265
45950eb6
SDJ
2662019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
267
268 * configure.srv: Use '$enable_unittest' instead of '$development'
269 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
270 case.
271
43ac54fc
TT
2722019-02-27 Tom Tromey <tromey@adacore.com>
273
274 * gdbreplay.c (logchar): Handle \r\n.
275
df0da8a2
AH
2762019-02-07 Alan Hayward <alan.hayward@arm.com>
277
278 * linux-low.c (linux_attach): Add process before lwp.
279 * server.c (attach_inferior): Check if already attached.
280
1a5c2598
TT
2812019-02-07 Tom Tromey <tom@tromey.com>
282
283 * x86-tdesc.h: Rename include guard.
284 * x86-low.h: Add include guard.
285 * wincecompat.h: Rename include guard.
286 * win32-low.h: Add include guard.
287 * utils.h: Rename include guard.
288 * tracepoint.h: Rename include guard.
289 * tdesc.h: Rename include guard.
290 * target.h: Rename include guard.
291 * server.h: Rename include guard.
292 * remote-utils.h: Rename include guard.
293 * regcache.h: Rename include guard.
294 * nto-low.h: Rename include guard.
295 * notif.h: Add include guard.
296 * mem-break.h: Rename include guard.
297 * lynx-low.h: Add include guard.
298 * linux-x86-tdesc.h: Add include guard.
299 * linux-s390-tdesc.h: Add include guard.
300 * linux-ppc-tdesc-init.h: Add include guard.
301 * linux-low.h: Add include guard.
302 * linux-aarch64-tdesc.h: Add include guard.
303 * linux-aarch32-low.h: Add include guard.
304 * inferiors.h: Rename include guard.
305 * i387-fp.h: Rename include guard.
306 * hostio.h: Rename include guard.
307 * gdbthread.h: Rename include guard.
308 * gdb_proc_service.h: Rename include guard.
309 * event-loop.h: Rename include guard.
310 * dll.h: Rename include guard.
311 * debug.h: Rename include guard.
312 * ax.h: Rename include guard.
313
956cc47c
SN
3142018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
315
316 PR gdb/23985
317 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
318 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
319
a0707f3c
TT
3202019-01-25 Tom Tromey <tom@tromey.com>
321
322 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
323
0747795c
TT
3242019-01-25 Tom Tromey <tom@tromey.com>
325
326 * win32-low.c: Fix common/ includes.
327 * win32-i386-low.c: Fix common/ includes.
328 * tracepoint.c: Fix common/ includes.
329 * thread-db.c: Fix common/ includes.
330 * target.h: Fix common/ includes.
331 * symbol.c: Fix common/ includes.
332 * spu-low.c: Fix common/ includes.
333 * server.h: Fix common/ includes.
334 * server.c: Fix common/ includes.
335 * remote-utils.c: Fix common/ includes.
336 * regcache.h: Fix common/ includes.
337 * regcache.c: Fix common/ includes.
338 * nto-x86-low.c: Fix common/ includes.
339 * notif.h: Fix common/ includes.
340 * mem-break.h: Fix common/ includes.
341 * lynx-low.c: Fix common/ includes.
342 * lynx-i386-low.c: Fix common/ includes.
343 * linux-x86-tdesc-selftest.c: Fix common/ includes.
344 * linux-x86-low.c: Fix common/ includes.
345 * linux-low.c: Fix common/ includes.
346 * inferiors.h: Fix common/ includes.
347 * i387-fp.c: Fix common/ includes.
348 * hostio.c: Fix common/ includes.
349 * hostio-errno.c: Fix common/ includes.
350 * gdbthread.h: Fix common/ includes.
351 * gdbreplay.c: Fix common/ includes.
352 * fork-child.c: Fix common/ includes.
353 * event-loop.c: Fix common/ includes.
354 * ax.c:
355 (enum gdb_agent_op): Fix common/ includes.
356
be6d4f74
TT
3572019-01-21 Tom Tromey <tom@tromey.com>
358
359 * tracepoint.c: Fix includes.
360 * remote-utils.c: Fix includes.
361 * linux-x86-low.c: Fix includes.
362
66d91b39
JB
3632019-01-01 Joel Brobecker <brobecker@adacore.com>
364
365 * gdbreplay.c (gdbreplay_version): Update copyright year in
366 version message.
367 * server.c (gdbserver_version): Likewise.
368
754e3168
AH
3692018-12-05 Alan Hayward <alan.hayward@arm.com>
370
371 * linux-low.c (add_lwp): Switch ordering.
372
d105de22
TT
3732018-11-29 Tom Tromey <tom@tromey.com>
374
375 * win32-low.c (win32_join): Take pid, not process.
376 * target.h (struct target_ops) <join>: Change argument type.
377 (join_inferior): Change argument name.
378 * spu-low.c (spu_join): Take pid, not process.
379 * server.c (handle_detach): Preserve pid before destroying
380 process.
381 * lynx-low.c (lynx_join): Take pid, not process.
382 * linux-low.c (linux_join): Take pid, not process.
383
50138245
AH
3842018-11-23 Alan Hayward <alan.hayward@arm.com>
385
386 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
387 (aarch64_cannot_fetch_register): Likewise.
388 (struct linux_target_ops): Update references.
389
64f57f3d
PFC
3902018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
391
392 * linux-ppc-low.c: Include nat/linux-ptrace.h.
393
8d619c01
EBM
3942018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
395
396 * configure.srv (ipa_ppc_linux_regobj): Add
397 powerpc-isa207-htm-vsx32l-ipa.o and
398 powerpc-isa207-htm-vsx64l-ipa.o.
399 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
400 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
401 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
402 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
403 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
404 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
405 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
406 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
407 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
408 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
409 (init_registers_powerpc_isa207_htm_vsx32l)
410 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
411 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
412 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
413 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
414 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
415 (ppc_store_tm_ctarregset): New functions.
416 (ppc_regsets): Add entries for HTM regsets.
417 (ppc_arch_setup): Set htm in features struct when needed. Set
418 sizes for the HTM regsets.
419 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
420 (initialize_low_arch): Call
421 init_registers_powerpc_isa207_htm_vsx32l and
422 init_registers_powerpc_isa207_htm_vsx64l.
423 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
424 PPC_TDESC_ISA207_HTM_VSX.
425 (initialize_low_tracepoint): Call
426 init_registers_powerpc_isa207_htm_vsx32l and
427 init_registers_powerpc_isa207_htm_vsx64l.
428
232bfb86
EBM
4292018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
430
431 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
432 rs6000/power-linux-pmu.xml to srv_xmlfiles.
433 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
434 (ppc_store_pmuregset): New functions.
435 (ppc_regsets): Add entries for ebb and pmu regsets.
436 (ppc_arch_setup): Set isa207 in features struct if the ebb and
437 pmu regsets are available. Set sizes for these regsets.
438
f2cf6173
EBM
4392018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
440
441 * configure.srv (ipa_ppc_linux_regobj): Add
442 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
443 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
444 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
445 rs6000/powerpc-isa207-vsx32l.xml, and
446 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
447 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
448 <PPC_TDESC_ISA207_VSX>: New enum value.
449 (init_registers_powerpc_isa207_vsx32l): Declare.
450 (init_registers_powerpc_isa207_vsx64l): Declare.
451 * linux-ppc-low.c (ppc_fill_tarregset): New function.
452 (ppc_store_tarregset): New function.
453 (ppc_regsets): Add entry for the TAR regset.
454 (ppc_arch_setup): Set isa207 in features struct when needed. Set
455 size for the TAR regsets.
456 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
457 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
458 and init_registers_powerpc_isa207_vsx64l.
459 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
460 (initialize_low_tracepoint): Call
461 init_registers_powerpc_isa207_vsx32l and
462 init_registers_powerpc_isa207_vsx64l.
463
7ca18ed6
EBM
4642018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
465 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
466
467 * configure.srv (ipa_ppc_linux_regobj): Add
468 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
469 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
470 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
471 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
472 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
473 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
474 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
475 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
476 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
477 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
478 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
479 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
480 (ppc_hwcap): Add comment.
481 (ppc_hwcap2): New global.
482 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
483 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
484 (ppc_regsets): Add entries for the DSCR and PPR regsets.
485 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
486 when needed. Set sizes for the the DSCR and PPR regsets.
487 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
488 (initialize_low_arch): Call
489 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
490 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
491 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
492 PPC_TDESC_ISA205_PPR_DSCR_VSX.
493 (initialize_low_tracepoint): Call
494 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
495 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
496
5c849b22
PFC
4972018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
498
499 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
500
8ecfd7bd
SDJ
5012018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
502 Simon Marchi <simark@simark.ca>
503
504 * acinclude.m4: Include "../selftest.m4".
505 * configure: Regenerate.
506 * configure.ac: Use "GDB_AC_SELFTEST".
507 * configure.srv: Use "$enable_unittests" instead of
508 "$development" when checking whether unit tests have been
509 enabled.
510 * server.c (captured_main): Update message informing that
511 selftests have been disabled.
512
96643e35
TT
5132018-10-04 Tom Tromey <tom@tromey.com>
514
515 * configure: Rebuild.
516
da4ae14a
TT
5172018-10-04 Tom Tromey <tom@tromey.com>
518
519 * server.c (handle_status): Rename inner "thread".
520 (process_serial_event): Declare "res" in 'm' case.
521 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
522 (iterate_over_lwps): Rename inner "thread".
523 (linux_qxfer_libraries_svr4): Rename inner "len".
524 * gdbthread.h (find_thread_in_random): Rename inner "thread".
525
7c619dbd
GB
5262018-10-01 Gary Benson <gbenson@redhat.com>
527
528 * gdb_proc_service.h: Moved common code to
529 common/gdb_proc_service.h.
530
3795e814
GB
5312018-10-01 Gary Benson <gbenson@redhat.com>
532
533 * gdb_proc_service.h: Synchronize comments and whitespace with
534 GDB's version of this file.
535
49b036f1
TT
5362018-09-25 Tom Tromey <tom@tromey.com>
537
538 * configure: Rebuild.
539 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
540
8ff03f0b
SM
5412018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
542
543 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
544 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
545 ($(IPA_LIB)): Sort IPA_OBJS.
546
a1cd91dc
SM
5472018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
548
549 * Makefile.in: Remove references to $(ADD_DEPS).
550
752312ba
TT
5512018-09-16 Tom Tromey <tom@tromey.com>
552
553 * remote-utils.c (remote_open): Use GNU style for metasyntactic
554 variables.
555 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
556 variables.
557
f1628857
TT
5582018-09-05 Tom Tromey <tom@tromey.com>
559
560 * configure: Rebuild.
561
ad202fcc
SM
5622018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
563
564 PR build/23399
565 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
566
d3d8724a
TT
5672018-08-27 Tom Tromey <tom@tromey.com>
568
569 PR build/23087:
570 * configure: Rebuild.
571
b4f183d2
TT
5722018-08-27 Tom Tromey <tom@tromey.com>
573
574 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
575 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
576 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
577 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
578 (s390x_emit_stack_adjust): Add casts to unsigned char.
579
4e2aa472
SM
5802018-08-22 Simon Marchi <simon.marchi@ericsson.com>
581
582 PR gdb/23374
583 PR gdb/23375
584 * server.h (struct client_state) <disable_randomization>:
585 Initialize to 1.
586
cf4088a9
SM
5872018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
588
589 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
590 variable.
591 (mips_supply_ptrace_register): Likewise.
592
a0de763e
TT
5932018-07-22 Tom Tromey <tom@tromey.com>
594
595 * configure: Rebuild.
596
b0a7723d
TT
5972018-07-22 Tom Tromey <tom@tromey.com>
598
599 * win32-low.c (win32_create_inferior): Remove unused variables.
600 * gdbreplay.c (remote_open): Remove unused variable.
601 * remote-utils.c (remote_prepare): Remove unused variable.
602 * x86-tdesc.h (X86_TDESC_H): Define.
603 (amd64_expedite_regs): Define conditionally.
604 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
605 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
606 * remote-utils.c (readchar): Remove unused variable.
607
a780ef4f
PA
6082018-07-13 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (linux_kill): Change parameter to process_info
611 pointer instead of pid. Adjust.
612 * lynx-low.c (lynx_kill): Likewise.
613 * nto-low.c (nto_kill): Likewise.
614 * spu-low.c (spu_kill): Likewise.
615 * win32-low.c (win32_kill): Likewise.
616 * server.c (handle_v_kill, kill_inferior_callback)
617 (detach_or_kill_for_exit): Adjust.
618 * target.c (kill_inferior): Change parameter to process_info
619 pointer instead of pid. Adjust.
620 * target.h (struct target_ops) <kill>: Change parameter to
621 process_info pointer instead of pid. Adjust all implementations
622 and callers.
623 (kill_inferior): Likewise.
624
ef2ddb33
PA
6252018-07-13 Pedro Alves <palves@redhat.com>
626
627 * linux-low.c (linux_detach, linux_join): Change parameter to
628 process_info pointer instead of pid. Adjust.
629 * lynx-low.c (lynx_detach, lynx_join): Likewise.
630 * nto-low.c (nto_detach): Likewise.
631 * spu-low.c (spu_detach, spu_join): Likewise.
632 * win32-low.c (win32_detach, win32_join): Likewise.
633 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
634 * target.h (struct target_ops) <detach, join>: Change parameter to
635 process_info pointer instead of pid. Adjust all implementations
636 and callers.
637 (detach_inferior, join_inferior): Rename 'pid' parameter to
638 'proc'.
639
c7ab0aef
SDJ
6402018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
641 Jan Kratochvil <jan.kratochvil@redhat.com>
642 Paul Fertser <fercerpav@gmail.com>
643 Tsutomu Seki <sekiriki@gmail.com>
644
645 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
646 (OBS): Add 'common/netstuff.o'.
647 (GDBREPLAY_OBS): Likewise.
648 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
649 (remote_open): Implement support for IPv6
650 connections.
651 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
652 and 'wspiapi.h'.
653 (handle_accept_event): Accept connections from IPv6 sources.
654 (remote_prepare): Handle IPv6-style hostnames; implement
655 support for IPv6 connections.
656 (remote_open): Implement support for printing connections from
657 IPv6 sources.
658
31445d10
PA
6592018-07-11 Pedro Alves <palves@redhat.com>
660
661 PR gdb/23377
662 * mem-break.c (any_persistent_commands): Add process_info
663 parameter and use it instead of relying on the current process.
664 Change return type to bool.
665 * mem-break.h (any_persistent_commands): Add process_info
666 parameter and change return type to bool.
667 * server.c (handle_detach): Remove require_running_or_return call.
668 Look up the process_info for the process we're about to detach.
669 If not found, return back error to GDB. Adjust
670 any_persistent_commands call to pass down a process pointer.
671
cb197132
PA
6722018-07-11 Pedro Alves <palves@redhat.com>
673
674 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
675 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
676 instead of collect_register_by_name.
677 * regcache.c (regcache_raw_get_unsigned_by_name): New.
678 * regcache.h (regcache_raw_get_unsigned_by_name): New.
679
1b919490
VB
6802018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
681 Pedro Alves <palves@redhat.com>
682
683 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
684
d7e15655
TT
6852018-07-03 Tom Tromey <tom@tromey.com>
686
687 * linux-low.c: Update.
688 * lynx-low.c: Update.
689 * mem-break.c: Update.
690 * nto-low.c: Update.
691 * remote-utils.c: Update.
692 * server.c: Update.
693 * spu-low.c: Update.
694 * target.c: Update.
695 * win32-low.c: Update.
696
26a57c92
TT
6972018-07-03 Tom Tromey <tom@tromey.com>
698
699 * server.c: Update.
700
0e998d96
TT
7012018-07-03 Tom Tromey <tom@tromey.com>
702
703 * linux-low.c: Update.
704
cc6bcb54
TT
7052018-07-03 Tom Tromey <tom@tromey.com>
706
707 * target.c: Update.
708
e38504b3
TT
7092018-07-03 Tom Tromey <tom@tromey.com>
710
711 * linux-low.c: Update.
712 * linux-mips-low.c: Update.
713 * lynx-low.c: Update.
714 * nto-low.c: Update.
715 * remote-utils.c: Update.
716 * server.c: Update.
717 * spu-low.c: Update.
718 * target.c: Update.
719 * thread-db.c: Update.
720
e99b03dc
TT
7212018-07-03 Tom Tromey <tom@tromey.com>
722
723 * linux-low.c: Update.
724 * linux-mips-low.c: Update.
725 * lynx-low.c: Update.
726 * mem-break.c: Update.
727 * nto-low.c: Update.
728 * remote-utils.c: Update.
729 * server.c: Update.
730 * spu-low.c: Update.
731 * target.c: Update.
732 * tracepoint.c: Update.
733
f2907e49
TT
7342018-07-03 Tom Tromey <tom@tromey.com>
735
736 * linux-low.c: Update.
737 * linux-ppc-low.c: Update.
738 * linux-x86-low.c: Update.
739 * proc-service.c: Update.
740 * server.c: Update.
741 * spu-low.c: Update.
742 * thread-db.c: Update.
743 * win32-low.c: Update.
744
fd79271b
TT
7452018-07-03 Tom Tromey <tom@tromey.com>
746
747 * linux-low.c: Update.
748 * lynx-low.c: Update.
749 * nto-low.c: Update.
750 * remote-utils.c: Update.
751 * spu-low.c: Update.
752 * thread-db.c: Update.
753 * win32-low.c: Update.
754
c0867626
SDJ
7552018-06-29 Joel Brobecker <brobecker@adacore.com>
756
757 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
758 parameter in call to 'amd64_create_target_description'.
759
2512d7ef
JK
7602018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
761
762 * x86-tdesc.h: Remove executable permission flag.
763
d0ac1c44
SM
7642018-06-19 Simon Marchi <simon.marchi@ericsson.com>
765
766 * configure.ac: Remove AC_PREREQ, add missing quoting.
767 * configure: Re-generate.
768 * config.in: Re-generate.
769 * aclocal.m4: Re-generate.
770
c4eb05ff
SM
7712018-06-18 Simon Marchi <simon.marchi@ericsson.com>
772
773 * tracepoint.h (current_traceframe): Remove declaration.
774
02895270
AH
7752018-06-18 Alan Hayward <alan.hayward@arm.com>
776
777 * linux-aarch64-low.c (is_sve_tdesc): New function.
778 (aarch64_sve_regs_copy_to_regcache): Likewise.
779 (aarch64_sve_regs_copy_from_regcache): Likewise.
780 (aarch64_regs_info): Add SVE checks.
781 (initialize_low_arch): Initialize SVE.
782
e9902bfc
AH
7832018-06-18 Alan Hayward <alan.hayward@arm.com>
784
785 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
786
fefa175e
AH
7872018-06-11 Alan Hayward <alan.hayward@arm.com>
788
789 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
790 (initialize_low_tracepoint): Likewise
791 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
792 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
793 param.
794 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
795 checks.
796 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
797
b91ad3ff
AH
7982018-06-11 Alan Hayward <alan.hayward@arm.com>
799
800 * server.h (PBUFSIZ): Increase size
801
f868386e
AH
8022018-06-11 Alan Hayward <alan.hayward@arm.com>
803
804 * regcache.c (regcache::raw_compare): New function.
805 * regcache.h (regcache::raw_compare): New declaration.
806
9c861883
AH
8072018-06-11 Alan Hayward <alan.hayward@arm.com>
808
809 * regcache.c (new_register_cache): Use new.
810 (free_register_cache): Use delete.
811 (register_data): Use const.
812 (supply_register): Move body inside regcache.
813 (regcache::raw_supply): New override function.
814 (collect_register): Move body inside regcache.
815 (regcache::raw_collect): New override function.
816 (regcache::get_register_status): New override function.
817 * regcache.h (struct regcache): Inherit from reg_buffer_common.
818
40591844
TT
8192018-06-09 Tom Tromey <tom@tromey.com>
820
821 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
822 declare queue.
823 (event_queue): Use std::queue.
824 (gdb_event_xfree): Remove.
825 (initialize_event_loop, process_event, wait_for_event): Update.
826
6341380d
SC
8272018-06-08 Stan Cox <scox@redhat.com>
828
829 * win32-low.c (win32_create_inferior): last_ptid and last_status
830 moved to client_state.
831
03349c93
PA
8322018-06-08 Pedro Alves <palves@redhat.com>
833
834 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
835 common/common-exceptions.o, common/common-utils.o,
836 common/errors.o, common/print-utils.o and utils.o.
837 * gdbreplay.c: Include "common-defs.h" instead of the two
838 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
839 string.h or alloca.h.
840 (perror_with_name): Delete.
841 (remote_open): Use xstrdup instead of strdup.
842 (main): Rename to ...
843 (captured_main): ... this.
844 (main): New.
845
8dcc53b3
TT
8462018-06-08 Tom Tromey <tom@tromey.com>
847
848 * linux-low.c (linux_low_read_btrace): Update.
849
c12a5089
SC
8502018-06-04 Stan Cox <scox@redhat.com>
851
852 * server.h (struct client_state): New.
853 * server.c (cont_thread, general_thread, multi_process)
854 (report_fork_events, report_vfork_events, report_exec_events)
855 (report_thread_events, swbreak_feature, hwbreak_feature)
856 (vCont_supported, disable_randomization, pass_signals)
857 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
858 Moved to client_state.
859 * remote-utils.c (remote_debug, noack_mode)
860 (transport_is_reliable): Moved to client_state.
861 * tracepoint.c (current_traceframe): Moved to client_state.
862
863 Update all callers.
864 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
865 linux-low.c, remote-utils.h, target.c: Use client_state.
866
122394f1
AH
8672018-05-31 Alan Hayward <alan.hayward@arm.com>
868
869 * configure.srv: Add new c/h file.
870
95228a0d
AH
8712018-05-31 Alan Hayward <alan.hayward@arm.com>
872
873 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
874 null VQ.
875
d8dab6c3
MR
8762018-05-25 Maciej W. Rozycki <macro@mips.com>
877
878 * gdb.arch/mips-fpregset-core.exp: New test.
879 * gdb.arch/mips-fpregset-core.c: New test source.
880
81e25b7c
EK
8812018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
882
883 PR server/23198
884 * hostio.c (require_int): Do not report overflow for integers
885 between 0xfffffff and 0x7fffffff.
886
7e947ad3
MR
8872018-05-22 Maciej W. Rozycki <macro@mips.com>
888
889 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
890 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
891 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
892 functions.
893 (the_low_target): Wire them.
894
1d75a658
PFC
8952018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
896
897 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
898 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
899 mode. Call collect_register_by_name with vscr using
900 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
901 (ppc_store_vrregset): Add and set vscr_offset variable as in
902 ppc_fill_vrregset. Call supply_register_by_name with vscr using
903 vscr_offset.
904
d078308a
PFC
9052018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
906
907 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
908 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
909 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
910
7273b5fc
PFC
9112018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
912
913 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
914 (ppc_store_vsxregset): Likewise.
915 (ppc_fill_vrregset): Likewise.
916 (ppc_store_vrregset): Likewise.
917 (ppc_fill_evrregset): Likewise.
918 (ppc_store_evrregset): Likewise.
919 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
920 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
921 needed.
922
2e077f5e
PFC
9232018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
924
925 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
926 wordsize of the inferior. Call ppc_linux_target_wordsize.
927
bd64614e
PFC
9282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
929
930 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
931 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
932 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
933 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
934 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
935 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
936 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
937 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
938 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
939 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
940 (tdesc_powerpc_e500l): Remove.
941 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
942 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
943 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
944 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
945 linux-ppc-tdesc.h.
946 (ppc_arch_setup): Remove target description matching code. Fill a
947 ppc_linux_features struct and call ppc_linux_match_description
948 with it.
949
75d74cca
MR
9502018-05-22 Maciej W. Rozycki <macro@mips.com>
951
952 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
953 width of the requested register exceeds the width of the
954 `ptrace' data type.
955 (mips_cannot_store_register): Likewise.
956
e4439e43
MR
9572018-05-21 Maciej W. Rozycki <macro@mips.com>
958
959 * linux-mips-low.c (mips_fetch_register): New function. Update
960 preceding comment.
961 (mips_store_gregset): Supply 0 rather than $restart for $zero.
962 (the_low_target): Wire `mips_fetch_register'.
963
55271bf9
JB
9642018-05-10 Joel Brobecker <brobecker@adacore.com>
965
966 * lynx-i386-low.c (LYNXOS_178): New macro.
967 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
968 the layout on LynxOS-178.
969 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
970 handle floating point registers that are not supported by
971 LynxOS-178.
972
1a34f210
TT
9732018-05-10 Tom Tromey <tom@tromey.com>
974
975 * configure: Rebuild.
976
190852c8
JB
9772018-05-10 Joel Brobecker <brobecker@adacore.com>
978
979 PR server/23158:
980 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
981 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
982 Use it to set the expedite_regs field in the given tdesc.
983 * x86-tdesc.h: New file.
984 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
985 Adjust following the addition of the new expedite_regs parameter
986 to init_target_desc.
987 * linux-tic6x-low.c (tic6x_read_description): Likewise.
988 * linux-x86-tdesc.c: #include "x86-tdesc.h".
989 (i386_linux_read_description, amd64_linux_read_description):
990 Adjust following the addition of the new expedite_regs parameter
991 to init_target_desc.
992 * lynx-i386-low.c: #include "x86-tdesc.h".
993 (lynx_i386_arch_setup): Adjust following the addition of the new
994 expedite_regs parameter to init_target_desc.
995 * nto-x86-low.c: #include "x86-tdesc.h".
996 (nto_x86_arch_setup): Adjust following the addition of the new
997 expedite_regs parameter to init_target_desc.
998 * win32-i386-low.c: #include "x86-tdesc.h".
999 (i386_arch_setup): Adjust following the addition of the new
1000 expedite_regs parameter to init_target_desc.
1001
7dbac825
JB
10022018-05-10 Joel Brobecker <brobecker@adacore.com>
1003
1004 PR server/23158:
1005 * win32-low.c (win32_create_inferior): Add call to my_wait
1006 setting last_status global.
1007
906994d9
JB
10082018-05-10 Joel Brobecker <brobecker@adacore.com>
1009
1010 PR server/23158:
1011 * win32-low.c (create_process): Only call gdb_tilde_expand if
1012 inferior_cwd is not NULL.
1013
8ee22052
AB
10142018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1015
1016 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1017 registers to the cache if their values have changed.
1018 (i387_xsave_to_cache): Provide default values for x87 control
1019 registers when these features are available, but disabled.
1020 * regcache.c (supply_register_by_name_zeroed): New function.
1021 * regcache.h (supply_register_by_name_zeroed): Declare new
1022 function.
1023
aff689d3
TT
10242018-05-07 Tom Tromey <tom@tromey.com>
1025
1026 * configure: Rebuild.
1027
85e26832
TT
10282018-05-04 Tom Tromey <tom@tromey.com>
1029
1030 * configure: Rebuild.
1031
a3b60e45
JK
10322018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1033 Pedro Alves <palves@redhat.com>
1034
1035 * linux-aarch64-low.c (aarch64_stopped_data_address):
1036 Likewise.
1037
632e107b
TT
10382018-04-27 Tom Tromey <tom@tromey.com>
1039
1040 * configure: Rebuild.
1041
458412c3
TT
10422018-04-23 Tom Tromey <tom@tromey.com>
1043
1044 * configure: Rebuild.
1045
f31c089e
SM
10462018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 * Makefile.in (depcomp): Add "..".
1049 (all_deps_files): New and use it.
1050
b319b098
AH
10512018-04-18 Alan Hayward <alan.hayward@arm.com>
1052
1053 * configure.srv (aarch64*-*-linux*): Don't include xml.
1054 (i[34567]86-*-cygwin*): Likewise.
1055 (i[34567]86-*-linux*): Likewise.
1056 (i[34567]86-*-lynxos*): Likewise.
1057 (i[34567]86-*-mingw32ce*): Likewise.
1058 (i[34567]86-*-mingw*): Likewise.
1059 (i[34567]86-*-nto*): Likewise.
1060 (tic6x-*-uclinux): Likewise.
1061 (x86_64-*-linux*): Likewise.
1062 (x86_64-*-mingw*): Likewise.
1063 (x86_64-*-cygwin*): Likewise.
1064
3b74854b
AH
10652018-04-18 Alan Hayward <alan.hayward@arm.com>
1066
1067 * tdesc.c: Remove xml parameter.
1068
e98577a9
AH
10692018-04-18 Alan Hayward <alan.hayward@arm.com>
1070
1071 * server.c (get_features_xml): Remove cast.
1072 * tdesc.c (void target_desc::accept): Fill in function.
1073 (tdesc_get_features_xml): Remove old xml creation.
1074 (print_xml_feature::visit_pre): Add xml vistor.
1075 * tdesc.h (struct target_desc): Make xmltarget mutable.
1076 (tdesc_get_features_xml): Remove declaration.
1077
d278f585
AH
10782018-04-18 Alan Hayward <alan.hayward@arm.com>
1079
1080 * tdesc.c (tdesc_architecture_name): Add new function.
1081 (tdesc_osabi_name): Likewise.
1082 (tdesc_get_features_xml): Use new functions.
1083
eee8a18d
AH
10842018-04-18 Alan Hayward <alan.hayward@arm.com>
1085
1086 * tdesc.c (tdesc_create_flags): Remove.
1087 (tdesc_add_flag): Likewise.
1088 (tdesc_named_type): Likewise.
1089 (tdesc_create_union): Likewise.
1090 (tdesc_create_struct): Likewise.
1091 (tdesc_create_vector): Likewise.
1092 (tdesc_add_bitfield): Likewise.
1093 (tdesc_add_field): Likewise.
1094 (tdesc_set_struct_size): Likewise.
1095
82ec9bc7
AH
10962018-04-18 Alan Hayward <alan.hayward@arm.com>
1097
1098 * tdesc.c (~target_desc): Remove implictly deleted items.
1099 (init_target_desc): Iterate all features.
1100 (tdesc_get_features_xml): Use vector.
1101 (tdesc_create_feature): Create feature.
1102 * tdesc.h (tdesc_feature) Remove
1103 (target_desc): Add features.
1104
ea3e7d71
AH
11052018-04-18 Alan Hayward <alan.hayward@arm.com>
1106
1107 * Makefile.in: Add common/tdesc.c
1108 * tdesc.c (init_target_desc): init all reg_defs from register
1109 vector.
1110 (tdesc_create_reg): Create tdesc_reg.
1111 * tdesc.h (tdesc_feature): Add register vector.
1112
17d08cd4
SM
11132018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1114
1115 * tdesc.h (struct target_desc) <features>: Change type to
1116 std::vector<std::string>.
1117 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1118 changes.
1119 (tdesc_get_features_xml): Likewise.
1120 (tdesc_create_feature): Likewise.
1121
5cd3e386
AH
11222018-03-26 Alan Hayward <alan.hayward@arm.com>
1123
1124 * regcache.c (find_register_by_number): Return a ref.
1125 (find_regno): Use references.
1126 (register_size): Likewise.
1127 (register_data): Likewise.
1128 * tdesc.c (target_desc::~target_desc): Remove free calls.
1129 (target_desc::operator==): Use std::vector compare.
1130 (init_target_desc): Use reference.
1131 (tdesc_create_reg): Use reg constructors.
1132 * tdesc.h (struct target_desc): Replace pointer with object.
1133
dff7492c
AH
11342018-03-23 Alan Hayward <alan.hayward@arm.com>
1135
1136 * regcache.c (find_register_by_number): Make static.
1137 (find_regno): Use find_register_by_number
1138 * regcache.h (struct reg): Remove declaration.
1139
d80e5242
AH
11402018-03-23 Alan Hayward <alan.hayward@arm.com>
1141
1142 * tdesc.c (target_desc::~target_desc): Move to here.
1143 (target_desc::operator==): Likewise.
1144 * tdesc.h (target_desc::~target_desc): Move from here.
1145 (target_desc::operator==): Likewise.
1146
f69c5afb
AA
11472018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1148
1149 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1150
ce29f843
AA
11512018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1152
1153 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1154 S390_TDESC_GS.
1155 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1156 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1157 and init_registers_s390_gs_linux64.
1158
c49bd90b
AA
11592018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1160
1161 * linux-s390-low.c (s390_fill_gs): Remove function.
1162 (s390_fill_gsbc): Remove function.
1163 (s390_regsets): Set fill functions for the guarded storage regsets
1164 to NULL.
1165
7edb9bd3
AA
11662018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1167
1168 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1169 the word size. Add comment.
1170 (s390_get_wordsize): New function.
1171 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1172 pswm with it. Instead, use s390_get_wordsize to determine the
1173 word size first and derive the correct tdesc from that directly.
1174
39be3c7e
SM
11752018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1176
1177 * Makefile.in: Include silent-rules.mk.
1178 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1179 (COMPILE): Add ECHO_CXX.
1180 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1181 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1182 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1183 (version-generated.c): Add ECHO_GEN.
1184 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1185 (IPAGENT_COMPILE): Add ECHO_CXX.
1186 (%-generated.c): Add ECHO_REGDAT.
1187
3ae9ce5d
TT
11882018-03-14 Tom Tromey <tom@tromey.com>
1189
1190 PR cli/14977:
1191 * ax.c (ax_printf): Special case for NULL.
1192
e6a58aa8
SM
11932018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1194
1195 * linux-low.c (linux_qxfer_libraries_svr4): Use
1196 xml_escape_text_append.
1197
f6e8a41e
SM
11982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1199
1200 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1201
b9671caf
SM
12022018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1203
1204 * server.c (handle_general_set): Remove unnecessary xstrdup.
1205
e80aaf61
SM
12062018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1207
1208 * server.c (parse_debug_format_options): Adjust to
1209 delim_string_to_char_ptr_vec changes.
1210 * thread-db.c (thread_db_load_search): Adjust to
1211 dirnames_to_char_ptr_vec changes.
1212
b1223e78
MM
12132018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1214
1215 * target.h (target_enable_btrace, target_disable_btrace)
1216 (target_read_btrace, target_read_btrace_conf): Turn macro into
1217 inline function. Throw error if target method is not defined.
1218 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1219 check for btrace target method. Be prepared to handle exceptions
1220 from btrace target methods.
1221
81561546
SDJ
12222018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1223
1224 * server.c (captured_main): Change order of error message printed
1225 when the current working directory cannot be found.
1226
25e3c82c
SDJ
12272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1228
1229 * server.c: Include "filenames.h" and "pathstuff.h".
1230 (program_name): Delete variable.
1231 (program_path): New anonymous class.
1232 (get_exec_wrapper): Use "program_path" instead of
1233 "program_name".
1234 (handle_v_run): Likewise.
1235 (captured_main): Likewise.
1236 (process_serial_event): Likewise.
1237
b4987c95
SDJ
12382018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1239
1240 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1241 (OBJS): Add "pathstuff.o".
1242 * server.c (current_directory): New global variable.
1243 (captured_main): Initialize "current_directory".
1244
f46cd62a
AH
12452018-02-26 Alan Hayward <alan.hayward@arm.com>
1246
1247 * tdesc.c: Use common/tdesc.h.
1248 * tdesc.h: Likewise.
1249
a543c5ca
AH
12502018-02-20 Alan Hayward <alan.hayward@arm.com>
1251 Simon Marchi <simon.marchi@ericsson.com>
1252
1253 * Makefile.in: Switch order of make rules.
1254
b5884fa7
AH
12552018-02-19 Alan Hayward <alan.hayward@arm.com>
1256
1257 * Makefile.in: Add common directory in build.
1258 * configure.ac: Add common reference.
1259 * configure: Regenerate.
1260
de6242d3
MM
12612018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1262
1263 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1264 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1265 * spu-low.c (spu_target_ops): Likewise.
1266 * win32-low.c (win32_target_ops): Likewise.
1267 * server.c (supported_btrace_packets): Report packets unconditionally.
1268 * target.h (target_ops) <supports_btrace>: Remove.
1269 (target_supports_btrace): Remove.
1270
9ee23a85
MM
12712018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1272
1273 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1274 (handle_btrace_disable): Change return type to void. Use exceptions
1275 to report errors.
1276 (handle_btrace_general_set): Catch exception and copy message to
1277 return message.
1278
8ce47547
TT
12792018-02-08 Tom Tromey <tom@tromey.com>
1280
1281 * linux-low.c (install_software_single_step_breakpoints): Use
1282 make_scoped_restore.
1283 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1284 (do_restore_current_thread_cleanup): Remove.
1285 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1286 declare.
1287
45dd3607
TT
12882018-02-08 Tom Tromey <tom@tromey.com>
1289
1290 * mem-break.c (set_raw_breakpoint_at): Use
1291 gdb::unique_xmalloc_ptr.
1292
e671cd59
PA
12932018-01-30 Pedro Alves <palves@redhat.com>
1294
1295 PR gdb/13211
1296 * target.c (target_terminal::terminal_state): Rename to ...
1297 (target_terminal::m_terminal_state): ... this.
1298
a0aad537
JC
12992018-01-19 James Clarke <jrtc27@jrtc27.com>
1300
1301 * linux-low.c (handle_extended_wait): Surround call to
1302 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1303
4d9b86e1
SM
13042018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1305
1306 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1307 linux_ptrace_attach_fail_reason_string now returning an
1308 std::string.
1309 (linux_attach): Likewise.
1310 * thread-db.c (attach_thread): Likewise.
1311
f517c180
EA
13122018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1313
1314 PR gdb/21559
1315 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1316 checking for fs_base/gs_base fields in struct user_regs_struct.
1317 * configure: Regenerate.
1318
9a70f35c
YQ
13192018-01-16 Yao Qi <yao.qi@linaro.org>
1320
1321 PR gdb/18749
1322 * linux-low.c (fetch_register): Call supply_register instead of
1323 error.
1324
605fd3c6
YQ
13252018-01-08 Yao Qi <yao.qi@linaro.org>
1326 Simon Marchi <simon.marchi@ericsson.com>
1327
1328 * Makefile.in (OBS): Remove selftest.o.
1329 * configure.ac: Set srv_selftest_objs if $development is true.
1330 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1331 * configure: Re-generated.
1332 * server.c (captured_main): Wrap variable selftest_filter with
1333 GDB_SELF_TEST.
1334
2cc05030
SM
13352018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1336
1337 * server.c (parse_debug_format_options): Return std::string.
1338 (handle_monitor_command, captured_main): Adjust.
1339
e379cee6
PA
13402018-01-05 Pedro Alves <palves@redhat.com>
1341
1342 PR gdb/18653
1343 * server.c (captured_main): Pass quiet=false to
1344 save_original_signals_state.
1345
82e1e79a
JB
13462018-01-01 Joel Brobecker <brobecker@adacore.com>
1347
1348 * gdbreplay.c (gdbreplay_version): Update copyright year in
1349 version message.
1350 * server.c (gdbserver_version): Likewise.
1351
8e481c3b
TT
13522017-12-08 Tom Tromey <tom@tromey.com>
1353
1354 * ax.c (ax_printf): Update.
1355
a8806230
YQ
13562017-12-07 Yao Qi <yao.qi@linaro.org>
1357
1358 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1359 aarch64_linux_read_description.
1360 * linux-amd64-ipa.c (idx2mask): New array.
1361 (get_ipa_tdesc): Move idx2mask out.
1362 (initialize_low_tracepoint): Initialize target descriptions.
1363 * linux-i386-ipa.c (idx2mask): New array.
1364 (get_ipa_tdesc): Move idx2mask out.
1365 (initialize_low_tracepoint): Initialize target descriptions.
1366
d4a0e8b5
SM
13672017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1368
1369 * tdesc.c (struct tdesc_type): Change return type.
1370 (tdesc_add_flag): Change parameter type.
1371 (tdesc_add_bitfield): Likewise.
1372 (tdesc_add_field): Likewise.
1373 (tdesc_set_struct_size): Likewise.
1374
798a7429
SM
13752017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * regcache.c (registers_to_string): Remove unused variable.
1378
c0e15c9b
SM
13792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1380
1381 * inferiors.c (for_each_inferior_with_data): Remove.
1382 * inferiors.h (for_each_inferior_with_data): Remove.
1383 * server.c (handle_qxfer_threads_worker): Change parameter type.
1384 (handle_qxfer_threads_proper): Use for_each_thread.
1385
f0045347
SM
13862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1387
1388 * inferiors.c (for_each_inferior): Remove.
1389 (clear_inferiors): Use for_each_thread.
1390 * inferiors.h (for_each_inferior): Remove.
1391 * linux-low.c (linux_wait_for_event_filtered): Use
1392 for_each_thread.
1393 (linux_stabilize_threads): Likewise.
1394 * regcache.c (regcache_release): Likewise.
1395 * server.c (gdb_wants_all_threads_stopped): Likewise.
1396 (clear_pending_status_callback): Remove.
1397 (handle_status): Use for_each_thread.
1398 (captured_main): Likewise.
1399 * win32-low.c (child_init_thread_list): Likewise.
1400 (win32_clear_inferiors): Likewise.
1401 (fake_breakpoint_event): Likewise.
1402
9521758b
SM
14032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1404
1405 * inferiors.h (find_inferior): Remove.
1406 * inferiors.c (find_inferior): Remove.
1407
8f86d7aa
SM
14082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1409
1410 * linux-low.c (resume_status_pending_p): Update comment.
1411 (need_step_over_p): Update comment.
1412
e2b44075
SM
14132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1414
1415 * linux-low.c (proceed_one_lwp): Return void, change parameter
1416 type.
1417 (unsuspend_and_proceed_one_lwp): Likewise.
1418 (proceed_all_lwps): Use for_each_thread.
1419 (unstop_all_lwps): Likewise.
1420
c80825ff
SM
14212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1422
1423 * linux-low.c (linux_resume_one_thread): Return void, take
1424 parameter directly.
1425 (linux_resume): Use for_each_thread.
1426
df3e4dbe
SM
14272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1428
1429 * linux-low.c (send_sigstop_callback): Return void, change
1430 parameter type. Rename to...
1431 (send_sigstop): ... this.
1432 (suspend_and_send_sigstop_callback): Return void, change parameter
1433 type. Rename to...
1434 (suspend_and_send_sigstop): ... this.
1435 (stop_all_lwps): Use for_each_thread.
1436
5a6b0a41
SM
14372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1438
1439 * linux-low.c (lwp_running): Return bool, remove unused
1440 argument.
1441 (linux_stabilize_threads): Use find_thread.
1442
39a64da5
SM
14432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1444
1445 * linux-low.c (select_singlestep_lwp_callback): Remove.
1446 (count_events_callback): Remove.
1447 (select_event_lwp_callback): Remove.
1448 (select_event_lwp): Use find_thread/for_each_thread.
1449
a1385b7b
SM
14502017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1451
1452 * linux-low.c (not_stopped_callback): Return bool, take filter
1453 argument directly.
1454 (linux_wait_for_event_filtered): Use find_thread.
1455 (linux_wait_1): Likewise.
1456
454296a2
SM
14572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1458
1459 * linux-low.c (same_lwp): Remove.
1460 (find_lwp_pid): Use find_thread.
1461
6b2a85da
SM
14622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * linux-low.c (delete_lwp_callback): Remove.
1465 (linux_mourn): Use for_each_thread.
1466
798a38e8
SM
14672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1468
1469 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1470 args parameter, don't check for pid.
1471 (linux_detach): Use for_each_thread.
1472
e4eb0dec
SM
14732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1474
1475 * linux-low.c (struct counter): Remove.
1476 (second_thread_of_pid_p): Remove.
1477 (last_thread_of_process_p): Use find_thread.
1478
83e1b6c1
SM
14792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1480
1481 * inferiors.c (find_inferior_in_random): Remove.
1482 * inferiors.h (find_inferior_in_random): Remove.
1483 * linux-low.c (status_pending_p_callback): Return bool, accept
1484 parameter ptid directly.
1485 (linux_wait_for_event_filtered): Use find_thread_in_random.
1486 (linux_wait_1): Likewise.
1487
8dc7b443
SM
14882017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * inferiors.c (find_inferior_id): Remove.
1491 (find_thread_ptid): Move implemention from find_inferior_id to
1492 here.
1493 * inferiors.h (find_inferior_id): Remove.
1494 * server.c (handle_status): Use find_thread_ptid.
1495 (process_serial_event): Likewise.
1496 * thread-db.c (find_one_thread): Likewise.
1497 (thread_db_thread_handle): Likewise.
1498 * win32-low.c (thread_rec): Likewise.
1499 (child_delete_thread): Likewise.
1500 (win32_thread_alive): Likewise.
1501 (get_child_debug_event): Likewise.
1502
da25033c
SM
15032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1504
1505 * linux-mips-low.c (update_watch_registers_callback): Return
1506 void, remove pid_p parameter, don't check for pid.
1507 (mips_insert_point, mips_remove_point): Use for_each_thread.
1508
c91bb56b
SM
15092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1510
1511 * lynx.low (lynx_delete_thread_callback): Remove.
1512 (lynx_mourn): Use for_each_thread.
1513
634a3254
SM
15142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * regcache.c (regcache_invalidate_one): Remove.
1517 (regcache_invalidate_pid): use for_each_thread.
1518
41272101
TT
15192017-11-26 Tom Tromey <tom@tromey.com>
1520
1521 * linux-low.c (linux_create_inferior): Update.
1522
f5291a6f
UW
15232017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1524
1525 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1526
6654d750
AH
15272017-11-24 Alan Hayward <alan.hayward@arm.com>
1528
1529 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
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
15342017-11-24 Alan Hayward <alan.hayward@arm.com>
1535
1536 * configure.srv: Add new file.
1537 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1538 * linux-aarch64-tdesc-selftest.c: New file.
1539 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1540
49bdb7ee
AH
15412017-11-24 Alan Hayward <alan.hayward@arm.com>
1542
1543 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1544 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1545 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1546
d6d7ce56
AH
15472017-11-24 Alan Hayward <alan.hayward@arm.com>
1548
1549 * configure.srv: Add new files.
1550 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1551 aarch64_linux_read_description.
1552 * linux-aarch64-low.c (aarch64_linux_read_description):
1553 Merge with aarch64_arch_setup.
1554 (aarch64_arch_setup): Call aarch64_linux_read_description.
1555 * linux-aarch64-tdesc.c: New file.
1556 * linux-aarch64-tdesc.h: New file.
1557
506fe5f4
YQ
15582017-11-24 Yao Qi <yao.qi@linaro.org>
1559
1560 * configure.srv: Set $srv_regobj for tic6x-linux.
1561 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1562 (tic6x_read_description): Move some code to tic6x_arch_setup.
1563 (tic6x_tdesc_test): New function.
1564 (initialize_low_arch): Call selftests::register_test.
1565
29f9a567
YQ
15662017-11-22 Yao Qi <yao.qi@linaro.org>
1567
1568 * remote-utils.c (prepare_resume_reply): Use memcpy.
1569
578290ec
SM
15702017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1571
1572 * linux-low.c (kill_one_lwp_callback): Return void, take
1573 argument directly, don't filter on pid.
1574 (linux_kill): Use for_each_thread.
1575
eca55aec
SM
15762017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1577
1578 * linux-low.c (need_step_over_p): Return bool, remove dummy
1579 argument.
1580 (linux_resume, proceed_all_lwps): Use find_thread.
1581
25c28b4d
SM
15822017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1583
1584 * linux-low.c (resume_status_pending_p): Return bool, remove
1585 flag_p argument.
1586 (linux_resume): Use find_thread.
1587
5fdda392
SM
15882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1589
1590 * linux-low.c (struct thread_resume_array): Remove.
1591 (linux_set_resume_request): Return void, take arguments
1592 directly.
1593 (linux_resume): Use for_each_thread.
1594
fcb056a5
SM
15952017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1596
1597 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1598 return bool, remove data argument.
1599 (linux_stabilize_threads): Use find_thread.
1600
139720c5
SM
16012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1602
1603 * linux-low.c (unsuspend_one_lwp): Remove.
1604 (unsuspend_all_lwps): Use for_each_thread, inline code from
1605 unsuspend_one_lwp.
1606
6d1e5673
SM
16072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1608
1609 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1610 * linux-low.c (struct iterate_over_lwps_args): Remove.
1611 (iterate_over_lwps_filter): Remove.
1612 (iterate_over_lwps): Use find_thread.
1613
bbf550d5
SM
16142017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1615
1616 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1617 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1618 code from reset_lwp_ptrace_options_callback.
1619
00192f77
SM
16202017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1621
1622 * linux-arm-low.c (struct update_registers_data): Remove.
1623 (update_registers_callback): Return void, take arguments
1624 directly, don't check thread's pid.
1625 (arm_insert_point, arm_remove_point): Use for_each_thread.
1626
2bee2b6c
SM
16272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1628
1629 * win32-low.c (continue_one_thread): Return void, take argument
1630 directly.
1631 (child_continue): Use for_each_thread.
1632
0b360f19
SM
16332017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1634
1635 * win32-i386-low.c (update_debug_registers_callback): Rename
1636 to ...
1637 (update_debug_registers): ... this, return void, remove pid_p arg.
1638 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1639
f27866ba
SM
16402017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1641
1642 * inferiors.h (struct process_info): Add constructor, initialize
1643 fields..
1644 <syscalls_to_catch>: Change type to std::vector<int>.
1645 * inferiors.c (add_process): Allocate process_info with new.
1646 (remove_process): Free process_info with delete.
1647 * linux-low.c (handle_extended_wait): Adjust.
1648 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1649 * server.c (handle_general_set): Adjust.
1650
e849ea89
PA
16512017-11-16 Pedro Alves <palves@redhat.com>
1652
1653 * remote-utils.c (remote_close): Block SIGIO signals instead of
1654 uninstalling the SIGIO handler.
1655
1d0aa65c
AH
16562017-11-16 Alan Hayward <alan.hayward@arm.com>
1657
1658 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1659
3491a34c
YQ
16602017-11-16 Yao Qi <yao.qi@linaro.org>
1661
1662 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1663 (tic6x_store_gregset): Likewise.
1664 (tic6x_usrregs_info): Move it up.
1665
a602f924
AH
16662017-11-15 Alan Hayward <alan.hayward@arm.com>
1667
1668 * Makefile.in: Update arch rules.
1669 * configure.srv: Explicitly mark arch/ files.
1670
5616b6c3
AS
16712017-11-13 Andreas Schwab <schwab@suse.de>
1672
1673 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1674 function.
1675 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1676
d1928160
PA
16772017-11-06 Pedro Alves <palves@redhat.com>
1678
1679 * config.in, configure: Regenerate.
1680
bac608e7
SM
16812017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1682
1683 * target.c (struct thread_search): Remove.
1684 (thread_search_callback): Remove.
1685 (prepare_to_access_memory): Use for_each_thread instead of
1686 find_inferior. Inline code from thread_search_callback.
1687
eaddb425
SM
16882017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1689
1690 * server.c (struct visit_actioned_threads_data): Remove.
1691 (visit_actioned_threads): Change prototype to take arguments
1692 directly.
1693 (resume): Use find_thread instead of find_inferior.
1694
99078d34
SM
16952017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1696
1697 * server.c (queue_stop_reply_callback): Change prototype, return
1698 void.
1699 (find_status_pending_thread_callback): Remove.
1700 (handle_status): Replace find_inferior with find_thread and
1701 for_each_thread.
1702
cc628f3d
AH
17032017-10-25 Alan Hayward <alan.hayward@arm.com>
1704
1705 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1706 with REGNO.
1707 (aarch64_store_gregset): Likewise.
1708 (aarch64_fill_fpregset): Likewise.
1709 (aarch64_store_fpregset): Likewise.
1710
4d3bb80e
SM
17112017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1712
1713 * gdbthread.h (find_thread, for_each_thread): New functions.
1714 * inferiors.c (thread_of_pid): Remove.
1715 (find_any_thread_of_pid): Use find_thread.
1716 * linux-low.c (num_lwps): Use for_each_thread.
1717
7a7cdfa0
YQ
17182017-10-17 Yao Qi <yao.qi@linaro.org>
1719
1720 * Makefile.in: Remove one rule.
1721 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1722
e675d170
YQ
17232017-10-17 Yao Qi <yao.qi@linaro.org>
1724
1725 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1726 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1727
7eb4e0f9
YQ
17282017-10-17 Yao Qi <yao.qi@linaro.org>
1729
1730 * configure.srv: Rename arm.o with arch/arm.o.
1731
60d6cfc9
YQ
17322017-10-17 Yao Qi <yao.qi@linaro.org>
1733
1734 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1735 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1736 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1737 (arch-i386.o, arch-amd64.o): Remove rules.
1738 (arch/%.o): New rule.
1739 Update POSTCOMPILE and COMPILE.pre.
1740 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1741 * configure: Re-generated.
1742 * configure.srv: Replace arch-i386.o with arch/i386.o.
1743 Replace arch-amd64.o with arch/amd64.o.
1744
5bfda255
YQ
17452017-10-16 Yao Qi <yao.qi@linaro.org>
1746
1747 * configure: Regenerated.
1748
9c80ecd6
SM
17492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1750
1751 * inferiors.h: (struct inferior_list): Remove.
1752 (struct inferior_list_entry); Remove.
1753 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1754 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1755 get_first_inferior): Remove.
1756 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1757 find_inferior_id, find_inferior_in_random): Change signature.
1758 * inferiors.c (all_threads): Change type to
1759 std::list<thread_info *>.
1760 (get_thread): Remove macro.
1761 (find_inferior, find_inferior_id): Change signature, implement
1762 using find_thread.
1763 (find_inferior_in_random): Change signature, implement using
1764 find_thread_in_random.
1765 (for_each_inferior, for_each_inferior_with_data): Change
1766 signature, implement using for_each_thread.
1767 (add_inferior_to_list, remove_inferior): Remove.
1768 (add_thread, get_first_thread, thread_of_pid,
1769 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1770 (get_first_inferior, one_inferior_p, clear_inferior_list):
1771 Remove.
1772 (clear_inferiors, get_thread_process): Update.
1773 * gdbthread.h: Include <list>.
1774 (struct thread_info) <entry>: Remove field.
1775 <id>: New field.
1776 (all_threads): Change type to std::list<thread_info *>.
1777 (get_first_inferior): Add doc.
1778 (find_thread, for_each_thread, find_thread_in_random): New
1779 functions.
1780 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1781 * linux-arm-low.c (update_registers_callback): Update.
1782 * linux-low.c (second_thread_of_pid_p): Update.
1783 (kill_one_lwp_callback, linux_detach_lwp_callback,
1784 delete_lwp_callback, status_pending_p_callback, same_lwp,
1785 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1786 iterate_over_lwps, not_stopped_callback,
1787 resume_stopped_resumed_lwps, count_events_callback,
1788 select_singlestep_lwp_callback, select_event_lwp_callback,
1789 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1790 suspend_and_send_sigstop_callback, wait_for_sigstop,
1791 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1792 lwp_running, linux_set_resume_request, resume_status_pending_p,
1793 need_step_over_p, start_step_over, linux_resume_one_thread,
1794 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1795 reset_lwp_ptrace_options_callback): Update.
1796 * linux-mips-low.c (update_watch_registers_callback): Update.
1797 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1798 Update.
1799 (free_register_cache_thread_one): Remove.
1800 (regcache_release): Update.
1801 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1802 handle_qxfer_threads_worker): Update.
1803 (handle_query): Update, use list iterator.
1804 (visit_actioned_threads, handle_pending_status,
1805 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1806 clear_pending_status_callback, set_pending_status_callback,
1807 find_status_pending_thread_callback, handle_status,
1808 process_serial_event): Update.
1809 * target.c (thread_search_callback): Update.
1810 * thread-db.c (thread_db_get_tls_address): Update.
1811 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1812 Update.
1813 * win32-i386-low.c (update_debug_registers_callback): Update.
1814 * win32-low.c (delete_thread_info, child_delete_thread,
1815 continue_one_thread, suspend_one_thread,
1816 get_child_debug_event): Adjust.
1817
9179355e
SM
18182017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1819
1820 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1821 * inferiors.h: Include <list>.
1822 (struct process_info) <entry>: Remove field.
1823 <pid>: New field.
1824 (pid_of): Change macro to function.
1825 (ptid_of, lwpid_of): Remove macro.
1826 (all_processes): Change type to std::list<process_info *>.
1827 (ALL_PROCESSES): Remove macro.
1828 (for_each_process, find_process): New function.
1829 * inferiors.c (all_processes): Change type to
1830 std::list<process_info *>.
1831 (find_thread_process): Adjust.
1832 (add_process): Likewise.
1833 (remove_process): Likewise.
1834 (find_process_pid): Likewise.
1835 (get_first_process): Likewise.
1836 (started_inferior_callback): Remove.
1837 (have_started_inferiors_p): Adjust.
1838 (attached_inferior_callback): Remove.
1839 (have_attached_inferiors_p): Adjust.
1840 * linux-low.c (check_zombie_leaders): Likewise.
1841 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1842 (x86_linux_update_xmltarget): Adjust.
1843 * server.c (handle_query): Likewise.
1844 (gdb_reattached_process): Remove.
1845 (handle_status): Adjust.
1846 (kill_inferior_callback): Likewise.
1847 (detach_or_kill_inferior): Remove.
1848 (print_started_pid): Likewise.
1849 (print_attached_pid): Likewise.
1850 (detach_or_kill_for_exit): Update.
1851 (process_serial_event): Likewise.
1852 * linux-arm-low.c (arm_new_fork): Likewise.
1853
c9cb8905
SM
18542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1855
1856 * dll.h: Include <list>.
1857 (struct dll_info): Add constructor.
1858 <entry>: Remove field.
1859 (all_dlls): Change type to std::list<dll_info>.
1860 * dll.c: Include <algorithm>.
1861 (get_dll): Remove macro.
1862 (all_dlls): Change type to std::list<dll_info *>.
1863 (free_one_dll): Remove.
1864 (match_dll): Likewise.
1865 (loaded_dll): Adjust.
1866 (unloaded_dll): Adjust to all_dlls type change, use
1867 std::find_if. Inline code from match_dll.
1868 (clear_dlls): Adjust to all_dlls type change.
1869 * server.c (emit_dll_description): Remove.
1870 (handle_qxfer_libraries): Adjust to all_dlls type change,
1871 integrate emit_dll_description's functionality.
1872
04ec7890
SM
18732017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * linux-low.h (struct linux_target_ops) <delete_process>: New
1876 field.
1877 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1878 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1879 (struct linux_target_ops): Add delete_process callback.
1880 * linux-arm-low.c (arm_delete_process): New.
1881 (struct linux_target_ops): Add delete_process callback.
1882 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1883 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1884 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1885 * linux-mips-low.c (mips_linux_delete_process): New.
1886 (struct linux_target_ops): Add delete_process callback.
1887 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1888 * linux-s390-low.c (struct linux_target_ops): Likewise.
1889 * linux-sh-low.c (struct linux_target_ops): Likewise.
1890 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1891 * linux-tile-low.c (struct linux_target_ops): Likewise.
1892 * linux-x86-low.c (x86_linux_delete_process): New.
1893 (struct linux_target_ops): Add delete_process callback.
1894 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1895
466eecee
SM
18962017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1897
1898 * linux-aarch64-low.c (the_low_target): Add thread delete
1899 callback.
1900 * linux-arm-low.c (arm_delete_thread): New function.
1901 (the_low_target): Add thread delete callback.
1902 * linux-bfin-low.c (the_low_target): Likewise.
1903 * linux-crisv32-low.c (the_low_target): Likewise.
1904 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1905 set.
1906 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1907 field.
1908 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1909 * linux-mips-low.c (mips_linux_delete_thread): New function.
1910 (the_low_target): Add thread delete callback.
1911 * linux-ppc-low.c (the_low_target): Likewise.
1912 * linux-s390-low.c (the_low_target): Likewise.
1913 * linux-sh-low.c (the_low_target): Likewise.
1914 * linux-tic6x-low.c (the_low_target): Likewise.
1915 * linux-tile-low.c (the_low_target): Likewise.
1916 * linux-x86-low.c (the_low_target): Likewise.
1917 * linux-xtensa-low.c (the_low_target): Likewise.
1918
b79f7801
YZ
19192017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1920
1921 * win32-low.c: Include "common-inferior.h".
1922
bc3b087d
SDJ
19232017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1924
1925 * inferiors.c (set_inferior_cwd): New function.
1926 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1927 (handle_query): Inform that QSetWorkingDir is supported.
1928 * win32-low.c (create_process): Pass the inferior's cwd to
1929 CreateProcess.
1930
d092c5a2
SDJ
19312017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1932
1933 * inferiors.c (current_inferior_cwd): New global variable.
1934 (get_inferior_cwd): New function.
1935 * inferiors.h (struct process_info) <cwd>: New field.
1936
7da0a886
SDJ
19372017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1938
1939 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1940 (OBS): Add gdb_tilde_expand.o.
1941
289a6840
SM
19422017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1943
1944 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1945 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1946
256642e8
PA
19472017-09-29 Pedro Alves <palves@redhat.com>
1948
1949 * ax.c (gdb_parse_agent_expr): Constify.
1950 * ax.h (gdb_parse_agent_expr): Constify.
1951 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1952 Constify.
1953 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1954 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1955 * remote-utils.h (read_ptid): Constify.
1956 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1957 (process_point_options, process_serial_event): Constify.
1958 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1959 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1960 (cmd_qtbuffer): Constify.
1961
5b9ca4d4
PA
19622017-09-29 Pedro Alves <palves@redhat.com>
1963
1964 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1965 fails.
1966
94c207e0
PA
19672017-09-29 Pedro Alves <palves@redhat.com>
1968
1969 * linux-low.c (handle_extended_wait): Pass parent thread instead
1970 of process to thread_db_notice_clone.
1971 * linux-low.h (thread_db_notice_clone): Replace parent process
1972 parameter with parent thread parameter.
1973 * thread-db.c (find_one_thread): Add comment.
1974 (thread_db_notice_clone): Replace parent process parameter with
1975 parent thread parameter. Temporarily switch to the parent thread.
1976
75352e28
SDJ
19772017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1978
1979 * gdbthread.h: Include "common-gdbthread.h".
1980 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1981 "if" when validating the ptid.
1982 * remote-utils.c: Include "gdbthread.h".
1983 (prepare_resume_reply): Use "switch_to_thread".
1984 * target.c (done_accessing_memory): Likewise.
1985
ad339634
AA
19862017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1987
1988 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1989 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1990 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1991 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1992 s390x-gs-linux64-ipa.o to ipa_obj.
1993 * linux-s390-low.c (HWCAP_S390_GS): New define.
1994 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1995 New functions.
1996 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1997 (s390_arch_setup): Check for guarded-storage support and choose
1998 appropriate tdesc.
1999 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2000 init_registers_s390x_gs_linux64.
2001 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2002 enum value.
2003 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2004 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2005
cc4d742f
SM
20062017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2007
2008 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2009
f6327dcb
KB
20102017-09-21 Kevin Buettner <kevinb@redhat.com>
2011
2012 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2013 (thread_db_thread_handle): Declare.
2014 * linux-low.c (linux_target_ops): Initialize thread_handle.
2015 * server.c (handle_qxfer_threads_worker): Add support for
2016 "handle" attribute.
2017 * target.h (struct target_ops): Add new function pointer,
2018 thread_handle.
2019 (target_thread_handle): Define.
2020 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2021 field in lwp.
2022 (thread_db_thread_handle): New function.
2023
86299109
KB
20242017-09-21 Kevin Buettner <kevinb@redhat.com>
2025
2026 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2027 * linux-low.h (thread_db_notice_clone): Declare.
2028 * thread-db.c (thread_db_notice_clone): New function.
2029
f557a88a
PA
20302017-09-21 Pedro Alves <palves@redhat.com>
2031
2032 * server.c (gdb_read_memory, handle_status, process_serial_event)
2033 (handle_serial_event, handle_target_event): Adjust to
2034 set_desired_thread prototype change.
2035 * target.c (set_desired_thread): Remove 'use_general' parameter
2036 and adjust.
2037 * target.h (set_desired_thread): Remove 'use_general' parameter.
2038
223ffa71
TT
20392017-09-20 Tom Tromey <tom@tromey.com>
2040
2041 * target.c (target_terminal::terminal_state): Define.
2042 (target_terminal::init): Rename from target_terminal_init.
2043 (target_terminal::inferior): Rename from
2044 target_terminal_inferior.
2045 (target_terminal::ours): Rename from target_terminal_ours.
2046 (target_terminal::ours_for_output, target_terminal::info): New.
2047
04fd3ba9
SM
20482017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2049
2050 * server.c (accumulate_file_name_length): Remove.
2051 (emit_dll_description): Adjust to std::string change.
2052 (handle_qxfer_libraries): Use std::string to hold document.
2053
5e187554
SM
20542017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2055
2056 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2057 return type of xml_escape_text.
2058 * server.c (emit_dll_description): Likewise.
2059
1526853e
SM
20602017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * server.c (captured_main): Accept argument for --selftest.
2063 Update run_tests call.
2064 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2065 when registering selftests.
2066
c4dfafab
SDJ
20672017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2068
2069 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2070 instead of "VEC" for "target_desc.reg_defs".
2071 (regcache_cpy): Likewise.
2072 (registers_to_string): Likewise.
2073 (registers_from_string): Likewise.
2074 (find_regno): Likewise.
2075 (supply_regblock): Likewise.
2076 (regcache_raw_read_unsigned): Likewise.
2077 * tdesc.c (init_target_desc): Likewise.
2078 (tdesc_create_reg): Likewise.
2079 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2080 (struct target_desc) <reg_defs>: Convert to "std::vector".
2081 (target_desc): Do not initialize "reg_defs".
2082 (~target_desc): Update code to use "std::vector" instead of "VEC"
2083 for "target_desc.reg_defs".
2084 (operator==): Likewise.
2085
124aceb4
SM
20862017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2087
2088 * inferiors.h (thread_to_gdb_id): Remove.
2089 * inferiors.c (thread_to_gdb_id): Remove.
2090 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2091 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2092 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2093 Likewise.
2094 * nto-low.c (nto_fetch_registers, nto_store_registers,
2095 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2096
96cde54f
SM
20972017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2098
2099 * inferiors.h (gdb_id_to_thread_id): Remove.
2100 * inferiors.c (gdb_id_to_thread_id): Remove.
2101 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2102 removal. Move pid declaration closer to where it's used.
2103
e8ca139e
SM
21042017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2105
2106 * server.c (handle_detach): New function.
2107 (process_serial_event): Move code out, call handle_detach.
2108
f8a4e119
SM
21092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2110
2111 * server.c (require_running): Rename to ...
2112 (require_running_or_return): ... this ...
2113 (require_running_or_break): ... and this.
2114 (handle_query, process_serial_event): Adjust.
2115
0eb0a407
SM
21162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * linux-low.c (linux_set_resume_request): Remove unused
2119 variables.
2120
785922a5
SM
21212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2122
2123 * server.c (first_thread_of): Remove.
2124 (process_serial_event): Replace usage of first_thread_of with
2125 find_any_thread_of_pid.
2126 * tracepoint.c (same_process_p): Remove.
2127 (gdb_agent_about_to_close): Replace usage of same_process_p with
2128 find_any_thread_of_pid.
2129 * linux-x86-low.c (same_process_callback): Remove.
2130 (x86_arch_setup_process_callback): Replace usage of
2131 same_process_callback with find_any_thread_of_pid.
2132 * thread-db.c (any_thread_of): Remove.
2133 (switch_to_process): Replace usage of any_thread_of with
2134 find_any_thread_of_pid.
2135 * inferiors.c (thread_pid_matches_callback): Remove.
2136 (find_thread_process): Adjust to use find_any_thread_of_pid.
2137
a059f00c
SDJ
21382017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2139
2140 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2141 with "!VEC_empty".
a059f00c 2142
cc397f3a
SDJ
21432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2144
2145 * linux-low.c (handle_extended_wait): Use
2146 "allocate_target_description" instead of "XNEW".
2147 * linux-x86-low.c (initialize_low_arch): Likewise.
2148
22916b07
YQ
21492017-09-05 Yao Qi <yao.qi@linaro.org>
2150
2151 * configure.srv (srv_i386_regobj): Remove.
2152 (srv_amd64_regobj): Remove.
2153 (srv_regobj): Set it to "" for x86 non-linux targets.
2154 * linux-x86-tdesc.c (i386_linux_read_description):
2155 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2156 (init_registers_i386): Remove the declaration.
2157 (tdesc_i386): Remove the declaration.
2158 (lynx_i386_arch_setup): Call i386_create_target_description.
2159 * nto-x86-low.c: Likewise.
2160 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2161 [!__x86_64__]: include arch/i386.h.
2162 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2163
38602d55
YQ
21642017-09-05 Yao Qi <yao.qi@linaro.org>
2165
2166 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2167 i386/amd64-XXX-linux from it.
2168
44b886ff
YQ
21692017-09-05 Yao Qi <yao.qi@linaro.org>
2170
2171 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2172 false.
2173 (ipa_amd64_linux_regobj): Remove.
2174 (ipa_x32_linux_regobj): Remove.
2175
b4570e4b
YQ
21762017-09-05 Yao Qi <yao.qi@linaro.org>
2177
2178 * Makefile.in (arch-amd64.o): New rule.
2179 * configure.srv: Append arch-amd64.o.
2180 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2181 (get_ipa_tdesc): Call amd64_linux_read_description.
2182 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2183 and init_registers_amd64_XXX.
2184 * linux-x86-low.c (x86_linux_read_description): Call
2185 amd64_linux_read_description.
2186 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2187 (initialize_low_arch): Don't call init_registers_x32_XXX and
2188 init_registers_amd64_XXX.
2189 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2190 and tdesc_amd64_XXX.
2191 [__x86_64__] (amd64_tdesc_test): New function.
2192 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2193 and init_registers_amd64_XXX.
2194 * linux-x86-tdesc.c: Include arch/amd64.h.
2195 (xcr0_to_tdesc_idx): New function.
2196 (i386_linux_read_description): New function.
2197 (amd64_get_ipa_tdesc_idx): New function.
2198 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2199 (amd64_get_ipa_tdesc): Declare.
2200
d1f28ea2
YQ
22012017-09-05 Yao Qi <yao.qi@linaro.org>
2202
2203 * configure.srv (srv_i386_linux_xmlfiles): Remove
2204 i386/i386-XXX-linux.xml from it.
2205
25a93583
YQ
22062017-09-05 Yao Qi <yao.qi@linaro.org>
2207
2208 * configure.srv: Set srv_i386_linux_regobj empty if $development
2209 is false.
2210 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2211 initialize_low_tdesc.
2212 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2213 with #if initialize_low_tdesc.
2214 * linux-x86-tdesc-selftest.c: New file.
2215 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2216
5f035c07
YQ
22172017-09-05 Yao Qi <yao.qi@linaro.org>
2218
2219 * Makefile.in (arch-i386.o): New rule.
2220 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2221 (x86_64-*-linux*): Likewise.
2222 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2223 include arch/i386.h.
2224 (i386_linux_read_description): Remove code and call
2225 i386_create_target_description.
2226 * tdesc.c (allocate_target_description): New function.
2227 * tdesc.h (set_tdesc_architecture): Remove declaration.
2228 (set_tdesc_osabi): Likewise.
2229
0abe8a89
YQ
22302017-09-05 Yao Qi <yao.qi@linaro.org>
2231
2232 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2233 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2234 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2235 .xmltarget.
2236 * server.c (get_features_xml): Call tdesc_get_features_xml.
2237 * tdesc.c (set_tdesc_architecture): New function.
2238 (set_tdesc_osabi): New function.
2239 (tdesc_get_features_xml): New function.
2240 (tdesc_create_feature): Add an argument.
2241 * tdesc.h (struct target_desc) <features>: New field.
2242 <arch, osabi>: New field.
2243 (~target_desc): xfree features, arch, and osabi.
2244 (target_desc::oerator==): Don't compare .xmltarget.
2245 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2246 (set_tdesc_osabi): Likewise.
2247 (tdesc_get_features_xml): Likewise.
2248
0a188386
YQ
22492017-09-05 Yao Qi <yao.qi@linaro.org>
2250
2251 * linux-x86-tdesc.c: Include selftest.h.
2252 (i386_tdesc_test): New function.
2253 (initialize_low_tdesc): Call selftests::register_test.
2254 * tdesc.h: Include regdef.h.
2255 (target_desc): Override operator == and !=.
2256
f49ff000
YQ
22572017-09-05 Yao Qi <yao.qi@linaro.org>
2258
2259 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2260 (ipa_obj): Likewise.
2261 * linux-i386-ipa.c: Include common/x86-xstate.h
2262 (get_ipa_tdesc): Call i386_linux_read_description.
2263 (initialize_low_tracepoint): Don't call init_registers_XXX
2264 functions, call initialize_low_tdesc instead.
2265 * linux-x86-low.c (x86_linux_read_description): Call
2266 i386_linux_read_description.
2267 (initialize_low_arch): Don't call init_registers_i386_XXX
2268 functions, call initialize_low_tdesc.
2269 * linux-x86-tdesc.c: New file.
2270 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2271 (i386_get_ipa_tdesc_idx): Declare.
2272 (i386_get_ipa_tdesc): Declare.
2273 (initialize_low_tdesc): Declare.
2274
2b68ef2f
YQ
22752017-09-05 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2278 instead of 0.
2279
f7000548
YQ
22802017-09-05 Yao Qi <yao.qi@linaro.org>
2281
2282 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2283 * regcache.c (get_thread_regcache): Use VEC_length.
2284 (init_register_cache): Likewise.
2285 (regcache_cpy): Likewise.
2286 (registers_to_string): Iterate reg_defs via VEC_iterate.
2287 (find_regno): Likewise.
2288 (find_register_by_number): Use VEC_index.
2289 (register_size): Call find_register_by_number.
2290 (register_data): Call find_register_by_number.
2291 (supply_regblock): Use VEC_length.
2292 (regcache_raw_read_unsigned): Likewise.
2293 * tdesc.c (init_target_desc): Iterate reg_defs via
2294 VEC_iterate.
2295 (default_description): Update initializer.
2296 (copy_target_description): Don't update field num_registers.
2297 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2298 <num_registers>: Remove.
2299
50a421ac
SM
23002017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2301
2302 * Makefile.in (.SECONDARY): Define target.
2303
23fdd69e
SM
23042017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2305
2306 * linux-low.c (linux_wait_1): Adjust.
2307 * server.c (queue_stop_reply_callback): Adjust.
2308
0a2dde4a
SDJ
23092017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2310
2311 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2312 QEnvironmentUnset and QEnvironmentReset packets.
2313 (handle_query): Inform remote that QEnvironmentHexEncoded,
2314 QEnvironmentUnset and QEnvironmentReset are supported.
2315
6afd337d
SM
23162017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * inferiors.h (inferior_target_data): Rename to ...
2319 (thread_target_data): ... this.
2320 (inferior_regcache_data): Rename to ...
2321 (thread_regcache_data): ... this.
2322 (set_inferior_regcache_data): Rename to ...
2323 (set_thread_regcache_data): ... this.
2324 * inferiors.c (inferior_target_data): Rename to ...
2325 (thread_target_data): ... this.
2326 (inferior_regcache_data): Rename to ...
2327 (thread_regcache_data): ... this.
2328 (set_inferior_regcache_data): Rename to ...
2329 (set_thread_regcache_data): ... this.
2330 (free_one_thread): Update.
2331 * linux-low.h (get_thread_lwp): Update.
2332 * regcache.c (get_thread_regcache): Update.
2333 (regcache_invalidate_thread): Update.
2334 (free_register_cache_thread): Update.
2335 * win32-i386-low.c (update_debug_registers_callback): Update.
2336 (win32_get_current_dr): Update.
2337 * win32-low.c (thread_rec): Update.
2338 (delete_thread_info): Update.
2339 (continue_one_thread): Update.
2340 (suspend_one_thread): Update.
2341
a160cc46
SM
23422017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2343
2344 * inferiors.c (set_inferior_target_data): Remove.
2345 * inferiors.h (set_inferior_target_data): Remove.
2346
6d580b63
YQ
23472017-08-18 Yao Qi <yao.qi@linaro.org>
2348
2349 * Makefile.in (OBS): Add selftest.o.
2350 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2351 * configure, config.in: Re-generated.
2352 * server.c: Include common/sefltest.h.
2353 (captured_main): Handle option --selftest.
2354
f5a29eb0
YQ
23552017-08-09 Yao Qi <yao.qi@linaro.org>
2356
2357 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2358 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2359 i386-avx-mpx.o and i386-mmx.o.
2360 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2361 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2362 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2363 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2364 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2365 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2366 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2367 i386/amd64-avx-mpx.xml.
2368
57757c2f
YQ
23692017-08-09 Yao Qi <yao.qi@linaro.org>
2370
2371 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2372 and x32-avx-avx512.o.
2373 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2374 i386/x32-avx-avx512.xml.
2375
229d26fc
SM
23762017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2377
2378 * tracepoint.h (enum class fast_tpoint_collect_result): New
2379 enumeration.
2380 (fast_tracepoint_collecting): Change return type to
2381 fast_tpoint_collect_result.
2382 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2383 * linux-low.h: Include tracepoint.h.
2384 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2385 fast_tpoint_collect_result.
2386 * linux-low.c (handle_tracepoints): Adjust.
2387 (linux_fast_tracepoint_collecting): Change return type to
2388 fast_tpoint_collect_result.
2389 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2390 linux_wait_1, stuck_in_jump_pad_callback,
2391 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2392 proceed_one_lwp): Adjust to type change.
2393
2e1e43e1
YQ
23942017-07-10 Yao Qi <yao.qi@linaro.org>
2395
2396 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2397
adc764e7
YQ
23982017-06-29 Yao Qi <yao.qi@linaro.org>
2399
2400 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2401 Remove.
2402 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2403
a206891a
SM
24042017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2405
2406 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2407
9a6c7d9c
SDJ
24082017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2409
2410 * linux-low.c (linux_create_inferior): Adjust code to access the
2411 environment information via 'gdb_environ' class.
2412 * lynx-low.c (lynx_create_inferior): Likewise.
2413 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2414 (get_environ): Return a pointer to 'our_environ'.
2415 (captured_main): Initialize 'our_environ'.
2416 * server.h (get_environ): Adjust prototype.
2417 * spu-low.c (spu_create_inferior): Adjust code to access the
2418 environment information via 'gdb_environ' class.
2419
ae3e2ccf
SM
24202017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2421
2422 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2423 usage of "register" keyword.
2424
3e019bdc
SM
24252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2426
2427 * configure: Re-generate.
2428
8465943a
SM
24292017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2430
2431 * configure: Re-generate.
2432
cf0dd6f0
SM
24332017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2434
2435 * Makefile.in (COMPILE.pre): Add "-x c++".
2436
9845682b
SDJ
24372017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2438
2439 * fork-child.c: Conditionally include <signal.h>.
2440
aefd8b33
SDJ
24412017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2442
2443 * server.c (handle_general_set): Handle new packet
2444 "QStartupWithShell".
2445 (handle_query): Add "QStartupWithShell" to the list of supported
2446 packets.
2447 (gdbserver_usage): Add help text explaining the
2448 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2449 options.
2450 (captured_main): Recognize and act upon the presence of the new
2451 CLI options.
2452
2090129c
SDJ
24532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2454 Pedro Alves <palves@redhat.com>
2455
2456 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2457 * configure: Regenerate.
2458 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2459 "fork-inferior.o".
2460 (i[34567]86-*-lynxos*): Likewise.
2461 (spu*-*-*): Likewise.
2462 * fork-child.c: New file.
2463 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2464 and "environ.h".
2465 (linux_ptrace_fun): New function.
2466 (linux_create_inferior): Adjust function prototype to reflect
2467 change on "target.h". Adjust function code to use
2468 "fork_inferior".
2469 (linux_request_interrupt): Delete "signal_pid".
2470 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2471 (lynx_ptrace_fun): New function.
2472 (lynx_create_inferior): Adjust function prototype to reflect
2473 change on "target.h". Adjust function code to use
2474 "fork_inferior".
2475 * nto-low.c (nto_create_inferior): Adjust function prototype and
2476 code to reflect change on "target.h". Update comments.
2477 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2478 "common-terminal.h" and "environ.h".
2479 (terminal_fd): Moved to fork-child.c.
2480 (old_foreground_pgrp): Likewise.
2481 (restore_old_foreground_pgrp): Likewise.
2482 (last_status): Make it global.
2483 (last_ptid): Likewise.
2484 (our_environ): New variable.
2485 (startup_with_shell): Likewise.
2486 (program_name): Likewise.
2487 (program_argv): Rename to...
2488 (program_args): ...this.
2489 (wrapper_argv): New variable.
2490 (start_inferior): Delete function.
2491 (get_exec_wrapper): New function.
2492 (get_exec_file): Likewise.
2493 (get_environ): Likewise.
2494 (prefork_hook): Likewise.
2495 (post_fork_inferior): Likewise.
2496 (postfork_hook): Likewise.
2497 (postfork_child_hook): Likewise.
2498 (handle_v_run): Update code to deal with arguments coming from the
2499 remote host. Update calls from "start_inferior" to
2500 "create_inferior".
2501 (captured_main): Likewise. Initialize environment variable. Call
2502 "have_job_control".
2503 * server.h (post_fork_inferior): New prototype.
2504 (get_environ): Likewise.
2505 (last_status): Declare.
2506 (last_ptid): Likewise.
2507 (signal_pid): Likewise.
2508 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2509 (spu_ptrace_fun): New function.
2510 (spu_create_inferior): Adjust function prototype to reflect change
2511 on "target.h". Adjust function code to use "fork_inferior".
2512 * target.c (target_terminal_init): New function.
2513 (target_terminal_inferior): Likewise.
2514 (target_terminal_ours): Likewise.
2515 * target.h: Include <vector>.
2516 (struct target_ops) <create_inferior>: Update prototype.
2517 (create_inferior): Update macro.
2518 * utils.c (gdb_flush_out_err): New function.
2519 * win32-low.c (win32_create_inferior): Adjust function prototype
2520 and code to reflect change on "target.h".
2521
043a4934
SDJ
25222017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2523
2524 * inferiors.c (switch_to_thread): New function.
2525
15652511
SDJ
25262017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2527
2528 * Makefile.in (SFILE): Add "common/job-control.c".
2529 (OBS): Add "job-control.o".
2530
21ea5acd
SDJ
25312017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2532
2533 * Makefile: Remove "@host_makefile_frag@".
2534
e13cb306
PA
25352017-05-05 Pedro Alves <palves@redhat.com>
2536
2537 * configure: Regenerate.
2538
c94fee56
SDJ
25392017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2540
2541 * configure: Regenerate.
2542
a0ff9e1a
SM
25432017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2544
2545 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2546 software_single_step change of return type to
2547 std::vector<CORE_ADDR>.
2548 * linux-low.c (install_software_single_step_breakpoints):
2549 Likewise.
2550 * linux-low.h (install_software_single_step_breakpoints):
2551 Likewise.
2552
be628ab8
SDJ
25532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2554
2555 * remote-utils.c: Include "gdb_termios.h" instead of
2556 "terminal.h".
2557 * terminal.h: Delete file.
2558
7c5ded6a
SDJ
25592017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2560
2561 * server.c: Include <vector>.
2562 <program_argv, wrapper_argv>: Convert to std::vector.
2563 (start_inferior): Rewrite function to use C++.
2564 (handle_v_run): Likewise. Update code that calculates the argv
2565 based on the vRun packet; use C++.
2566 (captured_main): Likewise.
2567
436252de
SM
25682017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2569
2570 * server.c (handle_v_cont): Initialize thread_resume::thread
2571 with null_ptid.
2572
9bf2a700
PA
25732017-04-05 Pedro Alves <palves@redhat.com>
2574
2575 * configure: Regenerate.
2576
a121b7c1
PA
25772017-04-05 Pedro Alves <palves@redhat.com>
2578
2579 * gdbreplay.c (sync_error): Constify.
2580 * linux-x86-low.c (push_opcode): Constify.
2581
21c8a587
PA
25822017-04-05 Pedro Alves <palves@redhat.com>
2583
2584 * win32-low.c (get_child_debug_event)
2585 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2586 Report TARGET_WAITKIND_SPURIOUS instead.
2587
fb32b4f7
PA
25882017-04-05 Pedro Alves <palves@redhat.com>
2589
e79be6e5
SM
2590 * remote-utils.c (remote_prepare, remote_open): Constify.
2591 * remote-utils.h (remote_prepare, remote_open): Constify.
2592 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2593
65dd1e59
SM
25942017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2595
2596 * Makefile.in (clean): Clear .deps.
2597
8fa5b777
SM
25982017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2599
2600 * .gitignore: Remove generated files, replace with wildcard.
2601 * (clean): Replace removal of generated files with wildcard.
2602 (version.c): Replace with...
2603 (version-generated.c): ...this.
2604 (xml-builtin.c): Replace with...
2605 (xml-builtin-generated.c): ...this.
2606 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2607 (%.c: *regformats*): Replace with...
2608 (%-generated.c: *regformats*): ...this.
2609
a12e714b
MF
26102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2611
2612 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2613 (xtensa_fill_gregset): Call collect_register_by_name for
2614 threadptr register.
2615 (xtensa_store_gregset): Call supply_register_by_name for
2616 threadptr register.
2617
1a09b50a
MF
26182017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2619
2620 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2621 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2622 (xtensa_store_gregset): Call supply_register for all registers in
2623 a0_regnum..a0_regnum + C0_NREGS range.
2624
1a01e7c6
SM
26252017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2626
2627 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2628 (ax-ipa.o: ax.c): Remove.
2629 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2630 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2631 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2632 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2633 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2634
36bc18a8
SM
26352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2636
2637 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2638 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2639 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2640 (errors-ipa.o: ../common/errors.c): Remove.
2641 (format-ipa.o: ../common/format.c): Remove.
2642 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2643
a8ebe3d5
SM
26442017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2645
2646 * Makefile.in (%-ipa.o: %.c): New rule.
2647 (tracepoint-ipa.o: tracepoint.c): Remove.
2648 (utils-ipa.o: utils.c): Remove.
2649 (remote-utils-ipa.o: remote-utils.c): Remove.
2650 (regcache-ipa.o: regcache.c): Remove.
2651 (i386-linux-ipa.o: i386-linux.c): Remove.
2652 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2653 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2654 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2655 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2656 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2657 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2658 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2659 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2660 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2661 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2662 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2663 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2664 (aarch64-ipa.o: aarch64.c): Remove.
2665 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2666 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2667 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2668 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2669 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2670 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2671 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2672 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2673 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2674 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2675 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2676 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2677 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2678 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2679 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2680 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2681 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2682 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2683 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2684 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2685 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2686 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2687 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2688 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2689 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2690 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2691 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2692 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2693 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2694 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2695 (tdesc-ipa.o: tdesc.c): Remove.
2696 (x32-linux-ipa.o: x32-linux.c): Remove.
2697 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2698 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2699
50cfacb7
SM
27002017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2701
2702 * Makefile.in (%.o: ../arch/%.c): New rule.
2703 (arm.o: ../arch/arm.c): Remove.
2704 (arm-linux.o: ../arch/arm-linux.c): Remove.
2705 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2706 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2707
c5a22423
SM
27082017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2709
2710 * Makefile.in (%.o: ../nat/%.c): New rule.
2711 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2712 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2713 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2714 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2715 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2716 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2717 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2718 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2719 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2720 (linux-personality.o: ../nat/linux-personality.c): Remove.
2721 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2722 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2723 (x86-linux.o: ../nat/x86-linux.c): Remove.
2724 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2725 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2726
6bda016b
SM
27272017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2728
2729 * Makefile.in (%.o: ../common/%.c): New rule.
2730 (signals.o: ../common/signals.c): Remove.
2731 (print-utils.o: ../common/print-utils.c): Remove.
2732 (rsp-low.o: ../common/rsp-low.c): Remove.
2733 (common-utils.o: ../common/common-utils.c): Remove.
2734 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2735 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2736 (vec.o: ../common/vec.c): Remove.
2737 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2738 (xml-utils.o: ../common/xml-utils.c): Remove.
2739 (ptid.o: ../common/ptid.c): Remove.
2740 (buffer.o: ../common/buffer.c): Remove.
2741 (format.o: ../common/format.c): Remove.
2742 (filestuff.o: ../common/filestuff.c): Remove.
2743 (agent.o: ../common/agent.c): Remove.
2744 (errors.o: ../common/errors.c): Remove.
2745 (environ.o: ../common/environ.c): Remove.
2746 (common-debug.o: ../common/common-debug.c): Remove.
2747 (cleanups.o: ../common/cleanups.c): Remove.
2748 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2749 (fileio.o: ../common/fileio.c): Remove.
2750 (common-regcache.o: ../common/common-regcache.c): Remove.
2751 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2752 (new-op.o: ../common/new-op.c): Remove.
2753 (btrace-common.o: ../common/btrace-common.c): Remove.
2754
21122961
SM
27552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2756
2757 * Makefile.in (%.o: ../target/%.c): New rule.
2758 (waitstatus.o: ../target/waitstatus.c): Remove.
2759
c362e621
SM
27602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2761
2762 * Makefile.in
2763 (%.c: ../regformats/%.dat,
2764 (%.c: ../regformats/arm/%.dat,
2765 (%.c: ../regformats/i386/%.dat,
2766 (%.c: ../regformats/rs6000/%.dat): New rules.
2767 (aarch64.c): Remove.
2768 (reg-arm.c): Remove.
2769 (arm-with-iwmmxt.c): Remove.
2770 (arm-with-vfpv2.c): Remove.
2771 (arm-with-vfpv3.c): Remove.
2772 (arm-with-neon.c): Remove.
2773 (reg-bfin.c): Remove.
2774 (reg-cris.c): Remove.
2775 (reg-crisv32.c): Remove.
2776 (i386.c): Remove.
2777 (i386-linux.c): Remove.
2778 (i386-avx.c): Remove.
2779 (i386-avx-linux.c): Remove.
2780 (i386-avx-avx512.c): Remove.
2781 (i386-avx-avx512-linux.c): Remove.
2782 (i386-mpx.c): Remove.
2783 (i386-mpx-linux.c): Remove.
2784 (i386-avx-mpx-avx512-pku.c): Remove.
2785 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2786 (i386-avx-mpx.c): Remove.
2787 (i386-avx-mpx-linux.c): Remove.
2788 (i386-mmx.c): Remove.
2789 (i386-mmx-linux.c): Remove.
2790 (reg-ia64.c): Remove.
2791 (reg-m32r.c): Remove.
2792 (reg-m68k.c): Remove.
2793 (reg-cf.c): Remove.
2794 (mips-linux.c): Remove.
2795 (mips-dsp-linux.c): Remove.
2796 (mips64-linux.c): Remove.
2797 (mips64-dsp-linux.c): Remove.
2798 (nios2-linux.c): Remove.
2799 (powerpc-32.c): Remove.
2800 (powerpc-32l.c): Remove.
2801 (powerpc-altivec32l.c): Remove.
2802 (powerpc-cell32l.c): Remove.
2803 (powerpc-vsx32l.c): Remove.
2804 (powerpc-isa205-32l.c): Remove.
2805 (powerpc-isa205-altivec32l.c): Remove.
2806 (powerpc-isa205-vsx32l.c): Remove.
2807 (powerpc-e500l.c): Remove.
2808 (powerpc-64l.c): Remove.
2809 (powerpc-altivec64l.c): Remove.
2810 (powerpc-cell64l.c): Remove.
2811 (powerpc-vsx64l.c): Remove.
2812 (powerpc-isa205-64l.c): Remove.
2813 (powerpc-isa205-altivec64l.c): Remove.
2814 (powerpc-isa205-vsx64l.c): Remove.
2815 (s390-linux32.c): Remove.
2816 (s390-linux32v1.c): Remove.
2817 (s390-linux32v2.c): Remove.
2818 (s390-linux64.c): Remove.
2819 (s390-linux64v1.c): Remove.
2820 (s390-linux64v2.c): Remove.
2821 (s390-te-linux64.c): Remove.
2822 (s390-vx-linux64.c): Remove.
2823 (s390-tevx-linux64.c): Remove.
2824 (s390x-linux64.c): Remove.
2825 (s390x-linux64v1.c): Remove.
2826 (s390x-linux64v2.c): Remove.
2827 (s390x-te-linux64.c): Remove.
2828 (s390x-vx-linux64.c): Remove.
2829 (s390x-tevx-linux64.c): Remove.
2830 (tic6x-c64xp-linux.c): Remove.
2831 (tic6x-c64x-linux.c): Remove.
2832 (tic6x-c62x-linux.c): Remove.
2833 (reg-sh.c): Remove.
2834 (reg-sparc64.c): Remove.
2835 (reg-spu.c): Remove.
2836 (amd64.c): Remove.
2837 (amd64-linux.c): Remove.
2838 (amd64-avx.c): Remove.
2839 (amd64-avx-linux.c): Remove.
2840 (amd64-avx-avx512.c): Remove.
2841 (amd64-avx-avx512-linux.c): Remove.
2842 (amd64-mpx.c): Remove.
2843 (amd64-mpx-linux.c): Remove.
2844 (amd64-avx-mpx-avx512-pku.c): Remove.
2845 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2846 (amd64-avx-mpx.c): Remove.
2847 (amd64-avx-mpx-linux.c): Remove.
2848 (x32.c): Remove.
2849 (x32-linux.c): Remove.
2850 (x32-avx.c): Remove.
2851 (x32-avx-linux.c): Remove.
2852 (x32-avx-avx512.c): Remove.
2853 (x32-avx-avx512-linux.c): Remove.
2854 (reg-xtensa.c): Remove.
2855 (reg-tilegx.c): Remove.
2856 (reg-tilegx32.c): Remove.
2857
1672e0d9
SDJ
28582017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2859
2860 * Makefile.in (SFILES): Add "common/environ.c".
2861 (OBJS): Add "common/environ.h".
2862
239b6d10
WT
28632017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2864
2865 * configure.ac: Check if the fs_base and gs_base members of
2866 `struct user_regs_struct' exist.
2867 * config.in: Regenerated.
2868 * configure: Likewise.
2869
694b382c
AT
28702017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2871
2872 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2873 target_read_memory.
2874 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2875 (get_next_pcs_syscall_next_pc): Likewise.
2876
7dc53023
LM
28772016-12-23 Luis Machado <lgustavo@codesourcery.com>
2878
2879 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2880 * nto-x86-low.c: Likewise.
2881
ad02e4fe
SM
28822016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * Makefile.in: Include disable-implicit-rules.mk.
2885
dcb07cfa
PA
28862016-11-23 Pedro Alves <palves@redhat.com>
2887
2888 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2889 (debug_vprintf): Use std::chrono::steady_clock instead of
2890 gettimeofday. Use '.' instead of ':'.
2891 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2892 (get_timestamp): Use std::chrono::steady_clock instead of
2893 gettimeofday.
2894
8629c02c
SM
28952016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2896
2897 * Makefile.in: Fix whitespace formatting.
2898
b593ecca
SM
28992016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2900
2901 * Makefile.in (SFILES, OBS): Flatten list and order
2902 alphabetically.
2903
9986ba08
PA
29042016-11-23 Pedro Alves <palves@redhat.com>
2905
2906 * event-loop.c (handle_file_event): Use warning.
2907 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2908 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2909 Use warning.
2910
4eefa7bc
PA
29112016-11-23 Pedro Alves <palves@redhat.com>
2912
2913 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2914 output.
2915 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2916 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2917 debug_printf and debug_flush for debug output.
2918 * server.c (handle_general_set): Likewise.
2919 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2920 output.
2921
5443506e
SM
29222016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2923
2924 * Makefile.in (.c.o): Replace rule with ...
2925 (%.o: %.c): ... this one.
2926
3b165252
SM
29272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2928
2929 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2930 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2931 make.
2932 * configure.ac: Remove checks for the make program.
2933 * configure: Re-generate.
2934
0bcda685
PA
29352016-10-28 Pedro Alves <palves@redhat.com>
2936
2937 * Makefile.in (CXX_DIALECT): Get from configure.
2938 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2939 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2940 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2941 * config.in: Regenerate.
2942 * configure: Regenerate.
2943
c3805894
YQ
29442016-10-27 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-low.c (linux_supports_range_stepping): Return true if
2947 can_software_single_step return true.
2948
89342618
YQ
29492016-10-27 Yao Qi <yao.qi@linaro.org>
2950
2951 * inferiors.c (find_inferior_in_random): New function.
2952 * inferiors.h (find_inferior_in_random): Declare.
2953 * linux-low.c (linux_wait_for_event_filtered): Call
2954 find_inferior_in_random instead of find_inferior.
2955
e3652c84
YQ
29562016-10-27 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-low.c (linux_wait_1): If single-step breakpoints are
2959 inserted, remove them.
2960
5a04c4cf
PA
29612016-10-26 Pedro Alves <palves@redhat.com>
2962
2963 * linux-low.c (handle_extended_wait): Link parent/child fork
2964 threads.
2965 (linux_wait_1): Unlink them.
2966 (linux_set_resume_request): Ignore resume requests for
2967 already-resumed and unhandled fork child threads.
2968 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2969 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2970 New functions.
2971 (handle_v_requests) <vCont>: Don't call require_running.
2972 * server.h (in_queued_stop_replies): New declaration.
2973
cb93dc7f
YQ
29742016-10-24 Yao Qi <yao.qi@linaro.org>
2975
2976 PR server/20733
2977 * linux-aarch64-low.c (append_insns): Cast the return value to
2978 'uint32_t *'.
2979
a1078bea
YQ
29802016-10-10 Yao Qi <yao.qi@linaro.org>
2981
2982 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2983
1fb77080
SDJ
29842016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2985
2986 * target.c (target_supports_multi_process): New function, moved
2987 from...
2988 * target.h (target_supports_multi_process): ... here. Remove
2989 macro.
2990
39b5a3b9
TT
29912016-10-05 Tom Tromey <tom@tromey.com>
2992
2993 PR remote/20655:
2994 * tracepoint.c (handle_tracepoint_bkpts): Check
2995 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2996
c1d0b70a
YQ
29972016-10-05 Yao Qi <yao.qi@linaro.org>
2998
2999 * configure.srv: Update the path of arm-*.xml files.
3000
0a69eedb
YQ
30012016-10-05 Terry Guo <terry.guo@arm.com>
3002 Yao Qi <yao.qi@linaro.org>
3003
3004 * Makefile.in: Adjust the path of rules.
3005 * configure.srv: Update the path of xml files.
3006 * regformats/arm-with-iwmmxt.dat: Regenerated.
3007 * regformats/arm-with-neon.dat: Likewise.
3008 * regformats/arm-with-vfpv2.dat: Likewise.
3009 * regformats/arm-with-vfpv3.dat Likewise.
3010
17e16485
YQ
30112016-09-30 Yao Qi <yao.qi@linaro.org>
3012
3013 PR gdbserver/20627
3014 * target.c (target_stop_and_wait): Don't call
3015 target_continue_no_signal, use resume_stop instead.
3016
edeeb602
YQ
30172016-09-26 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-low.c (linux_wait_1): Call debug_exit.
3020
503b1c39
PA
30212016-09-23 Pedro Alves <palves@redhat.com>
3022
3023 * Makefile.in (SFILES): Add common/new-op.c.
3024 (OBS): Add common/new-op.o.
3025 (new-op.o): New rule.
3026
74172ecf
SM
30272016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3028
3029 * .gitinore: Ignore more files.
3030
fc6cda2e
YQ
30312016-09-21 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3034 23.
3035
bc1e6c81
SDJ
30362016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3037
3038 * server.c (start_inferior): Call target_mourn_inferior instead of
3039 mourn_inferior; pass ptid_t argument to it.
3040 (resume): Likewise.
3041 (handle_target_event): Likewise.
3042 * target.c (target_mourn_inferior): New function.
3043 * target.h (mourn_inferior): Delete macro.
3044
0e00e962
AA
30452016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3046
3047 * linux-low.c (lwp_is_stepping): New function.
3048
1d8cb77d
CL
30492016-09-06 Carl Love <cel@us.ibm.com>
3050
3051 * server.c (start_inferior): Fixed comment, requested comment change
3052 didn't get updated correctly. Removed reference to ptrace () call as
3053 it is only true on Linux systems.
3054
7313bced
CL
30552016-09-06 Carl Love <cel@us.ibm.com>
3056
3057 * server.c (start_inferior): Do not call
3058 function target_post_create_inferior () if the
3059 inferior process has already exited.
3060
cf6de44d
PA
30612016-09-05 Pedro Alves <palves@redhat.com>
3062
3063 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3064 (COMPILE.pre, CC_LD): Use CXX directly.
3065 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3066 * acinclude.m4: Don't include build-with-cxx.m4.
3067 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3068 * configure: Regenerate.
3069
c1da6748
AT
30702016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3071
3072 PR gdb/19495
3073 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3074 call writing data to own_buf.
3075
f2b9e3df
SDJ
30762016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3077
3078 * target.c (mywait): Call target_wait instead of
3079 the_target->wait.
3080 (target_wait): New function.
3081
049a8570
SDJ
30822016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3083
3084 * server.c (start_inferior): New variable 'ptid'. Replace calls
3085 to the_target->resume by target_continue{,_no_signal}, depending
3086 on the case.
3087 * target.c (target_stop_and_wait): Call target_continue_no_signal
3088 instead of the_target->resume.
3089 (target_continue): New function.
3090
3aa5cfa0
AT
30912016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3092
3093 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3094
754653a7
AZ
30952016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3096
3097 PR server/20491
3098 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3099 ps_prochandle.
3100 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3101 * linux-arm-low.c (ps_get_thread_area): Likewise.
3102 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3103 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3104 * linux-mips-low.c (ps_get_thread_area): Likewise.
3105 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3106 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3107 * linux-x86-low.c (ps_get_thread_area): Likewise.
3108 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3109
ed036b40
PA
31102016-08-19 Pedro Alves <palves@redhat.com>
3111
3112 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3113
c8ef42ee
PA
31142016-08-19 Pedro Alves <palves@redhat.com>
3115
3116 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3117 comment. Use memcpy instead of casting through unsigned long.
3118
9c235a72
PA
31192016-08-19 Pedro Alves <palves@redhat.com>
3120
3121 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3122 allocating around 0x80000000.
3123
201506da
PA
31242016-08-19 Pedro Alves <palves@redhat.com>
3125
3126 PR gdb/20415
3127 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3128 (x32-avx512-linux-ipa.o): New rules.
3129 * configure.ac (x86_64-*-linux*): New x32 check.
3130 * configure.srv (ipa_x32_linux_regobj): New.
3131 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3132 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3133 descriptions.
3134 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3135 descriptions.
3136 * configure: Regenerate.
3137
f348d89a
PA
31382016-08-09 Pedro Alves <palves@redhat.com>
3139
3140 PR gdb/18653
3141 * Makefile.in (OBS): Add signals-state-save-restore.o.
3142 (signals-state-save-restore.o): New rule.
3143 * config.in: Regenerate.
3144 * configure: Regenerate.
3145 * linux-low.c: Include "signals-state-save-restore.h".
3146 (linux_create_inferior): Call
3147 restore_original_signals_state.
3148 * server.c: Include "dispositions-save-restore.h".
3149 (captured_main): Call save_original_signals_state.
3150
1baf5149
PA
31512016-08-05 Pedro Alves <palves@redhat.com>
3152
3153 * configure: Regenerate.
3154
fcd4a73d
YQ
31552016-08-04 Yao Qi <yao.qi@linaro.org>
3156
3157 * linux-low.c (regsets_fetch_inferior_registers): Check
3158 errno is ESRCH or not.
3159
979659d0
YQ
31602016-08-02 Yao Qi <yao.qi@linaro.org>
3161
3162 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3163 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3164 (thread_db_load_search): Update.
3165 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3166 td_ta_set_event and td_ta_event_getmsg.
3167
6598661d
PA
31682016-07-26 Pedro Alves <palves@redhat.com>
3169
3170 PR server/20414
3171 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3172 of unsigned long for 64-bit registers and use uint32_t instead of
3173 unsigned int for 32-bit registers.
3174
9cf12d57
PA
31752016-07-26 Pedro Alves <palves@redhat.com>
3176
3177 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3178 to 'ptrace'.
3179
305450ed
TT
31802016-07-21 Tom Tromey <tom@tromey.com>
3181
3182 * configure: Rebuild.
3183
2583da7c
YQ
31842016-07-21 Yao Qi <yao.qi@linaro.org>
3185
3186 * mem-break.c (find_gdb_breakpoint): Cast bp to
3187 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3188
21536b36
YQ
31892016-07-21 Yao Qi <yao.qi@linaro.org>
3190
3191 * server.c (handle_v_requests): Support s and S actions
3192 if target_supports_software_single_step return true.
3193
8901d193
YQ
31942016-07-21 Yao Qi <yao.qi@linaro.org>
3195
3196 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3197 is resume_step, call maybe_hw_step.
3198 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3199 and unstop them.
3200 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3201 breakpoints or not.
3202 (proceed_one_lwp): If resume request is resume_step, install
3203 reinsert breakpoints and call maybe_hw_step.
3204
0e9a339e
YQ
32052016-07-21 Yao Qi <yao.qi@linaro.org>
3206
3207 * linux-low.c (proceed_one_lwp): Declare.
3208 (linux_resume_one_thread): Remove local variable 'step'.
3209 Lift code enqueue signal. Call proceed_one_lwp instead of
3210 linux_resume_one_lwp.
3211
4281b351
YQ
32122016-07-21 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-low.c (linux_resume_one_thread): Call
3215 enqueue_pending_signal.
3216
984a2c04
YQ
32172016-07-21 Yao Qi <yao.qi@linaro.org>
3218
3219 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3220 * inferiors.c (do_restore_current_thread_cleanup): New function.
3221 (make_cleanup_restore_current_thread): Likewise.
3222 * linux-low.c (install_software_single_step_breakpoints): Call
3223 make_cleanup_restore_current_thread. Switch current_thread to
3224 thread.
3225
bec903c9
YQ
32262016-07-21 Yao Qi <yao.qi@linaro.org>
3227
3228 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3229 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3230 (clone_one_breakpoint): Likewise.
3231 (delete_reinsert_breakpoints): Change parameter to thread.
3232 Callers updated.
3233 (has_reinsert_breakpoints): Likewise.
3234 (uninsert_reinsert_breakpoints): Likewise.
3235 (reinsert_reinsert_breakpoints): Likewise.
3236 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3237 (delete_reinsert_breakpoints): Likewise.
3238 (reinsert_reinsert_breakpoints): Likewise.
3239 (uninsert_reinsert_breakpoints): Likewise.
3240 (has_reinsert_breakpoints): Likewise.
3241
63c40ec7
YQ
32422016-07-21 Yao Qi <yao.qi@linaro.org>
3243
3244 * inferiors.c (get_thread_process): Make parameter const.
3245 * inferiors.h (get_thread_process): Update declaration.
3246 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3247 Add new parameters child_thread and parent_thread. Callers
3248 updated.
3249 * mem-break.h (clone_all_breakpoints): Update declaration.
3250
9aa76cd0
YQ
32512016-07-21 Yao Qi <yao.qi@linaro.org>
3252
3253 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3254 <command_list, handler>: Remove.
3255 (struct gdb_breakpoint): New.
3256 (struct other_breakpoint): New.
3257 (struct reinsert_breakpoint): New.
3258 (is_gdb_breakpoint): New function.
3259 (any_persistent_commands): Update command_list if
3260 is_gdb_breakpoint returns true.
3261 (set_breakpoint): Create breakpoints according to their types.
3262 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3263 (set_gdb_breakpoint_1): Likewise.
3264 (set_gdb_breakpoint): Likewise.
3265 (clear_breakpoint_conditions): Change parameter type to
3266 'struct gdb_breakpoint *'.
3267 (clear_breakpoint_commands): Likewise.
3268 (clear_breakpoint_conditions_and_commands): Likewise.
3269 (add_condition_to_breakpoint): Likewise.
3270 (add_breakpoint_condition): Likewise.
3271 (add_commands_to_breakpoint): Likewise.
3272 (check_breakpoints): Check other_breakpoint.
3273 (clone_one_breakpoint): Clone breakpopint according to its type.
3274 * mem-break.h (struct gdb_breakpoint): Declare.
3275 (set_gdb_breakpoint): Update declaration.
3276 (clear_breakpoint_conditions_and_commands): Likewise.
3277 (add_breakpoint_condition): Likewise.
3278 (add_breakpoint_commands): Likewise.
3279 * server.c (process_point_options): Change parameter type to
3280 'struct gdb_breakpoint *'.
3281
811f8301
YQ
32822016-07-21 Yao Qi <yao.qi@linaro.org>
3283
3284 * mem-break.c (set_breakpoint_at): Rename it to ...
3285 (set_breakpoint_type_at): ... it.
3286 (set_breakpoint_at): Call set_breakpoint_type_at.
3287 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3288 * mem-break.h (set_breakpoint_at): Update comments.
3289
b1c51e36
CLT
32902016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3291
3292 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3293 to buf parameter.
3294 (nios2_store_gregset): Likewise.
3295
ced2dffb
PA
32962016-07-01 Pedro Alves <palves@redhat.com>
3297 Antoine Tremblay <antoine.tremblay@ericsson.com>
3298
3299 * linux-low.c: Change interface to take the target lwp_info
3300 pointer directly and return void. Handle detaching from a zombie
3301 thread.
3302 (linux_detach_lwp_callback): New function.
3303 (linux_detach): Detach from the leader thread after detaching from
3304 the clone threads.
3305
2ac09a5b
YQ
33062016-06-28 Yao Qi <yao.qi@linaro.org>
3307
3308 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3309 for variable new_offset.
3310 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3311 (aarch64_ftrace_insn_reloc_cb): Likewise.
3312 (aarch64_ftrace_insn_reloc_tb): Likewise.
3313 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3314 PRIx64 instead of PRIx32.
3315
79e7fd4f
YQ
33162016-06-28 Yao Qi <yao.qi@linaro.org>
3317
3318 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3319 (the_low_target): Install arm_get_syscall_trapinfo.
3320
061fc021
YQ
33212016-06-28 Yao Qi <yao.qi@linaro.org>
3322
3323 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3324 function.
3325 (the_low_target): Install aarch64_get_syscall_trapinfo.
3326
4cc32bec
YQ
33272016-06-28 Yao Qi <yao.qi@linaro.org>
3328
3329 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3330 Callers updated.
3331 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3332 Remove parameter sysno.
3333 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3334 sysret.
3335
782c1122
AA
33362016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3337
3338 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3339 (s390_emit_ne_goto): Likewise.
3340 (s390_emit_lt_goto): Likewise.
3341 (s390_emit_le_goto): Likewise.
3342 (s390_emit_gt_goto): Likewise.
3343 (s390_emit_ge_goto): Likewise.
3344 (s390x_emit_eq_goto): Likewise.
3345 (s390x_emit_ne_goto): Likewise.
3346 (s390x_emit_lt_goto): Likewise.
3347 (s390x_emit_le_goto): Likewise.
3348 (s390x_emit_gt_goto): Likewise.
3349 (s390x_emit_ge_goto): Likewise.
3350 (s390_emit_ops_impl): Mark variable static.
3351 (s390x_emit_ops): Likewise.
3352
2e7b624b
YQ
33532016-06-17 Yao Qi <yao.qi@linaro.org>
3354
3355 * linux-low.c (handle_extended_wait): Call
3356 uninsert_reinsert_breakpoints for the parent process. Remove
3357 reinsert breakpoints from the child process. Reinsert them to
3358 the parent process when vfork is done.
3359 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3360 (reinsert_reinsert_breakpoints): New function.
3361 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3362 (reinsert_reinsert_breakpoints): Declare.
3363
8a81c5d7
YQ
33642016-06-17 Yao Qi <yao.qi@linaro.org>
3365
3366 * linux-low.c (handle_extended_wait): If the parent is doing
3367 step-over, remove the reinsert breakpoints from the forked child.
3368
f50bf8e5
YQ
33692016-06-17 Yao Qi <yao.qi@linaro.org>
3370
3371 * linux-low.c (unsuspend_all_lwps): Declare.
3372 (linux_low_filter_event): If thread exited, call finish_step_over.
3373 If step-over is finished, unsuspend other threads.
3374
8376a3cb
YQ
33752016-06-17 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-low.c (linux_resume_one_lwp_throw): Assert
3378 has_reinsert_breakpoints returns false.
3379 * mem-break.c (delete_disabled_breakpoints): Assert
3380 bp type isn't reinsert_breakpoint.
3381
f79b145d
YQ
33822016-06-17 Yao Qi <yao.qi@linaro.org>
3383
3384 * linux-low.c (maybe_hw_step): New function.
3385 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3386 (finish_step_over): Switch current_thread to lwp temporarily,
3387 and assert has_reinsert_breakpoints returns true.
3388 (proceed_one_lwp): Call maybe_hw_step.
3389 * mem-break.c (has_reinsert_breakpoints): New function.
3390 * mem-break.h (has_reinsert_breakpoints): Declare.
3391
0ae534d2
JT
33922016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3393
3394 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3395
fcdad592
YQ
33962016-05-17 Yao Qi <yao.qi@linaro.org>
3397
3398 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3399 instead of find_inferior.
3400
9e784964
YQ
34012016-05-05 Yao Qi <yao.qi@linaro.org>
3402
3403 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3404 Initialize res to zero.
3405
cf2ebb6e
YQ
34062016-05-05 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3409 to uint32_t.
3410
c1aebf87
UW
34112016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3412
3413 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3414 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3415 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3416
35fd2deb 34172016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3418 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3419
3420 * tracepoint.c (write_inferior_int8): New function.
3421 (cmd_qtenable_disable): Write enable flag using
3422 write_inferior_int8.
3423
484b3c32
YQ
34242016-04-25 Yao Qi <yao.qi@linaro.org>
3425
3426 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3427 (need_step_over_p): Return zero if the LWP has pending signals
3428 can be delivered on software single step target.
3429
85ba7d86
YQ
34302016-04-25 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3433 return instead of error.
3434
3539aa13
YQ
34352016-04-22 Yao Qi <yao.qi@linaro.org>
3436
3437 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3438 to 23.
3439
5b061e98
YQ
34402016-04-22 Yao Qi <yao.qi@linaro.org>
3441
3442 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3443 signal when stepping over breakpoint with software single
3444 step.
3445
3451269c
PA
34462016-04-21 Pedro Alves <palves@redhat.com>
3447
3448 * linux-s390-low.c (s390_collect_ptrace_register)
3449 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3450 add casts.
3451 (s390_check_regset): Use void * instead of gdb_byte *.
3452
a2358508
PA
34532016-04-20 Pedro Alves <palves@redhat.com>
3454
3455 * configure: Renegerate.
3456
6885166d
YQ
34572016-04-20 Yao Qi <yao.qi@linaro.org>
3458
3459 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3460 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3461 number 16.
3462 (arm_store_gregset): Likewise.
3463
2b863f51
WT
34642016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3465
3466 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3467 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3468 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3469 (amd64-avx-mpx-linux.c): New rules.
3470 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3471 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3472 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3473 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3474 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3475 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3476 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3477 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3478 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3479 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3480 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3481 * linux-x86-low.c (x86_linux_read_description): Add case for
3482 X86_XSTATE_AVX_MPX_MASK.
3483 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3484 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3485 init_registers_i386_avx_mpx_linux.
3486 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3487 (initialize_low_tracepoint): Call
3488 init_registers_i386_avx_mpx_linux.
3489 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3490 (initialize_low_tracepoint): Call
3491 init_registers_amd64_avx_mpx_linux.
3492 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3493 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3494 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3495 declarations.
3496
9b30624b
PA
34972016-04-18 Pedro Alves <palves@redhat.com>
3498
3499 * configure: Regenerate.
3500
45e3745e
AT
35012016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3502
3503 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3504 (aarch64_emit_sub): Likewise.
3505
2afc13ff
PA
35062016-04-12 Pedro Alves <palves@redhat.com>
3507
3508 * utils.c (prepare_to_throw_exception): Delete.
3509
6e774b13
SM
35102016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3513
4dca19f8
MK
35142016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3515
3516 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3517
d0a9981f
MK
35182016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3519
3520 * linux-aarch64-ipa.c: Add <elf.h> include.
3521 * linux-ppc-ipa.c: Add <elf.h> include.
3522 * linux-s390-ipa.c: Add <elf.h> include.
3523
252db07e
MK
35242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3525
3526 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3527 (get_raw_reg_ptr): Likewise.
3528 (get_trace_state_variable_value_ptr): Likewise.
3529 (set_trace_state_variable_value_ptr): Likewise.
3530 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3531 char *.
3532
14e2b6d9
MK
35332016-03-31 Wei-cheng Wang <cole945@gmail.com>
3534 Marcin Kościelnicki <koriakin@0x04.net>
3535
3536 PR/17221
3537 * linux-ppc-low.c (emit_insns): New function.
3538 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3539 (ppc_emit_prologue): New function.
3540 (ppc_emit_epilogue): New function.
3541 (ppc_emit_add): New function.
3542 (ppc_emit_sub): New function.
3543 (ppc_emit_mul): New function.
3544 (ppc_emit_lsh): New function.
3545 (ppc_emit_rsh_signed): New function.
3546 (ppc_emit_rsh_unsigned): New function.
3547 (ppc_emit_ext): New function.
3548 (ppc_emit_zero_ext): New function.
3549 (ppc_emit_log_not): New function.
3550 (ppc_emit_bit_and): New function.
3551 (ppc_emit_bit_or): New function.
3552 (ppc_emit_bit_xor): New function.
3553 (ppc_emit_bit_not): New function.
3554 (ppc_emit_equal): New function.
3555 (ppc_emit_less_signed): New function.
3556 (ppc_emit_less_unsigned): New function.
3557 (ppc_emit_ref): New function.
3558 (ppc_emit_const): New function.
3559 (ppc_emit_reg): New function.
3560 (ppc_emit_pop): New function.
3561 (ppc_emit_stack_flush): New function.
3562 (ppc_emit_swap): New function.
3563 (ppc_emit_stack_adjust): New function.
3564 (ppc_emit_call): New function.
3565 (ppc_emit_int_call_1): New function.
3566 (ppc_emit_void_call_2): New function.
3567 (ppc_emit_if_goto): New function.
3568 (ppc_emit_goto): New function.
3569 (ppc_emit_eq_goto): New function.
3570 (ppc_emit_ne_goto): New function.
3571 (ppc_emit_lt_goto): New function.
3572 (ppc_emit_le_goto): New function.
3573 (ppc_emit_gt_goto): New function.
3574 (ppc_emit_ge_goto): New function.
3575 (ppc_write_goto_address): New function.
3576 (ppc_emit_ops_impl): New static variable.
3577 (ppc64v1_emit_prologue): New function.
3578 (ppc64v2_emit_prologue): New function.
3579 (ppc64_emit_epilogue): New function.
3580 (ppc64_emit_add): New function.
3581 (ppc64_emit_sub): New function.
3582 (ppc64_emit_mul): New function.
3583 (ppc64_emit_lsh): New function.
3584 (ppc64_emit_rsh_signed): New function.
3585 (ppc64_emit_rsh_unsigned): New function.
3586 (ppc64_emit_ext): New function.
3587 (ppc64_emit_zero_ext): New function.
3588 (ppc64_emit_log_not): New function.
3589 (ppc64_emit_bit_and): New function.
3590 (ppc64_emit_bit_or): New function.
3591 (ppc64_emit_bit_xor): New function.
3592 (ppc64_emit_bit_not): New function.
3593 (ppc64_emit_equal): New function.
3594 (ppc64_emit_less_signed): New function.
3595 (ppc64_emit_less_unsigned): New function.
3596 (ppc64_emit_ref): New function.
3597 (ppc64_emit_const): New function.
3598 (ppc64v1_emit_reg): New function.
3599 (ppc64v2_emit_reg): New function.
3600 (ppc64_emit_pop): New function.
3601 (ppc64_emit_stack_flush): New function.
3602 (ppc64_emit_swap): New function.
3603 (ppc64v1_emit_call): New function.
3604 (ppc64v2_emit_call): New function.
3605 (ppc64v1_emit_int_call_1): New function.
3606 (ppc64v2_emit_int_call_1): New function.
3607 (ppc64v1_emit_void_call_2): New function.
3608 (ppc64v2_emit_void_call_2): New function.
3609 (ppc64_emit_if_goto): New function.
3610 (ppc64_emit_eq_goto): New function.
3611 (ppc64_emit_ne_goto): New function.
3612 (ppc64_emit_lt_goto): New function.
3613 (ppc64_emit_le_goto): New function.
3614 (ppc64_emit_gt_goto): New function.
3615 (ppc64_emit_ge_goto): New function.
3616 (ppc64v1_emit_ops_impl): New static variable.
3617 (ppc64v2_emit_ops_impl): New static variable.
3618 (ppc_emit_ops): New function.
3619 (linux_low_target): Wire in ppc_emit_ops.
3620
a2174ba4
MK
36212016-03-31 Wei-cheng Wang <cole945@gmail.com>
3622 Marcin Kościelnicki <koriakin@0x04.net>
3623
3624 PR/17221
3625 * Makefile.in: Add powerpc-*-ipa.o
3626 * configure.srv: Add ipa_obj for powerpc*-linux.
3627 * linux-ppc-ipa.c: New file.
3628 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3629 includes.
3630 (PPC_FIELD): New macro.
3631 (PPC_SEXT): New macro.
3632 (PPC_OP6): New macro.
3633 (PPC_BO): New macro.
3634 (PPC_LI): New macro.
3635 (PPC_BD): New macro.
3636 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3637 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3638 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3639 (ppc_get_thread_area): New function.
3640 (is_elfv2_inferior): New function.
3641 (gen_ds_form): New function.
3642 (GEN_STD): New macro.
3643 (GEN_STDU): New macro.
3644 (GEN_LD): New macro.
3645 (GEN_LDU): New macro.
3646 (gen_d_form): New function.
3647 (GEN_ADDI): New macro.
3648 (GEN_ADDIS): New macro.
3649 (GEN_LI): New macro.
3650 (GEN_LIS): New macro.
3651 (GEN_ORI): New macro.
3652 (GEN_ORIS): New macro.
3653 (GEN_LWZ): New macro.
3654 (GEN_STW): New macro.
3655 (GEN_STWU): New macro.
3656 (gen_xfx_form): New function.
3657 (GEN_MFSPR): New macro.
3658 (GEN_MTSPR): New macro.
3659 (GEN_MFCR): New macro.
3660 (GEN_MTCR): New macro.
3661 (GEN_SYNC): New macro.
3662 (GEN_LWSYNC): New macro.
3663 (gen_x_form): New function.
3664 (GEN_OR): New macro.
3665 (GEN_MR): New macro.
3666 (GEN_LWARX): New macro.
3667 (GEN_STWCX): New macro.
3668 (GEN_CMPW): New macro.
3669 (gen_md_form): New function.
3670 (GEN_RLDICL): New macro.
3671 (GEN_RLDICR): New macro.
3672 (gen_i_form): New function.
3673 (GEN_B): New macro.
3674 (GEN_BL): New macro.
3675 (gen_b_form): New function.
3676 (GEN_BNE): New macro.
3677 (GEN_LOAD): New macro.
3678 (GEN_STORE): New macro.
3679 (gen_limm): New function.
3680 (gen_atomic_xchg): New function.
3681 (gen_call): New function.
3682 (ppc_relocate_instruction): New function.
3683 (ppc_install_fast_tracepoint_jump_pad): New function.
3684 (ppc_get_min_fast_tracepoint_insn_len): New function.
3685 (ppc_get_ipa_tdesc_idx): New function.
3686 (the_low_target): Wire in the new functions.
3687 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3688 tdescs.
3689 * linux-ppc-tdesc.h: New file.
3690
a13c4696
MK
36912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3692
3693 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3694 (alloc_jump_pad_buffer): New function.
3695 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3696 (alloc_jump_pad_buffer): New function.
3697 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3698 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3699 (alloc_jump_pad_buffer): New function.
3700 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3701 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3702 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3703 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3704
1cda1512
MK
37052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3706
3707 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3708 * linux-amd64-ipa.c: Likewise.
3709 * linux-i386-ipa.c: Likewise.
3710 * linux-s390-ipa.c: Likewise.
3711 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3712 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3713 set_trace_state_variable_value_ptr.
3714 (struct ipa_sym_addresses): Likewise.
3715 (symbol_list): Likewise.
3716 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3717 accessing gdb_collect directly.
3718 (gdb_collect_ptr_type): New typedef.
3719 (get_raw_reg_ptr_type): New typedef.
3720 (get_trace_state_variable_value_ptr_type): New typedef.
3721 (set_trace_state_variable_value_ptr_type): New typedef.
3722 (gdb_collect_ptr): New global.
3723 (get_raw_reg_ptr): New global.
3724 (get_trace_state_variable_value_ptr): New global.
3725 (set_trace_state_variable_value_ptr): New global.
3726 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3727 accessing get_raw_reg directly.
3728 (get_get_tsv_func_addr): Likewise for
3729 get_trace_state_variable_value_ptr.
3730 (get_set_tsv_func_addr): Likewise for
3731 set_trace_state_variable_value_ptr.
3732 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3733
72fb5488
SM
37342016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3735
3736 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3737
28170b88
MK
37382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3739
3740 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3741 packets.
3742 (relocate_instruction): Remove own_buf.
3743 * server.c (own_buf): Make global.
3744 (handle_v_requests): Make global.
3745 * server.h (own_buf): New declaration.
3746 (handle_v_requests): New prototype.
3747
f39e8743
MK
37482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3749
3750 PR 18377
3751 * linux-s390-low.c (add_insns): New function.
3752 (s390_emit_prologue): New function.
3753 (s390_emit_epilogue): New function.
3754 (s390_emit_add): New function.
3755 (s390_emit_sub): New function.
3756 (s390_emit_mul): New function.
3757 (s390_emit_lsh): New function.
3758 (s390_emit_rsh_signed): New function.
3759 (s390_emit_rsh_unsigned): New function.
3760 (s390_emit_ext): New function.
3761 (s390_emit_log_not): New function.
3762 (s390_emit_bit_and): New function.
3763 (s390_emit_bit_or): New function.
3764 (s390_emit_bit_xor): New function.
3765 (s390_emit_bit_not): New function.
3766 (s390_emit_equal): New function.
3767 (s390_emit_less_signed): New function.
3768 (s390_emit_less_unsigned): New function.
3769 (s390_emit_ref): New function.
3770 (s390_emit_if_goto): New function.
3771 (s390_emit_goto): New function.
3772 (s390_write_goto_address): New function.
3773 (s390_emit_litpool): New function.
3774 (s390_emit_const): New function.
3775 (s390_emit_call): New function.
3776 (s390_emit_reg): New function.
3777 (s390_emit_pop): New function.
3778 (s390_emit_stack_flush): New function.
3779 (s390_emit_zero_ext): New function.
3780 (s390_emit_swap): New function.
3781 (s390_emit_stack_adjust): New function.
3782 (s390_emit_set_r2): New function.
3783 (s390_emit_int_call_1): New function.
3784 (s390_emit_void_call_2): New function.
3785 (s390_emit_eq_goto): New function.
3786 (s390_emit_ne_goto): New function.
3787 (s390_emit_lt_goto): New function.
3788 (s390_emit_le_goto): New function.
3789 (s390_emit_gt_goto): New function.
3790 (s390_emit_ge_goto): New function.
3791 (s390x_emit_prologue): New function.
3792 (s390x_emit_epilogue): New function.
3793 (s390x_emit_add): New function.
3794 (s390x_emit_sub): New function.
3795 (s390x_emit_mul): New function.
3796 (s390x_emit_lsh): New function.
3797 (s390x_emit_rsh_signed): New function.
3798 (s390x_emit_rsh_unsigned): New function.
3799 (s390x_emit_ext): New function.
3800 (s390x_emit_log_not): New function.
3801 (s390x_emit_bit_and): New function.
3802 (s390x_emit_bit_or): New function.
3803 (s390x_emit_bit_xor): New function.
3804 (s390x_emit_bit_not): New function.
3805 (s390x_emit_equal): New function.
3806 (s390x_emit_less_signed): New function.
3807 (s390x_emit_less_unsigned): New function.
3808 (s390x_emit_ref): New function.
3809 (s390x_emit_if_goto): New function.
3810 (s390x_emit_const): New function.
3811 (s390x_emit_call): New function.
3812 (s390x_emit_reg): New function.
3813 (s390x_emit_pop): New function.
3814 (s390x_emit_stack_flush): New function.
3815 (s390x_emit_zero_ext): New function.
3816 (s390x_emit_swap): New function.
3817 (s390x_emit_stack_adjust): New function.
3818 (s390x_emit_int_call_1): New function.
3819 (s390x_emit_void_call_2): New function.
3820 (s390x_emit_eq_goto): New function.
3821 (s390x_emit_ne_goto): New function.
3822 (s390x_emit_lt_goto): New function.
3823 (s390x_emit_le_goto): New function.
3824 (s390x_emit_gt_goto): New function.
3825 (s390x_emit_ge_goto): New function.
3826 (s390_emit_ops): New function.
3827 (struct linux_target_ops): Fill in emit_ops hook.
3828
abd9baf9
MK
38292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3830
3831 PR 18377
3832 * Makefile.in: Add s390 IPA files.
3833 * configure.srv: Build IPA for s390.
3834 * linux-s390-ipa.c: New file.
3835 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3836 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3837 (tdesc_s390_linux32): Likewise.
3838 (init_registers_s390_linux32v1): Likewise.
3839 (tdesc_s390_linux32v1): Likewise.
3840 (init_registers_s390_linux32v2): Likewise.
3841 (tdesc_s390_linux32v2): Likewise.
3842 (init_registers_s390_linux64): Likewise.
3843 (tdesc_s390_linux64): Likewise.
3844 (init_registers_s390_linux64v1): Likewise.
3845 (tdesc_s390_linux64v1): Likewise.
3846 (init_registers_s390_linux64v2): Likewise.
3847 (tdesc_s390_linux64v2): Likewise.
3848 (init_registers_s390_te_linux64): Likewise.
3849 (tdesc_s390_te_linux64): Likewise.
3850 (init_registers_s390_vx_linux64): Likewise.
3851 (tdesc_s390_vx_linux64): Likewise.
3852 (init_registers_s390_tevx_linux64): Likewise.
3853 (tdesc_s390_tevx_linux64): Likewise.
3854 (init_registers_s390x_linux64): Likewise.
3855 (tdesc_s390x_linux64): Likewise.
3856 (init_registers_s390x_linux64v1): Likewise.
3857 (tdesc_s390x_linux64v1): Likewise.
3858 (init_registers_s390x_linux64v2): Likewise.
3859 (tdesc_s390x_linux64v2): Likewise.
3860 (init_registers_s390x_te_linux64): Likewise.
3861 (tdesc_s390x_te_linux64): Likewise.
3862 (init_registers_s390x_vx_linux64): Likewise.
3863 (tdesc_s390x_vx_linux64): Likewise.
3864 (init_registers_s390x_tevx_linux64): Likewise.
3865 (tdesc_s390x_tevx_linux64): Likewise.
3866 (have_hwcap_s390_vx): New static variable.
3867 (s390_arch_setup): Fill have_hwcap_s390_vx.
3868 (s390_get_thread_area): New function.
3869 (s390_ft_entry_gpr_esa): New const.
3870 (s390_ft_entry_gpr_zarch): New const.
3871 (s390_ft_entry_misc): New const.
3872 (s390_ft_entry_fr): New const.
3873 (s390_ft_entry_vr): New const.
3874 (s390_ft_main_31): New const.
3875 (s390_ft_main_64): New const.
3876 (s390_ft_exit_fr): New const.
3877 (s390_ft_exit_vr): New const.
3878 (s390_ft_exit_misc): New const.
3879 (s390_ft_exit_gpr_esa): New const.
3880 (s390_ft_exit_gpr_zarch): New const.
3881 (append_insns): New function.
3882 (s390_relocate_instruction): New function.
3883 (s390_install_fast_tracepoint_jump_pad): New function.
3884 (s390_get_min_fast_tracepoint_insn_len): New function.
3885 (s390_get_ipa_tdesc_idx): New function.
3886 (struct linux_target_ops): Wire in the above functions.
3887 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3888 * linux-s390-tdesc.h: New file.
3889
a4105d04
MK
38902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3891
3892 * linux-s390-low.c (s390_supports_tracepoints): New function.
3893 (struct linux_target_ops): Fill supports_tracepoints hook.
3894
35ac8b3e
YQ
38952016-03-18 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-low.c (lwp_signal_can_be_delivered): New function.
3898 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3899
94610ec4
YQ
39002016-03-18 Yao Qi <yao.qi@linaro.org>
3901
3902 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3903 0 if signal is enqueued. Remove 'signal' from one debugging
3904 message. Move one debugging message to some lines below.
3905 Remove code setting 'signal' to 0.
3906
80aea927
YQ
39072016-03-18 Yao Qi <yao.qi@linaro.org>
3908
3909 * linux-low.c (linux_low_filter_event): Remove redundant
3910 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3911
b04fd3be
MK
39122016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3913
3914 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3915 (struct linux_target_ops): Wire in the above.
3916
c40c8d4b
YQ
39172016-03-03 Yao Qi <yao.qi@linaro.org>
3918
3919 * linux-low.c: Update comments to start_step_over.
3920
0f8288ae
YQ
39212016-03-03 Yao Qi <yao.qi@linaro.org>
3922
3923 PR server/19736
3924 * linux-low.c (handle_extended_wait): Set child suspended
3925 if event_lwp->bp_reinsert isn't zero.
3926
fdbd04a8
YQ
39272016-03-02 Yao Qi <yao.qi@linaro.org>
3928
3929 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3930 enqueue_pending_signal.
3931
6896a8fa
MK
39322016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3933
3934 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3935 is actually loaded.
3936
ab503087
MK
39372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3938
3939 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3940 (s390_regmap_3264) [!__s390x__]: New global.
3941 (s390_collect_ptrace_register): Skip map entries containing -1.
3942 (s390_supply_ptrace_register): Ditto.
3943 (s390_fill_gprs_high): New function.
3944 (s390_store_gprs_high): New function.
3945 (s390_regsets): Add NT_S390_HIGH_GPRS.
3946 (s390_get_hwcap): Enable on 31-bit.
3947 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3948 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3949 Detect NT_S390_HIGH_GPRS.
3950 (s390_usrregs_info_3264): Enable on 31-bit.
3951 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3952 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3953
ae91f625
MK
39542016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3955
3956 PR gdb/13808
3957 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3958 * configure.srv: Ditto.
3959 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3960 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3961 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3962 (init_registers_amd64_linux): Remove prototype.
3963 (tdesc_amd64_linux): Remove declaration.
3964 (get_ipa_tdesc): New function.
3965 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3966 initialize remaining tdescs.
3967 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3968 (init_registers_i386_linux): Remove prototype.
3969 (tdesc_i386_linux): Remove declaration.
3970 (get_ipa_tdesc): New function.
3971 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3972 initialize remaining tdescs.
3973 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3974 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3975 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3976 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3977 (x86_get_ipa_tdesc_idx): New function.
3978 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3979 * linux-x86-tdesc.h: New file.
3980 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3981 (target_get_ipa_tdesc_idx): New macro.
3982 * tracepoint.c (ipa_tdesc_idx): New macro.
3983 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3984 (symbol_list): Add ipa_tdesc_idx.
3985 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3986 (ipa_tdesc): Remove.
3987 (ipa_tdesc_idx): New variable.
3988 (get_context_regcache): Use get_ipa_tdesc.
3989 (gdb_collect): Ditto.
3990 (gdb_probe): Ditto.
3991 * tracepoint.h (get_ipa_tdesc): New prototype.
3992 (ipa_tdesc): Remove.
3993
e7ad2f14
PA
39942016-02-24 Pedro Alves <palves@redhat.com>
3995
3996 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3997 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3998 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3999 Factor out common code between the USE_SIGTRAP_SIGINFO and
4000 !USE_SIGTRAP_SIGINFO blocks.
4001 (linux_low_filter_event): Call save_stop_reason instead of
4002 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4003 Update comments.
4004 (linux_wait_1): Update comments.
4005
657f9cde
WW
40062016-02-24 Wei-cheng Wang <cole945@gmail.com>
4007
4008 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4009 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4010 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4011 ppc_insert_point, ppc_remove_point.
4012
b00b61e1
MK
40132016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4014
4015 * linux-s390-low.c (s390_supports_z_point_type): New function.
4016 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4017
553cb527
YQ
40182016-02-16 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4021 PC. Get pc from regcache_read_pc.
4022
a5652c21
YQ
40232016-02-12 Yao Qi <yao.qi@linaro.org>
4024
4025 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4026 or linux_get_pc_32bit.
4027 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4028
ed443b61
YQ
40292016-02-12 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4032 arm_linux_get_next_pcs_fixup.
4033
020ecd38
MK
40342016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4035
4036 * tracepoint.c (x_tracepoint_action_download): Change
4037 write_inferior_data_ptr to write_inferior_data_pointer.
4038 (cmd_qtstart): Likewise.
4039 (write_inferior_data_ptr): Remove.
4040 (download_agent_expr): Change write_inferior_data_ptr to
4041 write_inferior_data_pointer.
4042 (download_tracepoint_1): Likewise.
4043 (download_tracepoint): Likewise.
4044 (download_trace_state_variables): Likewise.
4045
7cae9051
WW
40462016-02-11 Wei-cheng Wang <cole945@gmail.com>
4047 Marcin Kościelnicki <koriakin@0x04.net>
4048
4049 * tracepoint.c (struct tracepoint_action_ops): Remove.
4050 (struct tracepoint_action): Remove ops.
4051 (m_tracepoint_action_download, r_tracepoint_action_download)
4052 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4053 size and offset accordingly.
4054 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4055 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4056 (tracepoint_action_send, tracepoint_action_download): New functions.
4057 Helpers for trace action handlers.
4058 (add_tracepoint_action): Remove setup actions ops.
4059 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4060
9f6a71b4
YQ
40612016-02-10 Yao Qi <yao.qi@linaro.org>
4062
4063 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4064
1e94266c
SM
40652016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4066
4067 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4068 to AC_OUTPUT.
4069 * configure: Regenerate.
4070
8adce034
SM
40712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4072
4073 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4074 void * to gdb_byte *.
4075 * linux-low.c (siginfo_fixup): Likewise.
4076 (linux_xfer_siginfo): Likewise.
4077 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4078 Likewise.
4079 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4080
93813b37
WT
40812016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4082
4083 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4084 to srv_tgtobj.
4085 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4086 to srv_tgtobj.
4087 * linux-x86-low.c [__x86_64__]: Include
4088 "nat/amd64-linux-siginfo.h".
4089 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4090 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4091 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4092 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4093 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4094 (cpt_si_fd, si_timerid, si_overrun): Move from
4095 nat/amd64-linux-siginfo.c.
4096 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4097
8424cc97
SM
40982016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4099
4100 * server.c (skip_to_semicolon): Remove.
4101 (process_point_options): Use strchrnul instead of
4102 skip_to_semicolon.
4103
4d18591b
YQ
41042016-01-26 Yao Qi <yao.qi@linaro.org>
4105
4106 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4107 * linux-low.c (install_software_single_step_breakpoints): Don't
4108 call regcache_read_pc.
4109 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4110 argument pc.
4111
d8020970
YQ
41122016-01-26 Yao Qi <yao.qi@linaro.org>
4113
4114 * linux-low.c (install_software_single_step_breakpoints): Call
4115 regcache_read_pc instead of get_pc.
4116
8b207339
YQ
41172016-01-26 Yao Qi <yao.qi@linaro.org>
4118
4119 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4120 (unblock_async_io): Rename to ...
4121 (block_unblock_async_io): ... it. New function.
4122 (enable_async_io): Don't install SIGIO handler. Unblock it
4123 instead.
4124 (disable_async_io): Don't ignore SIGIO. Block it instead.
4125 (initialize_async_io): Install SIGIO handler. Don't call
4126 unblock_async_io.
4127
18879fef
YQ
41282016-01-26 Yao Qi <yao.qi@linaro.org>
4129
4130 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4131 first character is '\003', call *the_target->request_interrupt.
4132
a0f8e08a
YQ
41332016-01-25 Yao Qi <yao.qi@linaro.org>
4134
4135 * remote-utils.c (new_thread_notify): Remove.
4136 (dead_thread_notify): Likewise.
4137 * remote-utils.h (new_thread_notify): Remove declaration.
4138 (dead_thread_notify): Likewise.
4139
cc5fd9ab
MK
41402016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4141
4142 * gdb.trace/pending.exp: Fix expected message on continue.
4143
99e8eb11
MK
41442016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4145
4146 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4147 it works properly on big-endian machines where sizeof (CORE_ADDR)
4148 != sizeof (void *).
4149
a994041d
PA
41502016-01-21 Pedro Alves <palves@redhat.com>
4151
4152 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4153 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4154 * configure: Regenerate.
4155
f7a6a40d
YQ
41562016-01-21 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4159 is_thumb and set it according to CPSR saved on the stack.
4160 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4161 arm_sigreturn_next_pc.
4162
6f69e520
YQ
41632016-01-18 Yao Qi <yao.qi@linaro.org>
4164
4165 * linux-low.c (linux_set_pc_64bit): New function.
4166 (linux_get_pc_64bit): New function.
4167 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4168 Declare.
4169 * linux-sparc-low.c (debug_threads): Remove declaration.
4170 (sparc_get_pc): Remove.
4171 (the_low_target): Use linux_get_pc_64bit instead of
4172 sparc_get_pc.
4173 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4174 (the_low_target): Use linux_get_pc_64bit and
4175 linux_set_pc_64bit.
4176
276d4552
YQ
41772016-01-18 Yao Qi <yao.qi@linaro.org>
4178
4179 * linux-arm-low.c (debug_threads): Remove declaration.
4180 (arm_get_pc, arm_set_pc): Remove.
4181 (the_low_target): Use linux_get_pc_32bit and
4182 linux_set_pc_32bit.
4183 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4184 (the_low_target): Use linux_get_pc_32bit and
4185 linux_set_pc_32bit.
4186 * linux-cris-low.c (debug_threads): Remove declaration.
4187 (cris_get_pc, cris_set_pc,): Remove.
4188 (the_low_target): Use linux_get_pc_32bit and
4189 linux_set_pc_32bit.
4190 * linux-crisv32-low.c (debug_threads): Remove declaration.
4191 (cris_get_pc, cris_set_pc): Remove.
4192 (the_low_target): Use linux_get_pc_32bit and
4193 linux_set_pc_32bit.
4194 * linux-low.c: Include inttypes.h.
4195 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4196 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4197 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4198 (the_low_target): Use linux_get_pc_32bit and
4199 linux_set_pc_32bit.
4200 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4201 (the_low_target): Use linux_get_pc_32bit and
4202 linux_set_pc_32bit.
4203 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4204 (the_low_target): Use linux_get_pc_32bit and
4205 linux_set_pc_32bit.
4206 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4207 (the_low_target): Use linux_get_pc_32bit and
4208 linux_set_pc_32bit.
4209 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4210 (the_low_target): Use linux_get_pc_32bit and
4211 linux_set_pc_32bit.
4212
eb0edac8
GB
42132016-01-18 Gary Benson <gbenson@redhat.com>
4214
4215 * configure.ac (AC_FUNC_FORK): New check.
4216 * config.in: Regenerate.
4217 * configure: Likewise.
4218
1b451dda
YQ
42192016-01-14 Yao Qi <yao.qi@linaro.org>
4220
4221 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4222 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4223 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4224 arm_get_next_pcs_ctor.
4225
82075af2
JS
42262016-01-12 Josh Stone <jistone@redhat.com>
4227 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4228
4229 * inferiors.h: Include "gdb_vecs.h".
4230 (struct process_info): Add syscalls_to_catch.
4231 * inferiors.c (remove_process): Free syscalls_to_catch.
4232 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4233 syscall_return stops.
4234 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4235 * server.c (handle_general_set): Handle QCatchSyscalls.
4236 (handle_query): Report support for QCatchSyscalls.
4237 * target.h (struct target_ops): Add supports_catch_syscall.
4238 (target_supports_catch_syscall): New macro.
4239 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4240 (struct lwp_info): Add syscall_state.
4241 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4242 Maintain syscall_state and syscalls_to_catch across exec.
4243 (get_syscall_trapinfo): New function, proxy to the_low_target.
4244 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4245 (linux_low_filter_event): Toggle syscall_state entry/return for
4246 syscall traps, and set it ignored for all others.
4247 (gdb_catching_syscalls_p): New function.
4248 (gdb_catch_this_syscall_p): New function.
4249 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4250 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4251 (linux_supports_catch_syscall): New function.
4252 (linux_target_ops): Install it.
4253 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4254 (the_low_target): Install it.
4255
8f13a3ce
MF
42562016-01-12 Mike Frysinger <vapier@gentoo.org>
4257
4258 * acinclude.m4: Include new ../warning.m4 file.
4259 * configure: Regenerated.
4260 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4261
5b3da067
MF
42622016-01-12 Mike Frysinger <vapier@gentoo.org>
4263
4264 * ax.c (is_goto_target): Mark static.
4265 * linux-low.c (register_addr): Likewise.
4266 (linux_fetch_registers, linux_store_registers): Likewise.
4267 * mem-break.c (any_persistent_commands): Fix old prototype.
4268 (add_commands_to_breakpoint): Mark static.
4269 * regcache.c (find_register_by_name): Delete unused func.
4270 * remote-utils.c (hex_or_minus_one): Mark static.
4271 * server.c (monitor_show_help): Mark static.
4272 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4273 handle_v_requests): Likewise.
4274
bc504a31
PA
42752016-01-12 Pedro Alves <palves@redhat.com>
4276
4277 Remove use of the registered trademark symbol throughout.
4278
5a0dd67a
YQ
42792016-01-08 Yao Qi <yao.qi@linaro.org>
4280
4281 * remote-utils.c (getpkt): If c is '\003', call target hook
4282 request_interrupt.
4283
b2ca446f
YQ
42842016-01-06 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4287 linux-aarch32-low.c.
4288 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4289 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4290 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4291 (thumb2_breakpoint): Declare.
4292 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4293 linux-aarch32-low.h.
4294 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4295 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4296 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4297
edd88788
JB
42982016-01-01 Joel Brobecker <brobecker@adacore.com>
4299
4300 * gdbreplay.c (gdbreplay_version): Change copyright year in
4301 version message.
4302 * server.c (gdbserver_version): Likewise.
4303
65da7f14
PP
43042015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4305
4306 * server.c (crc32_table): Delete.
4307 (crc32): Use libiberty's xcrc32 function.
4308
4abd5ed2
JB
43092015-12-22 Joel Brobecker <brobecker@adacore.com>
4310
4311 * lynx-low.c (lynx_delete_thread_callback): New function.
4312 (lynx_mourn): Properly delete our process and all of its
4313 threads. Remove call to clear_inferiors.
4314
0e50fe5c
JB
43152015-12-22 Joel Brobecker <brobecker@adacore.com>
4316
4317 * target.c (thread_search_callback): Add check that
4318 the thread_stopped target callback is not NULL before
4319 calling it.
4320
35adc03f
YQ
43212015-12-21 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4324 arm breakpoint.
4325
bd2b2909
AT
43262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4327
4328 * server.c (handle_query): Call target_supports_software_single_step.
4329
7fe5e27e
AT
43302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4331
4332 * linux-low.c (single_step): New function.
4333 (linux_resume_one_lwp_throw): Call single_step.
4334 (start_step_over): Likewise.
4335
d9311bfa
AT
43362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4337
4338 * Makefile.in (SFILES): Append arch/arm-linux.c,
4339 arch/arm-get-next-pcs.c.
4340 (arm-linux.o): New rule.
4341 (arm-get-next-pcs.o): New rule.
4342 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4343 arm-linux.o.
4344 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4345 to 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): Make non-static.
4351 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4352 from linux-aarch32-low.c.
4353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4354 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4355 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4356 (thumb2_breakpoint_len): Likewise.
4357 (arm_is_thumb_mode): New declaration.
4358 * linux-arm-low.c: Include arch/arm-linux.h
4359 aarch/arm-get-next-pcs.h, sys/syscall.h.
4360 (get_next_pcs_ops): New struct.
4361 (get_next_pcs_addr_bits_remove): New function.
4362 (get_next_pcs_is_thumb): New function.
4363 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4364 (arm_sigreturn_next_pc): Likewise.
4365 (get_next_pcs_syscall_next_pc): Likewise.
4366 (arm_gdbserver_get_next_pcs): Likewise.
4367 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4368 Initialize.
4369 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4370 * server.h: Include gdb_vecs.h.
4371
68ce2059
AT
43722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4373
4374 * Makefile.in (SFILES): Append common/common-regcache.c.
4375 (OBS): Append common-regcache.o.
4376 (common-regcache.o): New rule.
4377 * regcache.c (init_register_cache): Initialize cache to
4378 REG_UNAVAILABLE.
4379 (regcache_raw_read_unsigned): New function.
4380 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4381 register_status enum.
4382
fa5308bd
AT
43832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4384
4385 * linux-aarch64-low.c (the_low_targets): Rename
4386 breakpoint_reinsert_addr to get_next_pcs.
4387 * linux-arm-low.c (the_low_targets): Likewise.
4388 * linux-bfin-low.c (the_low_targets): Likewise.
4389 * linux-cris-low.c (the_low_targets): Likewise.
4390 * linux-crisv32-low.c (the_low_targets): Likewise.
4391 * linux-low.c (can_software_single_step): Likewise.
4392 (install_software_single_step_breakpoints): New function.
4393 (start_step_over): Use install_software_single_step_breakpoints.
4394 * linux-low.h: New CORE_ADDR vector.
4395 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4396 get_next_pcs.
4397 * linux-mips-low.c (the_low_targets): Likewise.
4398 * linux-nios2-low.c (the_low_targets): Likewise.
4399 * linux-sparc-low.c (the_low_targets): Likewise.
4400
4a6ed09b
PA
44012015-12-17 Pedro Alves <palves@redhat.com>
4402
4403 * linux-low.c (linux_kill_one_lwp): Remove references to
4404 LinuxThreads.
4405 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4406 to 'kill'.
4407 (linux_init_signals): Delete.
4408 (initialize_low): Adjust.
4409 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4410
7544db95
PA
44112015-12-16 Pedro Alves <palves@redhat.com>
4412
4413 * configure.ac (compiler warning flags): When testing a
4414 -Wno-foo option, check whether -Wfoo works instead.
4415 * configure: Regenerate.
4416
8020350c
DB
44172015-12-11 Don Breazeal <donb@codesourcery.com>
4418
4419 * server.c (process_serial_event): Don't exit from gdbserver
4420 in remote mode if there are still active inferiors.
4421
db91f502
YQ
44222015-12-11 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4425 arm_breakpoint_at if the process is 32-bit.
4426
b37a6290
YQ
44272015-12-11 Yao Qi <yao.qi@linaro.org>
4428
4429 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4430 arm breakpoint.
4431
17b1509a
YQ
44322015-12-07 Yao Qi <yao.qi@linaro.org>
4433
4434 * configure.srv: Append arm.o to srv_tgtobj for
4435 aarch64*-*-linux* target.
4436 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4437 from linux-arm-low.c.
4438 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4439 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4440 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4441 (thumb2_breakpoint_len): Likewise.
4442 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4443 (arm_breakpoint_kinds): Likewise.
4444 (arm_breakpoint_kind_from_pc): Likewise.
4445 (arm_sw_breakpoint_from_kind): Likewise.
4446 (arm_breakpoint_kind_from_current_state): Likewise.
4447 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4448 (arm_sw_breakpoint_from_kind): Declare.
4449 (arm_breakpoint_kind_from_current_state): Declare.
4450 (arm_breakpoint_at): Declare.
4451 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4452 arm_sw_breakpoint_from_kind if process is 32-bit.
4453 (aarch64_breakpoint_kind_from_pc): New function.
4454 (aarch64_breakpoint_kind_from_current_state): New function.
4455 (the_low_target): Initialize fields breakpoint_kind_from_pc
4456 and breakpoint_kind_from_current_state.
4457 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4458 linux-aarch32-low.c.
4459 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4460 (arm_breakpoint, arm_breakpoint_len): Likewise.
4461 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4462 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4463 (arm_is_thumb_mode): Likewise.
4464 (arm_breakpoint_at): Likewise.
4465 (arm_breakpoint_kind_from_pc): Likewise.
4466 (arm_sw_breakpoint_from_kind): Likewise.
4467 (arm_breakpoint_kind_from_current_state): Likewise.
4468
4469 Revert:
4470 2015-08-04 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4473 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4474 * server.c (extended_protocol): Remove "static".
4475 * server.h (extended_protocol): Declare it.
4476
ece66d65
JS
44772015-12-04 Josh Stone <jistone@redhat.com>
4478
4479 * target.h (struct target_ops) <arch_setup>: Rename to ...
4480 (struct target_ops) <post_create_inferior>: ... this.
4481 (target_arch_setup): Rename to ...
4482 (target_post_create_inferior): ... this, calling post_create_inferior.
4483 * server.c (start_inferior): Update target_arch_setup calls to
4484 target_post_create_inferior.
4485 * linux-low.c (linux_low_ptrace_options): Forward declare.
4486 (linux_arch_setup): Update its comment for general use.
4487 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4488 (struct linux_target_ops): Use linux_post_create_inferior.
4489 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4490 to post_create_inferior.
4491 * nto-low.c (struct nto_target_ops): Likewise.
4492 * spu-low.c (struct spu_target_ops): Likewise.
4493 * win32-low.c (struct win32_target_ops): Likewise.
4494
e58c48b4
AT
44952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4496
4497 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4498
fbec8956
AT
44992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4500
4501 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4502 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4503 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4504 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4505 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4506 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4507 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4508 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4509 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4510 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4511 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4512 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4513
9b4c5f87
AT
45142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4515
4516 * linux-low.c (linux_look_up_symbols): Don't call
4517 linux_supports_traceclone.
4518 * linux-low.h (thread_db_init): Remove use_events argument.
4519 * thread-db.c (thread_db_use_event): Remove global variable.
4520 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4521 (struct thread_db) <td_create_bp>: Remove field.
4522 (thread_db_create_event): Remove function.
4523 (thread_db_enable_reporting): Likewise.
4524 (find_one_thread): Don't check for thread_db_use_events.
4525 (attach_thread): Likewise.
4526 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4527 (try_thread_db_load_1): Don't check for thread_db_use_events.
4528 (thread_db_init): Remove use_events argument and thread events
4529 handling.
4530 (remove_thread_event_breakpoints): Remove function.
4531 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4532
7d00775e
AT
45332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4534
4535 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4536 New function.
4537 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4538 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4539 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4540 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4541 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4542 Initialize.
4543 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4544 New function.
4545 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4546 * linux-low.c (can_hardware_single_step): Use
4547 supports_hardware_single_step.
4548 (can_software_single_step): New function.
4549 (start_step_over): Call can_software_single_step.
4550 (linux_supports_hardware_single_step): New function.
4551 (struct target_ops) <supports_software_single_step>: Initialize.
4552 * linux-low.h (struct linux_target_ops)
4553 <supports_hardware_single_step>: Initialize.
4554 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4556 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4557 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4558 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4559 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4560 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4561 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4562 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4563 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4564 Initialize.
4565 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4566 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4567 Initialize.
4568 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4569 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4570 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4571 New function.
4572 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4573 * target.h (struct target_ops): <supports_software_single_step>:
4574 New field.
4575 (target_supports_software_single_step): New macro.
4576
2d97cd35
AT
45772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4578
4579 * linux-low.c (linux_wait_1): Fix pc advance condition.
4580 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4581 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4582
769ef81f
AT
45832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4584
4585 * linux-arm-low.c (arm_is_thumb_mode): New function.
4586 (arm_breakpoint_at): Use arm_is_thumb_mode.
4587 (arm_breakpoint_kind_from_current_state): New function.
4588 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4589 Initialize.
4590 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4591 (linux_breakpoint_kind_from_current_state): New function.
4592 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4593 * linux-low.h (struct linux_target_ops)
4594 <breakpoint_kind_from_current_state>: New field.
4595 * target.h (struct target_ops): Likewise.
4596 (target_breakpoint_kind_from_current_state): New macro.
4597
1bebeeca
PA
45982015-11-30 Pedro Alves <palves@redhat.com>
4599
4600 * linux-low.c (linux_resume): Wake up the event loop before
4601 returning.
4602
a67a9fae
PA
46032015-11-30 Pedro Alves <palves@redhat.com>
4604
4605 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4606 check.
4607 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4608 to -1.
4609 * target.c (struct thread_search): New structure.
4610 (thread_search_callback): New function.
4611 (prev_general_thread): New global.
4612 (prepare_to_access_memory, done_accessing_memory): New functions.
4613 * target.h (prepare_to_access_memory, done_accessing_memory):
4614 Replace macros with function declarations.
4615
f2faf941
PA
46162015-11-30 Pedro Alves <palves@redhat.com>
4617
4618 PR 14618
4619 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4620 report TARGET_WAITKIND_NO_RESUMED.
4621 * remote-utils.c (prepare_resume_reply): Handle
4622 TARGET_WAITKIND_NO_RESUMED.
4623 * server.c (report_no_resumed): New global.
4624 (handle_query) <qSupported>: Handle "no-resumed+". Report
4625 "no-resumed+" support.
4626 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4627 return error if the client doesn't support no-resumed events.
4628 (push_stop_notification): New function.
4629 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4630 events if the client supports them.
4631
a681f9c9
PA
46322015-11-30 Pedro Alves <palves@redhat.com>
4633
4634 * linux-low.c (thread_still_has_status_pending_p): Don't check
4635 vCont;t here.
4636 (lwp_resumed): New function.
4637 (status_pending_p_callback): Return early if the LWP is not
4638 supposed to be resumed.
4639
65706a29
PA
46402015-11-30 Pedro Alves <palves@redhat.com>
4641
4642 * linux-low.c (handle_extended_wait): Assert that the LWP's
4643 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4644 thread create events, leave the new child's status pending.
4645 (linux_low_filter_event): If GDB wants to hear about thread exit
4646 events, leave the LWP marked dead and don't delete it.
4647 (linux_wait_for_event_filtered): Don't check for thread exit.
4648 (filter_exit_event): New function.
4649 (linux_wait_1): Use it, when returning an exit event.
4650 (linux_resume_one_lwp_throw): Assert that the LWP's
4651 waitstatus is TARGET_WAITKIND_IGNORE.
4652 * remote-utils.c (prepare_resume_reply): Handle
4653 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4654 * server.c (report_thread_events): New global.
4655 (handle_general_set): Handle QThreadEvents.
4656 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4657 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4658 TARGET_WAITKIND_THREAD_EXITED.
4659 * server.h (report_thread_events): Declare.
4660
56cf4bed
PA
46612015-11-30 Pedro Alves <palves@redhat.com>
4662
4663 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4664 the thread's last_resume_kind was resume_stop.
4665
500c1d85
PA
46662015-11-30 Pedro Alves <palves@redhat.com>
4667
4668 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4669 before returning.
4670
de979965
PA
46712015-11-30 Pedro Alves <palves@redhat.com>
4672
4673 * server.c (handle_v_requests): Handle vCtrlC.
4674
34c65914
PA
46752015-11-30 Pedro Alves <palves@redhat.com>
4676
4677 * gdbthread.h (find_any_thread_of_pid): Declare.
4678 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4679 functions.
4680 * server.c (handle_query): If current_thread is NULL, look for
4681 another thread of the selected process.
4682
79efa585 46832015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4684 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4685
4686 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4687 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4688 name in reply.
4689 * target.h (struct target_ops) <thread_name>: New field.
4690 (target_thread_name): New macro.
4691
80d82c19
JB
46922015-11-23 Joel Brobecker <brobecker@adacore.com>
4693
4694 * regcache.h (regcache_invalidate_pid): Add declaration.
4695 * regcache.c (regcache_invalidate_pid): New function, extracted
4696 from regcache_invalidate.
4697 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4698 Add trivial documentation comment.
4699 * lynx-low.c: Use regcache_invalidate_pid instead of
4700 regcache_invalidate.
4701
64da5dd5
JB
47022015-11-23 Joel Brobecker <brobecker@adacore.com>
4703
4704 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4705 and Elf64_auxv_t if the target is Android.
4706
37ce4055
DE
47072015-11-22 Doug Evans <xdje42@gmail.com>
4708
4709 * target.h: #include <sys/types.h>.
4710
06e03fff
PA
47112015-11-19 Pedro Alves <palves@redhat.com>
4712
4713 * linux-low.c (linux_process_qsupported): Change prototype.
4714 Adjust.
4715 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4716 Change prototype.
4717 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4718 and adjust to loop over all features.
4719 * server.c (handle_query) <qSupported>: Adjust to call
4720 target_process_qsupported once, passing it a vector of unprocessed
4721 features.
4722 * target.h (struct target_ops) <process_qsupported>: Change
4723 prototype.
4724 (target_process_qsupported): Adjust.
4725
9a084706
PA
47262015-11-19 Pedro Alves <palves@redhat.com>
4727
4728 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4729 mode.
4730 * configure: Regenerate.
4731
dad44a1f
PA
47322015-11-19 Pedro Alves <palves@redhat.com>
4733
4734 * configure: Regenerate.
4735
231c0592
YQ
47362015-11-19 Yao Qi <yao.qi@linaro.org>
4737
4738 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4739 type to uint32_t.
4740
6c1c9a8b
YQ
47412015-11-19 Yao Qi <yao.qi@linaro.org>
4742
4743 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4744 (struct aarch64_operand): Move enum out.
4745
9caa3311
YQ
47462015-11-19 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4749 struct user_fpsimd_state *.
4750 (aarch64_store_fpregset): Likewise.
4751
6a69a054
YQ
47522015-11-19 Yao Qi <yao.qi@linaro.org>
4753
4754 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4755 struct user_pt_regs *.
4756 (aarch64_store_gregset): Likewise.
4757
1798301e
PA
47582015-11-18 Pedro Alves <palves@redhat.com>
4759
4760 * Makefile.in (all_object_files): Add $IPA_OBJS.
4761
ce7715e2
PA
47622015-11-17 Pedro Alves <palves@redhat.com>
4763
4764 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4765 GDB_SIGNAL_0 and gdb_signal_to_string.
4766
c0879059
PA
47672015-11-17 Pedro Alves <palves@redhat.com>
4768
4769 * win32-low.c (handle_output_debug_string): Remove parameter.
4770 (win32_kill): Remove our_status local and adjust call to
4771 handle_output_debug_string.
4772 (get_child_debug_event): Adjust call to
4773 handle_output_debug_string.
4774
1996e237
SM
47752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4776
4777 * linux-mips-low.c (mips_fill_gregset): Add cast.
4778 (mips_store_gregset): Likewise.
4779 (mips_fill_fpregset): Likewise.
4780 (mips_store_fpregset): Likewise.
4781
cbec665b
SM
47822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4783
4784 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4785 priv.
4786
eb3e3c67
SM
47872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4788
4789 * linux-mips-low.c (mips_linux_new_thread): Change type of
4790 watch_type to enum target_hw_bp_type.
4791
171de4b8
SM
47922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4793
4794 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4795 Change return type to arm_hwbp_type.
4796
04248ead
SM
47972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4798
4799 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4800 (arm_store_gregset): Likewise.
4801 * linux-arm-low.c (arm_get_hwcap): Likewise.
4802 (arm_read_description): Likewise.
4803
04b3479c
SM
48042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4805
4806 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4807
2bc84e8a
SM
48082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4809
4810 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4811 (ppc_fill_vsxregset): Likewise.
4812 (ppc_store_vsxregset): Likewise.
4813 (ppc_fill_vrregset): Likewise.
4814 (ppc_store_vrregset): Likewise.
4815 (ppc_fill_evrregset): Likewise.
4816 (ppc_store_evrregset): Likewise.
4817
e6c5bb05
SM
48182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4819
4820 * linux-ppc-low.c (ppc_usrregs_info): Remove
4821 forward-declaration.
4822 (ppc_arch_setup): Move lower in file.
4823
7ea45d72
SM
48242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4825
4826 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4827 (ps_pdwrite): Likewise.
4828
69291610
HW
48292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4830
4831 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4832 to after assert checks.
4833
b42945fd
SM
48342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4835
4836 * proc-service.c (ps_pdread): Add/adjust casts.
4837 (ps_pdwrite): Add/adjust casts.
4838
d6f85c84
SM
48392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4840
4841 * server.c (handle_search_memory_1): Cast return value of
4842 memmem.
4843
f98cd059
SM
48442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4845
4846 * server.c (write_qxfer_response): Change type of data to
4847 gdb_byte *.
4848
d2412fa5
PA
48492015-10-29 Pedro Alves <palves@redhat.com>
4850
4851 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4852
c17414a2
PA
48532015-10-29 Pedro Alves <palves@redhat.com>
4854
4855 * tracepoint.c (clear_installed_tracepoints): Add casts.
4856
e053fbc4
PA
48572015-10-29 Pedro Alves <palves@redhat.com>
4858
4859 * server.c (handle_v_cont, process_serial_event): Add enum
4860 gdb_signal casts to signal parsing code.
4861
add67df8
PA
48622015-10-29 Pedro Alves <palves@redhat.com>
4863
4864 * linux-low.h (NULL_REGSET): Define.
4865 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4866 * linux-arm-low.c (arm_regsets): Likewise.
4867 * linux-crisv32-low.c (cris_regsets): Likewise.
4868 * linux-m68k-low.c (m68k_regsets): Likewise.
4869 * linux-mips-low.c (mips_regsets): Likewise.
4870 * linux-nios2-low.c (nios2_regsets): Likewise.
4871 * linux-ppc-low.c (ppc_regsets): Likewise.
4872 * linux-s390-low.c (s390_regsets): Likewise.
4873 * linux-sh-low.c (sh_regsets): Likewise.
4874 * linux-sparc-low.c (sparc_regsets): Likewise.
4875 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4876 * linux-tile-low.c (tile_regsets): Likewise.
4877 * linux-x86-low.c (x86_regsets): Likewise.
4878 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4879
50bc912a
PA
48802015-10-29 Pedro Alves <palves@redhat.com>
4881
4882 * linux-low.h (NULL_REGSET): Define.
4883 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4884 * linux-arm-low.c (arm_regsets): Likewise.
4885 * linux-crisv32-low.c (cris_regsets): Likewise.
4886 * linux-m68k-low.c (m68k_regsets): Likewise.
4887 * linux-mips-low.c (mips_regsets): Likewise.
4888 * linux-nios2-low.c (nios2_regsets): Likewise.
4889 * linux-ppc-low.c (ppc_regsets): Likewise.
4890 * linux-s390-low.c (s390_regsets): Likewise.
4891 * linux-sh-low.c (sh_regsets): Likewise.
4892 * linux-sparc-low.c (sparc_regsets): Likewise.
4893 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4894 * linux-tile-low.c (tile_regsets): Likewise.
4895 * linux-x86-low.c (x86_regsets): Likewise.
4896 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4897
682b2546
DE
48982015-10-26 Doug Evans <dje@google.com>
4899
4900 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4901
963843d4
DE
49022015-10-26 Doug Evans <dje@google.com>
4903
4904 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4905
d41401ac
DE
49062015-10-26 Doug Evans <dje@google.com>
4907
4908 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4909 for debug_printf.
4910 (attach_thread, find_new_threads_callback): Ditto.
4911
3db28855
AT
49122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4913
4914 * mem-break.h (set_breakpoint_data): Remove.
4915
fb78e89c
AT
49162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4917
4918 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4919 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4920 (initialize_low): Remove set_breakpoint_data call.
4921 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4922 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4923 (initialize_low): Remove set_breakpoint_data call.
4924 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4925 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4926 (initialize_low): Remove set_breakpoint_data call.
4927
2e6ee069
AT
49282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4929
4930 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4931 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4932 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4933 * target.h (target_breakpoint_kind_from_pc): New macro.
4934
1652a986
AT
49352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4936
4937 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4938 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4939 the default breakpoint kind.
4940
abeead09
AT
49412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4942
4943 * linux-arm-low.c (arm_supports_z_point_type): Add software
4944 breakpoint support.
4945
b0b4b501
AT
49462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4947
4948 * linux-arm-low.c: Refactor breakpoint definitions.
4949 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4950 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4951
8689682c
AT
49522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4953
4954 * Makefile.in: Add arm.c/o.
4955 * configure.srv: Likewise.
4956 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4957 (arm_breakpoint_kind_from_pc): New function.
4958 (arm_sw_breakpoint_from_kind): Return proper kind.
4959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4960
27165294
AT
49612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4962
4963 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4964 removal.
4965 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4966 (struct raw_breakpoint) <size>: Remove.
4967 (struct raw_breakpoint) <kind>: Add.
4968 (bp_size): New function.
4969 (bp_opcode): Likewise.
4970 (find_raw_breakpoint_at): Adjust for kind.
4971 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4972 (remove_memory_breakpoint): Adjust for kind call bp_size.
4973 (set_raw_breakpoint_at): Adjust for kind.
4974 (set_breakpoint): Likewise.
4975 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4976 (delete_raw_breakpoint): Adjust for kind.
4977 (delete_breakpoint): Likewise.
4978 (find_gdb_breakpoint): Likewise.
4979 (set_gdb_breakpoint_1): Likewise.
4980 (set_gdb_breakpoint): Likewise.
4981 (delete_gdb_breakpoint_1): Likewise.
4982 (delete_gdb_breakpoint): Likewise.
4983 (uninsert_raw_breakpoint): Likewise.
4984 (reinsert_raw_breakpoint): Likewise.
4985 (set_breakpoint_data): Remove.
4986 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4987 (check_mem_read): Adjust for kind call bp_size.
4988 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4989 (clone_one_breakpoint): Adjust for kind.
4990 * mem-break.h (set_gdb_breakpoint): Likewise.
4991 (delete_gdb_breakpoint): Likewise.
4992 * server.c (process_serial_event): Likewise.
4993
dd373349
AT
49942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4995
4996 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5002 (arm_sw_breakpoint_from_kind): New function.
5003 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5004 (struct linux_target_ops) <breakpoint>: Remove.
5005 (struct linux_target_ops) <breakpoint_len>: Remove.
5006 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5007 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5008 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5009 (struct linux_target_ops) <breakpoint>: Remove.
5010 (struct linux_target_ops) <breakpoint_len>: Remove.
5011 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5012 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5013 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5014 (struct linux_target_ops) <breakpoint>: Remove.
5015 (struct linux_target_ops) <breakpoint_len>: Remove.
5016 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5017 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5018 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5019 and sw_breakpoint_from_kind to increment the pc.
5020 (linux_breakpoint_kind_from_pc): New function.
5021 (linux_sw_breakpoint_from_kind): New function.
5022 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5023 (initialize_low): Call breakpoint_kind_from_pc and
5024 sw_breakpoint_from_kind to replace breakpoint_data/len.
5025 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5026 New field.
5027 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5028 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5029 (struct linux_target_ops) <breakpoint>: Remove.
5030 (struct linux_target_ops) <breakpoint_len>: Remove.
5031 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5032 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5033 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5034 (struct linux_target_ops) <breakpoint>: Remove.
5035 (struct linux_target_ops) <breakpoint_len>: Remove.
5036 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5037 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5038 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5039 (struct linux_target_ops) <breakpoint>: Remove.
5040 (struct linux_target_ops) <breakpoint_len>: Remove.
5041 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5042 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5043 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5044 (struct linux_target_ops) <breakpoint>: Remove.
5045 (struct linux_target_ops) <breakpoint_len>: Remove.
5046 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5047 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5048 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5049 (struct linux_target_ops) <breakpoint>: Remove.
5050 (struct linux_target_ops) <breakpoint_len>: Remove.
5051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5053 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5054 (struct linux_target_ops) <breakpoint>: Remove.
5055 (struct linux_target_ops) <breakpoint_len>: Remove.
5056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5058 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5059 (struct linux_target_ops) <breakpoint>: Remove.
5060 (struct linux_target_ops) <breakpoint_len>: Remove.
5061 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5063 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5064 (struct linux_target_ops) <breakpoint>: Remove.
5065 (struct linux_target_ops) <breakpoint_len>: Remove.
5066 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5067 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5068 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5069 (struct linux_target_ops) <breakpoint>: Remove.
5070 (struct linux_target_ops) <breakpoint_len>: Remove.
5071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5073 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5074 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5075 (struct linux_target_ops) <breakpoint>: Remove.
5076 (struct linux_target_ops) <breakpoint_len>: Remove.
5077 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5078 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5079 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5080 (struct linux_target_ops) <breakpoint>: Remove.
5081 (struct linux_target_ops) <breakpoint_len>: Remove.
5082 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5083 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5084
4cd98a19
AT
50852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5086
5087 * linux-cris-low.c (cris_get_pc): Remove void arg.
5088
774ee6d2
AR
50892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5090
5091 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5092 variable name.
5093
833dcd29
AR
50942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5095
5096 * inferiors.c (thread_pid_matches_callback): New function.
5097 (find_thread_process): New function.
5098 (remove_thread): Reset current_thread.
5099 (remove_process): Assert threads have been removed first.
5100
8d689ee5
YQ
51012015-10-15 Yao Qi <yao.qi@linaro.org>
5102
5103 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5104 if it is 3.
5105 (aarch64_remove_point): Likewise.
5106 * regcache.c (regcache_register_size): New function.
5107
1c2e1515
YQ
51082015-10-12 Yao Qi <yao.qi@linaro.org>
5109
5110 * linux-aarch64-low.c: Update all callers as emit_load_store
5111 is renamed to aarch64_emit_load_store.
5112
e1c587c3
YQ
51132015-10-12 Yao Qi <yao.qi@linaro.org>
5114
5115 * linux-aarch64-low.c: Update all callers of function renaming
5116 from emit_insn to aarch64_emit_insn.
5117
b6542f81
YQ
51182015-10-12 Yao Qi <yao.qi@linaro.org>
5119
5120 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5121 arch/aarch64-insn.h.
5122 (struct aarch64_memory_operand): Likewise.
5123 (ENCODE): Likewise.
5124 (emit_insn): Move to arch/aarch64-insn.c.
5125 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5126 (emit_load_store): Move to arch/aarch64-insn.c.
5127 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5128 (can_encode_int32): Remove.
5129
246994ce
YQ
51302015-10-12 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5133 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5134 (aarch64_relocate_instruction): Likewise.
5135 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5136 (struct aarch64_insn_visitor): Likewise.
5137
0badd99f
YQ
51382015-10-12 Yao Qi <yao.qi@linaro.org>
5139
5140 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5141 (struct aarch64_insn_visitor): New.
5142 (struct aarch64_insn_relocation_data): New.
5143 (aarch64_ftrace_insn_reloc_b): New function.
5144 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5145 (aarch64_ftrace_insn_reloc_cb): Likewise.
5146 (aarch64_ftrace_insn_reloc_tb): Likewise.
5147 (aarch64_ftrace_insn_reloc_adr): Likewise.
5148 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5149 (aarch64_ftrace_insn_reloc_others): Likewise.
5150 (visitor): New.
5151 (aarch64_relocate_instruction): Use visitor.
5152
dfaffe9d
YQ
51532015-10-12 Yao Qi <yao.qi@linaro.org>
5154
5155 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5156 int. Add argument buf.
5157 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5158 aarch64_relocate_instruction.
5159
70b439f0
YQ
51602015-10-12 Yao Qi <yao.qi@linaro.org>
5161
5162 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5163 argument insn. Remove local variable insn. Don't call
5164 target_read_uint32.
5165 (aarch64_install_fast_tracepoint_jump_pad): Call
5166 target_read_uint32.
5167
7781c06f
YQ
51682015-09-30 Yao Qi <yao.qi@linaro.org>
5169
5170 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5171 (emit_load_store_pair): Likewise.
5172
9a3c8263
SM
51732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5174
5175 * dll.c (match_dll): Add cast(s).
5176 (unloaded_dll): Likewise.
5177 * linux-low.c (second_thread_of_pid_p): Likewise.
5178 (delete_lwp_callback): Likewise.
5179 (count_events_callback): Likewise.
5180 (select_event_lwp_callback): Likewise.
5181 (linux_set_resume_request): Likewise.
5182 * server.c (accumulate_file_name_length): Likewise.
5183 (emit_dll_description): Likewise.
5184 (handle_qxfer_threads_worker): Likewise.
5185 (visit_actioned_threads): Likewise.
5186 * thread-db.c (any_thread_of): Likewise.
5187 * tracepoint.c (same_process_p): Likewise.
5188 (match_blocktype): Likewise.
5189 (build_traceframe_info_xml): Likewise.
5190
224c3ddb
SM
51912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5192
5193 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5194 assignment.
5195 (gdb_unparse_agent_expr): Likewise.
5196 * hostio.c (require_data): Likewise.
5197 (handle_pread): Likewise.
5198 * linux-low.c (disable_regset): Likewise.
5199 (fetch_register): Likewise.
5200 (store_register): Likewise.
5201 (get_dynamic): Likewise.
5202 (linux_qxfer_libraries_svr4): Likewise.
5203 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5204 (set_fast_tracepoint_jump): Likewise.
5205 (uninsert_fast_tracepoint_jumps_at): Likewise.
5206 (reinsert_fast_tracepoint_jumps_at): Likewise.
5207 (validate_inserted_breakpoint): Likewise.
5208 (clone_agent_expr): Likewise.
5209 * regcache.c (init_register_cache): Likewise.
5210 * remote-utils.c (putpkt_binary_1): Likewise.
5211 (decode_M_packet): Likewise.
5212 (decode_X_packet): Likewise.
5213 (look_up_one_symbol): Likewise.
5214 (relocate_instruction): Likewise.
5215 (monitor_output): Likewise.
5216 * server.c (handle_search_memory): Likewise.
5217 (handle_qxfer_exec_file): Likewise.
5218 (handle_qxfer_libraries): Likewise.
5219 (handle_qxfer): Likewise.
5220 (handle_query): Likewise.
5221 (handle_v_cont): Likewise.
5222 (handle_v_run): Likewise.
5223 (captured_main): Likewise.
5224 * target.c (write_inferior_memory): Likewise.
5225 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5226 * tracepoint.c (init_trace_buffer): Likewise.
5227 (add_tracepoint_action): Likewise.
5228 (add_traceframe): Likewise.
5229 (add_traceframe_block): Likewise.
5230 (cmd_qtdpsrc): Likewise.
5231 (cmd_qtdv): Likewise.
5232 (cmd_qtstatus): Likewise.
5233 (response_source): Likewise.
5234 (response_tsv): Likewise.
5235 (cmd_qtnotes): Likewise.
5236 (gdb_collect): Likewise.
5237 (initialize_tracepoint): Likewise.
5238
afbe19f8
PL
52392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5240
5241 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5242 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5243 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5244 <NOP>: New.
5245 (enum aarch64_condition_codes): New enum.
5246 (w0): New static global.
5247 (fp): Likewise.
5248 (lr): Likewise.
5249 (struct aarch64_memory_operand) <type>: New
5250 MEMORY_OPERAND_POSTINDEX type.
5251 (postindex_memory_operand): New helper function.
5252 (emit_ret): New function.
5253 (emit_load_store_pair): New function, factored out of emit_stp
5254 with support for MEMORY_OPERAND_POSTINDEX.
5255 (emit_stp): Rewrite using emit_load_store_pair.
5256 (emit_ldp): New function.
5257 (emit_load_store): Likewise.
5258 (emit_ldr): Mention post-index instruction in comment.
5259 (emit_ldrh): New function.
5260 (emit_ldrb): New function.
5261 (emit_ldrsw): Mention post-index instruction in comment.
5262 (emit_str): Likewise.
5263 (emit_subs): New function.
5264 (emit_cmp): Likewise.
5265 (emit_and): Likewise.
5266 (emit_orr): Likewise.
5267 (emit_orn): Likewise.
5268 (emit_eor): Likewise.
5269 (emit_mvn): Likewise.
5270 (emit_lslv): Likewise.
5271 (emit_lsrv): Likewise.
5272 (emit_asrv): Likewise.
5273 (emit_mul): Likewise.
5274 (emit_sbfm): Likewise.
5275 (emit_sbfx): Likewise.
5276 (emit_ubfm): Likewise.
5277 (emit_ubfx): Likewise.
5278 (emit_csinc): Likewise.
5279 (emit_cset): Likewise.
5280 (emit_nop): Likewise.
5281 (emit_ops_insns): New helper function.
5282 (emit_pop): Likewise.
5283 (emit_push): Likewise.
5284 (aarch64_emit_prologue): New function.
5285 (aarch64_emit_epilogue): Likewise.
5286 (aarch64_emit_add): Likewise.
5287 (aarch64_emit_sub): Likewise.
5288 (aarch64_emit_mul): Likewise.
5289 (aarch64_emit_lsh): Likewise.
5290 (aarch64_emit_rsh_signed): Likewise.
5291 (aarch64_emit_rsh_unsigned): Likewise.
5292 (aarch64_emit_ext): Likewise.
5293 (aarch64_emit_log_not): Likewise.
5294 (aarch64_emit_bit_and): Likewise.
5295 (aarch64_emit_bit_or): Likewise.
5296 (aarch64_emit_bit_xor): Likewise.
5297 (aarch64_emit_bit_not): Likewise.
5298 (aarch64_emit_equal): Likewise.
5299 (aarch64_emit_less_signed): Likewise.
5300 (aarch64_emit_less_unsigned): Likewise.
5301 (aarch64_emit_ref): Likewise.
5302 (aarch64_emit_if_goto): Likewise.
5303 (aarch64_emit_goto): Likewise.
5304 (aarch64_write_goto_address): Likewise.
5305 (aarch64_emit_const): Likewise.
5306 (aarch64_emit_call): Likewise.
5307 (aarch64_emit_reg): Likewise.
5308 (aarch64_emit_pop): Likewise.
5309 (aarch64_emit_stack_flush): Likewise.
5310 (aarch64_emit_zero_ext): Likewise.
5311 (aarch64_emit_swap): Likewise.
5312 (aarch64_emit_stack_adjust): Likewise.
5313 (aarch64_emit_int_call_1): Likewise.
5314 (aarch64_emit_void_call_2): Likewise.
5315 (aarch64_emit_eq_goto): Likewise.
5316 (aarch64_emit_ne_goto): Likewise.
5317 (aarch64_emit_lt_goto): Likewise.
5318 (aarch64_emit_le_goto): Likewise.
5319 (aarch64_emit_gt_goto): Likewise.
5320 (aarch64_emit_ge_got): Likewise.
5321 (aarch64_emit_ops_impl): New static global variable.
5322 (aarch64_emit_ops): New target function, return
5323 &aarch64_emit_ops_impl.
5324 (struct linux_target_ops): Install it.
5325
bb903df0
PL
53262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5327
5328 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5329 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5330 aarch64-ipa.o.
5331 * linux-aarch64-ipa.c: New file.
5332 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5333 and endian.h.
5334 (aarch64_get_thread_area): New target method.
5335 (extract_signed_bitfield): New helper function.
5336 (aarch64_decode_ldr_literal): New function.
5337 (enum aarch64_opcodes): New enum.
5338 (struct aarch64_register): New struct.
5339 (struct aarch64_operand): New struct.
5340 (x0): New static global.
5341 (x1): Likewise.
5342 (x2): Likewise.
5343 (x3): Likewise.
5344 (x4): Likewise.
5345 (w2): Likewise.
5346 (ip0): Likewise.
5347 (sp): Likewise.
5348 (xzr): Likewise.
5349 (aarch64_register): New helper function.
5350 (register_operand): Likewise.
5351 (immediate_operand): Likewise.
5352 (struct aarch64_memory_operand): New struct.
5353 (offset_memory_operand): New helper function.
5354 (preindex_memory_operand): Likewise.
5355 (enum aarch64_system_control_registers): New enum.
5356 (ENCODE): New macro.
5357 (emit_insn): New helper function.
5358 (emit_b): New function.
5359 (emit_bcond): Likewise.
5360 (emit_cb): Likewise.
5361 (emit_tb): Likewise.
5362 (emit_blr): Likewise.
5363 (emit_stp): Likewise.
5364 (emit_ldp_q_offset): Likewise.
5365 (emit_stp_q_offset): Likewise.
5366 (emit_load_store): Likewise.
5367 (emit_ldr): Likewise.
5368 (emit_ldrsw): Likewise.
5369 (emit_str): Likewise.
5370 (emit_ldaxr): Likewise.
5371 (emit_stxr): Likewise.
5372 (emit_stlr): Likewise.
5373 (emit_data_processing_reg): Likewise.
5374 (emit_data_processing): Likewise.
5375 (emit_add): Likewise.
5376 (emit_sub): Likewise.
5377 (emit_mov): Likewise.
5378 (emit_movk): Likewise.
5379 (emit_mov_addr): Likewise.
5380 (emit_mrs): Likewise.
5381 (emit_msr): Likewise.
5382 (emit_sevl): Likewise.
5383 (emit_wfe): Likewise.
5384 (append_insns): Likewise.
5385 (can_encode_int32_in): New helper function.
5386 (aarch64_relocate_instruction): New function.
5387 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5388 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5389 (struct linux_target_ops): Install aarch64_get_thread_area,
5390 aarch64_install_fast_tracepoint_jump_pad and
5391 aarch64_get_min_fast_tracepoint_insn_len.
5392
787749ea
PL
53932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5394
5395 * Makefile.in (aarch64-insn.o): New rule.
5396 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5397
9812b2e6
YQ
53982015-09-21 Yao Qi <yao.qi@linaro.org>
5399
5400 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5401
18fe412b
YQ
54022015-09-21 Yao Qi <yao.qi@linaro.org>
5403
5404 * tracepoint.c (max_jump_pad_size): Remove.
5405
a0cc84cd
YQ
54062015-09-18 Yao Qi <yao.qi@linaro.org>
5407
5408 * linux-aarch64-low.c: Don't include sys/uio.h.
5409 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5410
d78908cf
WW
54112015-09-16 Wei-cheng Wang <cole945@gmail.com>
5412
5413 * tracepoint.c (eval_result_type): Change prototype.
5414 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5415
d57e0d50
PA
54162015-09-15 Pedro Alves <palves@redhat.com>
5417
5418 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5419 Check whether to report exec events instead of checking whether
5420 multiprocess is enabled.
5421
5a676acc
PA
54222015-09-15 Pedro Alves <palves@redhat.com>
5423
5424 PR remote/18965
5425 * remote-utils.c (prepare_resume_reply): Merge
5426 TARGET_WAITKIND_VFORK_DONE switch case with the
5427 TARGET_WAITKIND_FORKED case.
5428
7c5d0fad
YQ
54292015-09-15 Yao Qi <yao.qi@linaro.org>
5430
5431 * server.c (handle_query): Check string comparison using
5432 "else if" instead of "if".
5433
750ce8d1
YQ
54342015-09-15 Yao Qi <yao.qi@linaro.org>
5435
5436 * server.c (vCont_supported): New global variable.
5437 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5438 matches. Append ";vContSupported+" to own_buf.
5439 (handle_v_requests): Append ";s;S" to own_buf if target supports
5440 hardware single step or vCont_supported is false.
5441 (capture_main): Set vCont_supported to zero.
5442
70b90b91
YQ
54432015-09-15 Yao Qi <yao.qi@linaro.org>
5444
5445 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5446 it to ...
5447 (linux_supports_hardware_single_step): ... New function.
5448 (linux_target_ops): Update.
5449 * lynx-low.c (lynx_target_ops): Set field
5450 supports_hardware_single_step to target_can_do_hardware_single_step.
5451 * nto-low.c (nto_target_ops): Likewise.
5452 * spu-low.c (spu_target_ops): Likewise.
5453 * win32-low.c (win32_target_ops): Likewise.
5454 * target.c (target_can_do_hardware_single_step): New function.
5455 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5456 Remove. <supports_hardware_single_step>: New field.
5457 (target_supports_conditional_breakpoints): Remove.
5458 (target_supports_hardware_single_step): New macro.
5459 (target_can_do_hardware_single_step): Declare.
5460 * server.c (handle_query): Use target_supports_hardware_single_step
5461 instead of target_supports_conditional_breakpoints.
5462
ade90bde
YQ
54632015-09-15 Yao Qi <yao.qi@linaro.org>
5464
5465 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5466 function.
5467 (struct linux_target_ops the_low_target): Install
5468 aarch64_linux_siginfo_fixup.
5469
94585166
DB
54702015-09-11 Don Breazeal <donb@codesourcery.com>
5471 Luis Machado <lgustavo@codesourcery.com>
5472
5473 * linux-low.c (linux_mourn): Static declaration.
5474 (linux_arch_setup): Move in front of
5475 handle_extended_wait.
5476 (linux_arch_setup_thread): New function.
5477 (handle_extended_wait): Handle exec events. Call
5478 linux_arch_setup_thread. Make event_lwp argument a
5479 pointer-to-a-pointer.
5480 (check_zombie_leaders): Do not check stopped threads.
5481 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5482 (linux_low_filter_event): Add lwp and thread for exec'ing
5483 non-leader thread if leader thread has been deleted.
5484 Refactor code into linux_arch_setup_thread and call it.
5485 Pass child lwp pointer by reference to handle_extended_wait.
5486 (linux_wait_for_event_filtered): Update comment.
5487 (linux_wait_1): Prevent clobbering exec event status.
5488 (linux_supports_exec_events): New function.
5489 (linux_target_ops) <supports_exec_events>: Initialize new member.
5490 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5491 new member.
5492 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5493 * server.c (report_exec_events): New global variable.
5494 (handle_query): Handle qSupported query for exec-events feature.
5495 (captured_main): Initialize report_exec_events.
5496 * server.h (report_exec_events): Declare new global variable.
5497 * target.h (struct target_ops) <supports_exec_events>: New
5498 member.
5499 (target_supports_exec_events): New macro.
5500 * win32-low.c (win32_target_ops) <supports_exec_events>:
5501 Initialize new member.
5502
0568462b
MM
55032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5504
5505 * linux-low.c (linux_low_enable_btrace): Remove.
5506 (linux_target_ops): Replace linux_low_enable_btrace with
5507 linux_enable_btrace.
5508
39edd165
YQ
55092015-09-03 Yao Qi <yao.qi@linaro.org>
5510
5511 * linux-aarch64-low.c (aarch64_insert_point): Call
5512 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5513 returns true.
5514
1db33b5a
UW
55152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5516
5517 * linux-low.c (check_stopped_by_breakpoint): Use
5518 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5519
ab290430
PA
55202015-08-27 Pedro Alves <palves@redhat.com>
5521
5522 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5523
8d749320
SM
55242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5525
6711b7f8
SM
5526 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5527 the XNEW-family equivalent.
8d749320
SM
5528 (compile_bytecodes): Likewise.
5529 * dll.c (loaded_dll): Likewise.
5530 * event-loop.c (append_callback_event): Likewise.
5531 (create_file_handler): Likewise.
5532 (create_file_event): Likewise.
5533 * hostio.c (handle_open): Likewise.
5534 * inferiors.c (add_thread): Likewise.
5535 (add_process): Likewise.
5536 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5537 * linux-arm-low.c (arm_new_process): Likewise.
5538 (arm_new_thread): Likewise.
5539 * linux-low.c (add_to_pid_list): Likewise.
5540 (linux_add_process): Likewise.
5541 (handle_extended_wait): Likewise.
5542 (add_lwp): Likewise.
5543 (enqueue_one_deferred_signal): Likewise.
5544 (enqueue_pending_signal): Likewise.
5545 (linux_resume_one_lwp_throw): Likewise.
5546 (linux_resume_one_thread): Likewise.
5547 (linux_read_memory): Likewise.
5548 (linux_write_memory): Likewise.
5549 * linux-mips-low.c (mips_linux_new_process): Likewise.
5550 (mips_linux_new_thread): Likewise.
5551 (mips_add_watchpoint): Likewise.
5552 * linux-x86-low.c (initialize_low_arch): Likewise.
5553 * lynx-low.c (lynx_add_process): Likewise.
5554 * mem-break.c (set_raw_breakpoint_at): Likewise.
5555 (set_breakpoint): Likewise.
5556 (add_condition_to_breakpoint): Likewise.
5557 (add_commands_to_breakpoint): Likewise.
5558 (clone_agent_expr): Likewise.
5559 (clone_one_breakpoint): Likewise.
5560 * regcache.c (new_register_cache): Likewise.
5561 * remote-utils.c (look_up_one_symbol): Likewise.
5562 * server.c (queue_stop_reply): Likewise.
5563 (start_inferior): Likewise.
5564 (queue_stop_reply_callback): Likewise.
5565 (handle_target_event): Likewise.
5566 * spu-low.c (fetch_ppc_memory): Likewise.
5567 (store_ppc_memory): Likewise.
5568 * target.c (set_target_ops): Likewise.
5569 * thread-db.c (thread_db_load_search): Likewise.
5570 (try_thread_db_load_1): Likewise.
5571 * tracepoint.c (add_tracepoint): Likewise.
5572 (add_tracepoint_action): Likewise.
5573 (create_trace_state_variable): Likewise.
5574 (cmd_qtdpsrc): Likewise.
5575 (cmd_qtro): Likewise.
5576 (add_while_stepping_state): Likewise.
5577 * win32-low.c (child_add_thread): Likewise.
5578 (get_image_name): Likewise.
5579
ed8b7b42
YQ
55802015-08-25 Yao Qi <yao.qi@linaro.org>
5581
5582 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5583
db3cb7cb
YQ
55842015-08-25 Yao Qi <yao.qi@linaro.org>
5585
5586 * Makefile.in (aarch64-linux.o): New rule.
5587 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5588 srv_tgtobj.
5589 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5590 (aarch64_init_debug_reg_state): Make it extern.
5591 (aarch64_linux_prepare_to_resume): Remove.
5592
f6011a1c
YQ
55932015-08-25 Yao Qi <yao.qi@linaro.org>
5594
5595 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5596 lwp_arch_private_info and ptid_of_lwp.
5597
88e2cf7e
YQ
55982015-08-25 Yao Qi <yao.qi@linaro.org>
5599
5600 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5601 Find proc_info by find_process_pid. All callers updated.
5602
5e35436e
YQ
56032015-08-25 Yao Qi <yao.qi@linaro.org>
5604
5605 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5606 Remove.
5607 (debug_reg_change_callback): Remove.
5608 (aarch64_notify_debug_reg_change): Remove.
5609
4a8a7965
YQ
56102015-08-25 Yao Qi <yao.qi@linaro.org>
5611
5612 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5613 Call current_lwp_ptid.
5614
32a271ee
YQ
56152015-08-25 Yao Qi <yao.qi@linaro.org>
5616
5617 * linux-aarch64-low.c (debug_reg_change_callback): Use
5618 debug_printf.
5619
0d51c8d7
YQ
56202015-08-25 Yao Qi <yao.qi@linaro.org>
5621
5622 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5623
31a43dd5
YQ
56242015-08-25 Yao Qi <yao.qi@linaro.org>
5625
5626 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5627
8ee52567
YQ
56282015-08-25 Yao Qi <yao.qi@linaro.org>
5629
5630 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5631 the code.
5632
ff3f0f45
YQ
56332015-08-25 Yao Qi <yao.qi@linaro.org>
5634
5635 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5636 Remove.
5637 (debug_reg_change_callback): Remove argument entry and add argument
5638 lwp. Remove local variable thread. Don't print thread id in the
5639 debugging output. Don't check whether pid of thread equals to pid.
5640 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5641 iterate_over_lwps instead find_inferior.
5642
3d40fbb5
PA
56432015-08-24 Pedro Alves <palves@redhat.com>
5644
5645 * inferiors.c (get_first_process): New function.
5646 * inferiors.h (get_first_process): New declaration.
5647 * remote-utils.c (read_ptid): Default to the first process in the
5648 list, instead of to the current thread's process.
5649
438e1e42
PA
56502015-08-24 Pedro Alves <palves@redhat.com>
5651
5652 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5653 * event-loop.c: Likewise.
5654 * remote-utils.c: Likewise.
5655 * tracepoint.c: Likewise.
5656
a8c6d4fc
PA
56572015-08-24 Pedro Alves <palves@redhat.com>
5658
5659 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5660 ptid_get_lwp.
5661
99b0bb12
PA
56622015-08-21 Pedro Alves <palves@redhat.com>
5663
5664 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5665 instead of literal 1.
5666
f8904751
PA
56672015-08-21 Pedro Alves <palves@redhat.com>
5668
5669 * tdesc.c (default_description): Explicitly zero-initialize.
5670
465a859e
PA
56712015-08-21 Pedro Alves <palves@redhat.com>
5672
5673 PR gdb/18749
5674 * inferiors.c (remove_thread): Discard any pending stop reply for
5675 this thread.
5676 * server.c (remove_all_on_match_pid): Rename to ...
5677 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5678 instead of a pid.
5679 (discard_queued_stop_replies): Change parameter to a ptid. Now
5680 extern.
5681 (handle_v_kill, kill_inferior_callback, captured_main)
5682 (process_serial_event): Adjust.
5683 * server.h (discard_queued_stop_replies): Declare.
5684
f0db101d
PA
56852015-08-21 Pedro Alves <palves@redhat.com>
5686
5687 * linux-low.c (wait_for_sigstop): Always switch to no thread
5688 selected if the previously current thread dies.
5689 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5690 process instead of the current thread's.
5691 * remote-utils.c (input_interrupt): Don't check if there's no
5692 current thread.
5693 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5694 current thread to the general thread fails, error out.
5695 (handle_qxfer_auxv, handle_qxfer_libraries)
5696 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5697 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5698 (handle_query): Check if there's a thread selected instead of
5699 checking whether there's any thread in the thread list.
5700 (handle_qxfer_threads, handle_qxfer_btrace)
5701 (handle_qxfer_btrace_conf): Don't error out early if there's no
5702 thread in the thread list.
5703 (handle_v_cont, myresume): Don't set the current thread to the
5704 continue thread.
5705 (process_serial_event) <Hg handling>: Also set thread_id if the
5706 previous general thread is still alive.
5707 (process_serial_event) <g/G handling>: If setting the current
5708 thread to the general thread fails, error out.
5709 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5710 thread's lwp instead of the current thread's.
5711 * target.c (set_desired_thread): If the desired thread was not
5712 found, leave the current thread pointing to NULL. Return an int
5713 (boolean) indicating success.
5714 * target.h (set_desired_thread): Change return type to int.
5715
40045d91
MF
57162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5717
5718 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5719 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5720 #includes.
5721 (ps_get_thread_area): New function.
5722
45face3b
GB
57232015-08-19 Gary Benson <gbenson@redhat.com>
5724
5725 * hostio.c (handle_pread): Do not attempt to read more data
5726 than hostio_reply_with_data can fit in a packet.
5727
16d5f642
JB
57282015-08-18 Joel Brobecker <brobecker@adacore.com>
5729
5730 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5731
a738da3a
MF
57322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5733
5734 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5735
33ebda9d
PA
57362015-08-06 Pedro Alves <palves@redhat.com>
5737
5738 * tracepoint.c (expr_eval_result): Now an int.
5739
a44892be
PA
57402015-08-06 Pedro Alves <palves@redhat.com>
5741
5742 * gdbthread.h (struct regcache): Forward declare.
5743 (struct thread_info) <regcache_data>: Now a struct regcache
5744 pointer.
5745 * inferiors.c (inferior_regcache_data)
5746 (set_inferior_regcache_data): Now work with struct regcache
5747 pointers.
5748 * inferiors.h (struct regcache): Forward declare.
5749 (inferior_regcache_data, set_inferior_regcache_data): Now work
5750 with struct regcache pointers.
5751 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5752 (free_register_cache_thread): Remove struct regcache pointer
5753 casts.
5754
608a1e46
PA
57552015-08-06 Pedro Alves <palves@redhat.com>
5756
5757 * server.c (captured_main): On error, print the exception message
5758 to stderr, and if run_once is set, throw a quit.
5759
f0ce0d3a
PA
57602015-08-06 Pedro Alves <palves@redhat.com>
5761
5762 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5763 the current thread.
5764
bf47e248
PA
57652015-08-06 Pedro Alves <palves@redhat.com>
5766
5767 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5768 reading beyond the passed in buffer length.
5769
b6b9ffcc
PL
57702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5771
5772 * tracepoint.c (symbol_list) <required>: Remove.
5773
863d01bd
PA
57742015-08-06 Pedro Alves <palves@redhat.com>
5775
5776 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5777 count if stopping and suspending threads.
5778 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5779 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5780 (linux_detach): Complete an ongoing step-over.
5781 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5782 throughout.
5783 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5784 (linux_wait_1): If passing a signal to the inferior after
5785 finishing a step-over, unsuspend and re-resume all lwps. If we
5786 see a single-step event but the thread should be continuing, don't
5787 pass the trap to gdb.
5788 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5789 internal_error instead of gdb_assert.
5790 (enqueue_pending_signal): New function.
5791 (check_ptrace_stopped_lwp_gone): Add debug output.
5792 (start_step_over): Use internal_error instead of gdb_assert.
5793 (complete_ongoing_step_over): New function.
5794 (linux_resume_one_thread): Don't resume a suspended thread.
5795 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5796 it stepping.
5797
00db26fa
PA
57982015-08-06 Pedro Alves <palves@redhat.com>
5799
5800 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5801 (linux_thread_alive): Use lwp_is_marked_dead.
5802 (extended_event_reported): Delete.
5803 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5804 instead of extended_event_reported.
5805 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5806 as well.
5807 (lwp_is_marked_dead): New function.
5808 (lwp_running): Use lwp_is_marked_dead.
5809 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5810 comment.
5811
ad071a30
PA
58122015-08-06 Pedro Alves <palves@redhat.com>
5813
5814 * linux-low.c (linux_wait_1): Move fork event output out of the
5815 !report_to_gdb check. Pass event_child->waitstatus to
5816 target_waitstatus_to_string instead of ourstatus.
5817
524b57e6
YQ
58182015-08-04 Yao Qi <yao.qi@linaro.org>
5819
5820 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5821 if current_thread is 32 bit.
5822
6085d6f6
YQ
58232015-08-04 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5826 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5827 * server.c (extended_protocol): Remove "static".
5828 * server.h (extended_protocol): Declare it.
5829
8a7e4587
YQ
58302015-08-04 Yao Qi <yao.qi@linaro.org>
5831
5832 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5833 both aarch64 and aarch32.
5834 (aarch64_set_pc): Likewise.
5835
3b53ae99
YQ
58362015-08-04 Yao Qi <yao.qi@linaro.org>
5837
5838 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5839 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5840 arm-with-neon.xml to srv_xmlfiles.
5841 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5842 (is_64bit_tdesc): New function.
5843 (aarch64_linux_read_description): New function.
5844 (aarch64_arch_setup): Call aarch64_linux_read_description.
5845 (regs_info): Rename to regs_info_aarch64.
5846 (aarch64_regs_info): Return right regs_info.
5847 (initialize_low_arch): Call initialize_low_arch_aarch32.
5848
bd9e6534
YQ
58492015-08-04 Yao Qi <yao.qi@linaro.org>
5850
5851 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5852 * linux-aarch32-low.c: New file.
5853 * linux-aarch32-low.h: New file.
5854 * linux-arm-low.c (arm_fill_gregset): Move it to
5855 linux-aarch32-low.c.
5856 (arm_store_gregset): Likewise.
5857 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5858 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5859 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5860 (regs_info): Rename to regs_info_arm.
5861 (arm_regs_info): Return regs_info_aarch32 if
5862 have_ptrace_getregset is 1 and target description is
5863 arm_with_neon or arm_with_vfpv3.
5864 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5865 Call initialize_low_arch_aarch32 instead.
5866
ded48a5e
YQ
58672015-08-04 Yao Qi <yao.qi@linaro.org>
5868
5869 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5870 * linux-low.c: ... here.
5871 * linux-low.h (have_ptrace_getregset): Declare it.
5872
96e9210f
PA
58732015-08-04 Pedro Alves <palves@redhat.com>
5874
5875 * thread-db.c (struct thread_db): Use new typedefs.
5876 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5877 CHK calls.
5878 (disable_thread_event_reporting): Cast result of dlsym to
5879 destination function pointer type.
5880 (thread_db_mourn): Use td_ta_delete_ftype.
5881
af60a1ef
SL
58822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5883
5884 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5885 arch variant.
5886 (CDX_BREAKPOINT): Define for R2.
5887 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5888 (the_low_target): Add comments.
5889
e8b41681
YQ
58902015-07-30 Yao Qi <yao.qi@linaro.org>
5891
5892 * linux-arm-low.c (arm_hwcap): Remove it.
5893 (arm_read_description): New local variable arm_hwcap. Don't
5894 set arm_hwcap to zero.
5895
89abb039
YQ
58962015-07-30 Yao Qi <yao.qi@linaro.org>
5897
5898 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5899 Use regcache->tdesc instead.
5900 (arm_store_wmmxregset): Likewise.
5901 (arm_fill_vfpregset): Likewise.
5902 (arm_store_vfpregset): Likewise.
5903
deca266c
YQ
59042015-07-30 Yao Qi <yao.qi@linaro.org>
5905
5906 * linux-arm-low.c: Include arch/arm.h.
5907 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5908 (arm_store_gregset): Likewise.
5909
aa58a496
SM
59102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5911
5912 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5913 ptrace's 4th parameter.
5914
50904b25
YQ
59152015-07-27 Yao Qi <yao.qi@linaro.org>
5916
5917 * configure.srv (case aarch64*-*-linux*): Don't set
5918 srv_linux_usrregs.
5919
5826e159
PA
59202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5921
5922 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5923 sys/ptrace.h.
5924 * linux-arm-low.c: Likewise.
5925 * linux-cris-low.c: Likewise.
5926 * linux-crisv32-low.c: Likewise.
5927 * linux-low.c: Likewise.
5928 * linux-m68k-low.c: Likewise.
5929 * linux-mips-low.c: Likewise.
5930 * linux-nios2-low.c: Likewise.
5931 * linux-s390-low.c: Likewise.
5932 * linux-sparc-low.c: Likewise.
5933 * linux-tic6x-low.c: Likewise.
5934 * linux-tile-low.c: Likewise.
5935 * linux-x86-low.c: Likewise.
5936
54019719
PA
59372015-07-24 Pedro Alves <palves@redhat.com>
5938
5939 * config.in: Regenerate.
5940 * configure: Regenerate.
5941
eb7aa561
PA
59422015-07-24 Pedro Alves <palves@redhat.com>
5943
5944 * acinclude.m4: Include ../ptrace.m4.
5945 * configure.ac: Call GDB_AC_PTRACE.
5946 * config.in, configure: Regenerate.
5947
55d7b841
YQ
59482015-07-24 Yao Qi <yao.qi@linaro.org>
5949
5950 * linux-low.c (linux_create_inferior): Remove setting to
5951 proc->priv->new_inferior.
5952 (linux_attach): Likewise.
5953 (linux_low_filter_event): Likewise.
5954 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5955
c06cbd92
YQ
59562015-07-24 Yao Qi <yao.qi@linaro.org>
5957
5958 * linux-low.c (linux_arch_setup): New function.
5959 (linux_low_filter_event): If proc->tdesc is NULL and
5960 proc->attached is true, call the_low_target.arch_setup.
5961 Otherwise, keep status pending, and return.
5962 (linux_resume_one_lwp_throw): Don't call get_pc if
5963 thread->while_stepping isn't NULL. Don't call
5964 get_thread_regcache if proc->tdesc is NULL.
5965 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5966 (linux_target_ops): Install arch_setup.
5967 * server.c (start_inferior): Call the_target->arch_setup.
5968 * target.h (struct target_ops) <arch_setup>: New field.
5969 (target_arch_setup): New marco.
5970 * lynx-low.c (lynx_target_ops): Update.
5971 * nto-low.c (nto_target_ops): Update.
5972 * spu-low.c (spu_target_ops): Update.
5973 * win32-low.c (win32_target_ops): Update.
5974
5ae3ebba
YQ
59752015-07-24 Yao Qi <yao.qi@linaro.org>
5976
5977 * linux-low.c (linux_add_process): Don't set
5978 proc->priv->new_inferior.
5979 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5980 (linux_attach): Likewise.
5981
eb97750b
YQ
59822015-07-24 Yao Qi <yao.qi@linaro.org>
5983
5984 * server.c (start_inferior): Code refactor.
5985
51aee833
YQ
59862015-07-24 Yao Qi <yao.qi@linaro.org>
5987
5988 * server.c (process_serial_event): Set general_thread.
5989
af1b22f3
YQ
59902015-07-21 Yao Qi <yao.qi@linaro.org>
5991
5992 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5993 aarch64_linux_get_debug_reg_capacity.
5994
554717a3
YQ
59952015-07-17 Yao Qi <yao.qi@linaro.org>
5996
5997 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5998 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5999 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6000 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6001 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6002 (AARCH64_HWP_ALIGNMENT): Likewise.
6003 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6004 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6005 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6006 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6007 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6008 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6009 (struct aarch64_debug_reg_state): Likewise.
6010 (struct arch_lwp_info): Likewise.
6011 (aarch64_align_watchpoint): Likewise.
6012 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6013 (aarch64_watchpoint_length): Likewise.
6014 (aarch64_point_encode_ctrl_reg): Likewise
6015 (aarch64_point_is_aligned): Likewise.
6016 (aarch64_align_watchpoint): Likewise.
6017 (aarch64_linux_set_debug_regs):
6018 (aarch64_dr_state_insert_one_point): Likewise.
6019 (aarch64_dr_state_remove_one_point): Likewise.
6020 (aarch64_handle_breakpoint): Likewise.
6021 (aarch64_handle_aligned_watchpoint): Likewise.
6022 (aarch64_handle_unaligned_watchpoint): Likewise.
6023 (aarch64_handle_watchpoint): Likewise.
6024
c67ca4de
YQ
60252015-07-17 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6028 and don't aarch64_get_debug_reg_state. All callers update.
6029 (aarch64_handle_aligned_watchpoint): Likewise.
6030 (aarch64_handle_unaligned_watchpoint): Likewise.
6031 (aarch64_handle_watchpoint): Likewise.
6032 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6033 (aarch64_remove_point): Likewise.
6034
25abf979
YQ
60352015-07-17 Yao Qi <yao.qi@linaro.org>
6036
6037 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6038 debug_printf.
6039 (aarch64_handle_unaligned_watchpoint): Likewise.
6040
db1ff28b
JK
60412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6042
6043 Revert the previous 3 commits:
6044 Move gdb_regex* to common/
6045 Move linux_find_memory_regions_full & co.
6046 gdbserver build-id attribute generator
6047
700ca40f
JK
60482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6049 Jan Kratochvil <jan.kratochvil@redhat.com>
6050
6051 gdbserver build-id attribute generator.
6052 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6053 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6054 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6055 (find_phdr): New.
6056 (get_dynamic): Use find_pdhr to traverse program headers.
6057 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6058 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6059 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6060 (get_hex_build_id): New.
6061 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6062 to reply XML document.
6063
9904185c
JK
60642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6065 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 * target.c: Include target/target-utils.h and fcntl.h.
6068 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6069 (target_fileio_read_stralloc): New functions.
6070
6e5b4429
JK
60712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6072
6073 * Makefile.in (OBS): Add gdb_regex.o.
6074 (gdb_regex.o): New.
6075 * config.in: Rebuilt.
6076 * configure: Rebuilt.
6077
ddc98fbf
JK
60782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6079 Jan Kratochvil <jan.kratochvil@redhat.com>
6080
6081 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6082 * Makefile.in (OBS): Add target-utils.o.
6083 (linux-maps.o, target-utils.o): New.
6084 * configure.srv (srv_linux_obj): Add linux-maps.o.
6085
e57bb7a0
PL
60862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6087
6088 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6089 function, return 1.
6090 (the_low_target): Install it.
6091
586b02a9
PA
60922015-07-14 Pedro Alves <palves@redhat.com>
6093
6094 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6095 Instead, ignore ECHILD, and throw an error for other errnos.
6096
58c1b36c
PA
60972015-07-10 Pedro Alves <palves@redhat.com>
6098
6099 * event-loop.c (struct callback_event) <data>: Change type to
6100 gdb_client_data instance instead of gdb_client_data pointer.
6101 (append_callback_event): Adjust.
6102
421530db
PL
61032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6104
6105 * linux-aarch64-low.c: Add comments for each linux_target_ops
6106 method. Remove comments already covered in target_ops and
6107 linux_target_ops definitions.
6108 (the_low_target): Add comments for each unimplemented method.
6109
c2d65f38
YQ
61102015-07-09 Yao Qi <yao.qi@linaro.org>
6111
6112 * linux-aarch64-low.c (aarch64_regmap): Remove.
6113 (aarch64_usrregs_info): Remove.
6114 (regs_info): Set field usrregs to NULL.
6115
b20a6524
MM
61162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6117
6118 * linux-low.c: Include "rsp-low.h"
6119 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6120 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6121 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6122 (handle_btrace_enable_pt): New.
6123 (handle_btrace_general_set): Support "pt".
6124 (handle_btrace_conf_general_set): Support "pt:size".
6125
96c97461
PL
61262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6127
6128 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6129 Z_PACKET_SW_BP.
6130
37d66942
PL
61312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6132
6133 * linux-aarch64-low.c: Remove comment about endianness.
6134 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6135 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6136 memcmp.
6137
dc06243f
GB
61382015-06-24 Gary Benson <gbenson@redhat.com>
6139
6140 * linux-i386-ipa.c (stdint.h): Do not include.
6141 * lynx-i386-low.c (stdint.h): Likewise.
6142 * lynx-ppc-low.c (stdint.h): Likewise.
6143 * mem-break.c (stdint.h): Likewise.
6144 * thread-db.c (stdint.h): Likewise.
6145 * tracepoint.c (stdint.h): Likewise.
6146 * win32-low.c (stdint.h): Likewise.
6147
124e13d9
SM
61482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6149
6150 * server.c (write_qxfer_response): Update call to
6151 remote_escape_output.
6152
909c2cda
JK
61532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6154 Jan Kratochvil <jan.kratochvil@redhat.com>
6155
6156 Merge multiple hex conversions.
6157 * gdbreplay.c (tohex): Rename to 'fromhex'.
6158 (logchar): Use fromhex.
6159
24c05f46
JK
61602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6161
6162 * server.c (handle_qxfer_libraries): Set `version' attribute for
6163 <library-list>.
6164
14d2069a
GB
61652015-06-10 Gary Benson <gbenson@redhat.com>
6166
6167 * target.h (struct target_ops) <multifs_open>: New field.
6168 <multifs_unlink>: Likewise.
6169 <multifs_readlink>: Likewise.
6170 * linux-low.c (nat/linux-namespaces.h): New include.
6171 (linux_target_ops): Initialize the_target->multifs_open,
6172 the_target->multifs_unlink and the_target->multifs_readlink.
6173 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6174 * hostio.c (hostio_fs_pid): New static variable.
6175 (hostio_handle_new_gdb_connection): New function.
6176 (handle_setfs): Likewise.
6177 (handle_open): Use the_target->multifs_open as appropriate.
6178 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6179 (handle_readlink): Use the_target->multifs_readlink as
6180 appropriate.
6181 (handle_vFile): Handle vFile:setfs packets.
6182 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6183 after target_handle_new_gdb_connection.
6184
4b8b5e72
GB
61852015-06-10 Gary Benson <gbenson@redhat.com>
6186
6187 * configure.ac (AC_CHECK_FUNCS): Add setns.
6188 * config.in: Regenerate.
6189 * configure: Likewise.
6190 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6191 (linux-namespaces.o): New rule.
6192 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6193
3ac2e371
GB
61942015-06-09 Gary Benson <gbenson@redhat.com>
6195
6196 * hostio.c (handle_open): Process mode argument with
6197 fileio_to_host_mode.
6198
ca9b78ce
YQ
61992015-06-01 Yao Qi <yao.qi@linaro.org>
6200
6201 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6202 * linux-x86-low.c: Likewise.
6203
bfacd19d
DB
62042015-05-28 Don Breazeal <donb@codesourcery.com>
6205
6206 * linux-low.c (handle_extended_wait): Initialize
6207 thread_info.last_resume_kind for new fork children.
6208
452003ef
PA
62092015-05-15 Pedro Alves <palves@redhat.com>
6210
6211 * target.h (target_handle_new_gdb_connection): Rewrite using if
6212 wrapped in do/while.
6213
1041a03c
JB
62142015-05-14 Joel Brobecker <brobecker@adacore.com>
6215
6216 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6217 * configure, config.in: Regenerate.
6218 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6219 Declare typedef.
6220
c269dbdb
DB
62212015-05-12 Don Breazeal <donb@codesourcery.com>
6222
6223 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6224 PTRACE_EVENT_VFORK_DONE.
6225 (linux_low_ptrace_options, extended_event_reported): Add vfork
6226 events.
6227 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6228 and "vforkdone" for RSP 'T' Stop Reply Packet.
6229 * server.h (report_vfork_events): Declare
6230 global variable.
6231
3a8a0396
DB
62322015-05-12 Don Breazeal <donb@codesourcery.com>
6233
6234 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6235 (the_low_target) <new_fork>: Initialize new member.
6236 * linux-arm-low.c (arm_new_fork): New function.
6237 (the_low_target) <new_fork>: Initialize new member.
6238 * linux-low.c (handle_extended_wait): Call new target function
6239 new_fork.
6240 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6241 * linux-mips-low.c (mips_add_watchpoint): New function
6242 extracted from mips_insert_point.
6243 (the_low_target) <new_fork>: Initialize new member.
6244 (mips_linux_new_fork): New function.
6245 (mips_insert_point): Call mips_add_watchpoint.
6246 * linux-x86-low.c (x86_linux_new_fork): New function.
6247 (the_low_target) <new_fork>: Initialize new member.
6248
de0d863e
DB
62492015-05-12 Don Breazeal <donb@codesourcery.com>
6250
6251 * linux-low.c (handle_extended_wait): Implement return value,
6252 rename argument 'event_child' to 'event_lwp', handle
6253 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6254 (linux_low_ptrace_options): New function.
6255 (linux_low_filter_event): Call linux_low_ptrace_options,
6256 use different argument fo linux_enable_event_reporting,
6257 use return value from handle_extended_wait.
6258 (extended_event_reported): New function.
6259 (linux_wait_1): Call extended_event_reported and set
6260 status to report fork events.
6261 (linux_write_memory): Add pid to debug message.
6262 (reset_lwp_ptrace_options_callback): New function.
6263 (linux_handle_new_gdb_connection): New function.
6264 (linux_target_ops): Initialize new structure member.
6265 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6266 * lynx-low.c: Initialize new structure member.
6267 * remote-utils.c (prepare_resume_reply): Implement stop reason
6268 "fork" for "T" stop message.
6269 * server.c (handle_query): Call handle_new_gdb_connection.
6270 * server.h (report_fork_events): Declare global flag.
6271 * target.h (struct target_ops) <handle_new_gdb_connection>:
6272 New member.
6273 (target_handle_new_gdb_connection): New macro.
6274 * win32-low.c: Initialize new structure member.
6275
ddcbc397
DB
62762015-05-12 Don Breazeal <donb@codesourcery.com>
6277
6278 * mem-break.c (APPEND_TO_LIST): Define macro.
6279 (clone_agent_expr): New function.
6280 (clone_one_breakpoint): New function.
6281 (clone_all_breakpoints): New function.
6282 * mem-break.h: Declare new functions.
6283
89245bc0
DB
62842015-05-12 Don Breazeal <donb@codesourcery.com>
6285
6286 * linux-low.c (linux_supports_fork_events): New function.
6287 (linux_supports_vfork_events): New function.
6288 (linux_target_ops): Initialize new structure members.
6289 (initialize_low): Call linux_check_ptrace_features.
6290 * lynx-low.c (lynx_target_ops): Initialize new structure
6291 members.
6292 * server.c (report_fork_events, report_vfork_events):
6293 New global flags.
6294 (handle_query): Add new features to qSupported packet and
6295 response.
6296 (captured_main): Initialize new global variables.
6297 * target.h (struct target_ops) <supports_fork_events>:
6298 New member.
6299 <supports_vfork_events>: New member.
6300 (target_supports_fork_events): New macro.
6301 (target_supports_vfork_events): New macro.
6302 * win32-low.c (win32_target_ops): Initialize new structure
6303 members.
6304
835205d0
GB
63052015-05-12 Gary Benson <gbenson@redhat.com>
6306
6307 * server.c (handle_qxfer_exec_file): Use current process
6308 if annex is empty.
6309
21e94bd9
SL
63102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6311
6312 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6313 Remove HAVE_PTRACE_GETREGS conditionals.
6314 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6315 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6316
45614f15
YQ
63172015-05-08 Yao Qi <yao.qi@linaro.org>
6318
6319 * linux-low.c (linux_supports_conditional_breakpoints): New
6320 function.
6321 (linux_target_ops): Install new target method.
6322 * lynx-low.c (lynx_target_ops): Install NULL hook for
6323 supports_conditional_breakpoints.
6324 * nto-low.c (nto_target_ops): Likewise.
6325 * spu-low.c (spu_target_ops): Likewise.
6326 * win32-low.c (win32_target_ops): Likewise.
6327 * server.c (handle_query): Check
6328 target_supports_conditional_breakpoints.
6329 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6330 New field.
6331 (target_supports_conditional_breakpoints): New macro.
6332
80ad801e
PA
63332015-05-06 Pedro Alves <palves@redhat.com>
6334
6335 PR server/18081
6336 * server.c (start_inferior): If the process exits, mourn it.
6337
819843c7
GB
63382015-04-21 Gary Benson <gbenson@redhat.com>
6339
6340 * hostio.c (fileio_open_flags_to_host): Factored out to
6341 fileio_to_host_openflags in common/fileio.c. Single use
6342 updated.
6343
a2d5a9d7
MF
63442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6345
6346 * linux-xtensa-low.c (xtensa_fill_gregset)
6347 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6348 XCHAL_HAVE_LOOP.
6349
deb44829
MF
63502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6351
6352 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6353 (regs_info): Replace usrregs pointer with NULL.
6354
e57f1de3
GB
63552015-04-17 Gary Benson <gbenson@redhat.com>
6356
6357 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6358 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6359 * server.c (handle_qxfer_exec_file): New function.
6360 (qxfer_packets): Add exec-file entry.
6361 (handle_query): Report qXfer:exec-file:read as supported packet.
6362
62828379
RN
63632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6364
6365 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6366
b88bb450
GB
63672015-04-09 Gary Benson <gbenson@redhat.com>
6368
6369 * hostio-errno.c (errno_to_fileio_error): Remove function.
6370 Update caller to use remote_fileio_to_fio_error.
6371
c8f4bfdd
YQ
63722015-04-09 Yao Qi <yao.qi@linaro.org>
6373
6374 * linux-low.c (linux_insert_point): Call
6375 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6376 (linux_remove_point): Call remove_memory_breakpoint if type is
6377 raw_bkpt_type_sw.
6378 * linux-x86-low.c (x86_insert_point): Don't call
6379 insert_memory_breakpoint.
6380 (x86_remove_point): Don't call remove_memory_breakpoint.
6381
41f98f02
PA
63822015-04-01 Pedro Alves <palves@redhat.com>
6383 Cleber Rosa <crosa@redhat.com>
6384
6385 * server.c (gdbserver_usage): Reorganize and extend the usage
6386 message.
6387
2bf6fb9d
PA
63882015-03-24 Pedro Alves <palves@redhat.com>
6389
6390 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6391 output. Also dump TRAP_TRACE.
6392 (linux_low_filter_event): In debug output, distinguish a
6393 resume_stop SIGSTOP from a delayed SIGSTOP.
6394
369f6daa
GB
63952015-03-24 Gary Benson <gbenson@redhat.com>
6396
6397 * linux-x86-low.c (x86_linux_new_thread): Moved to
6398 nat/x86-linux.c.
6399 (x86_linux_prepare_to_resume): Likewise.
6400
8e5d4070
GB
64012015-03-24 Gary Benson <gbenson@redhat.com>
6402
6403 * Makefile.in (x86-linux-dregs.o): New rule.
6404 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6405 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6406 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6407 (x86_linux_dr_get): Likewise.
6408 (x86_linux_dr_set): Likewise.
6409 (update_debug_registers_callback): Likewise.
6410 (x86_linux_dr_set_addr): Likewise.
6411 (x86_linux_dr_get_addr): Likewise.
6412 (x86_linux_dr_set_control): Likewise.
6413 (x86_linux_dr_get_control): Likewise.
6414 (x86_linux_dr_get_status): Likewise.
6415 (x86_linux_update_debug_registers): Likewise.
6416
2b95d440
GB
64172015-03-24 Gary Benson <gbenson@redhat.com>
6418
6419 * linux-x86-low.c (x86_linux_update_debug_registers):
6420 New function, factored out from...
6421 (x86_linux_prepare_to_resume): ...this.
6422
14b0bc68
GB
64232015-03-24 Gary Benson <gbenson@redhat.com>
6424
6425 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6426 (x86_linux_dr_set): Likewise.
6427 (update_debug_registers_callback): Likewise.
6428 (x86_linux_dr_set_addr): Likewise.
6429 (x86_linux_dr_get_addr): Likewise.
6430 (x86_linux_dr_set_control): Likewise.
6431 (x86_linux_dr_get_control): Likewise.
6432 (x86_linux_dr_get_status): Likewise.
6433 (x86_linux_prepare_to_resume): Likewise.
6434
5dfe6ca8
GB
64352015-03-24 Gary Benson <gbenson@redhat.com>
6436
6437 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6438 Use perror_with_name. Pass string through gettext.
6439 (x86_linux_dr_set): Likewise.
6440
d33472ad
GB
64412015-03-24 Gary Benson <gbenson@redhat.com>
6442
6443 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6444 (x86_linux_dr_set_addr): ...this.
6445 (x86_dr_low_get_addr): Rename to...
6446 (x86_linux_dr_get_addr): ...this.
6447 (x86_dr_low_set_control): Rename to...
6448 (x86_linux_dr_set_control): ...this.
6449 (x86_dr_low_get_control): Rename to...
6450 (x86_linux_dr_get_control): ...this.
6451 (x86_dr_low_get_status): Rename to...
6452 (x86_linux_dr_get_status): ...this.
6453 (x86_dr_low): Update with new function names.
6454
4b134ca1
GB
64552015-03-24 Gary Benson <gbenson@redhat.com>
6456
6457 * Makefile.in (x86-linux.o): New rule.
6458 * configure.srv: Add x86-linux.o to relevant targets.
6459 * linux-low.c (lwp_set_arch_private_info): New function.
6460 (lwp_arch_private_info): Likewise.
6461 * linux-x86-low.c: Include nat/x86-linux.h.
6462 (arch_lwp_info): Removed structure.
6463 (update_debug_registers_callback):
6464 Use lwp_set_debug_registers_changed.
6465 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6466 and lwp_set_debug_registers_changed.
6467 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6468
34c703da
GB
64692015-03-24 Gary Benson <gbenson@redhat.com>
6470
6471 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6472 * linux-arm-low.c (arm_new_thread): Likewise.
6473 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6474 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6475 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6476 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6477
cff068da
GB
64782015-03-24 Gary Benson <gbenson@redhat.com>
6479
6480 * linux-low.c (ptid_of_lwp): New function.
6481 (lwp_is_stopped): Likewise.
6482 (lwp_stop_reason): Likewise.
6483 * linux-x86-low.c (update_debug_registers_callback):
6484 Use lwp_is_stopped.
6485 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6486 lwp_stop_reason.
6487
b2f7c7e8
GB
64882015-03-24 Gary Benson <gbenson@redhat.com>
6489
6490 * linux-low.h (linux_stop_lwp): Remove declaration.
6491
6d4ee8c6
GB
64922015-03-24 Gary Benson <gbenson@redhat.com>
6493
6494 * linux-low.h: Include nat/linux-nat.h.
6495 * linux-low.c (iterate_over_lwps_args): New structure.
6496 (iterate_over_lwps_filter): New function.
6497 (iterate_over_lwps): Likewise.
6498 * linux-x86-low.c (update_debug_registers_callback):
6499 Update signature to what iterate_over_lwps expects.
6500 Remove PID check that iterate_over_lwps now performs.
6501 (x86_dr_low_set_addr): Use iterate_over_lwps.
6502 (x86_dr_low_set_control): Likewise.
6503
70a0bb6b
GB
65042015-03-24 Gary Benson <gbenson@redhat.com>
6505
6506 * linux-x86-low.c (x86_debug_reg_state): New function.
6507 (x86_linux_prepare_to_resume): Use the above.
6508
7b669087
GB
65092015-03-24 Gary Benson <gbenson@redhat.com>
6510
6511 * linux-low.c (current_lwp_ptid): New function.
6512 * linux-x86-low.c: Include nat/linux-nat.h.
6513 (x86_dr_low_get_addr): Use current_lwp_ptid.
6514 (x86_dr_low_get_control): Likewise.
6515 (x86_dr_low_get_status): Likewise.
6516
eef49a3d
PA
65172015-03-20 Pedro Alves <palves@redhat.com>
6518
6519 * tracepoint.c (cmd_qtstatus): Make "str" const.
6520
b2333d22
PA
65212015-03-20 Pedro Alves <palves@redhat.com>
6522
6523 * server.c (handle_general_set): Make "req_str" const.
6524
23f238d3
PA
65252015-03-19 Pedro Alves <palves@redhat.com>
6526
6527 * linux-low.c (linux_resume_one_lwp): Rename to ...
6528 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6529 instead call perror_with_name.
6530 (check_ptrace_stopped_lwp_gone): New function.
6531 (linux_resume_one_lwp): Reimplement as wrapper around
6532 linux_resume_one_lwp_throw that swallows errors if the LWP is
6533 gone.
6534
91baf43f
PA
65352015-03-19 Pedro Alves <palves@redhat.com>
6536
6537 * linux-low.c (count_events_callback, select_event_lwp_callback):
6538 No longer check whether the thread has resume_stop as last resume
6539 kind.
6540
8bf3b159
PA
65412015-03-19 Pedro Alves <palves@redhat.com>
6542
6543 * linux-low.c (count_events_callback, select_event_lwp_callback):
6544 Use the lwp's status_pending_p field, not the thread's.
6545
b90fc188
PA
65462015-03-19 Pedro Alves <palves@redhat.com>
6547
6548 * linux-low.c (select_event_lwp_callback): Update comments to
6549 no longer mention SIGTRAP.
6550
464b0089
GB
65512015-03-18 Gary Benson <gbenson@redhat.com>
6552
6553 * server.c (handle_query): Do not report vFile:fstat as supported.
6554
aa9e327f
GB
65552015-03-11 Gary Benson <gbenson@redhat.com>
6556
6557 * hostio.c (sys/types.h): New include.
6558 (sys/stat.h): Likewise.
6559 (common-remote-fileio.h): Likewise.
6560 (handle_fstat): New function.
6561 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6562
791c0056
GB
65632015-03-11 Gary Benson <gbenson@redhat.com>
6564
6565 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6566 struct stat.st_blocks and struct stat.st_blksize.
6567 * configure: Regenerate.
6568 * config.in: Likewise.
6569 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6570 (OBS): Add common-remote-fileio.o.
6571 (common-remote-fileio.o): New rule.
6572
9a9df970
PA
65732015-03-09 Pedro Alves <palves@redhat.com>
6574
6575 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6576 'struct sockaddr' pointer in 'accept' call.
6577
9eb1356e
PA
65782015-03-09 Pedro Alves <palves@redhat.com>
6579
6580 Revert:
6581 2015-03-07 Pedro Alves <palves@redhat.com>
6582 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6583 or <winsock2.h> here. Instead include "gdb_socket.h".
6584 (remote_open): Use union gdb_sockaddr_u.
6585 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6586 or <winsock2.h> here. Instead include "gdb_socket.h".
6587 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6588 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6589 or <sys/un.h>.
6590 (init_named_socket, gdb_agent_helper_thread): Use union
6591 gdb_sockaddr_u.
6592
aac331e4
PA
65932015-03-07 Pedro Alves <palves@redhat.com>
6594
6595 * configure.ac (build_warnings): Move
6596 -Wdeclaration-after-statement to the C-specific set.
6597 * configure: Regenerate.
6598
366c75fc
PA
65992015-03-07 Pedro Alves <palves@redhat.com>
6600
6601 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6602 or <winsock2.h> here. Instead include "gdb_socket.h".
6603 (remote_open): Use union gdb_sockaddr_u.
6604 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6605 or <winsock2.h> here. Instead include "gdb_socket.h".
6606 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6607 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6608 or <sys/un.h>.
6609 (init_named_socket, gdb_agent_helper_thread): Use union
6610 gdb_sockaddr_u.
6611
492d29ea
PA
66122015-03-07 Pedro Alves <palves@redhat.com>
6613
6614 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6615 instead.
6616
60a191ed
YQ
66172015-03-06 Yao Qi <yao.qi@linaro.org>
6618
6619 * linux-aarch64-low.c (aarch64_insert_point): Use
6620 show_debug_regs as a boolean.
6621 (aarch64_remove_point): Likewise.
6622
f5771b1d
PA
66232015-03-05 Pedro Alves <palves@redhat.com>
6624
6625 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6626 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6627 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6628 * nto-low.c (nto_target_ops): Likewise.
6629 * spu-low.c (spu_target_ops): Likewise.
6630 * win32-low.c (win32_target_ops): Likewise.
6631
3e572f71
PA
66322015-03-04 Pedro Alves <palves@redhat.com>
6633
72f4393d 6634 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6635 Decide whether a breakpoint triggered based on the SIGTRAP's
6636 siginfo.si_code.
72f4393d
L
6637 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6638 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6639 (linux_low_filter_event): Check for breakpoints before checking
6640 watchpoints.
6641 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6642 siginfo.si_code.
72f4393d
L
6643 (linux_stopped_by_sw_breakpoint)
6644 (linux_supports_stopped_by_sw_breakpoint)
6645 (linux_stopped_by_hw_breakpoint)
6646 (linux_supports_stopped_by_hw_breakpoint): New functions.
6647 (linux_target_ops): Install new target methods.
3e572f71 6648
1ec68e26
PA
66492015-03-04 Pedro Alves <palves@redhat.com>
6650
6651 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6652 * server.c (swbreak_feature, hwbreak_feature): New globals.
6653 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6654 (captured_main): Clear swbreak_feature and hwbreak_feature.
6655 * server.h (swbreak_feature, hwbreak_feature): Declare.
6656 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6657 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6658 supports_stopped_by_hw_breakpoint>: New fields.
6659 (target_supports_stopped_by_sw_breakpoint)
6660 (target_stopped_by_sw_breakpoint)
6661 (target_supports_stopped_by_hw_breakpoint)
6662 (target_stopped_by_hw_breakpoint): Declare.
6663
15c66dd6
PA
66642015-03-04 Pedro Alves <palves@redhat.com>
6665
6666 enum lwp_stop_reason -> enum target_stop_reason
6667 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6668 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6669 (linux_wait_1, stuck_in_jump_pad_callback)
6670 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6671 (linux_stopped_by_watchpoint):
6672 * linux-low.h (enum lwp_stop_reason): Delete.
6673 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6674 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6675
98fc70d6
YQ
66762015-03-04 Yao Qi <yao.qi@linaro.org>
6677
6678 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6679
dd2ac174
GB
66802015-03-03 Gary Benson <gbenson@redhat.com>
6681
6682 * hostio.c (handle_vFile): Fix prefix lengths.
6683
d68e53f4
MM
66842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6685
6686 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6687 ptr_bits.
6688
bf2d68ab
AA
66892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6690
6691 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6692 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6693 (clean): Add "rm -f" for above C files.
6694 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6695 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6696 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6697 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6698 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6699 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6700 (init_registers_s390x_vx_linux64)
6701 (init_registers_s390x_tevx_linux64)
6702 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6703 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6704 declarations.
6705 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6706 (s390_store_vxrs_high): New functions.
6707 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6708 NT_S390_VXRS_HIGH.
6709 (s390_arch_setup): Add logic for selecting one of the new target
6710 descriptions. Activate the new vector regsets if applicable.
6711 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6712 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6713 and init_registers_s390x_tevx_linux64.
6714
c966a859
PA
67152015-03-01 Pedro Alves <palves@redhat.com>
6716
6717 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6718 parameter.
6719
4180215b
PA
67202015-02-27 Pedro Alves <palves@redhat.com>
6721
6722 * linux-x86-low.c (u_debugreg_offset): New function.
6723 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6724
749bab01
PA
67252015-02-27 Pedro Alves <palves@redhat.com>
6726
6727 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6728 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6729 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6730 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6731 (ps_lsetfpregs, ps_getpid)
6732 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6733 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6734 (ps_lsetxregs, ps_plog): Declare.
6735
3c14e5a3
PA
67362015-02-27 Pedro Alves <palves@redhat.com>
6737
6738 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6739 IP_AGENT_EXPORT_FUNC.
6740 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6741 IP_AGENT_EXPORT_FUNC.
6742 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6743 (IP_AGENT_EXPORT): Delete.
6744 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6745 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6746 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6747 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6748 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6749 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6750 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6751 (traceframe_read_count, traceframe_write_count)
6752 (traceframes_created, trace_state_variables, get_raw_reg)
6753 (get_trace_state_variable_value, set_trace_state_variable_value)
6754 (ust_loaded, helper_thread_id, cmd_buf): Use
6755 IPA_SYM_EXPORTED_NAME.
6756 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6757 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6758 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6759 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6760 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6761 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6762 EXTERN_C_PUSH/EXTERN_C_POP.
6763 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6764 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6765 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6766 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6767 (traceframe_write_count, traceframe_read_count)
6768 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6769 (about_to_request_buffer_space, get_trace_state_variable_value)
6770 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6771 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6772 EXTERN_C_PUSH/EXTERN_C_POP.
6773 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6774 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6775 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6776 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6777 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6778 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6779 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6780 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6781 Define.
6782 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6783 (IP_AGENT_EXPORT_VAR_DECL): Define.
6784 (tracing): Declare.
6785 (gdb_agent_get_raw_reg): Declare.
6786
fe978cb0
PA
67872015-02-27 Tom Tromey <tromey@redhat.com>
6788 Pedro Alves <palves@redhat.com>
6789
6790 Rename symbols whose names are reserved C++ keywords throughout.
6791
3bc3d82a
PA
67922015-02-27 Pedro Alves <palves@redhat.com>
6793
6794 * Makefile.in (COMPILER): New, get it from autoconf.
6795 (CXX): Get from autoconf instead.
6796 (COMPILE.pre): Use COMPILER.
6797 (CC-LD): Rename to ...
6798 (CC_LD): ... this. Use COMPILER.
6799 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6800 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6801 * acinclude.m4: Include build-with-cxx.m4.
6802 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6803 Disable -Werror by default if building in C++ mode.
6804 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6805 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6806 the C++ compiler. Save/restore CXXFLAGS too.
6807 * configure: Regenerate.
6808
07697489
PA
68092015-02-27 Pedro Alves <palves@redhat.com>
6810
6811 * acinclude.m4: Include libiberty.m4.
6812 * configure.ac: Call libiberty_INIT.
6813 * config.in, configure: Regenerate.
6814
9beb7c4e
PA
68152015-02-26 Pedro Alves <palves@redhat.com>
6816
6817 * linux-low.c (linux_wait_1): When incrementing the PC past a
6818 program breakpoint always use the_low_target.breakpoint_len as
6819 increment, rather than the maximum between that and
6820 the_low_target.decr_pc_after_break.
6821
8090aef2
PA
68222015-02-23 Pedro Alves <palves@redhat.com>
6823
6824 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6825 thread was doing a step-over; always adjust the PC if
6826 we stepped over a permanent breakpoint.
6827 (linux_wait_1): If we stepped over breakpoint that was on top of a
6828 permanent breakpoint, manually advance the PC past it.
6829
bc9540e8
PA
68302015-02-23 Pedro Alves <palves@redhat.com>
6831
6832 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6833 modes.
6834 (x86_fill_gregset, x86_store_gregset): Use it when handling
6835 $orig_eax.
6836
2db9a427
PA
68372015-02-20 Pedro Alves <palves@redhat.com>
6838
6839 * thread-db.c: Include "nat/linux-procfs.h".
6840 (thread_db_init): Skip listing new threads if the kernel supports
6841 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6842
afa8d396
PA
68432015-02-20 Pedro Alves <palves@redhat.com>
6844
6845 * linux-low.c (status_pending_p_callback): Use ptid_match.
6846
c9587f88
AT
68472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6848
6849 PR breakpoints/16812
6850 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6851 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6852 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6853
b05ec7a5
AT
68542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6855
6856 PR breakpoints/15956
6857 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6858
d33501a5
MM
68592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6860
6861 * linux-low.c (linux_low_btrace_conf): Print size.
6862 * server.c (handle_btrace_conf_general_set): New.
6863 (hanle_general_set): Call handle_btrace_conf_general_set.
6864 (handle_query): Report Qbtrace-conf:bts:size as supported.
6865
f4abbc16
MM
68662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6867
6868 * linux-low.c (linux_low_enable_btrace): Update parameters.
6869 (linux_low_btrace_conf): New.
6870 (linux_target_ops)<to_btrace_conf>: Initialize.
6871 * server.c (current_btrace_conf): New.
6872 (handle_btrace_enable): Rename to ...
6873 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6874 to target_enable_btrace. Update comment. Update users.
6875 (handle_qxfer_btrace_conf): New.
6876 (qxfer_packets): Add btrace-conf entry.
6877 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6878 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6879 (target_ops)<read_btrace_conf>: New.
6880 (target_enable_btrace): Update parameters.
6881 (target_read_btrace_conf): New.
6882
043c3577
MM
68832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6884
6885 * server.c (handle_btrace_general_set): Remove call to
6886 target_supports_btrace.
6887 (supported_btrace_packets): New.
6888 (handle_query): Call supported_btrace_packets.
6889 * target.h: include btrace-common.h.
6890 (btrace_target_info): Removed.
6891 (supports_btrace, target_supports_btrace): Update parameters.
6892
734b0e4b
MM
68932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6894
6895 * Makefile.in (SFILES): Add common/btrace-common.c.
6896 (OBS): Add common/btrace-common.o.
6897 (btrace-common.o): Add build rules.
6898 * linux-low: Include btrace-common.h.
6899 (linux_low_read_btrace): Use struct btrace_data. Call
6900 btrace_data_init and btrace_data_fini.
6901
d6c146e9
PA
69022015-02-06 Pedro Alves <palves@redhat.com>
6903
6904 * thread-db.c (find_new_threads_callback): Add debug output.
6905
20ba1ce6
PA
69062015-02-04 Pedro Alves <palves@redhat.com>
6907
6908 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6909 (resume_stopped_resumed_lwps): New function.
6910 (linux_wait_for_event_filtered): Use it.
6911
8cc73a39
SDJ
69122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6913
6914 * Makefile.in (SFILES): Add linux-personality.c.
6915 (linux-personality.o): New rule.
6916 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6917 list of objects to be built.
6918 * linux-low.c: Include nat/linux-personality.h.
6919 (linux_create_inferior): Remove code to disable address space
6920 randomization (moved to ../nat/linux-personality.c). Create
6921 cleanup to disable address space randomization.
6922
fb23d554
SDJ
69232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6924
6925 * Makefile.in (posix-strerror.o): New rule.
6926 (mingw-strerror.o): Likewise.
6927 * configure: Regenerated.
6928 * configure.ac: Source file ../common/common.host. Initialize new
6929 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6930
cdf43629
YQ
69312015-01-14 Yao Qi <yao@codesourcery.com>
6932
6933 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6934 (ppc-linux.o): New rule.
6935 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6936 * configure.ac: AC_CHECK_FUNCS(getauxval).
6937 * config.in: Re-generated.
6938 * configure: Re-generated.
6939 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6940 ppc64_64bit_inferior_p
6941
514c5338
YQ
69422015-01-14 Yao Qi <yao@codesourcery.com>
6943
6944 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6945 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6946 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6947 (PT_ORIG_R3, PT_TRAP): Likewise.
6948 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6949 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6950 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6951
3368c1e5
JB
69522015-01-10 Joel Brobecker <brobecker@adacore.com>
6953
6954 * i387-fp.c (i387_cache_to_xsave): In look over
6955 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6956 zmmh_low_space field by use of zmmh_high_space.
6957
582511be
PA
69582015-01-09 Pedro Alves <palves@redhat.com>
6959
6960 * linux-low.c (step_over_bkpt): Move higher up in the file.
6961 (handle_extended_wait): Don't store the stop_pc here.
6962 (get_stop_pc): Adjust comments and rename to ...
6963 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6964 stopped for a software breakpoint or hardware breakpoint.
6965 (thread_still_has_status_pending_p): New function.
6966 (status_pending_p_callback): Use
6967 thread_still_has_status_pending_p. If the event is no longer
6968 interesting, resume the LWP.
6969 (handle_tracepoints): Add assert.
6970 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6971 (wstatus_maybe_breakpoint): New function.
6972 (cancel_breakpoint): Delete function.
6973 (check_stopped_by_watchpoint): New function, factored out from
6974 linux_low_filter_event.
6975 (lp_status_maybe_breakpoint): Delete function.
6976 (linux_low_filter_event): Remove filter_ptid argument.
6977 Leave thread group exits pending here. Store the LWP's stop PC.
6978 Always leave events pending.
6979 (linux_wait_for_event_filtered): Pull all events out of the
6980 kernel, and leave them all pending.
6981 (count_events_callback, select_event_lwp_callback): Consider all
6982 events.
6983 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6984 (select_event_lwp): Only give preference to the stepping LWP in
6985 all-stop mode. Adjust comments.
6986 (ignore_event): New function.
6987 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6988 references to cancel_breakpoints. Adjust to renames. Also give
6989 equal priority to all LWPs that have had events in non-stop mode.
6990 If reporting a software breakpoint event, unadjust the LWP's PC.
6991 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6992 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6993 Adjust.
6994 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6995 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6996 (linux_stopped_by_watchpoint): Adjust.
6997 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6998 * linux-low.h (enum lwp_stop_reason): New.
6999 (struct lwp_info) <stop_pc>: Adjust comment.
7000 <stopped_by_watchpoint>: Delete field.
7001 <stop_reason>: New field.
7002 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7003 * mem-break.c (software_breakpoint_inserted_here)
7004 (hardware_breakpoint_inserted_here): New function.
7005 * mem-break.h (software_breakpoint_inserted_here)
7006 (hardware_breakpoint_inserted_here): Declare.
7007 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7008 (cancel_breakpoints): Delete.
7009 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7010 (upload_fast_traceframes): Remove references to
7011 cancel_breakpoints.
7012
a33e3959
PA
70132015-01-09 Pedro Alves <palves@redhat.com>
7014
7015 * thread-db.c (find_new_threads_callback): Ignore thread if the
7016 kernel thread ID is -1.
7017
8784d563
PA
70182015-01-09 Pedro Alves <palves@redhat.com>
7019
7020 * linux-low.c (linux_attach_fail_reason_string): Move to
7021 nat/linux-ptrace.c, and rename.
7022 (linux_attach_lwp): Update comment.
7023 (attach_proc_task_lwp_callback): New function.
7024 (linux_attach): Adjust to rename and use
7025 linux_proc_attach_tgid_threads.
7026 (linux_attach_fail_reason_string): Delete declaration.
7027
76f2b779
JB
70282015-01-01 Joel Brobecker <brobecker@adacore.com>
7029
7030 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7031 * server.c (gdbserver_version): Likewise.
7032
fafcc06a
SDJ
70332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7034
7035 * remote-utils.c: Include ctype.h.
7036 (input_interrupt): Explicitly handle the case when the char
7037 received is the NUL byte. Improve the printing of non-ASCII
7038 characters.
7039
beed38b8
JB
70402014-12-16 Joel Brobecker <brobecker@adacore.com>
7041
7042 * linux-low.c (linux_low_filter_event): Update call to
7043 linux_enable_event_reporting following the addition of
7044 a new parameter to that function.
7045
bf330350
CU
70462014-12-16 Catalin Udma <catalin.udma@freescale.com>
7047
7048 PR server/17457
7049 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7050 (AARCH64_FPCR_REGNO): Likewise.
7051 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7052 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7053 (aarch64_store_fpregset): Likewise.
7054
5227d625
JB
70552014-12-15 Joel Brobecker <brobecker@adacore.com>
7056
7057 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7058 Remove FIXME comment about assumption about N.
7059
f93b65a0
JB
70602014-12-13 Joel Brobecker <brobecker@adacore.com>
7061
7062 * configure.ac: If large-file support is disabled in GDBserver,
7063 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7064 * configure: Regenerate.
7065
e5a9158d
AA
70662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7067
7068 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7069 warning upon ENODATA from ptrace.
7070 * linux-s390-low.c (s390_store_tdb): New.
7071 (s390_regsets): Add regset for NT_S390_TDB.
7072
feea5f36
AA
70732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7074
7075 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7076 without a fill_function.
7077 * linux-s390-low.c (s390_fill_last_break): Remove.
7078 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7079 (s390_arch_setup): Use regset's size instead of fill_function for
7080 loop end condition.
7081
098dbe61
AA
70822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7083
7084 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7085 the regset's store function when ptrace returned an error.
7086 * regcache.c (get_thread_regcache): Invalidate register cache
7087 before fetching inferior's registers.
7088
28eef672
AA
70892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7090
7091 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7092 while-loop as for-loop.
7093 (regsets_store_inferior_registers): Likewise.
7094
bdca27a2
YQ
70952014-11-28 Yao Qi <yao@codesourcery.com>
7096
7097 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7098 * config.in, configure: Re-generate.
7099 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7100 is defined.
7101
9c232dda
YQ
71022014-11-21 Yao Qi <yao@codesourcery.com>
7103
7104 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7105 (AC_CHECK_HEADERS): Remove malloc.h.
7106 * configure: Re-generated.
7107 * config.in: Re-generated.
7108 * server.h: Don't include alloca.h and malloc.h.
7109 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7110 Don't include malloc.h.
7111
43968415
JB
71122014-11-17 Joel Brobecker <brobecker@adacore.com>
7113
7114 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7115 corresponding ERRNO check in same block.
7116
40e91bc7
PA
71172014-11-12 Pedro Alves <palves@redhat.com>
7118
7119 * server.c (cont_thread): Update comment.
7120 (start_inferior, attach_inferior): No longer clear cont_thread.
7121 (handle_v_cont): No longer set cont_thread.
7122 (captured_main): Clear cont_thread each time a GDB connects.
7123
c2c118cf
PA
71242014-11-12 Pedro Alves <palves@redhat.com>
7125
7126 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7127 thread, and don't resume all threads if the Hc thread has exited.
7128
78708b7c
PA
71292014-11-12 Pedro Alves <palves@redhat.com>
7130
7131 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7132 the process group instead of to a specific LWP.
7133
a2abc7de
PA
71342014-10-15 Pedro Alves <palves@redhat.com>
7135
7136 PR server/17487
7137 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7138 parameter.
7139 (arm_set_thread_context): Delete.
7140 (the_low_target): Adjust.
7141 * win32-i386-low.c (debug_registers_changed)
7142 (debug_registers_used): Delete.
7143 (update_debug_registers_callback): New function.
7144 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7145 needing to update their debug registers.
7146 (win32_get_current_dr): New function.
7147 (x86_dr_low_get_addr, x86_dr_low_get_control)
7148 (x86_dr_low_get_status): Fetch the debug register from the thread
7149 record's context.
7150 (i386_initial_stuff): Adjust.
7151 (i386_get_thread_context): Remove current_event parameter. Don't
7152 clear debug_registers_changed nor copy DR values to
7153 debug_reg_state.
7154 (i386_set_thread_context): Delete.
7155 (i386_prepare_to_resume): New function.
7156 (i386_thread_added): Mark the thread as needing to update irs
7157 debug registers.
7158 (the_low_target): Remove i386_set_thread_context and install
7159 i386_prepare_to_resume.
7160 * win32-low.c (win32_get_thread_context): Adjust.
7161 (win32_set_thread_context): Use SetThreadContext
7162 directly.
7163 (win32_prepare_to_resume): New function.
7164 (win32_require_context): New function, factored out from ...
7165 (thread_rec): ... this.
7166 (continue_one_thread): Call win32_prepare_to_resume on each thread
7167 we're about to continue.
7168 (win32_resume): Call win32_prepare_to_resume on the event thread.
7169 * win32-low.h (struct win32_thread_info)
7170 <debug_registers_changed>: New field.
7171 (struct win32_target_ops): Change prototype of set_thread_context,
7172 delete set_thread_context and add prepare_to_resume.
7173 (win32_require_context): New declaration.
7174
a442d071
GB
71752014-10-08 Gary Benson <gbenson@redhat.com>
7176
7177 * server.h: Do not include common-exceptions.h.
7178
6f1947e8
GB
71792014-10-08 Gary Benson <gbenson@redhat.com>
7180
7181 * server.h: Do not include cleanups.h.
7182
63b434a4
JH
71832014-09-30 James Hogan <james.hogan@imgtec.com>
7184
7185 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7186 mips64-dsp-linux.c.
7187
c4d9ceb6
YQ
71882014-09-23 Yao Qi <yao@codesourcery.com>
7189
7190 * linux-low.c (lp_status_maybe_breakpoint): New function.
7191 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7192 (count_events_callback): Likewise.
7193 (select_event_lwp_callback): Likewise.
7194 (cancel_breakpoints_callback): Likewise.
7195
89a5711c
DB
71962014-09-19 Don Breazeal <donb@codesourcery.com>
7197
7198 * linux-low.c (handle_extended_wait): Call
7199 linux_ptrace_get_extended_event.
7200 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7201 linux_is_extended_waitstatus.
7202
bffc0964
JB
72032014-09-16 Joel Brobecker <brobecker@adacore.com>
7204
7205 * Makefile.in (CPPFLAGS): Define.
7206 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7207 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7208
0bfdf32f
GB
72092014-09-16 Gary Benson <gbenson@redhat.com>
7210
7211 * inferiors.h (current_inferior): Renamed as...
7212 (current_thread): New variable. All uses updated.
7213 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7214 (maybe_move_out_of_jump_pad): Likewise.
7215 (cancel_breakpoint): Likewise.
7216 (linux_low_filter_event): Likewise.
7217 (wait_for_sigstop): Likewise.
7218 (linux_resume_one_lwp): Likewise.
7219 (need_step_over_p): Likewise.
7220 (start_step_over): Likewise.
7221 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7222 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7223 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7224 and save_inferior as saved_thread.
7225 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7226 saved_thread.
7227 (regcache_invalidate_thread): Likewise.
7228 * remote-utils.c (prepare_resume_reply): Likewise.
7229 * thread-db.c (thread_db_get_tls_address): Likewise.
7230 (disable_thread_event_reporting): Likewise.
7231 (remove_thread_event_breakpoints): Likewise.
7232 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7233 as saved_thread.
7234 * target.h (set_desired_inferior): Renamed as...
7235 (set_desired_thread): New declaration. All uses updated.
7236 * server.c (myresume): Updated comment to reference thread instead
7237 of inferior.
7238 (handle_serial_event): Likewise.
7239 (handle_target_event): Likewise.
7240
361c8ade
GB
72412014-09-12 Tom Tromey <tromey@redhat.com>
7242 Gary Benson <gbenson@redhat.com>
7243
7244 * regcache.h: Include common-regcache.h.
7245 (regcache_read_pc): Don't declare.
7246 * regcache.c (get_thread_regcache_for_ptid): New function.
7247
bd9269f7
GB
72482014-09-11 Tom Tromey <tromey@redhat.com>
7249 Gary Benson <gbenson@redhat.com>
7250
7251 * symbol.c: New file.
7252 * Makefile.in (SFILES): Add symbol.c.
7253 (OBS): Add symbol.o.
7254
f8c1d06b
GB
72552014-09-11 Gary Benson <gbenson@redhat.com>
7256
7257 * target.c (target_stop_ptid, target_continue_ptid): New
7258 functions.
7259
721ec300
GB
72602014-09-11 Tom Tromey <tromey@redhat.com>
7261 Gary Benson <gbenson@redhat.com>
7262
7263 * target.h: Include target/target.h.
7264 * target.c (target_read_memory, target_read_uint32)
7265 (target_write_memory): New functions.
7266
c5e92cca
GB
72672014-09-11 Gary Benson <gbenson@redhat.com>
7268
7269 * server.h (debug_hw_points): Don't declare.
7270 * server.c (debug_hw_points): Don't define. Replace all uses
7271 with show_debug_regs.
7272 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7273 all uses with show_debug_regs.
7274
2e4bb98a
EBM
72752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7276
7277 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7278 endianness into account.
7279 (ppc_supply_ptrace_register): Likewise.
7280
ac740bc7
JH
72812014-09-03 James Hogan <james.hogan@imgtec.com>
7282
7283 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7284 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7285
97ea6506
GB
72862014-09-03 Gary Benson <gbenson@redhat.com>
7287
7288 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7289 ALL_DEBUG_ADDRESS_REGISTERS.
7290
df7e5265
GB
72912014-09-02 Gary Benson <gbenson@redhat.com>
7292
7293 * i386-low.h: Renamed as...
7294 * x86-low.h: New file. All type, function and variable name
7295 prefixes changed from "i386_" to "x86_". All references updated.
7296 * i386-low.c: Renamed as...
7297 * x86-low.c: New file. All type, function and variable name
7298 prefixes changed from "i386_" to "x86_". All references updated.
7299
ed859da7
GB
73002014-09-02 Gary Benson <gbenson@redhat.com>
7301
7302 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7303 (x86_linux_new_thread): Likewise.
7304
860789c7
GB
73052014-08-29 Gary Benson <gbenson@redhat.com>
7306
7307 * server.h (setjmp.h): Do not include.
7308 (toplevel): Do not declare.
7309 (common-exceptions.h): Include.
7310 (cleanups.h): Likewise.
7311 * server.c (toplevel): Do not define.
7312 (exit_code): New static global.
7313 (detach_or_kill_for_exit_cleanup): New function.
7314 (main): New function. Original main renamed to...
7315 (captured_main): New function.
7316 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7317
ff55e1b5
GB
73182014-08-29 Gary Benson <gbenson@redhat.com>
7319
7320 * Makefile.in (SFILES): Add common/common-exceptions.c.
7321 (OBS): Add common-exceptions.o.
7322 (common-exceptions.o): New rule.
7323 * utils.c (prepare_to_throw_exception): New function.
7324
e9bcb658
GB
73252014-08-29 Gary Benson <gbenson@redhat.com>
7326
7327 * config.in: Regenerate.
7328 * configure: Likewise.
7329
e3180625
GB
73302014-08-29 Gary Benson <gbenson@redhat.com>
7331
7332 * Makefile.in (SFILES): Add common/cleanups.c.
7333 (OBS): cleanups.o.
7334 (cleanups.o): New rule.
7335
e3d6ba5d
GB
73362014-08-29 Gary Benson <gbenson@redhat.com>
7337
7338 * utils.c (internal_vwarning): New function.
7339
7096e886
GB
73402014-08-28 Gary Benson <gbenson@redhat.com>
7341
7342 * utils.h (fatal): Remove declaration.
7343 * utils.c (fatal): Remove function.
7344
14ce3192
GB
73452014-08-28 Gary Benson <gbenson@redhat.com>
7346
7347 * tracepoint.c (gdb_agent_init): Replace fatal with
7348 perror_with_name.
7349 (initialize_tracepoint): Likewise.
7350
50278d59
GB
73512014-08-28 Gary Benson <gbenson@redhat.com>
7352
7353 * remote-utils.c (remote_prepare): Replace fatal with error.
7354
aa96c426
GB
73552014-08-28 Gary Benson <gbenson@redhat.com>
7356
7357 * linux-low.c (linux_async): Replace fatal with warning.
7358 Tidy up and return.
7359 (linux_start_non_stop): Return -1 if linux_async failed.
7360
f7160e97
GB
73612014-08-28 Gary Benson <gbenson@redhat.com>
7362
7363 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7364 gdb_assert.
7365 (i386_dr_low_get_addr): Remove vague comment.
7366 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7367 gdb_assert.
7368
38e08fca
GB
73692014-08-28 Gary Benson <gbenson@redhat.com>
7370
7371 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7372 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7373 internal_error.
7374 (linux_resume_one_lwp): Likewise.
7375 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7376 gdb_assert.
7377 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7378 with internal_error.
7379 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7380 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7381 (find_register_by_name): Replace fatal with internal_error.
7382 (find_regno): Likewise.
7383 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7384 * thread-db.c (thread_db_create_event): Likewise.
7385 (thread_db_load_search): Likewise.
7386 (try_thread_db_load_1): Likewise.
7387 * tracepoint.c (get_jump_space_head): Replace fatal with
7388 internal_error.
7389 (claim_trampoline_space): Likewise.
7390 (have_fast_tracepoint_trampoline_buffer): Likewise.
7391 (cmd_qtstart): Likewise.
7392 (stop_tracing): Likewise.
7393 (fast_tracepoint_collecting): Likewise.
7394 (target_malloc): Likewise.
7395 (download_tracepoint): Likewise.
7396 (download_trace_state_variables): Replace check with gdb_assert.
7397 (upload_fast_traceframes): Replace fatal with internal_error.
7398
34abf635
GB
73992014-08-19 Tom Tromey <tromey@redhat.com>
7400 Gary Benson <gbenson@redhat.com>
7401
7402 * Makefile.in (SFILES): Add common/common-debug.c.
7403 (OBS): Add common-debug.o.
7404 (common-debug.o): New rule.
7405 * debug.h (debug_printf): Don't declare.
7406 * debug.c (debug_printf): Renamed and rewritten as...
7407 (debug_vprintf): New function.
7408
f6e94d78
GB
74092014-08-19 Gary Benson <gbenson@redhat.com>
7410
7411 * utils.h: Do not include print-utils.h.
7412
9239eeab
GB
74132014-08-19 Tom Tromey <tromey@redhat.com>
7414 Gary Benson <gbenson@redhat.com>
7415
7416 * server.h: Add static assertion.
7417 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7418
ef87c8bb
GB
74192014-08-19 Tom Tromey <tromey@redhat.com>
7420 Gary Benson <gbenson@redhat.com>
7421
7422 * Makefile.in (SFILES): Add common/errors.c.
7423 (OBS): Add errors.o.
7424 (IPA_OBS): Add errors-ipa.o.
7425 (errors.o): New rule.
7426 (errors-ipa.o): Likewise.
7427 * utils.h (perror_with_name, error, warning): Don't declare.
7428 * utils.c (warning): Renamed and rewritten as...
7429 (vwarning): New function.
7430 (error): Renamed and rewritten as...
7431 (verror): New function.
7432 (internal_error): Renamed and rewritten as...
7433 (internal_verror): New function.
7434
bb974a24
GB
74352014-08-07 Gary Benson <gbenson@redhat.com>
7436
7437 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7438 * configure: Regenerate.
7439 * config.in: Likewise.
7440 * server.h: Do not include errno.h.
7441 * event-loop.c: Likewise.
7442 * hostio-errno.c: Likewise.
7443 * linux-low.c: Likewise.
7444 * remote-utils.c: Likewise.
7445 * spu-low.c: Likewise.
7446 * utils.c: Likewise.
7447 * gdbreplay.c: Unconditionally include errno.h.
7448
6d3d12eb
GB
74492014-08-07 Gary Benson <gbenson@redhat.com>
7450
7451 * server.h: Do not include string.h.
7452 * event-loop.c: Likewise.
7453 * linux-low.c: Likewise.
7454 * regcache.c: Likewise.
7455 * remote-utils.c: Likewise.
7456 * spu-low.c: Likewise.
7457 * utils.c: Likewise.
7458
dccbb609
GB
74592014-08-07 Gary Benson <gbenson@redhat.com>
7460
7461 * server.h: Do not include gdb_assert.h.
7462
e76df0d0
GB
74632014-08-07 Gary Benson <gbenson@redhat.com>
7464
7465 * server.h: Do not include common-utils.h.
7466
4cb9c816
GB
74672014-08-07 Gary Benson <gbenson@redhat.com>
7468
7469 * server.h: Do not include ptid.h.
7470 * notif.h: Likewise.
7471
3995eeee
GB
74722014-08-07 Gary Benson <gbenson@redhat.com>
7473
7474 * server.h: Do not include gdb_locale.h.
7475
cb9f1a9b
GB
74762014-08-07 Gary Benson <gbenson@redhat.com>
7477
7478 * server.h: Do not include gdb/signals.h.
7479 * win32-low.c: Likewise.
7480
a5fceff8
GB
74812014-08-07 Gary Benson <gbenson@redhat.com>
7482
7483 * server.h: Do not include pathmax.h.
7484
b9391142
GB
74852014-08-07 Gary Benson <gbenson@redhat.com>
7486
7487 * server.h: Do not include libiberty.h.
7488 * linux-bfin-low.c: Likewise.
7489
0e443c87
GB
74902014-08-07 Gary Benson <gbenson@redhat.com>
7491
7492 * server.h: Do not include ansidecl.h.
7493
8ebb3f56
GB
74942014-08-07 Gary Benson <gbenson@redhat.com>
7495
7496 * linux-x86-low.c: Do not include stddef.h.
7497 * lynx-ppc-low.c: Likewise.
7498 * tracepoint.c: Likewise.
7499
8980bdf6
GB
75002014-08-07 Gary Benson <gbenson@redhat.com>
7501
7502 * server.h: Do not include stdarg.h.
7503 * nto-low.c: Likewise.
7504
d7096f71
GB
75052014-08-07 Gary Benson <gbenson@redhat.com>
7506
7507 * server.h: Do not include stdlib.h.
7508 * inferiors.c: Likewise.
7509 * linux-low.c: Likewise.
7510 * regcache.c: Likewise.
7511 * spu-low.c: Likewise.
7512 * tracepoint.c: Likewise.
7513 * utils.c: Likewise.
7514
d02f550d
GB
75152014-08-07 Gary Benson <gbenson@redhat.com>
7516
7517 * server.h: Do not include stdio.h.
7518 * linux-low.c: Likewise.
7519 * remote-utils.c: Likewise.
7520 * spu-low.c: Likewise.
7521 * utils.c: Likewise.
7522 * wincecompat.c: Likewise.
7523
87f6c4e3
GB
75242014-08-06 Gary Benson <gbenson@redhat.com>
7525
7526 * regcache.c (init_register_cache): Move conditionals inside if.
7527
7089dca4
GB
75282014-08-06 Gary Benson <gbenson@redhat.com>
7529
7530 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7531
462f517e
GB
75322014-07-31 Gary Benson <gbenson@redhat.com>
7533
7534 * ax.h: Do not include server.h.
7535 * gdbthread.h: Likewise.
7536 * lynx-low.h: Likewise.
7537 * notif.h: Likewise.
7538
976411d6
GB
75392014-07-30 Gary Benson <gbenson@redhat.com>
7540
7541 * server.h: Include common-defs.h.
7542 Do not include config.h or build-gnulib-gdbserver/config.h.
7543
d41f6d8e
GB
75442014-07-30 Gary Benson <gbenson@redhat.com>
7545
7546 * hostio-errno.c: Move server.h to top of includes list.
7547 * inferiors.c: Likewise.
7548 * linux-x86-low.c: Likewise.
7549 * notif.c: Include server.h.
7550
314c6a35
TT
75512014-07-24 Tom Tromey <tromey@redhat.com>
7552 Gary Benson <gbenson@redhat.com>
7553
7554 * server.h (CORE_ADDR): Now unsigned.
7555
69ff6be5
PA
75562014-07-16 Pedro Alves <palves@redhat.com>
7557
7558 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7559
ce9e3fe7
PA
75602014-07-15 Pedro Alves <palves@redhat.com>
7561
7562 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7563 copy.
7564
e76126e8
PA
75652014-07-11 Pedro Alves <palves@redhat.com>
7566
7567 * linux-low.c (kill_wait_lwp): New function, based on
7568 kill_one_lwp_callback, but use my_waitpid directly.
7569 (kill_one_lwp_callback, linux_kill): Use it.
7570
8e9db26e
PA
75712014-06-23 Pedro Alves <palves@redhat.com>
7572
7573 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7574 before setting DR0..DR3.
7575
698b3e08
GB
75762014-06-20 Gary Benson <gbenson@redhat.com>
7577
7578 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7579 * configure: Regenerated.
7580 * config.in: Likewise.
7581
125f8a3d
GB
75822014-06-20 Gary Benson <gbenson@redhat.com>
7583
7584 * Makefile.in (SFILES): Update locations for files moved
7585 from common to nat.
7586 (object file files): Reordered.
7587
42995dbd
GB
75882014-06-20 Gary Benson <gbenson@redhat.com>
7589
7590 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7591 (i386_dr_low_set_addr): Likewise.
7592 (i386_dr_low_get_addr): Likewise.
7593 (i386_dr_low_can_set_control): Likewise.
7594 (i386_dr_low_set_control): Likewise.
7595 (i386_dr_low_get_control): Likewise.
7596 (i386_dr_low_get_status): Likewise.
7597 (i386_get_debug_register_length): Likewise.
7598 * linux-x86-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 * win32-i386-low.c (i386_dr_low_set_addr):
7606 Changed signature. Made static.
7607 (i386_dr_low_get_addr): Likewise.
7608 (i386_dr_low_set_control): Likewise.
7609 (i386_dr_low_get_control): Likewise.
7610 (i386_dr_low_get_status): Likewise.
7611 (i386_dr_low): New global variable.
7612
e1d2394b
MS
76132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7614
7615 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7616 * Makefile.in (AR, AR_FLAGS): Define.
7617 * configure: Regenerate.
7618
3a8ee006
GB
76192014-06-19 Gary Benson <gbenson@redhat.com>
7620
7621 * Makefile.in (i386-dregs.o): New rule.
7622 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7623 * i386-low.c (target.h): Remove include.
7624 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7625 (DR_CONTROL_SHIFT): Likewise.
7626 (DR_CONTROL_SIZE): Likewise.
7627 (DR_RW_EXECUTE): Likewise.
7628 (DR_RW_WRITE): Likewise.
7629 (DR_RW_READ): Likewise.
7630 (DR_RW_IORW): Likewise.
7631 (DR_LEN_1): Likewise.
7632 (DR_LEN_2): Likewise.
7633 (DR_LEN_4): Likewise.
7634 (DR_LEN_8): Likewise.
7635 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7636 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7637 (DR_ENABLE_SIZE): Likewise.
7638 (DR_LOCAL_SLOWDOWN): Likewise.
7639 (DR_GLOBAL_SLOWDOWN): Likewise.
7640 (DR_CONTROL_RESERVED): Likewise.
7641 (I386_DR_CONTROL_MASK): Likewise.
7642 (I386_DR_VACANT): Likewise.
7643 (I386_DR_LOCAL_ENABLE): Likewise.
7644 (I386_DR_GLOBAL_ENABLE): Likewise.
7645 (I386_DR_DISABLE): Likewise.
7646 (I386_DR_SET_RW_LEN): Likewise.
7647 (I386_DR_GET_RW_LEN): Likewise.
7648 (I386_DR_WATCH_HIT): Likewise.
7649 (i386_wp_op_t): Likewise.
7650 (i386_show_dr): Likewise.
7651 (i386_length_and_rw_bits): Likewise.
7652 (i386_insert_aligned_watchpoint): Likewise.
7653 (i386_remove_aligned_watchpoint): Likewise.
7654 (i386_handle_nonaligned_watchpoint): Likewise.
7655 i386_update_inferior_debug_regs(): Likewise.
7656 (i386_dr_insert_watchpoint): Likewise.
7657 (i386_dr_remove_watchpoint): Likewise.
7658 (i386_dr_region_ok_for_watchpoint): Likewise.
7659 (i386_dr_stopped_data_address): Likewise.
7660 (i386_dr_stopped_by_watchpoint): Likewise.
7661
8f26655c
GB
76622014-06-19 Gary Benson <gbenson@redhat.com>
7663
7664 * i386-low.c (i386_dr_show): Renamed to
7665 i386_show_dr and made static. All uses updated.
7666 (i386_dr_length_and_rw_bits): Renamed to
7667 i386_length_and_rw_bits and made static.
7668 All uses updated.
7669 (i386_dr_insert_aligned_watchpoint): Renamed to
7670 i386_insert_aligned_watchpoint and made static.
7671 All uses updated.
7672 (i386_dr_remove_aligned_watchpoint): Renamed to
7673 i386_remove_aligned_watchpoint and made static.
7674 All uses updated.
7675 (i386_dr_update_inferior_debug_regs): Renamed to
7676 i386_update_inferior_debug_regs and made static.
7677 All uses updated.
7678
b9228891
GB
76792014-06-18 Gary Benson <gbenson@redhat.com>
7680
5171def3
GB
7681 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7682 (i386_dr_low_can_set_control): Likewise.
7683 (i386_get_debug_register_length): Likewise.
7684 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7685 (i386_dr_low_can_set_control): Likewise.
7686 (i386_get_debug_register_length): Likewise.
7687
76882014-06-17 Gary Benson <gbenson@redhat.com>
7689
b9228891
GB
7690 * i386-low.h (i386-dregs.h): New include.
7691 (DR_FIRSTADDR): Now in i386-dregs.h.
7692 (DR_LASTADDR): Likewise.
7693 (DR_NADDR): Likewise.
7694 (DR_STATUS): Likewise.
7695 (DR_CONTROL): Likewise.
7696 (i386_debug_reg_state): Likewise.
7697 (i386_dr_insert_watchpoint): Likewise.
7698 (i386_dr_remove_watchpoint): Likewise.
7699 (i386_dr_region_ok_for_watchpoint): Likewise.
7700 (i386_dr_stopped_data_address): Likewise.
7701 (i386_dr_stopped_by_watchpoint): Likewise.
7702 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7703
4be83cc2
GB
77042014-06-18 Gary Benson <gbenson@redhat.com>
7705
7706 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7707 i386_dr_insert_watchpoint.
7708 (i386_low_remove_watchpoint): Renamed to
7709 i386_dr_remove_watchpoint.
7710 (i386_low_region_ok_for_watchpoint): Renamed to
7711 i386_dr_region_ok_for_watchpoint.
7712 (i386_low_stopped_data_address): Renamed to
7713 i386_dr_stopped_data_address.
7714 (i386_low_stopped_by_watchpoint): Renamed to
7715 i386_dr_stopped_by_watchpoint.
7716 * i386-low.c (i386_show_dr): Renamed to
7717 i386_dr_show and made nonstatic. All uses updated.
7718 (i386_length_and_rw_bits): Renamed to
7719 i386_dr_length_and_rw_bits and made nonstatic.
7720 All uses updated.
7721 (i386_insert_aligned_watchpoint): Renamed to
7722 i386_dr_insert_aligned_watchpoint and made nonstatic.
7723 All uses updated.
7724 (i386_remove_aligned_watchpoint): Renamed to
7725 i386_dr_remove_aligned_watchpoint and made nonstatic.
7726 All uses updated.
7727 (i386_update_inferior_debug_regs): Renamed to
7728 i386_dr_update_inferior_debug_regs and made nonstatic.
7729 All uses updated.
7730 (i386_low_insert_watchpoint): Renamed to
7731 i386_dr_insert_watchpoint. All uses updated.
7732 (i386_low_remove_watchpoint): Renamed to
7733 i386_dr_remove_watchpoint. All uses updated.
7734 (i386_low_region_ok_for_watchpoint): Renamed to
7735 i386_dr_region_ok_for_watchpoint. All uses updated.
7736 (i386_low_stopped_data_address): Renamed to
7737 i386_dr_stopped_data_address. All uses updated.
7738 (i386_low_stopped_by_watchpoint): Renamed to
7739 i386_dr_stopped_by_watchpoint. All uses updated.
7740
131aa0d4
GB
77412014-06-18 Gary Benson <gbenson@redhat.com>
7742
7743 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7744 (i386_dr_low_can_set_control): Likewise.
7745 (i386_insert_aligned_watchpoint): New check.
7746
d9305f7f
GB
77472014-06-18 Gary Benson <gbenson@redhat.com>
7748
7749 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7750 Renamed to state.
7751
e927c9fc
GB
77522014-06-18 Gary Benson <gbenson@redhat.com>
7753
7754 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7755 instead of fatal and error.
7756 (i386_handle_nonaligned_watchpoint): Likewise.
7757
1b6d4134
GB
77582014-06-18 Gary Benson <gbenson@redhat.com>
7759
7760 * i386-low.c (i386_get_debug_register_length): New macro.
7761 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7762 (i386_show_dr): Use debug_printf instead of fprintf. Use
7763 phex to format values.
7764
6e62758f
GB
77652014-06-18 Gary Benson <gbenson@redhat.com>
7766
7767 * i386-low.h: Comment changes.
7768 * i386-low.c: Likewise.
7769
fc6e2f03
GB
77702014-06-18 Gary Benson <gbenson@redhat.com>
7771
7772 * i386-low.c: Whitespace changes.
7773
f9d1eeed
TT
77742014-06-12 Tom Tromey <tromey@redhat.com>
7775
7776 * utils.c (freeargv): Remove.
7777
0b04e523
TT
77782014-06-12 Tom Tromey <tromey@redhat.com>
7779
7780 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7781 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7782 (parse_debug_format_options): Likewise.
7783 (gdbserver_usage): Likewise.
7784 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7785 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7786 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7787 against libiberty.
7788 ($(LIBGNU)): Depend on libiberty.
7789 (all-lib): Recurse into all subdirs.
7790 (install-only): Invoke "install" target in subdirs.
7791 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7792 targets.
7793 * configure: Rebuild.
7794 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7795 for vasprintf, vsnprintf, or gettimeofday.
7796 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7797 srv_tgtobj.
7798
270c9937
JB
77992014-06-05 Joel Brobecker <brobecker@adacore.com>
7800
7801 * development.sh: Delete.
7802 * Makefile.in (config.status): Adjust dependency on development.sh.
7803 * configure.ac: Adjust development.sh source call.
7804 * configure: Regenerate.
7805
0a261ed8
PA
78062014-06-02 Pedro Alves <palves@redhat.com>
7807
7808 * ax.c (gdb_free_agent_expr): New function.
7809 * ax.h (gdb_free_agent_expr): New declaration.
7810 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7811 list.
7812 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7813 static.
7814 (clear_breakpoint_conditions_and_commands): New function.
7815 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7816 (clear_breakpoint_conditions_and_commands): New declaration.
7817
e9dae05e
RR
78182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7819
7820 * linux-aarch64-low.c (asm/ptrace.h): Include.
7821
5876f503
JK
78222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7823
7824 Fix TLS access for -static -pthread.
7825 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7826 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7827 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7828
802e8e6d
PA
78292014-05-20 Pedro Alves <palves@redhat.com>
7830
7831 * linux-aarch64-low.c (aarch64_insert_point)
7832 (aarch64_remove_point): No longer check whether the type is
7833 supported here. Adjust to new interface.
7834 (the_low_target): Install aarch64_supports_z_point_type as
7835 supports_z_point_type method.
7836 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7837 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7838 instead of a Z packet char. Adjust.
7839 (arm_supports_z_point_type): New function.
7840 (arm_insert_point, arm_remove_point): Adjust to new interface.
7841 (the_low_target): Install arm_supports_z_point_type.
7842 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7843 (cris_insert_point, cris_remove_point): Adjust to new interface.
7844 Don't check whether the type is supported here.
7845 (the_low_target): Install cris_supports_z_point_type.
7846 * linux-low.c (linux_supports_z_point_type): New function.
7847 (linux_insert_point, linux_remove_point): Adjust to new interface.
7848 * linux-low.h (struct linux_target_ops) <insert_point,
7849 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7850 raw_breakpoint pointer parameter.
7851 <supports_z_point_type>: New method.
7852 * linux-mips-low.c (mips_supports_z_point_type): New function.
7853 (mips_insert_point, mips_remove_point): Adjust to new interface.
7854 Use mips_supports_z_point_type.
7855 (the_low_target): Install mips_supports_z_point_type.
7856 * linux-ppc-low.c (the_low_target): Install NULL as
7857 supports_z_point_type method.
7858 * linux-s390-low.c (the_low_target): Install NULL as
7859 supports_z_point_type method.
7860 * linux-sparc-low.c (the_low_target): Install NULL as
7861 supports_z_point_type method.
7862 * linux-x86-low.c (x86_supports_z_point_type): New function.
7863 (x86_insert_point): Adjust to new insert_point interface. Use
7864 insert_memory_breakpoint. Adjust to new
7865 i386_low_insert_watchpoint interface.
7866 (x86_remove_point): Adjust to remove_point interface. Use
7867 remove_memory_breakpoint. Adjust to new
7868 i386_low_remove_watchpoint interface.
7869 (the_low_target): Install x86_supports_z_point_type.
7870 * lynx-low.c (lynx_target_ops): Install NULL as
7871 supports_z_point_type callback.
7872 * nto-low.c (nto_supports_z_point_type): New.
7873 (nto_insert_point, nto_remove_point): Adjust to new interface.
7874 (nto_target_ops): Install nto_supports_z_point_type.
7875 * mem-break.c: Adjust intro comment.
7876 (struct raw_breakpoint) <raw_type, size>: New fields.
7877 <inserted>: Update comment.
7878 <shlib_disabled>: Delete field.
7879 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7880 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7881 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7882 (raw_bkpt_type_to_target_hw_bp_type): New function.
7883 (find_enabled_raw_code_breakpoint_at): New function.
7884 (find_raw_breakpoint_at): New type and size parameters. Use them.
7885 (insert_memory_breakpoint): New function, based off
7886 set_raw_breakpoint_at.
7887 (remove_memory_breakpoint): New function.
7888 (set_raw_breakpoint_at): Reimplement.
7889 (set_breakpoint): New, based on set_breakpoint_at.
7890 (set_breakpoint_at): Reimplement.
7891 (delete_raw_breakpoint): Go through the_target->remove_point
7892 instead of assuming memory breakpoints.
7893 (find_gdb_breakpoint_at): Delete.
7894 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7895 (find_gdb_breakpoint): New function.
7896 (set_gdb_breakpoint_at): Delete.
7897 (z_type_supported): New function.
7898 (set_gdb_breakpoint_1): New function, loosely based off
7899 set_gdb_breakpoint_at.
7900 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7901 (delete_gdb_breakpoint_at): Delete.
7902 (delete_gdb_breakpoint_1): New function, loosely based off
7903 delete_gdb_breakpoint_at.
7904 (delete_gdb_breakpoint): New function.
7905 (clear_gdb_breakpoint_conditions): Rename to ...
7906 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7907 breakpoint.
7908 (add_condition_to_breakpoint): Make static.
7909 (add_breakpoint_condition): Take a struct breakpoint pointer
7910 instead of an address. Adjust.
7911 (gdb_condition_true_at_breakpoint): Rename to ...
7912 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7913 z_type parameter.
7914 (gdb_condition_true_at_breakpoint): Reimplement.
7915 (add_breakpoint_commands): Take a struct breakpoint pointer
7916 instead of an address. Adjust.
7917 (gdb_no_commands_at_breakpoint): Rename to ...
7918 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7919 parameter. Return true if no breakpoint was found. Change debug
7920 output.
7921 (gdb_no_commands_at_breakpoint): Reimplement.
7922 (run_breakpoint_commands): Rename to ...
7923 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7924 and change return type to boolean.
7925 (run_breakpoint_commands): New function.
7926 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7927 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7928 breakpoint. Go through the_target->remove_point instead of
7929 assuming memory breakpoint.
7930 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7931 software and hardware breakpoints.
7932 (reinsert_raw_breakpoint): Go through the_target->insert_point
7933 instead of assuming memory breakpoint.
7934 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7935 software and hardware breakpoints.
7936 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7937 Check both software and hardware breakpoints.
7938 (validate_inserted_breakpoint): Assert the breakpoint is a
7939 software breakpoint. Set the inserted flag to -1 instead of
7940 setting shlib_disabled.
7941 (delete_disabled_breakpoints): Adjust.
7942 (validate_breakpoints): Only validate software breakpoints.
7943 Adjust to inserted flag change.
7944 (check_mem_read, check_mem_write): Skip breakpoint types other
7945 than software breakpoints. Adjust to inserted flag change.
7946 * mem-break.h (enum raw_bkpt_type): New enum.
7947 (raw_breakpoint, struct process_info): Forward declare.
7948 (Z_packet_to_target_hw_bp_type): Delete declaration.
7949 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7950 (set_gdb_breakpoint, delete_gdb_breakpoint)
7951 (clear_breakpoint_conditions): New declarations.
7952 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7953 (breakpoint_inserted_here): Update comment.
7954 (add_breakpoint_condition, add_breakpoint_commands): Replace
7955 address parameter with a breakpoint pointer parameter.
7956 (gdb_breakpoint_here): Update comment.
7957 (delete_gdb_breakpoint_at): Delete.
7958 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7959 * server.c (process_point_options): Take a struct breakpoint
7960 pointer instead of an address. Adjust.
7961 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7962 delete_gdb_breakpoint.
7963 * spu-low.c (spu_target_ops): Install NULL as
7964 supports_z_point_type method.
7965 * target.h: Include mem-break.h.
7966 (struct target_ops) <prepare_to_access_memory>: Update comment.
7967 <supports_z_point_type>: New field.
7968 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7969 instead of a char. Also take a raw breakpoint pointer.
7970 * win32-arm-low.c (the_low_target): Install NULL as
7971 supports_z_point_type.
7972 * win32-i386-low.c (i386_supports_z_point_type): New function.
7973 (i386_insert_point, i386_remove_point): Adjust to new interface.
7974 (the_low_target): Install i386_supports_z_point_type.
7975 * win32-low.c (win32_supports_z_point_type): New function.
7976 (win32_insert_point, win32_remove_point): Adjust to new interface.
7977 (win32_target_ops): Install win32_supports_z_point_type.
7978 * win32-low.h (struct win32_target_ops):
7979 <supports_z_point_type>: New method.
7980 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7981 instead of a char. Also take a raw breakpoint pointer.
7982
932539e3
PA
79832014-05-20 Pedro Alves <palves@redhat.com>
7984
7985 * mem-break.h: Include break-common.h.
7986 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7987 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7988 (Z_packet_to_target_hw_bp_type): New declaration.
7989 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7990 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7991 (Z_PACKET_ACCESS_WP): Delete macros.
7992 (Z_packet_to_hw_type): Delete function.
7993 * i386-low.h: Don't include break-common.h here.
7994 (Z_packet_to_hw_type): Delete declaration.
7995 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7996 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7997 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7998 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7999 * linux-aarch64-low.c: Don't include break-common.h here.
8000 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8001 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8002 (Z_packet_to_target_hw_bp_type): Delete function.
8003 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8004 function.
8005 (mips_insert_point, mips_remove_point): Use
8006 Z_packet_to_target_hw_bp_type.
8007
4ff0d3d8
PA
80082014-05-20 Pedro Alves <palves@redhat.com>
8009
8010 * linux-aarch64-low.c: Include break-common.h.
8011 (enum target_point_type): Delete.
8012 (Z_packet_to_point_type): Rename to ...
8013 (Z_packet_to_target_hw_bp_type): ... this, and return a
8014 target_hw_bp_type instead.
8015 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8016 instead of an enum target_point_type.
8017 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8018 breakpoint type.
8019 (aarch64_dr_state_insert_one_point)
8020 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8021 (aarch64_handle_aligned_watchpoint)
8022 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8023 Take an enum target_hw_bp_type instead of an enum
8024 target_point_type.
8025 (aarch64_supports_z_point_type): New function.
8026 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8027 use Z_packet_to_target_hw_bp_type.
8028
786dc519
JB
80292014-05-20 Joel Brobecker <brobecker@adacore.com>
8030
8031 * configure.ac: Only use -Werror by default when DEVELOPMENT
8032 is true.
8033 * configure: Regenerate.
8034
9e0aa64f
JK
80352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8036
8037 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8038 * linux-x86-low.c (X86_64_USER_REGS): New.
8039 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8040
2b577b92
YQ
80412014-04-28 Yao Qi <yao@codesourcery.com>
8042
8043 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8044 name.
8045
94611da2
PA
80462014-04-25 Pedro Alves <palves@redhat.com>
8047
8048 PR server/16255
8049 * linux-low.c (linux_attach_fail_reason_string): New function.
8050 (linux_attach_lwp): Delete.
8051 (linux_attach_lwp_1): Rename to ...
8052 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8053 argument. Remove "initial" parameter. Return int instead of
8054 void. Don't error or warn here.
8055 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8056 failure to attach to the tgid. Call warning when failing to
8057 attach to an lwp.
8058 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8059 argument. Remove "initial" parameter. Return int instead of
8060 void. Don't error or warn here.
8061 (linux_attach_fail_reason_string): New declaration.
8062 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8063 interface change. Use linux_attach_fail_reason_string.
8064
01f9f808
MS
80652014-04-24 Michael Sturm <michael.sturm@mintel.com>
8066 Walfred Tedeschi <walfred.tedeschi@intel.com>
8067
8068 * Makefile.in: Added rules to handle new files
8069 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8070 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8071 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8072 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8073 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8074 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8075 x32-avx512-linux.o.
8076 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8077 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8078 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8079 i386/x32-avx512.xml.
8080 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8081 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8082 i386/x32-avx512-linux.xml.
8083 * i387-fp.c (num_avx512_k_registers): New constant for number
8084 of K registers.
8085 (num_avx512_zmmh_low_registers): New constant for number of
8086 lower ZMM registers (0-15).
8087 (num_avx512_zmmh_high_registers): New constant for number of
8088 higher ZMM registers (16-31).
8089 (num_avx512_ymmh_registers): New contant for number of higher
8090 YMM registers (ymm16-31 added by avx521 on x86_64).
8091 (num_avx512_xmm_registers): New constant for number of higher
8092 XMM registers (xmm16-31 added by AVX512 on x86_64).
8093 (struct i387_xsave): Add space for AVX512 registers.
8094 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8095 Add code to handle AVX512 registers.
8096 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8097 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8098 prototypei from generated file.
8099 (tdesc_amd64_avx512_linux): Likewise.
8100 (init_registers_x32_avx512_linux): Likewise.
8101 (tdesc_x32_avx512_linux): Likewise.
8102 (init_registers_i386_avx512_linux): Likewise.
8103 (tdesc_i386_avx512_linux): Likewise.
8104 (x86_64_regmap): Add AVX512 registers.
8105 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8106 mask.
8107 (initialize_low_arch): Add code to initialize AVX512 registers.
8108
51aa91f9
PA
81092014-04-23 Pedro Alves <palves@redhat.com>
8110
8111 * mem-break.c (find_gdb_breakpoint_at): Make static.
8112 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8113
a4165e94
PA
81142014-04-23 Pedro Alves <palves@redhat.com>
8115
8116 * i386-low.c: Don't include break-common.h here.
8117 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8118 prototype to take target_hw_bp_type as argument instead of a Z
8119 packet char.
8120 * i386-low.h: Include break-common.h here.
8121 (Z_packet_to_hw_type): Declare.
8122 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8123 prototypes.
8124 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8125 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8126 (x86_remove_point): Convert the packet number to a
8127 target_hw_bp_type before calling i386_low_remove_watchpoint.
8128 * win32-i386-low.c (i386_insert_point): Convert the packet number
8129 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8130 (i386_remove_point): Convert the packet number to a
8131 target_hw_bp_type before calling i386_low_remove_watchpoint.
8132
b8acf843
PA
81332014-04-23 Pedro Alves <palves@redhat.com>
8134
8135 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8136
d708bcd1
PA
81372014-04-10 Pedro Alves <palves@redhat.com>
8138
8139 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8140 Check if the condition or command is NULL before checking if the
8141 breakpoint is known. On success, return true.
8142 * mem-break.h (add_breakpoint_condition): Document return.
8143 (add_breakpoint_commands): Add describing comment.
8144 * server.c (skip_to_semicolon): New function.
8145 (process_point_options): Use it.
8146
2eec7d5b
PA
81472014-04-09 Pedro Alves <palves@redhat.com>
8148
8149 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8150 to lwpid_of.
8151
fa96cb38
PA
81522014-02-27 Pedro Alves <palves@redhat.com>
8153
8154 PR 12702
8155 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8156 macros.
8157 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8158 output.
8159 (last_thread_of_process_p): Take a PID argument instead of a
8160 thread pointer.
8161 (linux_wait_for_lwp): Delete.
8162 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8163 functions.
8164 (linux_low_filter_event): New function, party factored out from
8165 linux_wait_for_event.
8166 (linux_wait_for_event): Rename to ...
8167 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8168 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8169 sigsuspend. Check for zombie leaders.
8170 (linux_wait_for_event): Reimplement as wrapper around
8171 linux_wait_for_event_filtered.
8172 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8173 a normal or signal exit is seen, it's the whole process exiting.
8174 (wait_for_sigstop): No longer a for_each_inferior callback.
8175 Rewrite on top of linux_wait_for_event_filtered.
8176 (stop_all_lwps): Call wait_for_sigstop directly.
8177 * server.c (resume, handle_target_event): Handle
8178 TARGET_WAITKIND_NO_RESUMED.
8179
d763de10
JB
81802014-02-26 Joel Brobecker <brobecker@adacore.com>
8181
8182 * win32-low.c (psapi_get_dll_name,
8183 * win32_CreateToolhelp32Snapshot): Delete.
8184 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8185 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8186 Delete.
8187 (handle_load_dll): Add function description.
8188 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8189
850a0f76
JB
81902014-02-26 Joel Brobecker <brobecker@adacore.com>
8191
8192 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8193 Add comment.
8194 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8195 base address when calling win32_add_one_solib.
8196 (handle_load_dll): Delete local variable load_addr.
8197 Remove 0x1000 offset applied to DLL base address when calling
8198 win32_add_one_solib.
8199 (handle_unload_dll): Add comment.
8200
f25b3fc3
JB
82012014-02-26 Joel Brobecker <brobecker@adacore.com>
8202
8203 * win32-low.c (win32_add_all_dlls): Renames
8204 win32_ensure_ntdll_loaded. Rewrite function documentation.
8205 Adjust implementation to always load all DLLs.
8206 Add 0x1000 offset to DLL base address when calling
8207 win32_add_one_solib.
8208 (child_initialization_done): New static global.
8209 (do_initial_child_stuff): Set child_initialization_done to
8210 zero during child initialization, and 1 after. Replace call
8211 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8212 Add comment.
8213 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8214 (handle_unload_dll): Add function documentation.
8215 (get_child_debug_event): Ignore load and unload DLL events
8216 during child initialization.
8217
d86d4aaf
DE
82182014-02-20 Doug Evans <dje@google.com>
8219
3bc32da3 8220 Remove global all_lwps.
d86d4aaf
DE
8221 * inferiors.h (ptid_of): Move here from linux-low.h.
8222 (pid_of, lwpid_of): Ditto.
8223 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8224 parameter is a struct thread_info * now.
8225 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8226 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8227 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8228 directly.
8229 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8230 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8231 * linux-arm-low.c (update_registers_callback): Update, "entry"
8232 parameter is a struct thread_info * now.
8233 Fetch lwpid from current_inferior directly.
8234 (arm_insert_point): Pass &all_threads to find_inferior instead of
8235 &all_lwps.
8236 (arm_remove_point): Ditto.
8237 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8238 (arm_prepare_to_resume): Fetch pid from thread.
8239 (arm_read_description): Fetch lwpid from current_inferior directly.
8240 * linux-low.c (all_lwps): Delete.
8241 (delete_lwp): Delete call to remove_inferior.
8242 (handle_extended_wait): Fetch lwpid from thread.
8243 (add_lwp): Don't set lwp->entry.id. Remove call to
8244 add_inferior_to_list.
8245 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8246 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8247 (kill_one_lwp_callback): Ditto.
8248 (linux_kill): Don't dereference NULL pointer.
8249 Fetch ptid,lwpid from thread.
8250 (get_detach_signal): Fetch ptid from thread.
8251 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8252 Simplify call to regcache_invalidate_thread.
8253 (delete_lwp_callback): Update, "entry" parameter is a
8254 struct thread_info * now. Fetch pid from thread.
8255 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8256 (status_pending_p_callback): Update, "entry" parameter is a
8257 struct thread_info * now. Fetch ptid from thread.
8258 (find_lwp_pid): Update, "entry" parameter is a
8259 struct thread_info * now.
8260 (linux_wait_for_lwp): Fetch pid from thread.
8261 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8262 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8263 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8264 (dequeue_one_deferred_signal): Ditto.
8265 (cancel_breakpoint): Fetch ptid from current_inferior.
8266 (linux_wait_for_event): Pass &all_threads to find_inferior,
8267 not &all_lwps. Fetch ptid, lwpid from thread.
8268 (count_events_callback): Update, "entry" parameter is a
8269 struct thread_info * now.
8270 (select_singlestep_lwp_callback): Ditto.
8271 (select_event_lwp_callback): Ditto.
8272 (cancel_breakpoints_callback): Ditto.
8273 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8274 not &all_lwps.
8275 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8276 (unsuspend_one_lwp): Update, "entry" parameter is a
8277 struct thread_info * now.
8278 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8279 not &all_lwps.
8280 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8281 Fetch lwpid from thread, not lwp.
8282 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8283 Pass &all_threads to find_inferior, not &all_lwps.
8284 (send_sigstop): Fetch lwpid from thread, not lwp.
8285 (send_sigstop_callback): Update, "entry" parameter is a
8286 struct thread_info * now.
8287 (suspend_and_send_sigstop_callback): Ditto.
8288 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8289 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8290 struct thread_info * now.
8291 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8292 from thread, lwp.
8293 (lwp_running): Update, "entry" parameter is a
8294 struct thread_info * now.
8295 (stop_all_lwps): Fetch ptid from thread.
8296 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8297 (linux_resume_one_lwp): Fetch lwpid from thread.
8298 (linux_set_resume_request): Update, "entry" parameter is a
8299 struct thread_info * now. Fetch pid, lwpid from thread.
8300 (resume_status_pending_p): Update, "entry" parameter is a
8301 struct thread_info * now.
8302 (need_step_over_p): Ditto. Fetch lwpid from thread.
8303 (start_step_over): Fetch lwpid from thread.
8304 (linux_resume_one_thread): Update, "entry" parameter is a
8305 struct thread_info * now. Fetch lwpid from thread.
8306 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8307 (proceed_one_lwp): Update, "entry" parameter is a
8308 struct thread_info * now. Fetch lwpid from thread.
8309 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8310 struct thread_info * now.
8311 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8312 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8313 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8314 directly.
8315 (regsets_store_inferior_registers): Ditto.
8316 (fetch_register, store_register): Ditto.
8317 (linux_read_memory, linux_write_memory): Ditto.
8318 (linux_request_interrupt): Ditto.
8319 (linux_read_auxv): Ditto.
8320 (linux_xfer_siginfo): Ditto.
8321 (linux_qxfer_spu): Ditto.
8322 (linux_qxfer_libraries_svr4): Ditto.
8323 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8324 moved to inferiors.h.
8325 (get_lwp): Delete.
8326 (get_thread_lwp): Update.
8327 (struct lwp_info): Delete member "entry". Simplify comment for
8328 member "thread".
8329 (all_lwps): Delete.
8330 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8331 current_inferior directly.
8332 (update_watch_registers_callback): Update, "entry" parameter is a
8333 struct thread_info * now. Fetch pid from thread.
8334 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8335 (mips_insert_point): Fetch lwpid from current_inferior.
8336 Pass &all_threads to find_inferior, not &all_lwps.
8337 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8338 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8339 directly.
8340 (mips_stopped_data_address): Ditto.
8341 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8342 directly.
8343 * linux-tile-low.c (tile_arch_setup): Ditto.
8344 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8345 (update_debug_registers_callback): Update, "entry" parameter is a
8346 struct thread_info * now. Fetch pid from thread.
8347 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8348 Pass &all_threads to find_inferior, not &all_lwps.
8349 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8350 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8351 Pass &all_threads to find_inferior, not &all_lwps.
8352 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8353 (i386_dr_low_get_status): Ditto.
8354 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8355 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8356 (x86_linux_read_description): Ditto.
8357 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8358
3b8361aa
DE
83592014-02-20 Doug Evans <dje@google.com>
8360
8361 * inferiors.c (get_first_inferior): Fix buglet.
8362
f7667f0d
DE
83632014-02-19 Doug Evans <dje@google.com>
8364
8365 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8366 * inferiors.c (add_thread): Change result type to struct thread_info *.
8367 All callers updated.
8368 (add_lwp): Call add_thread here instead of in callers.
8369 All callers updated.
8370 * linux-low.h (get_lwp_thread): Rewrite.
8371 (struct lwp_info): New member "thread".
8372
b3312d80
DE
83732014-02-19 Doug Evans <dje@google.com>
8374
8375 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8376 All callers updated.
8377
ecc6f45c
DE
83782014-02-19 Doug Evans <dje@google.com>
8379
8380 * inferiors.c (add_thread): Fix whitespace.
8381
649ebbca
DE
83822014-02-19 Doug Evans <dje@google.com>
8383
8384 * dll.c (clear_dlls): Replace accessing list implemention details
8385 with API function.
8386 * gdbthread.h (get_first_thread): Declare.
8387 * inferiors.c (for_each_inferior_with_data): New function.
8388 (get_first_thread): New function.
8389 (find_thread_ptid): Simplify.
8390 (get_first_inferior): New function.
8391 (clear_list): Delete.
8392 (one_inferior_p): New function.
8393 (clear_inferior_list): New function.
8394 (clear_inferiors): Update.
8395 * inferiors.h (for_each_inferior_with_data): Declare.
8396 (clear_inferior_list): Declare.
8397 (one_inferior_p): Declare.
8398 (get_first_inferior): Declare.
8399 * linux-low.c (linux_wait_for_event): Replace accessing list
8400 implemention details with API function.
8401 * server.c (target_running): Ditto.
8402 (accumulate_file_name_length): New function.
8403 (emit_dll_description): New function.
8404 (handle_qxfer_libraries): Replace accessing list implemention
8405 details with API function.
8406 (handle_qxfer_threads_worker): New function.
8407 (handle_qxfer_threads_proper): Replace accessing list implemention
8408 details with API function.
8409 (handle_query): Ditto.
8410 (visit_actioned_threads_callback_ftype): New typedef.
8411 (visit_actioned_threads_data): New struct.
8412 (visit_actioned_threads): Rewrite to be find_inferior callback.
8413 (resume): Call find_inferior.
8414 (handle_status): Replace accessing list implemention
8415 details with API function.
8416 (process_serial_event): Replace accessing list implemention details
8417 with API function.
8418 * target.c (set_desired_inferior): Replace accessing list implemention
8419 details with API function.
8420 * tracepoint.c (same_process_p): New function.
8421 (gdb_agent_about_to_close): Replace accessing list implemention
8422 details with API function.
8423 * win32-low.c (child_delete_thread): Replace accessing list
8424 implemention details with API function.
8425 (match_dll_by_basename): New function.
8426 (dll_is_loaded_by_basename): New function.
8427 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8428 details call to dll_is_loaded_by_basename.
8429
80894984
DE
84302014-02-19 Doug Evans <dje@google.com>
8431
8432 * dll.h (struct dll_info): Add comment.
8433 * gdbthread.h (struct thread_info): Add comment.
8434 (current_ptid): Simplify.
8435 * inferiors.c (add_process): Update.
8436 (remove_process): Update.
8437 * inferiors.h (struct process_info): Rename member "head" to "entry".
8438 * linux-low.c (delete_lwp): Update.
8439 (add_lwp): Update.
8440 (last_thread_of_process_p): Update.
8441 (kill_one_lwp_callback, linux_kill): Update.
8442 (status_pending_p_callback): Update.
8443 (wait_for_sigstop): Update. Simplify read of ptid.
8444 (start_step_over): Update.
8445 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8446 (get_lwp_thread): Update.
8447 (struct lwp_info): Rename member "head" to "entry".
8448 * regcache.h (inferior_list_entry): Delete.
8449 * server.c (kill_inferior_callback): Update.
8450 (detach_or_kill_inferior_callback): Update.
8451 (print_started_pid): Update.
8452 (print_attached_pid): Update.
8453 (process_serial_event): Simplify read of ptid.
8454 * thread-db.c (thread_db_create_event): Update.
8455 (thread_db_get_tls_address): Update.
8456 * win32-low.c (current_inferior_ptid): Simplify.
8457
46917d26
TT
84582014-02-19 Tom Tromey <tromey@redhat.com>
8459
8460 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8461 argument.
8462 (target_supports_btrace): Update.
8463
0759a81e
YQ
84642014-02-14 Yao Qi <yao@codesourcery.com>
8465
8466 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8467 (rsp-low-ipa.o): New target.
8468
a7191e8b
TT
84692014-02-12 Tom Tromey <tromey@redhat.com>
8470
8471 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8472 convert_ascii_to_int.
8473 * regcache.c (registers_to_string): Likewise.
8474 * remote-utils.c (decode_M_packet): Likewise.
8475 * server.c (process_serial_event): Likewise.
8476
ff0e980e
TT
84772014-02-12 Tom Tromey <tromey@redhat.com>
8478
8479 * server.c (handle_query, handle_v_run): Use hex2bin, not
8480 unhexify.
8481 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8482
e9371aff
TT
84832014-02-12 Tom Tromey <tromey@redhat.com>
8484
8485 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8486 convert_int_to_ascii.
8487 * regcache.c (registers_to_string, collect_register_as_string):
8488 Likewise.
8489 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8490 Likewise.
8491 * server.c (process_serial_event): Likewise.
8492 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8493 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8494
971dc0b8
TT
84952014-02-12 Tom Tromey <tromey@redhat.com>
8496
8497 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8498 bin2hex, not hexify.
8499 * tracepoint.c (cmd_qtstatus): Likewise.
8500
0a822afb
TT
85012014-02-12 Tom Tromey <tromey@redhat.com>
8502
8503 * remote-utils.c (monitor_output): Pass explicit length to
8504 hexify.
8505
9c3d6531
TT
85062014-02-12 Tom Tromey <tromey@redhat.com>
8507
8508 * tracepoint.c: Include rsp-low.h.
8509 * server.c: Include rsp-low.h.
8510 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8511 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8512 declare.
8513 * remote-utils.c: Include rsp-low.h.
8514 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8515 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8516 (convert_int_to_ascii, convert_ascii_to_int): Move to
8517 common/rsp-low.c.
8518 * regcache.c: Include rsp-low.h.
8519 * ax.c: Include rsp-low.h.
8520 * Makefile.in (SFILES): Add common/rsp-low.c.
8521 (OBS): Add rsp-low.o.
8522 (rsp-low.o): New target.
8523
01fd3ea5
TT
85242014-02-12 Tom Tromey <tromey@redhat.com>
8525
8526 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8527 Include print-utils.h.
8528 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8529 (plongest, thirty_two, phex_nz): Remove.
8530 * Makefile.in (SFILES): Add common/print-utils.c.
8531 (OBS): Add print-utils.o.
8532 (print-utils-ipa.o): New target.
8533 (print-utils.o): New target.
8534 (IPA_OBJS): Add print-utils-ipa.o.
8535
e99dc820
TT
85362014-02-06 Tom Tromey <tromey@redhat.com>
8537
8538 * Makefile.in (SFILES): Fix indentation.
8539
ee1e2d4f
DE
85402014-02-05 Doug Evans <dje@google.com>
8541
8542 * linux-low.c (linux_wait_for_event): Improve comment.
8543 (linux_wait_1): Keep current_inferior in sync with event_child.
8544
f5a02773
DE
85452014-01-22 Doug Evans <dje@google.com>
8546
8547 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8548
87ce2a04
DE
85492014-01-22 Doug Evans <dje@google.com>
8550
8551 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8552 * configure: Regenerate.
8553 * config.in: Regenerate.
8554 * Makefile.in (SFILES): Add debug.c.
8555 (OBS): Add debug.o.
8556 * debug.c: New file.
8557 * debug.h: New file.
8558 * linux-aarch64-low.c (*): Update all debugging printfs to use
8559 debug_printf instead of fprintf.
8560 * linux-arm-low.c (*): Ditto.
8561 * linux-cris-low.c (*): Ditto.
8562 * linux-crisv32-low.c (*): Ditto.
8563 * linux-m32r-low.c (*): Ditto.
8564 * linux-sparc-low.c (*): Ditto.
8565 * linux-x86.c (*): Ditto.
8566 * linux-low.c (*): Ditto.
8567 (linux_wait_1): Add calls to debug_enter, debug_exit.
8568 (linux_wait): Remove redundant debugging printf.
8569 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8570 (linux_resume, unstop_all_lwps): Ditto.
8571 * mem-break.c (*): Update all debugging printfs to use
8572 debug_printf instead of fprintf.
8573 * remote-utils.c (*): Ditto.
8574 * thread-db.c (*): Ditto.
8575 * server.c #include <ctype.h>, "gdb_vecs.h".
8576 (debug_threads): Moved to debug.c.
8577 (*): Update all debugging printfs to use debug_printf instead of
8578 fprintf.
8579 (start_inferior): Replace call to fflush with call to debug_flush.
8580 (monitor_show_help): Mention set debug-format.
8581 (parse_debug_format_options): New function.
8582 (handle_monitor_command): Handle "monitor set debug-format".
8583 (gdbserver_usage): Mention --debug-format.
8584 (main): Parse --debug-format.
8585 * server.h (debug_threads): Declaration moved to debug.h.
8586 #include "debug.h".
8587 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8588 trace_debug_1 that uses debug_printf.
8589 (tracepoint_look_up_symbols): Update all debugging printfs to use
8590 debug_printf instead of fprintf.
8591
e671835b
BS
85922014-01-20 Baruch Siach <baruch@tkos.co.il>
8593
8594 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8595 sys/ptrace.h.
8596
b5737fa9
PA
85972014-01-17 Pedro Alves <palves@redhat.com>
8598
ea38d2a9 8599 PR build/16445
c7faa97a
PA
8600 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8601 defined after including gdb_proc_service.h.
b5737fa9 8602
40ed484e
DE
86032014-01-16 Doug Evans <dje@google.com>
8604
8605 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8606 (match_dll): Use it.
8607
969c39fb
MM
86082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8609
8610 * target.h (target_ops) <read_btrace>: Change parameters and
8611 return type to allow error reporting.
8612 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8613 trace reading errors on.
8614 * linux-low.c (linux_low_read_btrace): Pass trace reading
8615 errors on.
8616 (linux_low_disable_btrace): New.
8617
ab7f45ba
DE
86182014-01-15 Doug Evans <dje@google.com>
8619
8620 * inferiors.c (thread_id_to_gdb_id): Delete.
8621 * inferiors.h (thread_id_to_gdb_id): Delete.
8622
66af0f44
EZ
86232014-01-13 Eli Zaretskii <eliz@gnu.org>
8624
8625 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8626 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8627 versions.
8628
9939e131
PA
86292014-01-08 Pedro Alves <palves@redhat.com>
8630
8631 * server.c (handle_status): Don't discard previous queued stop
8632 replies or thread's pending status here.
8633 (main) <disconnection>: Do it here instead.
8634
b7ea362b
PA
86352014-01-08 Pedro Alves <palves@redhat.com>
8636
8637 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8638 * server.c (visit_actioned_threads, handle_pending_status): New
8639 function.
8640 (handle_v_cont): Factor out parts to ...
8641 (resume): ... this new function. If in all-stop, and a thread
8642 being resumed has a pending status, report it without actually
8643 resuming.
8644 (myresume): Adjust to use the new 'resume' function.
8645 (clear_pending_status_callback, set_pending_status_callback)
8646 (find_status_pending_thread_callback): New functions.
8647 (handle_status): Handle the case of multiple threads having
8648 interesting statuses to report. Report threads' real last signal
8649 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8650 with an interesting thread to report the status for, instead of
8651 always reporting the status of the first thread.
8652
28498c42
JB
86532014-01-01 Joel Brobecker <brobecker@adacore.com>
8654
8655 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8656 * gdbreplay.c (gdbreplay_version): Likewise.
8657
f45c82da
YZ
86582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8659
8660 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8661 iov.iov_len with the real length in use.
8662
379a5e2d
JB
86632013-12-13 Joel Brobecker <brobecker@adacore.com>
8664
8665 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8666 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8667 for all targets that use win32-low.c.
8668 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8669 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8670
4210d83e
PA
86712013-12-13 Pedro Alves <palves@redhat.com>
8672
8673 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8674 if equal to TARGET_WAITKIND_LOADED.
8675 * win32-low.c (cached_status): New static global.
8676 (win32_wait): Add declaration.
8677 (do_initial_child_stuff): Flush all initial pending debug events
8678 up to the initial breakpoint.
8679 (win32_wait): If CACHED_STATUS was set, return that instead
8680 of doing a real wait. Remove the code resuming the execution
8681 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8682 during the initial phase. Also remove the code changing
8683 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8684 TARGET_WAITKIND_STOPPED.
8685
e7f0d979
YQ
86862013-12-11 Yao Qi <yao@codesourcery.com>
8687
8688 * notif.c (handle_notif_ack): Return 0 if no notification
8689 matches.
8690
ebcf782c
DE
86912013-11-20 Doug Evans <dje@google.com>
8692
8693 * linux-low.c (linux_set_resume_request): Fix comment.
8694
20ad9378
DE
86952013-11-20 Doug Evans <dje@google.com>
8696
8697 * linux-low.c (resume_status_pending_p): Tweak comment.
8698
a196ebeb
WT
86992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8700
8701 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8702 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8703 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8704 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8705 (srv_amd64_regobj): Add amd64-mpx.o.
8706 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8707 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8708 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8709 * i387-fp.c (num_pl_bnd_register) Added constant.
8710 (num_pl_bnd_cfg_registers) Added constant.
8711 (struct i387_xsave) Added reserved area and MPX fields.
8712 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8713 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8714 function.
8715 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8716 (init_registers_amd64_mpx_linux): Declare new function.
8717 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8718 (x86_64_regmap): Add MPX registers.
8719 (x86_linux_read_description): Add MPX case.
8720 (initialize_low_arch): Initialize MPX targets.
8721
0080a2f6
TT
87222013-11-18 Tom Tromey <tromey@redhat.com>
8723
8724 * configure: Rebuild.
8725 * configure.ac: Don't check for stdlib.h.
8726 * gdbreplay.c: Unconditionally include stdlib.h.
8727
2978b111
TT
87282013-11-18 Tom Tromey <tromey@redhat.com>
8729
8730 * config.in: Rebuild.
8731 * configure: Rebuild.
8732 * configure.ac: Don't use AC_HEADER_DIRENT.
8733
a3d08894
TT
87342013-11-18 Tom Tromey <tromey@redhat.com>
8735
8736 * server.h: Don't check HAVE_STRING_H.
8737 * gdbreplay.c: Don't check HAVE_STRING_H.
8738 * configure: Rebuild.
8739
0a5dd17d
TT
87402013-11-18 Tom Tromey <tromey@redhat.com>
8741
8742 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8743 LIBGNU.
8744
1bd2f0ba
TT
87452013-11-08 Tom Tromey <tromey@redhat.com>
8746
8747 * configure, config.in: Rebuild.
8748 * configure.ac: Remove unused configury.
8749
3266f10b
TT
87502013-11-08 Tom Tromey <tromey@redhat.com>
8751
8752 * acinclude.m4: Include common.m4, codeset.m4.
8753 * configure, config.in: Rebuild.
8754 * configure.ac: Use GDB_AC_COMMON.
8755
6682d959
AA
87562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8757
8758 * linux-s390-low.c (HWCAP_S390_TE): New define.
8759 (s390_arch_setup): Consider the TE field in the HWCAP for
8760 determining 'have_regset_tdb'.
8761
fd0a4d76
SDJ
87622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8763
8764 PR gdb/16014
8765 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8766 call to sizeof.
8767
1a3d890b
PA
87682013-10-02 Pedro Alves <palves@redhat.com>
8769
8770 * server.c (process_serial_event): Don't output "GDBserver
8771 exiting" if GDB is connected through stdio.
8772 * target.c (mywait): Likewise, be silent if GDB is connected
8773 through stdio.
8774
97ad4581
JB
87752013-10-01 Joel Brobecker <brobecker@adacore.com>
8776
8777 * lynx-low.c (lynx_add_threads_after_attach): New function.
8778 (lynx_attach): Remove call to add_thread. Add call to
8779 lynx_add_threads_after_attach instead.
8780
5b4e221c
MF
87812013-09-28 Mike Frysinger <vapier@gentoo.org>
8782
8783 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8784 * config.in, configure: Regenerated.
8785
ee47b2f8
YQ
87862013-09-18 Yao Qi <yao@codesourcery.com>
8787
8788 PR server/15959
8789 * server.c (start_inferior): Clear 'resume_info'.
8790
d6707650 87912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8792
d6707650
JW
8793 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8794 for each register.
8795
9243dd0e 87962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8797
9243dd0e
JW
8798 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8799 linux-tile-low.o to srv_tgtobj.
8800
c623a6ef
WN
88012013-09-16 Will Newton <will.newton@linaro.org>
8802
8803 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8804 out regs.
8805
fb71d39e
PA
88062013-09-06 Pedro Alves <palves@redhat.com>
8807
8808 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8809 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8810 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8811 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8812 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8813 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8814
8e7e9910
PA
88152013-09-06 Pedro Alves <palves@redhat.com>
8816
8817 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8818 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8819
7c3a12ca
PA
88202013-09-06 Pedro Alves <palves@redhat.com>
8821
8822 * linux-amd64-ipa.c: Include tracepoint.h.
8823 * linux-i386-ipa.c: Include tracepoint.h.
8824
8eb3d7b6
RW
88252013-09-06 Ricard Wanderlof <ricardw@axis.com>
8826
8827 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8828 (ps_get_thread_area): New function.
8829
eddddb9d
RW
88302013-09-06 Ricard Wanderlof <ricardw@axis.com>
8831
8832 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8833 (initialize_low_arch): Call init_registers_crisv32 rather than
8834 init_register_crisv32.
8835
533b0600
PA
88362013-09-05 Pedro Alves <palves@redhat.com>
8837
8838 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8839 to ...
8840 * hostio.h: ... this new file.
8841 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8842 win32-low.c: Include hostio.h.
8843
0ce3d3b5
PA
88442013-09-05 Pedro Alves <palves@redhat.com>
8845
8846 * server.h (gdb_client_data, handler_func, callback_handler_func)
8847 (delete_file_handler, add_file_handler, append_callback_event)
8848 (delete_callback_event, start_event_loop, initialize_event_loop):
8849 Move to event-loop.h and include it.
8850 * event-loop.h: New file.
8851
799cdc37
PA
88522013-09-05 Pedro Alves <palves@redhat.com>
8853
8854 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8855 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8856 (loaded_dll, unloaded_dll): Move to ...
8857 * dll.h: ... this new file.
8858 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8859
6a6bbd9d
PA
88602013-09-05 Pedro Alves <palves@redhat.com>
8861
8862 * server.h (current_process, get_thread_process, all_processes)
8863 (add_inferior_to_list, for_each_inferior, current_inferior)
8864 (remove_inferior, add_process, remove_process, find_process_pid)
8865 (have_started_inferiors_p, have_attached_inferiors_p)
8866 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8867 (clear_inferiors, find_inferior, find_inferior_id)
8868 (inferior_target_data, set_inferior_target_data)
8869 (inferior_regcache_data, set_inferior_regcache_data): Move to
8870 inferiors.h, and include it.
8871 * inferiors.h: New file.
8872
f699aaba
PA
88732013-09-05 Pedro Alves <palves@redhat.com>
8874
8875 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8876 Move ...
72f4393d 8877 * ax.h: ... here.
f699aaba 8878
c144c7a0
PA
88792013-09-05 Pedro Alves <palves@redhat.com>
8880
8881 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8882 tracepoint.h.
8883 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8884 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8885 (handle_tracepoint_general_set, handle_tracepoint_query)
8886 (tracepoint_finished_step, tracepoint_was_hit)
8887 (release_while_stepping_state_list, current_traceframe)
8888 (in_readonly_region, traceframe_read_mem)
8889 (fetch_traceframe_registers, traceframe_read_sdata)
8890 (traceframe_read_info, struct fast_tpoint_collect_status)
8891 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8892 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8893 (supply_fast_tracepoint_registers)
8894 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8895 (ipa_tdesc, claim_trampoline_space)
8896 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8897 (agent_mem_read, agent_get_trace_state_variable_value)
8898 (agent_set_trace_state_variable_value, agent_tsv_read)
8899 (agent_mem_read_string, get_raw_reg_func_addr)
8900 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8901 * tracepoint.h: ... this new file.
8902
ff42e6ab
PA
89032013-09-05 Pedro Alves <palves@redhat.com>
8904
8905 * server.h (perror_with_name, error, fatal, warning, paddress)
8906 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8907 include it.
8908 * utils.h: New file.
8909
541af0f4
PA
89102013-09-05 Pedro Alves <palves@redhat.com>
8911
8912 * server.h (remote_debug, noack_mode, transport_is_reliable)
8913 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8914 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8915 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8916 (write_enn, initialize_async_io, enable_async_io)
8917 (disable_async_io, check_remote_input_interrupt_request)
8918 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8919 (dead_thread_notify, prepare_resume_reply)
8920 (decode_address_to_semicolon, decode_address, decode_m_packet)
8921 (decode_M_packet, decode_X_packet, decode_xfer_write)
8922 (decode_search_memory_packet, unhexify, hexify)
8923 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8924 (look_up_one_symbol, relocate_instruction)
8925 (monitor_output): Move to remote-utils.h, and include it.
8926 * remote-utils.h: New file.
8927
eebdf26b
PA
89282013-09-05 Pedro Alves <palves@redhat.com>
8929
8930 * server.h (_): Delete.
8931
3aafd2ff
PA
89322013-09-02 Pedro Alves <palves@redhat.com>
8933
8934 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8935 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8936 allocated.
8937 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8938
cee83bcb
PM
89392013-09-02 Pierre Muller <muller@sourceware.org>
8940
8941 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8942 or WriteProcessMemory complete successfully and handle
8943 ERROR_PARTIAL_COPY error.
8944
9a13b2fa
PA
89452013-09-02 Pedro Alves <palves@redhat.com>
8946
8947 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8948 error instead of EIO.
8949
602e3198
JK
89502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8951
8952 PR server/15604
8953 * linux-low.c: Include filestuff.h.
8954 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8955 * lynx-low.c: Include filestuff.h.
8956 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8957 * server.c: Include filestuff.h.
8958 (main): Call notice_open_fds.
8959 * spu-low.c: Include filestuff.h.
8960 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8961
96d7229d
LM
89622013-08-22 Luis Machado <lgustavo@codesourcery.com>
8963
8964 * Makefile.in: Explain why ../target and ../nat are not
8965 listed as include file search paths.
8966 (linux-waitpid.o): New object file rule.
8967 * configure.srv (srv_native_linux_obj): New variable.
8968 Replace all occurrences of linux native object files with
8969 $srv_native_linux_obj.
8970 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8971 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8972 (linux_enable_event_reporting): Remove declaration.
8973 (my_waitpid): Moved to common/linux-waitpid.c.
8974 (linux_wait_for_event): Pass ptid when calling
8975 linux_enable_event_reporting.
8976 (linux_supports_tracefork_flag): Remove.
8977 (linux_enable_event_reporting): Likewise.
8978 (linux_tracefork_grandchild): Remove.
8979 (STACK_SIZE): Moved to common/linux-ptrace.c.
8980 (linux_tracefork_child): Remove.
8981 (linux_test_for_tracefork): Remove.
8982 (linux_look_up_symbols): Call linux_supports_traceclone.
8983 (initialize_low): Remove call to linux_test_for_tracefork.
8984 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8985 common/linux-ptrace.h.
8986 (PTRACE_TYPE_ARG4): Likewise.
8987 Include linux-ptrace.h.
8988
32940073
PA
89892013-08-21 Pedro Alves <palves@redhat.com>
8990
8991 * config.in: Renegerate.
8992
33b60d58 89932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 8994
33b60d58
LM
8995 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8996 (SFILES): Remove $(srcdir)/common/target-common.c and
8997 add $(srcdir)/target/waitstatus.c.
8998 (OBS): Remove target-common.o and add waitstatus.o.
8999 (server_h): Remove $(srcdir)/../common/target-common.h and
9000 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9001 and $(srcdir)/../target/waitstatus.h.
9002 (target-common.o): Remove.
9003 (waitstatus.o): New target object file.
9004 * target.h: Do not include target-common.h and
9005 include target/resume.h, target/wait.h and
9006 target/waitstatus.h.
9007
b8e1b30e
LM
90082013-08-13 Luis Machado <lgustavo@codesourcery.com>
9009
9010 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9011 to PTRACE_TYPE_ARG3.
9012 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9013 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9014 PTRACE_TYPE_ARG4.
9015 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9016 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9017
7a60ad40
YQ
90182013-07-27 Jie Zhang <jie@codesourcery.com>
9019 Daniel Jacobowitz <dan@codesourcery.com>
9020 Yao Qi <yao@codesourcery.com>
9021
9022 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9023 (mips-linux-watch.o): New rule.
9024 (mips_linux_watch_h): New variable.
9025 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9026 srv_tgtobj.
9027 * linux-mips-low.c: Include mips-linux-watch.h.
9028 (struct arch_process_info, struct arch_lwp_info): New.
9029 (update_watch_registers_callback): New function.
9030 (mips_linux_new_process, mips_linux_new_thread) New functions.
9031 (mips_linux_prepare_to_resume, mips_insert_point): New
9032 functions.
9033 (mips_remove_point, mips_stopped_by_watchpoint): New
9034 functions.
9035 (rsp_bp_type_to_target_hw_bp_type): New function.
9036 (mips_stopped_data_address): New function.
9037 (the_low_target): Add watchpoint support functions.
9038
de6f69ad
YQ
90392013-07-27 Yao Qi <yao@codesourcery.com>
9040
9041 * i386-low.c: Include break-common.h.
9042 (enum target_hw_bp_type): Remove.
9043
3360c0bf
LM
90442013-07-24 Luis Machado <lgustavo@codesourcery.com>
9045
9046 * Makefile.in (SFILES): /common/target-common.c.
9047 (OBS): Add target-common.o.
9048 (server_h): Add $(srcdir)/../common/target-common.h.
9049 (target-common.o): New target.
9050 * server.c (queue_stop_reply_callback): Free
9051 status string after use.
9052 * target.c (target_waitstatus_to_string): Remove.
9053 * target.h: Include target-common.h.
9054 (resume_kind): Likewise.
9055 (target_waitkind): Likewise.
9056 (target_waitstatus): Likewise.
9057 (TARGET_WNOHANG): Likewise.
9058
bd885420
YQ
90592013-07-04 Yao Qi <yao@codesourcery.com>
9060
9061 * Makefile.in (host_alias): Use @host_noncanonical@.
9062 (target_alias): Use @target_noncanonical@.
9063 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9064 ACX_NONCANONICAL_HOST.
9065 * configure: Regenerated.
9066
9067 Revert:
9068 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9069
9070 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9071 * configure: Rebuild.
9072 * Makefile.in (version_host, version_target): Get from configure.
9073 (version.c): Use $(version_host) and $(version_target).
9074
17ef446e
PA
90752013-07-03 Pedro Alves <palves@redhat.com>
9076
9077 * Makefile.in (config.status): Depend on development.sh.
9078 * acinclude.m4: Include libmcheck.m4.
9079 * configure: Regenerate.
9080
7a9a7487
MG
90812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9082
9083 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9084 attribute inside the parentheses.
9085 (winapi_DebugSetProcessKillOnExit): Ditto.
9086 (winapi_DebugBreakProcess): Ditto.
9087 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9088
49b64de6
MG
90892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9090
9091 * notif.h (notif_event): Add a dummy member to avoid compiler
9092 errors.
9093
d5749ee7
PA
90942013-07-01 Pedro Alves <palves@redhat.com>
9095
9096 * hostio.c (HOSTIO_PATH_MAX): Define.
9097 (require_filename, handle_open, handle_unlink, handle_readlink):
9098 Use it.
9099
d8d2a3ee
PA
91002013-07-01 Pedro Alves <palves@redhat.com>
9101
9102 * server.h: Include "pathmax.h".
9103 * linux-low.c: Don't include sys/param.h.
9104 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9105 MAXPATHLEN.
9106 * win32-low.c: Don't include sys/param.h.
9107 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9108
bc7dea8d
PA
91092013-07-01 Pedro Alves <palves@redhat.com>
9110
9111 * event-loop.c: Don't check HAVE_UNISTD_H before including
9112 <unistd.h>.
9113 * gdbreplay.c: Likewise.
9114 * remote-utils.c: Likewise.
9115 * server.c: Likewise.
9116 * configure.ac: Don't check for unistd.h.
9117 * configure: Regenerate.
9118
d6c2da54
TT
91192013-06-28 Tom Tromey <tromey@redhat.com>
9120
9121 * Makefile.in (version.c): Use version.in, not
9122 common/version.in.
9123
257b6bec
MG
91242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9125
9126 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9127 * configure: Rebuild.
9128 * Makefile.in (version_host, version_target): Get from configure.
9129 (version.c): Use $(version_host) and $(version_target).
9130
86ebe149
DK
91312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9132
9133 Fix trace-status to output user name without trailing colon.
9134 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9135
f30aa5af
DK
91362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9137
9138 Fix trace-status to output proper start-time and stop-time.
9139 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9140 output start time and stop time in hex as gdb expects.
9141
28a93511
YQ
91422013-06-26 Pedro Alves <pedro@codesourcery.com>
9143
9144 * tracepoint.c (build_traceframe_info_xml): Output trace state
9145 variables present in the trace buffer.
9146
01208463
TT
91472013-06-24 Tom Tromey <tromey@redhat.com>
9148
9149 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9150 create-version.sh.
9151 (version.o): Remove.
9152 * gdbreplay.c: Include version.h.
9153 (version, host_name): Don't declare.
9154 * server.h: Include version.h.
9155 (version, host_name): Don't declare.
9156
760256f9
PA
91572013-06-12 Pedro Alves <palves@redhat.com>
9158
9159 * linux-x86-low.c (linux_is_elf64): Delete global.
9160 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9161 with local linux_pid_exe_is_elf_64_file use.
9162
030031ee
PA
91632013-06-11 Pedro Alves <palves@redhat.com>
9164
9165 * linux-low.c (regset_disabled, disable_regset): New functions.
9166 (regsets_fetch_inferior_registers)
9167 (regsets_store_inferior_registers): Use them.
9168 (initialize_regsets_info); Don't allocate the disabled_regsets
9169 array here.
9170 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9171 comment.
9172
5da6eb0a
PA
91732013-06-11 Pedro Alves <palves@redhat.com>
9174
9175 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9176 xmalloc.
9177
7e5aaa09
PA
91782013-06-11 Pedro Alves <palves@redhat.com>
9179
9180 * linux-x86-low.c (initialize_low_arch): Call
9181 init_registers_x32_avx_linux.
9182
d878444c
JK
91832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9184
9185 Fix compatibility with Android Bionic.
9186 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9187 it is not empty.
9188
3aee8918
PA
91892013-06-07 Pedro Alves <palves@redhat.com>
9190
5f2b57b5 9191 PR server/14823
3aee8918
PA
9192 * Makefile.in (OBS): Add tdesc.o.
9193 (IPA_OBJS): Add tdesc-ipa.o.
9194 (tdesc-ipa.o): New rule.
9195 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9196 interface.
9197 * linux-low.c (new_inferior): Delete.
9198 (disabled_regsets, num_regsets): Delete.
9199 (linux_add_process): Adjust to set the new per-process
9200 new_inferior flag.
9201 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9202 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9203 was a stop. When calling arch_setup, switch the current inferior
9204 to the thread that got an event.
9205 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9206 (regsets_fetch_inferior_registers)
9207 (regsets_store_inferior_registers): New regsets_info parameter.
9208 Adjust to use it.
9209 (linux_register_in_regsets): New regs_info parameter. Adjust to
9210 use it.
9211 (register_addr, fetch_register, store_register): New usrregs_info
9212 parameter. Adjust to use it.
9213 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9214 parameter regs_info. Adjust to use it.
9215 (linux_fetch_registers): Get the current inferior's regs_info, and
9216 adjust to use it.
9217 (linux_store_registers): Ditto.
9218 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9219 (initialize_low): Don't initialize the target_regsets here. Call
9220 initialize_low_arch.
9221 * linux-low.h (target_regsets): Delete declaration.
9222 (struct regsets_info): New.
9223 (struct usrregs_info): New.
9224 (struct regs_info): New.
9225 (struct process_info_private) <new_inferior>: New field.
9226 (struct linux_target_ops): Delete the num_regs, regmap, and
9227 regset_bitmap fields. New field regs_info.
9228 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9229 * i387-fp.c (num_xmm_registers): Delete.
9230 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9231 calls to new interface.
9232 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9233 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9234 Infer the number of xmm registers from the regcache's target
9235 description.
9236 * i387-fp.h (num_xmm_registers): Delete.
9237 * inferiors.c (add_thread): Don't install the thread's regcache
9238 here.
9239 * proc-service.c (gregset_info): Fetch the current inferior's
9240 regs_info. Adjust to use it.
9241 * regcache.c: Include tdesc.h.
9242 (register_bytes, reg_defs, num_registers)
9243 (gdbserver_expedite_regs): Delete.
9244 (get_thread_regcache): If the thread doesn't have a regcache yet,
9245 create one, instead of aborting gdbserver.
9246 (regcache_invalidate_one): Rename to ...
9247 (regcache_invalidate_thread): ... this.
9248 (regcache_invalidate_one): New.
9249 (regcache_invalidate): Only invalidate registers of the current
9250 process.
9251 (init_register_cache): Add target_desc parameter, and use it.
9252 (new_register_cache): Ditto. Assert the target description has a
9253 non zero registers_size.
9254 (regcache_cpy): Add assertions. Adjust.
9255 (realloc_register_cache, set_register_cache): Delete.
9256 (registers_to_string, registers_from_string): Adjust.
9257 (find_register_by_name, find_regno, find_register_by_number)
9258 (register_cache_size): Add target_desc parameter, and use it.
9259 (free_register_cache_thread, free_register_cache_thread_one)
9260 (regcache_release, register_cache_size): New.
9261 (register_size): Add target_desc parameter, and use it.
9262 (register_data, supply_register, supply_register_zeroed)
9263 (supply_regblock, supply_register_by_name, collect_register)
9264 (collect_register_as_string, collect_register_by_name): Adjust.
9265 * regcache.h (struct target_desc): Forward declare.
9266 (struct regcache) <tdesc>: New field.
9267 (init_register_cache, new_register_cache): Add target_desc
9268 parameter.
9269 (regcache_invalidate_thread): Declare.
9270 (regcache_invalidate_one): Delete declaration.
9271 (regcache_release): Declare.
9272 (find_register_by_number, register_cache_size, register_size)
9273 (find_regno): Add target_desc parameter.
9274 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9275 declarations.
9276 * remote-utils.c: Include tdesc.h.
9277 (outreg, prepare_resume_reply): Adjust.
9278 * server.c: Include tdesc.h.
9279 (gdbserver_xmltarget): Delete declaration.
9280 (get_features_xml, process_serial_event): Adjust.
9281 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9282 declare.
9283 (struct process_info) <tdesc>: New field.
9284 (ipa_tdesc): Declare.
9285 * tdesc.c: New file.
9286 * tdesc.h: New file.
9287 * tracepoint.c: Include tdesc.h.
9288 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9289 (get_context_regcache): Adjust to pass ipa_tdesc down.
9290 (do_action_at_tracepoint): Adjust to get the register cache size
9291 from the context regcache's description.
9292 (traceframe_walk_blocks): Adjust to get the register cache size
9293 from the current trace frame's description.
9294 (traceframe_get_pc): Adjust to get current trace frame's
9295 description and pass it down.
9296 (gdb_collect): Adjust to get the register cache size from the
9297 IPA's description.
9298 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9299 (gdbserver_xmltarget): Delete.
9300 (initialize_low_tracepoint): Set the ipa's target description.
9301 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9302 (initialize_low_tracepoint): Set the ipa's target description.
9303 * linux-x86-low.c: Include tdesc.h.
9304 [__x86_64__] (is_64bit_tdesc): New.
9305 (ps_get_thread_area, x86_get_thread_area): Use it.
9306 (i386_cannot_store_register): Rename to ...
9307 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9308 (i386_cannot_fetch_register): Rename to ...
9309 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9310 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9311 to new interface.
9312 (target_regsets): Rename to ...
9313 (x86_regsets): ... this.
9314 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9315 interface.
9316 (x86_siginfo_fixup): Use is_64bit_tdesc.
9317 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9318 (tdesc_x32_avx_linux, tdesc_x32_linux)
9319 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9320 Declare.
9321 (x86_linux_update_xmltarget): Delete.
9322 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9323 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9324 (AMD64_LINUX_USER64_CS): New.
9325 (x86_linux_read_description): New, based on
9326 x86_linux_update_xmltarget.
9327 (same_process_callback): New.
9328 (x86_arch_setup_process_callback): New.
9329 (x86_linux_update_xmltarget): New.
9330 (x86_regsets_info): New.
9331 (amd64_linux_regs_info): New.
9332 (i386_linux_usrregs_info): New.
9333 (i386_linux_regs_info): New.
9334 (x86_linux_regs_info): New.
9335 (x86_arch_setup): Reimplement.
9336 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9337 (x86_emit_ops): Ditto.
9338 (the_low_target): Adjust. Install x86_linux_regs_info,
9339 x86_cannot_fetch_register, and x86_cannot_store_register.
9340 (initialize_low_arch): New.
9341 * linux-ia64-low.c (tdesc_ia64): Declare.
9342 (ia64_fetch_register): Adjust.
9343 (ia64_usrregs_info, regs_info): New globals.
9344 (ia64_regs_info): New function.
9345 (the_low_target): Adjust.
9346 (initialize_low_arch): New function.
9347 * linux-sparc-low.c (tdesc_sparc64): Declare.
9348 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9349 Adjust.
9350 (sparc_arch_setup): New function.
9351 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9352 (the_low_target): Adjust.
9353 (initialize_low_arch): New function.
9354 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9355 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9356 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9357 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9358 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9359 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9360 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9361 (tdesc_powerpc_isa205_vsx64l): Declare.
9362 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9363 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9364 (ppc_set_pc, ppc_get_hwcap): Adjust.
9365 (ppc_usrregs_info): Forward declare.
9366 (!__powerpc64__) ppc_regmap_adjusted: New global.
9367 (ppc_arch_setup): Adjust to the current process'es target
9368 description.
9369 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9370 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9371 (ppc_store_evrregset): Adjust.
9372 (target_regsets): Rename to ...
9373 (ppc_regsets): ... this, and make static.
9374 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9375 (ppc_regs_info): New function.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9379 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9380 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9381 (tdesc_s390x_linux64v2): Declare.
9382 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9383 (s390_fill_gregset, s390_store_last_break): Adjust.
9384 (target_regsets): Rename to ...
9385 (s390_regsets): ... this, and make static.
9386 (s390_get_pc, s390_set_pc): Adjust.
9387 (s390_get_hwcap): New target_desc parameter, and use it.
9388 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9389 (s390_arch_setup): Adjust to set the current process'es target
9390 description. Don't adjust the regmap.
9391 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9392 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9393 (regs_info_3264): New globals.
9394 (s390_regs_info): New function.
9395 (the_low_target): Adjust.
9396 (initialize_low_arch): New function.
9397 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9398 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9399 [__mips64] (init_registers_mips_linux)
9400 (init_registers_mips_dsp_linux): Delete defines.
9401 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9402 (have_dsp): New global.
9403 (mips_read_description): New, based on mips_arch_setup.
9404 (mips_arch_setup): Reimplement.
9405 (get_usrregs_info): New function.
9406 (mips_cannot_fetch_register, mips_cannot_store_register)
9407 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9408 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9409 (target_regsets): Rename to ...
9410 (mips_regsets): ... this, and make static.
9411 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9412 (dsp_regs_info, regs_info): New globals.
9413 (mips_regs_info): New function.
9414 (the_low_target): Adjust.
9415 (initialize_low_arch): New function.
9416 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9417 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9418 Declare.
9419 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9420 (arm_read_description): New, with bits factored from
9421 arm_arch_setup.
9422 (arm_arch_setup): Reimplement.
9423 (target_regsets): Rename to ...
9424 (arm_regsets): ... this, and make static.
9425 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9426 (arm_regs_info): New function.
9427 (the_low_target): Adjust.
9428 (initialize_low_arch): New function.
9429 * linux-m68k-low.c (tdesc_m68k): Declare.
9430 (target_regsets): Rename to ...
9431 (m68k_regsets): ... this, and make static.
9432 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9433 (m68k_regs_info): New function.
9434 (m68k_arch_setup): New function.
9435 (the_low_target): Adjust.
9436 (initialize_low_arch): New function.
9437 * linux-sh-low.c (tdesc_sharch): Declare.
9438 (target_regsets): Rename to ...
9439 (sh_regsets): ... this, and make static.
9440 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9441 (sh_regs_info, sh_arch_setup): New functions.
9442 (the_low_target): Adjust.
9443 (initialize_low_arch): New function.
9444 * linux-bfin-low.c (tdesc_bfin): Declare.
9445 (bfin_arch_setup): New function.
9446 (bfin_usrregs_info, regs_info): New globals.
9447 (bfin_regs_info): New function.
9448 (the_low_target): Adjust.
9449 (initialize_low_arch): New function.
9450 * linux-cris-low.c (tdesc_cris): Declare.
9451 (cris_arch_setup): New function.
9452 (cris_usrregs_info, regs_info): New globals.
9453 (cris_regs_info): New function.
9454 (the_low_target): Adjust.
9455 (initialize_low_arch): New function.
9456 * linux-cris-low.c (tdesc_crisv32): Declare.
9457 (cris_arch_setup): New function.
9458 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9459 (cris_regs_info): New function.
9460 (the_low_target): Adjust.
9461 (initialize_low_arch): New function.
9462 * linux-m32r-low.c (tdesc_m32r): Declare.
9463 (m32r_arch_setup): New function.
9464 (m32r_usrregs_info, regs_info): New globals.
9465 (m32r_regs_info): Adjust.
9466 (initialize_low_arch): New function.
9467 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9468 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9469 (tic6x_usrregs_info): Forward declare.
9470 (tic6x_read_description): New function, based on ...
9471 (tic6x_arch_setup): ... this. Reimplement.
9472 (target_regsets): Rename to ...
9473 (tic6x_regsets): ... this, and make static.
9474 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9475 (tic6x_regs_info): New function.
9476 (the_low_target): Adjust.
9477 (initialize_low_arch): New function.
9478 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9479 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9480 (target_regsets): Rename to ...
9481 (xtensa_regsets): ... this, and make static.
9482 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9483 globals.
9484 (xtensa_arch_setup, xtensa_regs_info): New functions.
9485 (the_low_target): Adjust.
9486 (initialize_low_arch): New function.
9487 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9488 (nios2_arch_setup): Set the current process'es tdesc.
9489 (target_regsets): Rename to ...
9490 (nios2_regsets): ... this.
9491 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9492 (nios2_regs_info): New function.
9493 (the_low_target): Adjust.
9494 (initialize_low_arch): New function.
a261b8f5
PA
9495 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9496 (aarch64_arch_setup): Set the current process'es tdesc.
9497 (target_regsets): Rename to ...
9498 (aarch64_regsets): ... this.
9499 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9500 (aarch64_regs_info): New function.
9501 (the_low_target): Adjust.
9502 (initialize_low_arch): New function.
3aee8918
PA
9503 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9504 globals.
9505 (target_regsets): Rename to ...
9506 (tile_regsets): ... this.
9507 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9508 (tile_regs_info): New function.
9509 (tile_arch_setup): Set the current process'es tdesc.
9510 (the_low_target): Adjust.
9511 (initialize_low_arch): New function.
9512 * spu-low.c (tdesc_spu): Declare.
9513 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9514 * win32-arm-low.c (tdesc_arm): Declare.
9515 (arm_arch_setup): New function.
9516 (the_low_target): Install arm_arch_setup instead of
9517 init_registers_arm.
9518 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9519 (init_windows_x86): Rename to ...
9520 (i386_arch_setup): ... this. Set `win32_tdesc'.
9521 (the_low_target): Adjust.
9522 * win32-low.c (win32_tdesc): New global.
9523 (child_add_thread): Don't create the thread cache here.
9524 (do_initial_child_stuff): Set the new process'es tdesc.
9525 * win32-low.h (struct target_desc): Forward declare.
9526 (win32_tdesc): Declare.
9527 * lynx-i386-low.c (tdesc_i386): Declare global.
9528 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9529 * lynx-low.c (lynx_tdesc): New global.
9530 (lynx_add_process): Set the new process'es tdesc.
9531 * lynx-low.h (struct target_desc): Forward declare.
9532 (lynx_tdesc): Declare global.
9533 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9534 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9535 * nto-low.c (nto_tdesc): New global.
9536 (do_attach): Set the new process'es tdesc.
9537 * nto-low.h (struct target_desc): Forward declare.
9538 (nto_tdesc): Declare.
9539 * nto-x86-low.c (tdesc_i386): Declare.
9540 (nto_x86_arch_setup): Set `nto_tdesc'.
9541
b1fbec62
GB
95422013-06-04 Gary Benson <gbenson@redhat.com>
9543
9544 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9545 to qSupported response when appropriate.
9546 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9547 with nonzero-length annex.
9548 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9549 arguments supplied in annex.
9550
d1ec4ce7
DE
95512013-05-31 Doug Evans <dje@google.com>
9552
ac44adcb 9553 PR server/15594
d1ec4ce7
DE
9554 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9555 64 bits in 64-cross-32 environment.
9556
9b25f2d3
PA
95572013-05-28 Pedro Alves <palves@redhat.com>
9558
9559 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9560 (aarch64-without-fpu.c): Delete rule.
9561 * configure.srv (aarch64*-*-linux*): Remove references to
9562 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9563 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9564 declaration.
9565
6740dc9c
PA
95662013-05-24 Pedro Alves <palves@redhat.com>
9567
9568 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9569 instead of strchr/decode_address. Error if the range isn't split
9570 with a ','. Don't assume there's be a ':' in the action.
9571
c2d6af84
PA
95722013-05-23 Yao Qi <yao@codesourcery.com>
9573 Pedro Alves <palves@redhat.com>
9574
9575 * linux-low.c (lwp_in_step_range): New function.
9576 (linux_wait_1): If the thread was range stepping and stopped
9577 outside the stepping range, report the stop to GDB. Otherwise,
9578 continue stepping. Add range stepping debug output.
9579 (linux_set_resume_request): Copy the step range from the resume
9580 request to the lwp.
9581 (linux_supports_range_stepping): New.
9582 (linux_target_ops) <supports_range_stepping>: Set to
9583 linux_supports_range_stepping.
9584 * linux-low.h (struct linux_target_ops)
9585 <supports_range_stepping>: New field.
9586 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9587 * linux-x86-low.c (x86_supports_range_stepping): New.
9588 (the_low_target) <supports_range_stepping>: Set to
9589 x86_supports_range_stepping.
9590 * server.c (handle_v_cont): Handle 'r' action.
9591 (handle_v_requests): Append ";r" if the target supports range
9592 stepping.
9593 * target.h (struct thread_resume) <step_range_start,
9594 step_range_end>: New fields.
9595 (struct target_ops) <supports_range_stepping>:
9596 New field.
9597 (target_supports_range_stepping): New macro.
9598
58794e1a
JB
95992013-05-17 Joel Brobecker <brobecker@adacore.com>
9600
9601 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9602 confusion in comment.
9603
d631c5a7
JB
96042013-05-17 Joel Brobecker <brobecker@adacore.com>
9605
9606 * lynx-low.c (struct process_info_private): New type.
9607 (lynx_add_process): New function.
9608 (lynx_create_inferior, lynx_attach): Replace calls to
9609 add_process by calls to lynx_add_process.
9610 (lynx_resume): If PTID is null, then try using
9611 current_process()->private->last_wait_event_ptid.
9612 Add comments.
9613 (lynx_clear_inferiors): Delete. The contents of that function
9614 has been inlined in lynx_mourn;
9615 (lynx_wait_1): Save the ptid in the process's private data.
9616 (lynx_mourn): Free the process' private data. Replace call
9617 to lynx_clear_inferiors by call to clear_inferiors.
9618
96f7a20f
YQ
96192013-05-17 Yao Qi <yao@codesourcery.com>
9620
9621 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9622 the right place.
9623
db0dfaa0
LM
96242013-05-16 Luis Machado <lgustavo@codesourcery.com>
9625
9626 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9627 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9628 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9629 PT_TEXT_END_ADDR guards. Update comments.
9630 (linux_target_op) <read_offsets>: Conditionally define to
9631 linux_read_offsets if the target is UCLIBC and if it defines
9632 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9633
68f5f838
SL
96342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9635 Andrew Jenner <andrew@codesourcery.com>
9636
9637 * Makefile.in (SFILES): Add linux-nios2-low.c.
9638 (clean): Add action to delete nios2-linux.c.
9639 (nios2-linux.c): New rule.
9640 * configure.srv: Add nios2*-*-linux*.
9641 * linux-nios2-low.c: New.
9642
1ebff1fd
HAQ
96432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9644
9645 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9646
f6150862
HZ
96472013-04-25 Hui Zhu <hui@codesourcery.com>
9648
9649 PR gdb/15186
f6150862
HZ
9650 * ax.c (ax_printf): Add fflush.
9651
614c279d
TT
96522013-04-22 Tom Tromey <tromey@redhat.com>
9653
9654 * Makefile.in (SFILES): Add filestuff.c.
9655 (OBS): Add filestuff.o.
9656 (filestuff.o): New target.
9657 * config.in, configure: Rebuild.
9658 * configure.ac: Check for fdwalk, pipe2.
9659
7d4e5717
PA
96602013-04-17 Pedro Alves <palves@redhat.com>
9661
9662 * configure.ac (USE_THREAD_DB): Delete variable.
9663 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9664 Don't AC_SUBST USE_THREAD_DB.
9665 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9666 * config.in, configure: Regenerate.
9667
d5c93e41
PA
96682013-04-16 Pedro Alves <palves@redhat.com>
9669
9670 * linux-low.h (struct lwp_info) <thread_known>: Move under
9671 the USE_THREAD_DB #ifdef.
9672
04f5fe89
PA
96732013-04-16 Pedro Alves <palves@redhat.com>
9674
9675 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9676 (linux-low.o): Delete rule.
9677 * linux-low.h: Always include "gdb_thread_db.h" instead of
9678 conditionally including thread_db.h.
9679 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9680 HAVE_THREAD_DB_H.
9681
480b27bf
JK
96822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9683
9684 * Makefile.in (install-only): Fix make install regression.
9685
43662968
JK
96862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9687
9688 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9689 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9690 installation.
9691 * gdbserver.1: Remove.
9692
3e74e146
PA
96932013-03-22 Pedro Alves <palves@redhat.com>
9694
9695 * linux-low.c (handle_extended_wait): Don't call
9696 linux_enable_event_reporting.
9697
a8347a2a
TT
96982013-03-15 Tony Theodore <tonyt@logyst.com>
9699
9700 PR build/9098:
9701 * Makefile.in (SHELL): Use @SHELL@.
9702
eeb56fa7
SDJ
97032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9704
9705 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9706 compiler warning.
9707
4fa7e2ff
JB
97082013-03-13 Joel Brobecker <brobecker@adacore.com>
9709
9710 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9711 Remove extraneous NULL element.
9712
8ddb1965
YQ
97132013-03-13 Yao Qi <yao@codesourcery.com>
9714
9715 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9716 'V' block in trace frame.
9717
9accd112
MM
97182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9719
9720 * target.h (struct target_ops): Add btrace ops.
9721 (target_supports_btrace): New macro.
9722 (target_enable_btrace): New macro.
9723 (target_disable_btrace): New macro.
9724 (target_read_btrace): New macro.
9725 * gdbthread.h (struct thread_info): Add btrace field.
9726 * server.c: Include btrace-common.h.
9727 (handle_btrace_general_set): New function.
9728 (handle_btrace_enable): New function.
9729 (handle_btrace_disable): New function.
9730 (handle_general_set): Call handle_btrace_general_set.
9731 (handle_qxfer_btrace): New function.
9732 (struct qxfer qxfer_packets[]): Add btrace entry.
9733 * inferiors.c (remove_thread): Disable btrace.
9734 * linux-low: Include linux-btrace.h.
9735 (linux_low_enable_btrace): New function.
9736 (linux_low_read_btrace): New function.
9737 (linux_target_ops): Add btrace ops.
9738 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9739 Add srv_linux_btrace=yes.
9740 (x86_64-*-linux*): Add linux-btrace.o.
9741 Add srv_linux_btrace=yes.
9742 * configure.ac: Define HAVE_LINUX_BTRACE.
9743 * config.in: Regenerated.
9744 * configure: Regenerated.
9745
5cc22e4c
MM
97462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9747
9748 * server.c (handle_qxfer): Preserve error message if -3 is
9749 returned.
9750 (qxfer): Document the -3 return value.
9751
7c97f91e
MM
97522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9753
9754 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9755 (linux_btrace_h): New variable.
9756 (linux-btrace.o): New rule.
9757
be9a119c 97582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9759 Hafiz Abid Qadeer <abidh@codesourcery.com>
9760
9761 * tracepoint.c (trace_buffer_size): New global.
9762 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9763 (init_trace_buffer): Change to one-argument function. Allocate
9764 trace buffer memory.
9765 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9766 handle QTBuffer:size packet.
9767 (cmd_bigqtbuffer_size): New function.
9768 (initialize_tracepoint): Call init_trace_buffer with
9769 DEFAULT_TRACE_BUFFER_SIZE.
9770 * server.c (handle_query): Add QTBuffer:size in the
9771 supported packets.
9772
e64f7499
YQ
97732013-03-07 Yao Qi <yao@codesourcery.com>
9774
9775 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9776 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9777 of -1.
9778 (cmd_qtsp): Adjust condition. Do post increment.
9779 Set cur_action and cur_step_action back to 0.
9780
f0ae6fc3
PA
97812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9782
9783 PR server/15236
9784 * linux-low.c (linux_write_memory): Return early success if LEN is
9785 zero.
9786
b5b0b0af
CV
97872013-03-05 Corinna Vinschen <vinschen@redhat.de>
9788
334ad4a8 9789 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9790
589bc927
TT
97912013-02-28 Tom Tromey <tromey@redhat.com>
9792
9793 * configure.ac: Invoke AC_SYS_LARGEFILE.
9794 * configure, config.in: Rebuild.
9795
dfe07582
CV
97962013-02-28 Corinna Vinschen <vinschen@redhat.com>
9797
9798 * win32-low.c: Throughout, fix format strings and casts of
9799 printf-like functions to avoid type related warnings on all
9800 platforms.
9801 (get_child_debug_event): Print dwDebugEventCode as hex since
9802 that's how it's usually documented.
9803
736cd585
YQ
98042013-02-28 Yao Qi <yao@codesourcery.com>
9805
9806 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9807 pulongest.
9808
e1f58301
JW
98092013-02-27 Jiong Wang <jiwang@tilera.com>
9810
9811 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9812 (reg-tilegx32.c): New rule.
9813 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9814 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9815 different register info initializer according to elf class.
9816 (init_registers_tilgx32): New function. The tilegx32 register info
9817 initializer.
9818 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9819 (tile_store_gregset): Likewise.
9820
d171ca78
YQ
98212013-02-27 Yao Qi <yao@codesourcery.com>
9822
9823 * server.c (process_point_options): Print debug message when
9824 debug_threads is true.
9825
282bbdf3
YQ
98262013-02-26 Yao Qi <yao@codesourcery.com>
9827
9828 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9829
aca22551
PA
98302013-02-19 Pedro Alves <palves@redhat.com>
9831 Kai Tietz <ktietz@redhat.com>
9832
9833 PR gdb/15161
9834
9835 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9836 instead of strtoul to extract address from packet.
9837 (process_serial_event) <'z'>: Likewise.
9838
4f3cee1c
YQ
98392013-02-18 Yao Qi <yao@codesourcery.com>
9840
9841 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9842
8e1d55a3
PA
98432013-02-14 Pedro Alves <palves@redhat.com>
9844
9845 Plug memory leak.
9846
9847 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9848 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9849
458820da
PA
98502013-02-14 Pedro Alves <palves@redhat.com>
9851
9852 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9853
baea0dae
PA
98542013-02-14 Pedro Alves <palves@redhat.com>
9855
9856 * tracepoint.c (save_string): Delete.
9857 (add_tracepoint_action): Use savestring instead of save_string.
9858
0b1afbb3
PA
98592013-02-12 Pedro Alves <palves@redhat.com>
9860
9861 * linux-xtensa-low.c: Ditto.
9862 * xtensa-xtregs.c: Ditto.
9863
8a4ac37e
PA
98642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9865
9866 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9867 thread_db.
9868
148de6bb
MS
98692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9870
9871 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9872 aarch64_num_wp_regs and aarch64_num_bp_regs to
9873 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9874
55fac6e0
MS
98752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9876
9877 * linux-aarch64-low.c (ps_get_thread_area): Replace
9878 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9879
176eb98c
MS
98802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9881 Marcus Shawcroft <marcus.shawcroft@arm.com>
9882 Nigel Stephens <nigel.stephens@arm.com>
9883 Yufeng Zhang <yufeng.zhang@arm.com>
9884
9885 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9886 (aarch64.c, aarch64-without-fpu.c): New targets.
9887 * configure.srv (aarch64*-*-linux*): New.
9888 * linux-aarch64-low.c: New file.
9889
56f7af9c
MS
98902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9891
43aaf8b6 9892 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9893 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9894 (dequeue_one_deferred_signal, linux_resume_one_thread)
9895 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9896 (linux_tracefork_grandchild, linux_test_for_tracefork)
9897 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9898 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9899 where the argument is 0.
9900
60f662b0
YQ
99012013-01-25 Yao Qi <yao@codesourcery.com>
9902
9903 * event-loop.c: Include "queue.h".
9904 (gdb_event_p): New typedef.
9905 (struct gdb_event) <next_event>: Remove.
9906 (event_queue): Change to QUEUE(gdb_event_p).
9907 (async_queue_event): Remove.
9908 (gdb_event_xfree): New.
9909 (initialize_event_loop): New.
9910 (process_event): Use API from QUEUE.
9911 (wait_for_event): Likewise.
9912 * server.c (main): Call initialize_event_loop.
9913 * server.h (initialize_event_loop): Declare.
9914
5ae4861a
YQ
99152013-01-18 Yao Qi <yao@codesourcery.com>
9916
9917 * ax.h (struct eval_agent_expr_context): New.
9918 (gdb_eval_agent_expr): Update declaration.
9919 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9920 TFRAME. Add new argument CTX.
9921 * server.h (struct eval_agent_expr_context): Declare.
9922 (agent_mem_read, agent_tsv_read): Update declaration.
9923 (agent_mem_read_string): Likewise.
9924 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9925 (add_traceframe_block): Add new argument TPOINT.
9926 Increase TPOINT->traceframe_usage.
9927 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9928 eval_tracepoint_agent_expr.
9929 (condition_true_at_tracepoint): Likewise.
9930 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9931 (agent_mem_read_string, agent_tsv_read): Likewise.
9932
85e00e85
YQ
99332013-01-16 Yao Qi <yao@codesourcery.com>
9934
9935 * linux-low.c (linux_resume_one_lwp): Don't check
9936 'lwp->bp_reinsert != 0'.
9937
4039cf45
JB
99382013-01-07 Joel Brobecker <brobecker@adacore.com>
9939 Pedro Alves <palves@redhat.com>
9940
9941 * lynx-low.c (ptrace_request_to_str): Define a temporary
9942 macro and use it to simplify this function's implementation.
9943
9044dee2
JB
99442013-01-07 Joel Brobecker <brobecker@adacore.com>
9945
9946 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9947 sets errno.
9948
e6352c8f
JB
99492013-01-07 Joel Brobecker <brobecker@adacore.com>
9950
9951 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9952
50681a27
JB
99532013-01-07 Joel Brobecker <brobecker@adacore.com>
9954
9955 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9956
3f6e77ef
JB
99572013-01-07 Joel Brobecker <brobecker@adacore.com>
9958
9959 * lynx-low.c (lynx_resume): Use the resume_info parameter
9960 to determine the ptid for the lynx_ptrace call, unless
9961 it is equal to minus_one_ptid, in which case we use the
9962 ptid of the current_inferior.
9963 (lynx_wait_1): After having received a thread create/exit
9964 event, resume the inferior's execution using the signaling
9965 thread's ptid, rather than the old ptid.
9966
7fda33ae
JB
99672013-01-07 Joel Brobecker <brobecker@adacore.com>
9968
9969 * lynx-low.c (lynx_resume): Delete variable ret.
9970
b9786c74
JB
99712013-01-01 Joel Brobecker <brobecker@adacore.com>
9972
9973 * gdbreplay.c (gdbreplay_version): Update copyright year.
9974 * server.c (gdbserver_version): Likewise.
9975
8b93d60f
JB
99762012-12-17 Joel Brobecker <brobecker@adacore.com>
9977
9978 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9979 new thread.
9980
037335a7
JB
99812012-12-17 Joel Brobecker <brobecker@adacore.com>
9982
9983 * lynx-low.c (ptrace_request_to_str): Add handling for
9984 PTRACE_GETTRACESIG.
9985
52d4cbd8
JB
99862012-12-17 Joel Brobecker <brobecker@adacore.com>
9987
9988 * lynx-low.c (lynx_attach): Delete variable new_process.
9989
ab8f6ca9
JB
99902012-12-17 Joel Brobecker <brobecker@adacore.com>
9991
9992 * lynx-low.c (lynx_create_inferior): Delete variable
9993 new_process.
9994
78cbc024
JB
99952012-12-17 Joel Brobecker <brobecker@adacore.com>
9996
9997 * lynx-low.c (ptrace_request_to_str): Do not handle
9998 PTRACE_GETTHREADLIST if this macro does not exist.
9999
14a00470
YQ
100002012-12-15 Yao Qi <yao@codesourcery.com>
10001
10002 * Makefile.in (OBS): Add notif.o.
10003 * notif.c, notif.h: New.
10004 * server.c: Include "notif.h".
10005 (struct vstop_notif) <next>: Remove.
10006 <base>: New field.
10007 (queue_stop_reply): Update.
10008 (push_event, send_next_stop_reply): Remove.
10009 (discard_queued_stop_replies): Update.
10010 (notif_stop): New variable.
10011 (handle_v_stopped): Remove.
10012 (handle_v_requests): Don't call handle_v_stopped. Call
10013 handle_ack_notif instead.
10014 (queue_stop_reply_callback): Call notif_event_enque instead
10015 of queue_stop_reply.
10016 (handle_status): Don't call send_next_stop_reply, call
10017 notif_write_event instead.
10018 (kill_inferior_callback): Likewise.
10019 (detach_or_kill_inferior_callback): Likewise.
10020 (main): Call initialize_notif.
10021 (process_serial_event): Call QUEUE_is_empty.
10022 (handle_target_event): Call notif_push instead of push event.
10023 * server.h (push_event): Remove declaration.
10024
61c125b9
TT
100252012-12-10 Tom Tromey <tromey@redhat.com>
10026
10027 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10028 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10029 macros.
10030 (.c.o): Rewrite.
10031 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10032 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10033 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10034 (amd64-linux-ipa.o, ax.o): Rewrite.
10035 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10036 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10037 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10038 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10039 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10040 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10041 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10042 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10043 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10044 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10045 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10046 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10047 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10048 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10049 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10050 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10051 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10052 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10053 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10054 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10055 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10056 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10057 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10058 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10059 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10060 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10061 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10062 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10063 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10064 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10065 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10066 (reg-tilegx.o): Remove.
10067 (all_object_files): New macro.
10068 Include .deps files.
10069 * aclocal.m4, configure: Rebuild.
10070 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10071 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10072 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10073
e90e9ad9
TT
100742012-12-05 Tom Tromey <tromey@redhat.com>
10075
10076 PR gdb/14917:
10077 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10078
02d403bf 100792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10080
10081 * configure.ac: Check for linux/perf_event.h.
10082 * config.in: Regenerated.
10083 * configure: Regenerated.
10084
0270a750
PA
100852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10086
10087 * hostio.c (handle_readlink): Decrease buffer size
10088 parameter passed to readlink by one byte.
10089
8c29b58e
YQ
100902012-11-26 Yao Qi <yao@codesourcery.com>
10091
10092 * configure.ac (build_warnings): Append '-Wempty-body'.
10093 * configure: Regenerated.
10094 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10095 body.
10096
8bdce1ff
PM
100972012-11-15 Pierre Muller <muller@sourceware.org>
10098
10099 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10100 * config.in: Regenerate.
10101 * configure: Regenerate.
10102 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10103 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10104 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10105 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10106 header.
10107 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10108 instead of <sys/wait.h> header.
10109 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10110
02d403bf 101112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10112
10113 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10114 (various make rules): Remove -DGDBSERVER
10115
fbd5db48
YQ
101162012-11-09 Yao Qi <yao@codesourcery.com>
10117
10118 * spu-low.c (current_ptid): Move it to ..
10119 * gdbthread.h: ... here. New.
10120 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10121 * server.c (myresume, process_serial_event): Likewise.
10122 * thread-db.c (thread_db_find_new_threads): Likewise.
10123 * tracepoint.c (run_inferior_command): Likewise.
10124
b3dc46ff
AB
101252012-10-01 Andrew Burgess <aburgess@broadcom.com>
10126
10127 * server.c (handle_search_memory_1): Include access length in
10128 warning message.
10129
07c04788
HPN
101302012-09-05 Michael Brandt <michael.brandt@axis.com>
10131
10132 * linux-crisv32-low.c: Fix compile errors.
10133
918d227b
YQ
101342012-09-04 Yao Qi <yao@codesourcery.com>
10135
10136 * tracepoint.c (cmd_qtsv): Adjust debug message.
10137 Don't check CUR_TPOINT.
10138
18c1b81a
YQ
101392012-08-28 Yao Qi <yao@codesourcery.com>
10140
10141 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10142 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10143 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10144 Remove declarations of xmalloc, xreallloc, xstrdup and
10145 freeargv.
10146 * Makefile.in (libiberty_h): New.
10147 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10148 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10149
dc82f37b
YQ
101502012-08-23 Yao Qi <yao@codesourcery.com>
10151
10152 * server.h: Remove declaration of 'xsnprintf'.
10153
406b1477
KS
101542012-08-22 Keith Seitz <keiths@redhat.com>
10155
10156 * server.h: Include build-gnulib-gbserver/config.h.
10157 * gdbreplay.c: Likewise.
10158
e6712ff1
DE
101592012-08-08 Doug Evans <dje@google.com>
10160
10161 * Makefile.in (SFILES): Add gdb_vecs.c.
10162 (OBS): Add gdb_vecs.o.
10163 (gdb_vecs_h, host_defs_h): New variables.
10164 (thread-db.o): Add $(gdb_vecs_h) dependency.
10165 (gdb_vecs.o): New rule.
10166 * thread-db.c: #include "gdb_vecs.h".
10167 (thread_db_load_search): Use a vector to iterate over path elements.
10168 Handle text appearing after "$pdir".
10169
10170 * configure.ac: Add check for strstr.
10171 * config.in: Regenerate.
10172 * configure: Regenerate.
10173
7c3270ae
UW
101742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10175
10176 * hostio.c (handle_pread): If pread fails, fall back to attempting
10177 lseek/read.
10178 (handle_pwrite): Likewise for pwrite.
10179
b62e2b27
UW
101802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10181
10182 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10183 between unsupported TYPE and unimplementable ADDR/LEN combination.
10184 (arm_insert_point): Act on new return value.
10185
78a99e91
PA
101862012-07-31 Pedro Alves <palves@redhat.com>
10187
10188 * server.c (process_point_options): Only skip tokens if we find
10189 one that is unrecognized. Don't treat 'X' specially while
10190 skipping unrecognized tokens.
10191
fcf303ab
UW
101922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10193
10194 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10195 to 4-byte-align HW breakpoint addresses for Thumb.
10196
7255706c
YQ
101972012-07-27 Yao Qi <yao@codesourcery.com>
10198
10199 PR remote/14161.
10200
10201 * server.h: Declare gdb_agent_about_to_close.
10202 * target.c (kill_inferior): Include "agent.h".
10203 New. Send command 'kill'.
10204 * target.h (kill_inferior): Removed macro.
10205 * tracepoint.c (gdb_agent_about_to_close): New.
10206 (gdb_agent_helper_thread): Handle command 'close'.
10207 Wait endlessly until the inferior stops.
10208 Install gdb_agent_remove_socket to atexit hook.
10209 (agent_socket_name): New static variable.
10210 (gdb_agent_socket_init): Replace local variable 'name' with
10211 'agent_socket_name'.
10212 (gdb_agent_remove_socket): New.
10213
5a3f286f
YQ
102142012-07-27 Yao Qi <yao@codesourcery.com>
10215
10216 * server.c (process_point_options): Stop at 'X' when parsing.
10217
961bd387
ME
102182012-07-19 Michael Eager <eager@eagercon.com>
10219
a261b8f5 10220 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10221 to hw_execute.
10222 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10223 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10224 hardware breakpoint.
10225
aa7c7447
JK
102262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10227
10228 * gdbserver/linux-low.c (initialize_low): Call
10229 linux_ptrace_init_warnings.
10230
7f216e7c
DE
102312012-07-02 Doug Evans <dje@google.com>
10232
10233 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10234 pointer to int.
10235
d3ce09f5
SS
102362012-07-02 Stan Shebs <stan@codesourcery.com>
10237
10238 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10239 (ax.o): Add it to build rule.
10240 (ax-ipa.o): Ditto.
10241 (OBS): Add format.o.
10242 (IPA_OBS): Add format.o.
10243 * server.c (handle_query): Claim support for breakpoint commands.
10244 (process_point_options): Add command case.
10245 (process_serial_event): Leave running if there are printfs in
10246 effect.
10247 * mem-break.h (any_persistent_commands): Declare.
10248 (add_breakpoint_commands): Declare.
10249 (gdb_no_commands_at_breakpoint): Declare.
10250 (run_breakpoint_commands): Declare.
10251 * mem-break.c (struct point_command_list): New struct.
10252 (struct breakpoint): New field command_list.
10253 (any_persistent_commands): New function.
10254 (add_commands_to_breakpoint): New function.
10255 (add_breakpoint_commands): New function.
10256 (gdb_no_commands_at_breakpoint): New function.
10257 (run_breakpoint_commands): New function.
10258 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10259 locally.
10260 * ax.c: Include format.h.
10261 (ax_printf): New function.
10262 (gdb_eval_agent_expr): Add printf opcode.
10263
2f8f6aed
YQ
102642012-06-13 Yao Qi <yao@codesourcery.com>
10265
10266 * server.c (start_inferior): Remove duplicated writes to fields
10267 'last_resume_kind' and 'last_status' of 'current_inferior'.
10268
0c9070b3
YQ
102692012-06-12 Yao Qi <yao@codesourcery.com>
10270 Pedro Alves <palves@redhat.com>
10271
10272 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10273 comment.
10274 * server.c (handle_v_cont): Extend comment.
10275
c52daf70
YQ
102762012-06-11 Yao Qi <yao@codesourcery.com>
10277
10278 * linux-low.c (linux_attach): Add 'static'.
10279
d38bbb0a
YQ
102802012-06-06 Yao Qi <yao@codesourcery.com>
10281
10282 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10283
89dc0afd
JK
102842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10285
10286 Fix gcc -flto compilation warning.
10287 * server.c (main): Make variable multi_mode and attach volatile.
10288
75f62ce7
TJB
102892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10290
10291 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10292 if the platform doesn't know about it.
10293
65f479b6
PA
102942012-05-30 Jeff Kenton <jkenton@tilera.com>
10295
10296 * Makefile.in (SFILES): Add linux-tile-low.c.
10297 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10298 * configure.srv: Handle tilegx-*-linux*.
10299 * linux-tile-low.c: New file.
10300
0c5bf5a9
JK
103012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10302
10303 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10304
a493e3e2
PA
103052012-05-24 Pedro Alves <palves@redhat.com>
10306
10307 PR gdb/7205
10308
43aaf8b6 10309 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10310
2ea28649
PA
103112012-05-24 Pedro Alves <palves@redhat.com>
10312
10313 PR gdb/7205
10314
10315 Replace target_signal with gdb_signal throughout.
10316
8d409d16
MR
103172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10318
10319 * linux-low.c (linux_store_registers): Avoid the copying sequence
10320 when no data has been retrieved by ptrace.
10321
23512c01
MGD
103222012-05-22 Will Deacon <will.deacon@arm.com>
10323
10324 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10325 Include asm/ptrace.h.
10326 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10327 already defined.
10328
4934b29e
MR
103292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10330
10331 * linux-low.c (linux_store_registers): Don't re-retrieve data
10332 with ptrace that has already been obtained from /proc. Always
10333 copy any data retrieved with ptrace to the buffer supplied.
10334
bde24c0a
PA
103352012-05-11 Yao Qi <yao@codesourcery.com>
10336 Pedro Alves <palves@redhat.com>
10337
10338 * linux-low.c (enum stopping_threads_kind): New.
10339 (stopping_threads): Change type to `enum stopping_threads_kind'.
10340 (handle_extended_wait): If stopping and suspending threads, leave
10341 the new_lwp suspended too.
10342 (linux_wait_for_event): Adjust.
10343 (stop_all_lwps): Set `stopping_threads' to
10344 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10345 whether we're suspending threads or just stopping them. Assert no
10346 recursion happens.
10347
623b6bdf
YQ
103482012-04-29 Yao Qi <yao@codesourcery.com>
10349
10350 * server.h: Move some code to ...
10351 * gdbthread.h: ... here. New.
10352 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10353 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10354 (nto-low.o, win32-low.o): Likewise.
10355 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10356 * regcache.c, remote-utils.c, server.c: Likewise.
10357 * target.c, tracepoint.c, win32-low.c: Likewise.
10358
f15f9948
TJB
103592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10360
10361 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10362 (PTRACE_ARG4_TYPE): Likewise.
10363 (PTRACE_XFER_TYPE): Likewise.
10364 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10365 ptrace to PTRACE_ARG3_TYPE.
10366 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10367 (PTRACE_ARG4_TYPE): Likewise.
10368 (PTRACE_XFER_TYPE): Likewise.
10369 (linux_detach_one_lwp): Cast fourth argument of
10370 ptrace to long then PTRACE_ARG4_TYPE.
10371 (regsets_fetch_inferior_registers): Cast third argument of
10372 ptrace to long then PTRACE_ARG3_TYPE.
10373 (regsets_store_inferior_registers): Likewise.
10374
38ea300a
PA
103752012-04-20 Pedro Alves <palves@redhat.com>
10376
10377 * configure: Regenerate.
10378
c971b7fa
PA
103792012-04-19 Pedro Alves <palves@redhat.com>
10380
43aaf8b6 10381 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10382 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10383 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10384 (all, install-only, uninstall, clean-info, all-lib, clean): No
10385 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10386 (maintainer-clean realclean distclean): Use subdir_do.
10387 (subdir_do): New.
10388 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10389 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10390 * acinclude.m4: Include acx_configure_dir.m4.
10391 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10392 calls. Call AC_PROG_RANLIB. Configure gnulib using
10393 ACX_CONFIGURE_DIR.
10394 (GNULIB): New.
10395 (GNULIB_STDINT_H): Adjust.
10396 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10397 * gdbreplay.c: Include build-gnulib/config.h.
10398 * server.h: Likewise.
10399 * aclocal.m4: Regenerate.
10400 * config.in: Regenerate.
10401 * configure: Regenerate.
c971b7fa 10402
809277f8
PA
104032012-04-19 Pedro Alves <palves@redhat.com>
10404
10405 * Makefile.in (LIBGNU, INCGNU): Adjust.
10406 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10407 (all, install-only, uninstall, clean-info, all-lib, clean)
10408 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10409 * configure.ac: Adjust AC_OUTPUT output.
10410 * aclocal.m4: Regenerate.
10411 * configure: Regenerate.
10412
fd9bb8b8
PA
104132012-04-19 Pedro Alves <palves@redhat.com>
10414
10415 * Makefile.in (generated_files): New.
10416 (server_h): Remove the explicit dependency on config.h, and depend
10417 on $generated_files.
10418
1c298c66
PA
104192012-04-19 Pedro Alves <palves@redhat.com>
10420
10421 * Makefile.in (INCGNU): Add -Ignulib.
10422
57c4b50b
PA
104232012-04-19 Pedro Alves <palves@redhat.com>
10424
10425 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10426 (INCGNU): ... this, and spell out -I here.
10427 (GNULIB_LIB): Rename to ...
10428 (LIBGNU): ... this.
10429 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10430
1030e047
PA
104312012-04-19 Pedro Alves <palves@redhat.com>
10432
10433 * config.in: Regenerate.
10434
447d4319
PA
104352012-04-19 Pedro Alves <palves@redhat.com>
10436
10437 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10438 * server.h (memmem): Remove declaration.
10439 * config.in: Regenerate.
10440 * configure: Regenerate.
10441
aad9eab9
YQ
104422012-04-19 Yao Qi <yao@codesourcery.com>
10443
10444 * Makefile.in (SFILES): Add common/vec.c.
10445 (OBS): Add vec.o.
10446 (vec.o): New rule.
10447
3e10640f
YQ
104482012-04-19 Yao Qi <yao@codesourcery.com>
10449
10450 * remote-utils.c (prepare_resume_reply): Replace with macro
10451 target_core_of_thread.
10452 * server.c (handle_qxfer_threads_proper): Likewise.
10453 * target.h (traget_core_of_thread): New macro.
10454
71622373
PA
104552012-04-18 Pedro Alves <palves@redhat.com>
10456
10457 * aclocal.m4: Regenerate.
10458 * configure: Regenerate.
10459
80d26939
YQ
104602012-04-16 Yao Qi <yao@codesourcery.com>
10461
10462 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10463 duplicated on address.
10464
42476b70
YQ
104652012-04-16 Yao Qi <yao@codesourcery.com>
10466
10467 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10468 (struct tracepoint_action_ops) <send>: New field.
10469 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10470 (agent_expr_send, x_tracepoint_action_send): New.
10471 (l_tracepoint_action_send): New.
10472 (cmd_qtdp): Download and install tracepoint
10473 according to `use_agent'.
10474 (run_inferior_command): Add one more parameter `len'.
10475 Update callers.
10476 (tracepoint_send_agent): New.
10477 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10478
7bc83639
YQ
104792012-04-16 Yao Qi <yao@codesourcery.com>
10480
10481 * tracepoint.c (download_tracepoints): Moved to ...
10482 (cmd_qtstart): ... here.
10483
5f18041e
YQ
104842012-04-14 Yao Qi <yao@codesourcery.com>
10485
10486 * tracepoint.c: Include inttypes.h.
10487 (struct collect_memory_action): Use sized types.
10488 (struct tracepoint): Likewise.
10489 (cmd_qtdp, stop_tracing): Update print specifiers.
10490 (cmd_qtp, response_tracepoint): Likewise.
10491 (collect_data_at_tracepoint): Likewise.
10492 (collect_data_at_step): Likewise.
10493
55a8c076
YQ
104942012-04-14 Yao Qi <yao@codesourcery.com>
10495
10496 Import gnulib module inttypes.
10497 * aclocal.m4, config.in, configure: Regenerated.
10498
dc750257
YQ
104992012-04-14 Yao Qi <yao@codesourcery.com>
10500
10501 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10502 Makefile and config.status at last.
10503
0ab5faf9
YQ
105042012-04-13 Yao Qi <yao@codesourcery.com>
10505
10506 * tracepoint.c: Include stdint.h unconditionally.
10507
18f5fd81
TJB
105082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10509
10510 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10511 on BFD_HAVE_SYS_PROCFS_TYPE.
10512 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10513 * configure: Regenerate.
10514 * config.in: Likewise.
10515
4d47af5c
L
105162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10517
10518 * Makefile.in (clean): Also remove x32.c x32-linux.c
10519 x32-avx.c x32-avx-linux.c.
10520 (x32.o): New target.
10521 (x32.c): Likewise.
10522 (x32-linux.o): Likewise.
10523 (x32-linux.c): Likewise.
10524 (x32-avx.o): Likewise.
10525 (x32-avx.c): Likewise.
10526 (x32-avx-linux.o): Likewise.
10527 (x32-avx-linux.c): Likewise.
10528
10529 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10530 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10531 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10532 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10533 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10534 i386/x32-avx-linux.xml.
10535
10536 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10537 (init_registers_x32_avx_linux): Likwise.
10538 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10539 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10540
ecedbe58
PA
105412012-04-13 Pedro Alves <palves@redhat.com>
10542
10543 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10544 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10545 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10546 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10547 the sub-make.
10548
c92b5177
L
105492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10550
10551 * linux-x86-low.c (compat_x32_clock_t): New.
10552 (compat_x32_siginfo_t): Likewise.
10553 (compat_x32_siginfo_from_siginfo): Likewise.
10554 (siginfo_from_compat_x32_siginfo): Likewise.
10555 (linux_is_elf64): Likewise.
10556 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10557 and siginfo_from_compat_x32_siginfo for x32.
10558 (x86_arch_setup): Set linux_is_elf64.
10559
214d508e
L
105602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10561
10562 PR gdb/13969
10563 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10564 e_machine field.
10565 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10566 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10567 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10568 compatible with process.
10569
c9a1864a
YQ
105702012-04-12 Yao Qi <yao@codesourcery.com>
10571
10572 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10573 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10574 (install-only, install-info, clean): Handle sub dir gnulib.
10575 (all-lib, am--refresh): New targets.
10576 (memmem.o): Remove target.
10577 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10578 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10579 (AC_REPLACE_FUNCS): Remove memmem.
10580 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10581 (AC_OUTPUT): Generate Makefile in gnulib/.
10582 * aclocal.m4, config.in, configure: Regenerated.
10583
367ba2c2
MR
105842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10585
10586 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10587
9d236627
PA
105882012-04-05 Pedro Alves <palves@redhat.com>
10589
10590 -Werror=strict-aliasing
10591
10592 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10593 pointer.
10594
111217b3
PA
105952012-04-04 Pedro Alves <palves@redhat.com>
10596
10597 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10598 (sparc_store_gregset_from_stack, sparc_store_gregset)
10599 (sparc_breakpoint_at): Fix formatting.
10600
8365dcf5
TJB
106012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10602
10603 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10604 are available.
10605 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10606 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10607 * config.in: Regenerate.
10608 * configure: Likewise.
10609
689cc2ae
PA
106102012-03-29 Pedro Alves <palves@redhat.com>
10611
10612 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10613 Correct ptrace arguments.
10614
c14dfd32
PA
106152012-03-28 Pedro Alves <palves@redhat.com>
10616
10617 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10618 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10619 (IA64_FR1_REGNUM): New defines.
10620 (ia64_fetch_register): New.
10621 (the_low_target): Install it.
10622 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10623 field.
10624 * linux-low.c (linux_fetch_registers): Try the
10625 the_low_target.fetch_register hook first.
10626
10627 * linux-arm-low.c (the_low_target): Adjust.
10628 * linux-bfin-low.c (the_low_target): Adjust.
10629 * linux-cris-low.c (the_low_target): Adjust.
10630 * linux-crisv32-low.c (the_low_target): Adjust.
10631 * linux-m32r-low.c (the_low_target): Adjust.
10632 * linux-m68k-low.c (the_low_target): Adjust.
10633 * linux-mips-low.c (the_low_target): Adjust.
10634 * linux-ppc-low.c (the_low_target): Adjust.
10635 * linux-s390-low.c (the_low_target): Adjust.
10636 * linux-sh-low.c (the_low_target): Adjust.
10637 * linux-sparc-low.c (the_low_target): Adjust.
10638 * linux-tic6x-low.c (the_low_target): Adjust.
10639 * linux-x86-low.c (the_low_target): Adjust.
10640 * linux-xtensa-low.c (the_low_target): Adjust.
10641
63c88e13
PA
106422012-03-26 Pedro Alves <palves@redhat.com>
10643
10644 * server.c (handle_qxfer_libraries): Don't bail early if
10645 the_target->qxfer_libraries_svr4 is not NULL.
10646
fb723180
PA
106472012-03-26 Pedro Alves <palves@redhat.com>
10648
10649 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10650
0afae3cf
PA
106512012-03-23 Pedro Alves <palves@redhat.com>
10652
10653 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10654 "library-list-svr4" element's start tag when the the DSO list is
10655 empty.
10656
485f1ee4
PA
106572012-03-23 Pedro Alves <palves@redhat.com>
10658
10659 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10660 a variable whose type size is the same as the inferior's pointer
10661 size.
10662
a5362b9a
TS
106632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10664
10665 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10666 struct siginfo.
10667 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10668 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10669 * linux-low.h: Include <signal.h>.
10670 (struct siginfo): Remove forward declaration.
10671 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10672 struct siginfo.
10673
d226c142
MF
106742012-03-21 Mike Frysinger <vapier@gentoo.org>
10675
10676 * .gitignore: Ignore more files.
10677
122f36ef
PA
106782012-03-19 Pedro Alves <palves@redhat.com>
10679 Jan Kratochvil <jan.kratochvil@redhat.com>
10680
10681 * server.c (cont_thread, general_thread): Add describing comments.
10682 (start_inferior): Clear `cont_thread'.
10683 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10684 of a process.
10685
fc3e5175
YQ
106862012-03-15 Yao Qi <yao@codesourcery.com>
10687
10688 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10689 handling to ...
10690 (cmd_qtdp): ... here.
10691
8d0d92cd
YQ
106922012-03-15 Yao Qi <yao@codesourcery.com>
10693
10694 * tracepoint.c (struct tracepoint_action_ops): New.
10695 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10696 (m_tracepoint_action_download): New.
10697 (r_tracepoint_action_download): New.
10698 (x_tracepoint_action_download): New.
10699 (l_tracepoint_action_download): New.
10700 (add_tracepoint_action): Install `action->ops' according type.
10701 (download_tracepoint_1): Move code `download' function pointer
10702 of various tracepoint_action_ops.
10703
87b0bb13
JK
107042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10705
10706 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10707 linux_ptrace_attach_warnings.
10708
5f572dec
JK
107092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10710
10711 * Makefile.in (linux-ptrace.o): New.
10712 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10713 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10714 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10715 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10716 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10717 of these targets.
10718 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10719
f4647387
YQ
107202012-03-08 Yao Qi <yao@codesourcery.com>
10721 Pedro Alves <palves@redhat.com>
10722
10723 Fix PR server/13392.
10724 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10725 offset of JMP insn.
10726 * tracepoint.c (remove_tracepoint): New.
10727 (cmd_qtdp): Call remove_tracepoint when failed to install.
10728
9b224c5e
PA
107292012-03-07 Pedro Alves <palves@redhat.com>
10730
10731 * linux-low.c (get_detach_signal): New.
10732 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10733 Pass on pending signals to PTRACE_DETACH. Check the result of the
10734 ptrace call.
10735 * server.c (program_signals, program_signals_p): New.
10736 (handle_general_set): Handle QProgramSignals.
10737 * server.h (program_signals, program_signals_p): Declare.
10738
e237a7e2
JK
107392012-03-05 Pedro Alves <palves@redhat.com>
10740 Jan Kratochvil <jan.kratochvil@redhat.com>
10741
10742 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10743 New comment why.
10744
5808517f
YQ
107452012-03-03 Yao Qi <yao@codesourcery.com>
10746
10747 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10748 agent_look_up_symbols.
10749
58b4daa5
YQ
107502012-03-03 Yao Qi <yao@codesourcery.com>
10751
10752 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10753 (linux-x86-low.o): Likewise.
10754 * server.h: Remove in_process_agent_loaded.
10755 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10756 common/agent.c.
10757 Update callers.
10758
8ffcbaaf
YQ
107592012-03-03 Yao Qi <yao@codesourcery.com>
10760
10761 * tracepoint.c (gdb_agent_capability): New global.
10762 (in_process_agent_loaded_ust): Renamed to
10763 `in_process_agent_supports_ust'.
10764 Update callers.
10765 (in_process_agent_supports_ust): Call agent_capability_check.
10766 (clear_installed_tracepoints): Assert that agent supports
10767 agent.
10768
d1feda86
YQ
107692012-03-03 Yao Qi <yao@codesourcery.com>
10770
10771 * linux-low.c (linux_supports_agent): New.
10772 (linux_target_ops): Initialize field `supports_agent' with
10773 linux_supports_agent.
10774 * target.h (struct target_ops) <supports_agent>: New.
10775 (target_supports_agent): New macro.
10776 * server.c (handle_general_set): Handle packet 'QAgent'.
10777 (handle_query): Send `QAgent+'.
10778 * Makefile.in (server.o): Depends on agent.h.
10779
2fa291ac
YQ
107802012-03-03 Yao Qi <yao@codesourcery.com>
10781
10782 * Makefile.in (OBS): Add agent.o.
10783 Add new rule for agent.o.
10784 Track dependence of tracepoint.c on agent.h.
10785 * tracepoint.c (run_inferior_command_1):
10786 (run_inferior_command): Call agent_run_command.
10787 (gdb_ust_connect_sync_socket): Deleted. Move it to
10788 common/agent.c.
10789 (resume_thread, stop_thread): Likewise.
10790 (gdb_ust_socket_init): Renamed to ...
10791 (gdb_agent_socket_init): ... New.
10792 (gdb_ust_thread): Renamed to ...
10793 (gdb_agent_helper_thread): ... New.
10794 (gdb_ust_init): Move some code to ...
10795 (gdb_agent_init): ... here. New.
10796 [HAVE_UST]: Call gdb_ust_init.
10797 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10798 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10799 * config.in, configure: Regenerated.
10800
05044653
PA
108012012-03-02 Pedro Alves <palves@redhat.com>
10802
10803 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10804 * linux-low.c (struct simple_pid_list): New.
10805 (stopped_pids): New a struct simple_pid_list pointer.
10806 (add_to_pid_list, pull_pid_from_list): New.
10807 (handle_extended_wait): Don't assume the first signal new children
10808 report is SIGSTOP. Adjust call to pull_pid_from_list.
10809 (linux_wait_for_lwp): Adjust.
10810
8d00225b
YQ
108112012-03-02 Yao Qi <yao@codesourcery.com>
10812
10813 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10814 debug log.
10815
19560ba5
YQ
108162012-03-02 Yao Qi <yao@codesourcery.com>
10817
10818 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10819 `stop_pc' and `tpoint'. Update caller.
10820
1faeff08
MR
108212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10822
10823 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10824 * linux-low.c (use_linux_regsets): New macro.
10825 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10826 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10827 (linux_register_in_regsets): New function.
10828 (usr_fetch_inferior_registers): Skip registers covered by
10829 regsets.
10830 (usr_store_inferior_registers): Likewise.
10831 (usr_fetch_inferior_registers): New macro.
10832 (usr_store_inferior_registers): Likewise.
10833 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10834 (linux_store_registers): Likewise.
10835 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10836 prototype.
10837 (init_registers_mips64_dsp_linux): Likewise.
10838 (init_registers_mips_linux): New macro.
10839 (init_registers_mips_dsp_linux): Likewise.
10840 (mips_dsp_num_regs): Likewise.
10841 (DSP_BASE, DSP_CONTROL): New fallback macros.
10842 (mips_base_regs): New macro.
10843 (mips_regmap): Use it. Fix the size.
10844 (mips_dsp_regmap): New variable.
10845 (mips_dsp_regset_bitmap): Likewise.
10846 (mips_arch_setup): New function.
10847 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10848 than mips_regmap.
10849 (mips_cannot_store_register): Likewise.
10850 (the_low_target): Update .arch_setup, .num_regs and .regmap
10851 initializers. Add .regset_bitmap initializer.
10852 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10853 initializer.
10854 * linux-bfin-low.c (the_low_target): Likewise.
10855 * linux-cris-low.c (the_low_target): Likewise.
10856 * linux-crisv32-low.c (the_low_target): Likewise.
10857 * linux-ia64-low.c (the_low_target): Likewise.
10858 * linux-m32r-low.c (the_low_target): Likewise.
10859 * linux-m68k-low.c (the_low_target): Likewise.
10860 * linux-ppc-low.c (the_low_target): Likewise.
10861 * linux-s390-low.c (the_low_target): Likewise.
10862 * linux-sh-low.c (the_low_target): Likewise.
10863 * linux-sparc-low.c (the_low_target): Likewise.
10864 * linux-tic6x-low.c (the_low_target): Likewise.
10865 * linux-x86-low.c (the_low_target): Likewise.
10866 * linux-xtensa-low.c (the_low_target): Likewise.
10867 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10868 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10869 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10870 srv_xmlfiles.
10871 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10872 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10873
c03e6ccc
YQ
108742012-02-29 Yao Qi <yao@codesourcery.com>
10875 Pedro Alves <palves@redhat.com>
10876
10877 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10878 `step_over_finished' is true.
10879
644cebc9
PA
108802012-02-27 Pedro Alves <palves@redhat.com>
10881
10882 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10883 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10884
c14d7ab2
PA
108852012-02-27 Pedro Alves <palves@redhat.com>
10886
10887 PR server/9684
10888 * linux-low.c (pid_is_stopped): New.
10889 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10890
412c89dd
LM
108912012-02-25 Luis Machado <lgustavo@codesourcery.com>
10892
10893 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10894 of conditions.
10895
b745defe
MR
108962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10897
10898 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10899
9f3a5c85
LM
109002012-02-24 Luis Machado <lgustavo@codesourcery>
10901
10902 * server.c (handle_query): Advertise support for target-side
10903 breakpoint condition evaluation.
10904 (process_point_options): New function.
10905 (process_serial_event): When inserting a breakpoint, check for
10906 a target-side condition that should be evaluated.
10907
10908 * mem-break.c: Include regcache.h and ax.h.
10909 (point_cond_list_t): New data structure.
10910 (breakpoint) <cond_list>: New field.
10911 (find_gdb_breakpoint_at): Make non-static.
10912 (delete_gdb_breakpoint_at): Clear any target-side
10913 conditions.
10914 (clear_gdb_breakpoint_conditions): New function.
10915 (add_condition_to_breakpoint): Likewise.
10916 (add_breakpoint_condition): Likewise.
10917 (gdb_condition_true_at_breakpoint): Likewise.
10918 (gdb_breakpoint_here): Return result directly instead
10919 of going through a local variable.
10920
10921 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10922 (clear_gdb_breakpoint_conditions): Likewise.
10923 (add_breakpoint_condition): Likewise.
10924 (gdb_condition_true_at_breakpoint): Likewise.
10925
10926 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10927 (need_step_over_p): Take target-side breakpoint condition into
10928 consideration.
10929
5e1dc496
LM
109302012-02-24 Luis Machado <lgustavo@codesourcery>
10931
10932 * server.h: Include tracepoint.h.
10933 (agent_mem_read, agent_get_trace_state_variable_value,
10934 agent_set_trace_state_variable_value,
10935 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10936 get_set_tsv_func_addr): New prototypes.
10937
10938 * ax.h: New include file.
10939 * ax.c: New source file.
10940
10941 * tracepoint.c: Include ax.h.
10942 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10943 agent_expr, eval_result_type): Move to ax.h.
10944 (parse_agent_expr): Rename to ...
10945 (gdb_parse_agent_expr): ... this, make it non-static and move
10946 to ax.h.
10947 (unparse_agent_expr) Rename to ...
10948 (gdb_unparse_agent_expr): ... this, make it non-static and move
10949 to ax.h.
10950 (eval_agent_expr): Rename to ...
10951 (eval_tracepoint_agent_expr): ... this.
10952 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10953 forward declarations.
10954 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10955 (agent_get_trace_state_variable_value): New function.
10956 (agent_set_trace_state_variable_value): New function.
10957 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10958 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10959 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10960 (condition_true_at_tracepoint): Likewise.
10961 (parse_agent_expr): Rename to ...
10962 (gdb_parse_agent_expr): ... this and move to ax.c.
10963 (unparse_agent_expr): Rename to ...
10964 (gdb_unparse_agent_expr): ... this and move to ax.c.
10965 (gdb_agent_op_name): Move to ax.c.
10966 (eval_agent_expr): Rename to ...
10967 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10968 and move to ax.c.
10969 (eval_tracepoint_agent_expr): New function.
10970 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10971 non-static.
5e1dc496
LM
10972 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10973 ax.c.
10974 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10975 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10976 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10977 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10978 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10979 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10980 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10981 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10982 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10983 (compile_bytecodes): Remove forward declaration.
10984 (is_goto_target): Move to ax.c.
10985 (compile_bytecodes): Move to ax.c and call
10986 agent_get_trace_state_variable_value (...) and
10987 agent_set_trace_state_variable_value (...).
10988
10989 * Makefile.in: Update ax.c and IPA dependencies.
10990
277e4e52
PA
109912012-02-24 Pedro Alves <palves@redhat.com>
10992
10993 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10994 (cmd_bigqtbuffer_circular): ... this. Only handle
10995 'QTBuffer:circular:'.
10996 (handle_tracepoint_general_set): Adjust.
10997
bf4c19f7
YQ
109982012-02-16 Yao Qi <yao@codesourcery.com>
10999
11000 * inferiors.c: Move code to ...
11001 * dll.c: .... here. New.
11002 * server.h: Declare clear_dlls.
11003 * Makefile.in (SFILES): Add dll.c.
11004 (OBS): Add dll.o
11005 (dll.o): New rule.
11006
d73f2619
YQ
110072012-02-11 Yao Qi <yao@codesourcery.com>
11008
11009 * server.c: (handle_monitor_command): Add a new parameter
11010 `own_buf'.
11011 (handle_query): Update caller.
11012
f8255c2a
JB
110132012-02-09 Joel Brobecker <brobecker@adacore.com>
11014
11015 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11016 * configure, config.in: Regenerate.
11017 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11018 is not defined.
11019
da84f473
PA
110202012-02-02 Pedro Alves <palves@redhat.com>
11021
11022 Try SIGKILL first, then PTRACE_KILL.
11023 * linux-low.c (linux_kill_one_lwp): New.
11024 (linux_kill_one_lwp): Rename to ...
11025 (kill_one_lwp_callback): ... this. Use the new
11026 linux_kill_one_lwp.
11027
e886a173
PA
110282012-02-02 Pedro Alves <palves@redhat.com>
11029
11030 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11031 inferior.
11032
be07f1a2
PA
110332012-01-27 Pedro Alves <palves@redhat.com>
11034
11035 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11036 (elf_64_file_p): Make static.
11037 (linux_pid_exe_is_elf_64_file): New.
11038 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11039 Delete declarations.
11040 (linux_pid_exe_is_elf_64_file): Declare.
11041 * linux-x86-low.c (x86_arch_setup): Use
11042 linux_pid_exe_is_elf_64_file.
11043
d8301ad1
JK
110442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11045
11046 * linux-low.c (linux_wait_for_event_1): Rename to ...
11047 (linux_wait_for_event): ... here and merge it with former
11048 linux_wait_for_event - new variable wait_ptid, use it.
11049 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11050
01b17894
PA
110512012-01-23 Pedro Alves <palves@redhat.com>
11052
11053 * server.c (main): Avoid yet another case of infinite loop while
11054 detaching/killing after a longjmp.
11055
e825046f
JK
110562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11057
11058 Code cleanup.
11059 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11060
b9e7b9c3
UW
110612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11062
11063 * hostio.c (handle_readlink): New function.
11064 (handle_vFile): Call it to handle "vFile:readlink" packets.
11065
901f9912
UW
110662012-01-20 Pedro Alves <palves@redhat.com>
11067 Ulrich Weigand <ulrich.weigand@linaro.org>
11068
11069 * server.c (handle_v_requests): Only support vAttach and vRun to
11070 start multiple processes when in extended protocol mode.
11071
fc1ab1a0
PA
110722012-01-17 Pedro Alves <palves@redhat.com>
11073
11074 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11075 memalign plus mprotect to allocate the scratch buffer.
11076
7d5d4e98
PA
110772012-01-13 Pedro Alves <palves@redhat.com>
11078
11079 * server.c (attach_inferior): Clear `cont_thread'.
11080
f128d5e9
PA
110812012-01-13 Pedro Alves <palves@redhat.com>
11082
11083 * server.c (main): Avoid infinite loop while detaching/killing
11084 after a longjmp.
11085
06db92f0
DE
110862012-01-09 Doug Evans <dje@google.com>
11087
11088 * server.c (start_inferior): Set last_ptid in --wrapper case.
11089
32d92999
YQ
110902012-01-06 Yao Qi <yao@codesourcery.com>
11091
11092 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11093 defined.
11094 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11095
5e0a92a9
YQ
110962012-01-04 Yao Qi <yao@codesourcery.com>
11097
11098 * tracepoint.c (cmd_qtdp): Print debug message
11099 for static tracepoint.
11100
ae639e8c
YQ
111012012-01-04 Yao Qi <yao@codesourcery.com>
11102
11103 * tracepoint.c (trace_vdebug): Differentiate debug message
11104 between gdbserver and IPA.
11105
f72429c5
YQ
111062012-01-03 Yao Qi <yao@codesourcery.com>
11107
11108 * tracepoint.c (tracepoint_was_hit): Don't collect for
11109 static tracepoint.
11110
12c3e59c
JB
111112012-01-02 Joel Brobecker <brobecker@adacore.com>
11112
11113 * terminal.h: Reformat copyright header.
11114
67827812
JB
111152012-01-02 Joel Brobecker <brobecker@adacore.com>
11116
11117 * server.c (gdbserver_version): Update copyright year.
11118 * gdbreplay.c (gdbreplay_version): Likewise.
11119
3e52c33d
JK
111202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11121
11122 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11123
11124 Revert:
11125 2011-12-18 Hui Zhu <teawater@gmail.com>
11126 * linux-low.c (linux_create_inferior): Save return value to ret.
11127
66f1260e
HZ
111282011-12-18 Hui Zhu <teawater@gmail.com>
11129
11130 * linux-low.c (linux_create_inferior): Save return value to ret.
11131
e77616d7
DE
111322011-12-16 Doug Evans <dje@google.com>
11133
e7b06c57
DE
11134 * linux-low.c (linux_create_inferior): If stdio connection,
11135 redirect stdin from /dev/null, stdout to stderr.
11136 * remote-utils.c (remote_is_stdio): New static global.
11137 (remote_connection_is_stdio): New function.
11138 (remote_prepare): Handle stdio connection.
11139 (remote_open): Ditto.
11140 (remote_close): Don't close stdin for stdio connections.
11141 (read_prim,write_prim): New functions. Replace all calls to
11142 read/write to these.
11143 * server.c (main): Watch for "-" argument. Move call to
11144 remote_prepare before start_inferior.
11145 * server.h (STDIO_CONNECTION_NAME): New macro.
11146 (remote_connection_is_stdio): Declare.
11147
e77616d7
DE
11148 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11149 in debugging output.
11150
82067193
YQ
111512011-12-15 Yao Qi <yao@codesourcery.com>
11152
11153 * tracepoint.c: Include sys/syscall.h.
11154 (gdb_ust_thread): Remove preprocessor conditional.
11155
82bfbe7e
PA
111562011-12-14 Pedro Alves <pedro@codesourcery.com>
11157
11158 * linux-low.c (linux_detach_one_lwp): Call
11159 the_low_target.prepare_to_resume before detaching.
11160
712c6575
YQ
111612011-12-14 Yao Qi <yao@codesourcery.com>
11162
11163 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11164 of write.
11165
d54d1edf
YQ
111662011-12-14 Yao Qi <yao@codesourcery.com>
11167
11168 * i386-low.c (i386_low_stopped_data_address): Initialize local
11169 variable `control'.
11170
6210a125
PA
111712011-12-13 Pedro Alves <pedro@codesourcery.com>
11172
11173 PR remote/13492
11174
11175 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11176 DR_CONTROL unless necessary. Extend comments.
11177 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11178 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11179
2ece8244
YQ
111802011-12-13 Yao Qi <yao@codesourcery.com>
11181
11182 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11183 macros.
11184 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11185
784867a5
JK
111862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11187
11188 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11189 Print new debug message for such case.
11190
6bf36717
JK
111912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11192
11193 Fix overlapping memcpy.
11194 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11195 the read_inferior_memory transfer.
11196 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11197 write_inferior_memory transfer.
11198 (set_fast_tracepoint_jump): New variable buf. Use it for the
11199 read_inferior_memory and write_inferior_memory transfers.
11200 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11201 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11202 Use it for the write_inferior_memory transfer.
11203 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11204 buffers.
11205
50275556
MR
112062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11207
11208 * linux-low.c (fetch_register, store_register): Make code
11209 consistent, fix formatting.
11210
7325beb4
MR
112112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11212
11213 * linux-low.c (usr_store_inferior_registers): Factor out code
11214 to handle individual registers into...
11215 (store_register): ... this new function.
11216
c642a434
UW
112172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11218
11219 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11220 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11221 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11222 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11223 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11224 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11225 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11226 (srv_xmlfiles): Add new XML files.
11227
11228 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11229 and <sys/uio.h>.
11230 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11231 (init_registers_s390_linux32v1): Add prototype.
11232 (init_registers_s390_linux32v2): Likewise.
11233 (init_registers_s390_linux64v1): Likewise.
11234 (init_registers_s390_linux64v2): Likewise.
11235 (init_registers_s390x_linux64v1): Likewise.
11236 (init_registers_s390x_linux64v2): Likewise.
11237 (s390_num_regs): Increment to 52.
11238 (s390_regmap): Add orig_r2 register.
11239 (s390_num_regs_3264): Increment to 68.
11240 (s390_regmap_3264): Add orig_r2 register.
11241 (s390_collect_ptrace_register): Handle orig_r2 register.
11242 (s390_supply_ptrace_register): Likewise.
11243 (s390_fill_last_break): New function.
11244 (s390_store_last_break): Likewise.
11245 (s390_fill_system_call): New function.
11246 (s390_store_system_call): Likewise.
11247 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11248 register sets.
11249 (s390_check_regset): New function.
11250 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11251 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11252 Update target_regsets for available register sets.
11253
2268b414
JK
112542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11255 Jan Kratochvil <jan.kratochvil@redhat.com>
11256
11257 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11258 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11259 New.
11260 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11261 * linux-low.h (struct process_info_private): New member r_debug.
11262 * server.c (handle_qxfer_libraries): Call
11263 the_target->qxfer_libraries_svr4.
11264 (handle_qxfer_libraries_svr4): New function.
11265 (qxfer_packets): New entry "libraries-svr4".
11266 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11267 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11268 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11269 PACKET_qXfer_libraries_svr4.
11270
d6db1fab
UW
112712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11272
11273 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11274 PSW address/mask between 8-byte and 16-byte formats.
11275 (s390_supply_ptrace_register): Likewise.
11276 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11277 basic addressing mode bit.
11278
242f5f1c
SS
112792011-11-24 Stan Shebs <stan@codesourcery.com>
11280
11281 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11282
f196051f
SS
112832011-11-17 Stan Shebs <stan@codesourcery.com>
11284
11285 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11286 (tracing_start_time): New global.
11287 (tracing_stop_time): New global.
11288 (tracing_user_name): New global.
11289 (tracing_notes): New global.
11290 (tracing_stop_note): New global.
11291 (cmd_qtstart): Set traceframe_usage, start_time.
11292 (stop_tracing): Set stop_time.
11293 (cmd_qtstatus): Report additional status.
11294 (cmd_qtp): New function.
11295 (handle_tracepoint_query): Call it.
11296 (cmd_qtnotes): New function.
11297 (handle_tracepoint_general_set): Call it.
11298 (get_timestamp): Rename from tsv_get_timestamp.
11299
405f8e94
SS
113002011-11-14 Stan Shebs <stan@codesourcery.com>
11301 Kwok Cheung Yeung <kcy@codesourcery.com>
11302
11303 * linux-x86-low.c (small_jump_insn): New.
11304 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11305 trampoline and error message, build a trampoline and issue a small
11306 jump instruction to it.
11307 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11308 trampoline and error message.
11309 (x86_get_min_fast_tracepoint_insn_len): New.
11310 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11311 * linux-low.h (struct linux_target_ops): Add arguments to
11312 install_fast_tracepoint_jump_pad operation, add new operation.
11313 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11314 arguments.
11315 (linux_get_min_fast_tracepoint_insn_len): New function.
11316 (linux_target_op): Add new operation.
11317 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11318 (gdb_trampoline_buffer_end): Ditto.
11319 (gdb_trampoline_buffer_error): Ditto.
11320 (struct ipa_sym_addresses): Add fields for new IPA variables.
11321 (symbol_list): Add entries for new IPA variables.
11322 (struct tracepoint): Add fields to hold the address range of the
11323 trampoline used by the tracepoint.
11324 (trampoline_buffer_head): New static variable.
11325 (trampoline_buffer_tail): Ditto.
11326 (claim_trampoline_space): New function.
11327 (have_fast_tracepoint_trampoline_buffer): New function.
11328 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11329 structure.
11330 (install_fast_tracepoint): Ditto, also add error buffer argument.
11331 (cmd_qtminftpilen): New function.
11332 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11333 (fast_tracepoint_from_trampoline_address): New function.
11334 (fast_tracepoint_collecting): Handle trampoline as part of jump
11335 pad space.
11336 (set_trampoline_buffer_space): New function.
11337 (initialize_tracepoint): Initialize new IPA variables.
11338 * target.h (struct target_ops): Add arguments to
11339 install_fast_tracepoint_jump_pad operation, add new
11340 get_min_fast_tracepoint_insn_len operation.
11341 (target_get_min_fast_tracepoint_insn_len): New.
11342 (install_fast_tracepoint_jump_pad): Add arguments.
11343 * server.h (IPA_BUFSIZ): Define.
11344 * linux-i386-ipa.c: Include extra header files.
11345 (initialize_fast_tracepoint_trampoline_buffer): New function.
11346 (initialize_low_tracepoint): Call it.
11347 * server.h (set_trampoline_buffer_space): Declare.
11348 (claim_trampoline_space): Ditto.
11349 (have_fast_tracepoint_trampoline_buffer): Ditto.
11350
1e4d1764
YQ
113512011-11-14 Yao Qi <yao@codesourcery.com>
11352
11353 * server.c (handle_query): Handle InstallInTrace for qSupported.
11354 * tracepoint.c (add_tracepoint): Sort list.
11355 (install_tracepoint, download_tracepoint): New.
11356 (cmd_qtdp): Call them to install and download tracepoints.
11357 (sort_tracepoints): Removed.
11358 (cmd_qtstart): Update.
11359
5c73ff4e
YQ
113602011-11-14 Yao Qi <yao@codesourcery.com>
11361
11362 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11363 * mem-break.h: Declare.
11364 * tracepoint.c (cmd_qtstart): Move some code to ...
11365 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11366 New.
11367 (download_tracepoints): Move some code to ...
11368 (download_tracepoint_1): ... here. New.
11369
86a30030
YQ
113702011-11-08 Yao Qi <yao@codesourcery.com>
11371
11372 * remote-utils.c (relocate_instruction): A comment fix.
11373
8d26e50c
JB
113742011-11-07 Joel Brobecker <brobecker@adacore.com>
11375
11376 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11377 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11378 dr_status_mirror and dr_control_mirror from debug_reg_state.
11379 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11380 (i386_initial_stuff): Remove use of deleted globals.
11381 (i386_get_thread_context, i386_set_thread_context,
11382 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11383 from debug_reg_state.
11384
a59306a3
YQ
113852011-11-05 Yao Qi <yao@codesourcery.com>
11386
11387 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11388 address as TPOINT's.
11389
3065dfb6
SS
113902011-11-02 Stan Shebs <stan@codesourcery.com>
11391
11392 * tracepoint.c (agent_mem_read_string): New function.
11393 (eval_agent_expr): Call it for tracenz.
11394 * server.c (handle_query): Report support for tracenz.
11395
fd0d8c7c
YQ
113962011-11-02 Yao Qi <yao@codesourcery.com>
11397
11398 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11399
609086b1
YQ
114002011-11-02 Yao Qi <yao@codesourcery.com>
11401
11402 * target.h: Fix a typo in comment.
11403
b9fd1791
PA
114042011-10-31 Pedro Alves <pedro@codesourcery.com>
11405
11406 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11407 clobber the breakpoints' shadows with fast tracepoint jumps.
11408 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11409 * target.c (write_inferior_memory): Also pass MYADDR down to
11410 check_mem_write.
11411
03583c20
UW
114122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11413
11414 * configure.ac: Check support for personality routine.
11415 * configure: Regenerate.
11416 * config.in: Likewise.
11417 * linux-low.c: Include <sys/personality.h>.
11418 Define ADDR_NO_RANDOMIZE if necessary.
11419 (linux_create_inferior): Disable address space randomization when
11420 forking inferior, if requested.
11421 (linux_supports_disable_randomization): New function.
11422 (linux_target_ops): Install it.
11423 * server.h (disable_randomization): Declare.
11424 * server.c (disable_randomization): New global variable.
11425 (handle_general_set): Handle QDisableRandomization.
11426 (handle_query): Likewise for qSupported.
11427 (main): Support --disable-randomization and --no-disable-randomization
11428 command line arguments.
11429 * target.h (struct target_ops): Add supports_disable_randomization.
11430 (target_supports_disable_randomization): New macro.
11431
723b724b
MF
114322011-09-29 Mike Frysinger <vapier@gentoo.org>
11433
11434 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11435 ifdef check.
11436 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11437 [!PT_GETDSBT] (target_loadmap): New definition.
11438 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11439 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11440 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11441 and PT_GETDSBT to LINUX_LOADMAP.
11442 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11443 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11444
55329a5c 114452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11446
11447 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11448 (arm_linux_hwbp_cap): New static variable.
11449 (arm_linux_get_hwbp_cap): Replace by ...
11450 (arm_linux_init_hwbp_cap): ... this new function.
11451 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11452 (arm_linux_get_hw_watchpoint_count): Likewise.
11453 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11454 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11455 (arm_prepare_to_resume): Use perror_with_name instead of error.
11456
55329a5c 114572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11458
11459 * linux-arm-low.c: Include <signal.h>.
11460 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11461 (struct arm_linux_hwbp_cap): New data type.
11462 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11463 (struct arm_linux_hw_breakpoint): New data type.
11464 (MAX_BPTS, MAX_WPTS): Define.
11465 (struct arch_process_info, struct arch_lwp_info): New data types.
11466 (arm_linux_get_hwbp_cap): New function.
11467 (arm_linux_get_hw_breakpoint_count): Likewise.
11468 (arm_linux_get_hw_watchpoint_count): Likewise.
11469 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11470 (arm_hwbp_control_initialize): Likewise.
11471 (arm_hwbp_control_is_enabled): Likewise.
11472 (arm_hwbp_control_is_initialized): Likewise.
11473 (arm_hwbp_control_disable): Likewise.
11474 (arm_linux_hw_breakpoint_equal): Likewise.
11475 (arm_linux_hw_point_initialize): Likewise.
11476 (struct update_registers_data): New data structure.
11477 (update_registers_callback: New function.
11478 (arm_insert_point): Likewise.
11479 (arm_remove_point): Likewise.
11480 (arm_stopped_by_watchpoint): Likewise.
11481 (arm_stopped_data_address): Likewise.
11482 (arm_new_process): Likewise.
11483 (arm_new_thread): Likewise.
11484 (arm_prepare_to_resume): Likewise.
11485 (the_low_target): Register arm_insert_point, arm_remove_point,
11486 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11487 arm_new_thread, and arm_prepare_to_resume.
11488
6b9801d4
SS
114892011-09-15 Stan Shebs <stan@codesourcery.com>
11490
11491 * server.h (struct emit_ops): Add compare-goto fields.
11492 * tracepoint.c (gdb_agent_op_sizes): New table.
11493 (emit_eq_goto): New function.
11494 (emit_ne_goto): New function.
11495 (emit_lt_goto): New function.
11496 (emit_le_goto): New function.
11497 (emit_gt_goto): New function.
11498 (emit_ge_goto): New function.
11499 (is_goto_target): New function.
11500 (compile_bytecodes): Recognize special cases of compare-goto
11501 combinations and call specialized emitters for them.
11502 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11503 (amd64_emit_ne_goto): New function.
11504 (amd64_emit_lt_goto): New function.
11505 (amd64_emit_le_goto): New function.
11506 (amd64_emit_gt_goto): New function.
11507 (amd64_emit_ge_goto): New function.
11508 (amd64_emit_ops): Add the new functions.
11509 (i386_emit_eq_goto): New function.
11510 (i386_emit_ne_goto): New function.
11511 (i386_emit_lt_goto): New function.
11512 (i386_emit_le_goto): New function.
11513 (i386_emit_gt_goto): New function.
11514 (i386_emit_ge_goto): New function.
11515 (i386_emit_ops): Add the new functions.
11516
bf15cbda
SS
115172011-09-08 Stan Shebs <stan@codesourcery.com>
11518
11519 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11520 (i386_emit_epilogue): Restore %ebx.
11521
943ca1dd
JZ
115222011-08-31 Jie Zhang <jzhang918@gmail.com>
11523
11524 * server.c (step_thread): Remove definition.
11525 (process_serial_event): Don't handle Hs.
11526 * server.h (step_thread): Remove declaration.
11527 * target.c (set_desired_inferior): Remove use of step_thread.
11528
e3deef73
LM
115292011-08-24 Luis Machado <lgustavo@codesourcery.com>
11530
11531 * linux-low.c: Include linux-procfs.h.
11532 (linux_attach_lwp_1): Update comments.
11533 (linux_attach): Scan for existing threads when attaching to a
11534 process that is the tgid.
11535 * Makefile.in: Update dependencies.
11536
13da1c97
LM
115372011-08-24 Luis Machado <lgustavo@codesourcery.com>
11538
11539 * configure.srv: Add linux-procfs.o dependencies.
11540
881127c9
YQ
115412011-08-14 Yao Qi <yao@codesourcery.com>
11542
11543 * target.h (struct target_ops): Fix indent.
11544 * win32-low.c (win32_target_ops): Fix comment.
11545
58dbd541
YQ
115462011-08-14 Andrew Jenner <andrew@codesourcery.com>
11547 Yao Qi <yao@codesourcery.com>
11548
11549 * Makefile.in (clean): Remove tic6x-*.c files.
11550 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11551 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11552 (tic6x-c64xp-linux.c): Likewise.
11553 * configure.srv: Add support for tic6x-*-uclinux.
11554 * linux-tic6x-low.c: New.
11555 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11556
78d85199
YQ
115572011-08-14 Andrew Stubbs <ams@codesourcery.com>
11558 Yao Qi <yao@codesourcery.com>
11559
11560 * target.h (struct target_ops): Add read_loadmap.
11561 * linux-low.c (struct target_loadseg): New type.
11562 (struct target_loadmap): New type.
11563 (linux_read_loadmap): New function.
11564 (linux_target_ops): Add linux_read_loadmap.
11565 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11566 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11567 to NULL.
78d85199 11568
a959a88d
EZ
115692011-08-05 Eli Zaretskii <eliz@gnu.org>
11570
11571 * win32-low.c: Include <stdint.h>.
11572
1ced966e
PA
115732011-07-22 Pedro Alves <pedro@codesourcery.com>
11574
11575 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11576 to the inferior here.
11577 (i386_remove_aligned_watchpoint): Ditto.
11578 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11579 fit part of the watchpoint in the debug registers.
11580 (i386_update_inferior_debug_regs): New.
11581 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11582 registers, and only update the inferior on success.
11583 (i386_low_remove_watchpoint): Ditto.
11584
d26e3629
KY
115852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11586
11587 * linux-low.c (compare_ints, unique, list_threads, show_process,
11588 linux_core_of_thread): Delete.
11589 (linux_target_ops): Change linux_core_of_thread to
11590 linux_common_core_of_thread.
11591 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11592 * utils.c (malloc_failure): Change type of argument.
11593 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11594 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11595 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11596 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11597 (IPA_OBJS): Add common-utils-ipa.o.
11598 (ptid_h, linux_osdata_h): New macros.
11599 (server_h): Add common/common-utils.h, common/xml-utils.h,
11600 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11601 common/ptid.h.
11602 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11603 ptid.o, buffer.o): New rules.
11604 (linux-low.o): Add common/linux-osdata.h as a dependency.
11605 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11606 * configure.ac: Add AC_HEADER_DIRENT check.
11607 * config.in: Regenerate.
11608 * configure: Regenerate.
11609 * remote-utils.c (xml_escape_text): Delete.
11610 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11611 buffer_xml_printf): Move to common/buffer.c.
11612 * server.c (main): Remove call to initialize_inferiors.
11613 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11614 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11615 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11616 internal_error, gdb_assert, gdb_assert_fail): Delete.
11617 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11618 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11619 common/buffer.h.
11620 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11621 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11622 initialize_inferiors): Delete.
11623
2275a1a7
PA
116242011-07-20 Pedro Alves <pedro@codesourcery.com>
11625
11626 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11627 symbol error.
11628
0a5b1e09
PA
116292011-05-31 Pedro Alves <pedro@codesourcery.com>
11630
11631 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11632 assertion.
11633 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11634
6938fd34
YQ
116352011-05-26 Yao Qi <yao@codesourcery.com>
11636
11637 * Makefile.in (thread-db.o): Track dependence to
11638 common/gdb_thread_db.h.
11639 * thread-db.c: include gdb_thread_db.h from right place.
11640
b481f9e0
TT
116412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11642
11643 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11644 __FILE__ and __LINE__ to internal_error.
11645
98a5dd13
DE
116462011-05-13 Doug Evans <dje@google.com>
11647
11648 * thread-db.c (try_thread_db_load_from_sdir): New function.
11649 (try_thread_db_load_from_dir): New function.
11650 (thread_db_load_search): Handle $sdir, ignore $pdir.
11651 Remove trying of system directories if search of
11652 libthread-db-search-path fails, that is now done via $sdir.
11653
d248b706
KY
116542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11655
11656 * server.c (handle_query): Add EnableDisableTracepoints to the list
11657 of supported features.
43aaf8b6 11658 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11659 tracepoints.
43aaf8b6
PA
11660 (cmd_qtenable_disable): New.
11661 (cmd_qtstart): Install tracepoints even if disabled.
11662 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11663 receiving a QTEnable or QTDisable packet.
11664 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11665 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11666 tracepoints.
11667 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11668
84e578fb
DE
116692011-05-10 Doug Evans <dje@google.com>
11670
11671 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11672
71f55dd8
DE
116732011-05-04 Doug Evans <dje@google.com>
11674
11675 * linux-low.c (linux_join): Skip process lookup.
11676 * spu-low.c (spu_join): Ditto.
11677 * server.c (join_inferiors_callback): Delete.
11678 (process_serial_event): For 'D' packet (detach) call join_inferior
11679 directly.
11680
4d393d60
JM
116812011-05-04 Joseph Myers <joseph@codesourcery.com>
11682
11683 * README: Don't mention xscale*-*-linux*.
11684 * configure.srv (xscale*-*-linux*): Don't handle target.
11685
b00ad6ff
NF
116862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11687
11688 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11689 casting pointers.
11690 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11691 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11692 (i386_emit_void_call_2): Likewise.
11693
af96c192
YQ
116942011-04-26 Yao Qi <yao@codesourcery.com>
11695
43aaf8b6
PA
11696 * linux-low.c: Move common macros to linux-ptrace.h.
11697 Include linux-ptrace.h.
af96c192
YQ
11698 * Makefile.in (linux_ptrace_h): New.
11699 (linux-low.o): Depends on linux-ptrace.h.
11700
03f2bd59
JK
117012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11702
11703 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11704 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11705 (remote_prepare): New function with most of the TCP code from ...
11706 (remote_open): ... here. Detect PORT here unconditionally. Move also
11707 setting transport_is_reliable.
11708 * server.c (run_once): New variable.
11709 (gdbserver_usage): Document it.
11710 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11711 the first run if RUN_ONCE.
11712 * server.h (run_once, remote_prepare): New declarations.
11713
7a9dd1b2
TT
117142011-04-19 Tom Tromey <tromey@redhat.com>
11715
11716 * win32-low.c (handle_load_dll): Remove duplicate "the".
11717
81239425
PM
117182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11719
11720 Remove support for old Cygwin 1.5 versions.
11721 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11722 function to avoid warning.
11723 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11724 warning.
11725
9e0627f1
PM
117262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11727
11728 * gdbserver/server.h (Macro _): Define it if not available.
11729
588eebee
MS
117302011-03-14 Michael Snyder <msnyder@vmware.com>
11731
348af9f7 11732 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11733
43f70d4c
JB
117342011-03-10 Joel Brobecker <brobecker@adacore.com>
11735
11736 * Makefile.in (maintainer-clean realclean distclean): Remove
11737 "make ... subdir_do" command.
11738
348af9f7
MS
117392011-03-10 Michael Snyder <msnyder@vmware.com>
11740
11741 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11742
11743 * server.c (handle_v_run): Free alloced buffer on early return.
11744
e637a4f5
YQ
117452011-03-09 Yao Qi <yao@codesourcery.com>
11746
11747 Revert:
11748 2011-03-04 Yao Qi <yao@codesourcery.com>
11749
11750 * Makefile.in: Remove GNU make feature --directory.
11751
11752 2011-03-05 Yao Qi <yao@codesourcery.com>
11753
11754 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11755 (subdir_do): New make target. Copied from gdb/Makefile.
11756 (maintainer-clean, realclean, distclean, clean): Call corresponding
11757 make targets in common/Makefile.
11758
11759 2011-02-11 Yao Qi <yao@codesourcery.com>
11760
11761 * configure.ac: Call AC_PROG_RANLIB.
11762 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11763 * configure: Regenerate.
11764
e6edda56
JK
117652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11766
11767 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11768
e5141119
JB
117692011-03-06 Yao Qi <yao@codesourcery.com>
11770
11771 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11772
64794aa4
JB
117732011-03-05 Yao Qi <yao@codesourcery.com>
11774
11775 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11776 (subdir_do): New make target. Copied from gdb/Makefile.
11777 (maintainer-clean, realclean, distclean, clean): Call corresponding
11778 make targets in common/Makefile.
11779
7a762829
YQ
117802011-03-04 Yao Qi <yao@codesourcery.com>
11781
11782 * Makefile.in: Remove GNU make feature --directory.
11783
348af9f7
MS
117842011-03-04 Michael Snyder <msnyder@vmware.com>
11785
11786 * server.c (queue_stop_reply): Call xmalloc not malloc.
11787
117882011-03-02 Michael Snyder <msnyder@vmware.com>
11789
11790 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11791
9f72fee2
MS
117922011-02-28 Michael Snyder <msnyder@vmware.com>
11793
588eebee
MS
11794 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11795 (cmd_qtframe): Ditto.
11796 (cmd_qtbuffer): Ditto.
11797 (cmd_bigqtbuffer): Ditto.
11798
9f72fee2
MS
11799 * utils.c (decimal2str): Initialize 'width' to nine, then
11800 don't mess with it.
11801
8040bd49
UW
118022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11803
11804 * hostio.c (require_data): Free *data, not data.
11805
7e52cbd0
JK
118062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11807
11808 * hostio.c (require_data): Use free, not xfree.
11809
9130f83e
MS
118102011-02-27 Michael Snyder <msnyder@vmware.com>
11811
4b812f4e
MS
11812 * server.c (handle_query): Discard unused value.
11813
9130f83e
MS
11814 * hostio.c (require_data): Free malloc memory before returning
11815 error.
11816
69d37113
MS
118172011-02-26 Michael Snyder <msnyder@vmware.com>
11818
11819 * linux-low.c (list_threads): Call closedir for dirent.
11820
35f5825a
MS
118212011-02-27 Michael Snyder <msnyder@vmware.com>
11822
2a589cef
MS
11823 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11824 a case statement falls through.
11825
0adea5f7
MS
11826 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11827
35f5825a
MS
11828 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11829 in comparison.
11830
238f1c74
MS
118312011-02-26 Michael Snyder <msnyder@vmware.com>
11832
11833 * utils.c (decimal2str): Eliminate dead code and dead param.
11834 (pulongest): Drop dead param from call to decimal2str.
11835 (plongest): Ditto.
11836
633ff500
JB
118372011-02-24 Joel Brobecker <brobecker@adacore.com>
11838
11839 Revert the following patch (not approved yet):
11840 2011-02-21 Hui Zhu <teawater@gmail.com>
11841 * tracepoint.c (tp_printf): New function.
11842 (eval_agent_expr): Handle gdb_agent_op_printf.
11843
f9c6ff72
HZ
118442011-02-21 Hui Zhu <teawater@gmail.com>
11845
11846 * tracepoint.c (tp_printf): New function.
11847 (eval_agent_expr): Handle gdb_agent_op_printf.
11848
94d5e490
TT
118492011-02-18 Tom Tromey <tromey@redhat.com>
11850
11851 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11852 (tracepoint.o): Likewise.
11853 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11854 (gdb_agent_op_names): Likewise.
11855
c7f96d2b
TT
118562011-02-18 Tom Tromey <tromey@redhat.com>
11857
11858 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11859 gdb_agent_op_rot>: New constants.
11860 (gdb_agent_op_names): Add pick and roll.
11861 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11862 cases.
11863
0feedb2c
JK
118642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11865
11866 * aclocal.m4: Regenerated with aclocal-1.11.1.
11867
b3b9301e
PA
118682011-02-14 Pedro Alves <pedro@codesourcery.com>
11869
11870 * server.c (handle_qxfer_traceframe_info): New.
11871 (qxfer_packets): Register "traceframe-info".
11872 (handle_query): Report support for qXfer:traceframe-info:read+.
11873 * tracepoint.c (match_blocktype): New.
11874 (traceframe_find_block_type): Rename to ...
11875 (traceframe_walk_blocks): ... this. Add callback filter argument,
11876 and use it.
11877 (traceframe_find_block_type): New, reimplemented on top of
11878 traceframe_walk_blocks.
11879 (build_traceframe_info_xml): New.
11880 (traceframe_read_info): New.
11881 * server.h (traceframe_read_info): Declare.
11882
4f3e6fb7
YQ
118832011-02-11 Yao Qi <yao@codesourcery.com>
11884
11885 * configure.ac: Call AC_PROG_RANLIB.
11886 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11887 * configure: Regenerate.
11888
764880b7
PA
118892011-02-07 Pedro Alves <pedro@codesourcery.com>
11890
11891 * server.c (gdb_read_memory): Change return semantics to allow
11892 partial transfers.
11893 (handle_search_memory_1): Adjust.
11894 (process_serial_event) <'m' packet>: Handle partial transfers.
11895 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11896
1c79eb8a
PA
118972011-01-28 Pedro Alves <pedro@codesourcery.com>
11898
11899 * regcache.c (init_register_cache): Initialize
11900 regcache->register_status.
11901 (free_register_cache): Release regcache->register_status.
11902 (regcache_cpy): Copy register_status.
11903 (registers_to_string): Print 'x's for unavailable registers.
11904 (supply_register): Mark the register's status valid or
11905 unavailable, depending on whether a buffer was passed in or not.
11906 (supply_register_zeroed): New.
11907 (supply_regblock): Mark the registers' status valid or
11908 unavailable, depending on whether a buffer was passed in or not.
11909 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11910 (struct regcache): New `register_status' field.
11911 (supply_register_zeroed): Declare.
11912 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11913 supply_register_zeroed, rather than passing a NULL buffer to
11914 supply_register.
11915 * tracepoint.c (fetch_traceframe_registers): Update comment.
11916
85724a0e
PA
119172011-01-28 Pedro Alves <pedro@codesourcery.com>
11918
11919 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11920 buffer explicit.
11921
d08aafef
PA
119222011-01-25 Pedro Alves <pedro@codesourcery.com>
11923
11924 * server.h (decode_xfer_write): Change prototype.
11925 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11926 and don't extract the annex here.
11927 * server.c (decode_xfer_read): Remove `annex' parameter,
11928 and don't extract the annex here.
11929 (decode_xfer): New.
11930 (struct qxfer): New.
11931 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11932 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11933 (handle_qxfer_statictrace): New functions, abstracted out from
11934 handle_query, and made to use the struct qxfer interface.
11935 (handle_threads_qxfer_proper): Rename to ...
11936 (handle_qxfer_threads_proper): ... this.
11937 (handle_threads_qxfer): Rename to ...
11938 (handle_qxfer_threads): ... this. Adjust.
11939 (qxfer_packets): New array.
11940 (handle_qxfer): New function.
11941 (handle_query): Use handle_qxfer.
11942
493e2a69
MS
119432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11944
11945 * gdbreplay.c: Shorten lines of >= 80 columns.
11946 * linux-low.c: Ditto.
11947 * linux-ppc-low.c: Ditto.
11948 * linux-s390-low.c: Ditto.
11949 * linux-sparc-low.c: Ditto.
11950 * linux-x86-low.c: Ditto.
11951 * linux-xtensa-low.c: Ditto.
11952 * mem-break.c: Ditto.
11953 * nto-low.c: Ditto.
11954 * regcache.h: Ditto.
11955 * remote-utils.c: Ditto.
11956 * server.c: Ditto.
11957 * server.h: Ditto.
11958 * thread-db.c: Ditto.
11959 * tracepoint.c: Ditto.
11960 * utils.c: Ditto.
11961 * win32-low.h: Ditto.
11962
44944448
JB
119632011-01-05 Joel Brobecker <brobecker@adacore.com>
11964
11965 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11966 update.
11967
71ce852c
JB
119682011-01-01 Joel Brobecker <brobecker@adacore.com>
11969
11970 * server.c (gdbserver_version): Update copyright year in version
11971 output.
11972 * gdbreplay.c (gdbreplay_version): Ditto.
11973
eb826dc6
MF
119742010-12-29 Jie Zhang <jie.zhang@analog.com>
11975
11976 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11977 * linux-bfin-low.c: New file.
11978 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11979 PT_DATA_ADDR for BFIN targets.
11980 * Makefile.in (SFILES): Add linux-bfin-low.c.
11981 (clean): Remove reg-bfin.c.
11982 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11983 * README: Mention supported Blackfin targets.
11984
39ab222a
MF
119852010-12-23 Mike Frysinger <vapier@gentoo.org>
11986
11987 * .gitignore: New file.
11988
a1f2ce7d
MF
119892010-11-16 Mike Frysinger <vapier@gentoo.org>
11990
11991 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11992
f474844c
JZ
119932010-10-22 Jie Zhang <jie@codesourcery.com>
11994
11995 * Makefile.in: Add FLAGS_TO_PASS variable.
11996 (install): Remove dependency of install-only and recursively
11997 invoke make for install-only.
11998
f1048712
DE
119992010-10-04 Doug Evans <dje@google.com>
12000
12001 * Makefile.in (uninstall): Use $(DESTDIR).
12002
b53a1623
PA
120032010-09-24 Pedro Alves <pedro@codesourcery.com>
12004
e6ee044d
PA
12005 PR gdb/11842
12006
b53a1623
PA
12007 * linux-x86-low.c (compat_siginfo_from_siginfo)
12008 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12009 si_code is < 0. Check for si_code == SI_TIMER before checking for
12010 si_code < 0.
12011
fa1bd1e4
JB
120122010-09-13 Joel Brobecker <brobecker@adacore.com>
12013
12014 * lynx-i386-low.c: New file.
12015 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12016
47fac8f8
JB
120172010-09-13 Joel Brobecker <brobecker@adacore.com>
12018
12019 * lynx-low.c (ptrace_request_to_str): Remove handling for
12020 request values that have been removed in LynxOS 5.x.
12021
1adfc54d
JB
120222010-09-13 Joel Brobecker <brobecker@adacore.com>
12023
12024 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12025 <ptrace.h>
12026
c2a66c29
NS
120272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12028
12029 * configure.ac: Add --enable-inprocess-agent option.
12030 * configure: Rebuilt.
12031
32fcada3
YQ
120322010-09-06 Yao Qi <yao@codesourcery.com>
12033
12034 * linux-low.c (linux_kill): Remove unused variable.
12035 (linux_stabilize_threads): Likewise.
12036 * server.c (start_inferior): Likewise.
12037 (queue_stop_reply_callback): Likewise.
12038 * tracepoint.c (do_action_at_tracepoint): Likewise.
12039
0cccb683
YQ
120402010-09-06 Yao Qi <yao@codesourcery.com>
12041
12042 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12043 on return.
12044
423ec54c
JK
120452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12046
12047 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12048
12ac6819
PA
120492010-09-06 Pedro Alves <pedro@codesourcery.com>
12050
12051 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12052 "$(IPA_DEPFILES)".
12053
8ed54b31
JB
120542010-09-01 Joel Brobecker <brobecker@adacore.com>
12055
12056 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12057 gdbserver/lynx-ppc-low.c: New files.
12058 * Makefile.in (lynx_low_h): New variable.
12059 (lynx-low.o, lynx-ppc-low.o): New rules.
12060 * configure.ac: On LynxOS, link with -lnetinet.
12061 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12062 * configure: regenerate.
12063
bb0116a4
JB
120642010-09-01 Joel Brobecker <brobecker@adacore.com>
12065
12066 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12067 * configure.ac: Add check for vasprintf and vsnprintf.
12068 * configure, config.in: Regenerate.
12069 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12070
a778ab81 120712010-09-01 Joel Brobecker <brobecker@adacore.com>
12072
12073 * gdbreplay.c: Move include of alloca.h up, next to include of
12074 malloc.h.
12075 * server.h: Add include of malloc.h.
12076 * mem-break.c: Remove include of malloc.h.
12077 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12078
8b034a19 120792010-09-01 Joel Brobecker <brobecker@adacore.com>
12080
12081 * Makefile.in (memmem.o): Build with -Wno-error.
12082
120832010-09-01 Joel Brobecker <brobecker@adacore.com>
12084
12085 * utils.c (xsnprintf): Make non-static.
12086 * server.h: Add xsnprintf declaration.
12087 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12088 replace calls to snprintf by calls to xsnprintf throughout.
12089
120902010-09-01 Joel Brobecker <brobecker@adacore.com>
12091
12092 * configure.ac: Add configure check for alloca.
12093 * configure, config.in: Regenerate.
12094 * server.h: Include alloca.h if it exists.
12095 * gdbreplay.c: Include alloca.h if it exists.
12096
1a981360
PA
120972010-08-28 Pedro Alves <pedro@codesourcery.com>
12098
12099 * linux-low.c (__SIGRTMIN): Define if not already defined.
12100 (linux_create_inferior): Check for __ANDROID__ rather than
12101 __SIGRTMIN.
12102 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12103 are already deferred.
12104 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12105 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12106 stopped and already has a pending signal to report.
12107 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12108 a pending signal to report or is moving out of a jump pad.
12109 (linux_init_signals): Check for __ANDROID__ rather than
12110 __SIGRTMIN.
12111
b4d51a55
PA
121122010-08-28 Pedro Alves <pedro@codesourcery.com>
12113
12114 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12115 debug_threads check. Avoid a linear search when not doing debug
12116 output.
12117
ec48365d
PA
121182010-08-27 Pedro Alves <pedro@codesourcery.com>
12119
12120 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12121 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12122 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12123 (process_event): Change local fd's type to gdb_fildes_t.
12124 (create_file_handler): Adjust prototype.
12125 (delete_file_handler): Adjust prototype.
12126 (handle_file_event): Adjust prototype. Use pfildes.
12127 (create_file_event): Adjsut prototype.
12128 * remote-utils.c (remote_desc, listen_desc): Change type to
12129 gdb_fildes_t.
12130 * server.h: New gdb_fildes_t typedef.
12131 [USE_WIN32API]: Include winsock2.h.
12132 (delete_file_handler, add_file_handler): Adjust prototypes.
12133 (pfildes): Declare.
12134 * utils.c (pfildes): New.
12135
854d88f0
PA
121362010-08-27 Pedro Alves <pedro@codesourcery.com>
12137
12138 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12139 * configure: Regenerate.
12140
0146f85b
PA
121412010-08-27 Pedro Alves <pedro@codesourcery.com>
12142
12143 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12144 (linux_done_accessing_memory): ... this.
12145 (linux_target_ops): Adjust.
12146 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12147 * nto-low.c (nto_target_ops): Adjust comment.
12148 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12149 * spu-low.c (spu_target_ops): Adjust comment.
12150 * target.h (target_ops): Rename unprepare_to_access_memory field
12151 to done_accessing_memory.
12152 (unprepare_to_access_memory): Rename to ...
12153 (done_accessing_memory): ... this.
12154
90d74c30
PA
121552010-08-26 Pedro Alves <pedro@codesourcery.com>
12156
12157 * linux-low.c (linux_prepare_to_access_memory): New.
12158 (linux_unprepare_to_access_memory): New.
12159 (linux_target_ops): Install them.
12160 * server.c (read_memory): Rename to ...
12161 (gdb_read_memory): ... this. Use
12162 prepare_to_access_memory/prepare_to_access_memory.
12163 (write_memory): Rename to ...
12164 (gdb_write_memory): ... this. Use
12165 prepare_to_access_memory/prepare_to_access_memory.
12166 (handle_search_memory_1): Adjust.
12167 (process_serial_event): Adjust.
12168 * target.h (struct target_ops): New fields
12169 prepare_to_access_memory and unprepare_to_access_memory.
12170 (prepare_to_access_memory, unprepare_to_access_memory): New.
12171 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12172 prepare_to_access_memory/prepare_to_access_memory.
12173 * nto-low.c (nto_target_ops): Adjust.
12174 * spu-low.c (spu_target_ops): Adjust.
12175 * win32-low.c (win32_target_ops): Adjust.
12176
fd467969
PA
121772010-08-26 Pedro Alves <pedro@codesourcery.com>
12178
12179 * Makefile.in (WARN_CFLAGS): Get it from configure.
12180 (WERROR_CFLAGS): New.
12181 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12182 * configure.ac: Introduce --enable-werror, which adds -Werror to
12183 the compiler command line. Enabled by default. Disable with
12184 --disable-werror. Add -Wdeclaration-after-statement
12185 Wpointer-arith and -Wformat-nonliteral to warning flags.
12186 * configure: Regenerate.
12187
331e2f5f
PA
121882010-08-26 Pedro Alves <pedro@codesourcery.com>
12189
12190 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12191
e581f2b4
PA
121922010-08-26 Pedro Alves <pedro@codesourcery.com>
12193
12194 * gdbreplay.c (remote_error): New.
12195 (gdbchar): New.
12196 (expect): Use gdbchar. Check for error reading from GDB.
12197 Clarify sync error output.
12198 (play): Check for errors writing to GDB.
12199 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12200 * remote-utils.c (getpkt): Check for errors writing to the remote
12201 descriptor.
12202
3c11dd79
PA
122032010-08-25 Pedro Alves <pedro@codesourcery.com>
12204
12205 * linux-low.c (linux_wait_1): Move non-debugging code out of
12206 `debug_threads' control.
12207
d20a8ad9
PA
122082010-08-25 Pedro Alves <pedro@codesourcery.com>
12209
12210 * linux-low.c (linux_wait_1): Don't set last_status here.
12211 * server.c (push_event, queue_stop_reply_callback): Assert we're
12212 not pushing a TARGET_WAITKIND_IGNORE event.
12213 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12214 (myresume, handle_target_event): Set the thread's last_resume_kind
12215 and last_status from the target returned status.
12216
964e4306
PA
122172010-08-25 Pedro Alves <pedro@codesourcery.com>
12218
12219 PR threads/10729
12220
12221 * linux-x86-low.c (update_debug_registers_callback): New.
12222 (i386_dr_low_set_addr): Use it.
12223 (i386_dr_low_get_addr): New.
12224 (i386_dr_low_set_control): Use update_debug_registers_callback.
12225 (i386_dr_low_get_control): New.
12226 (i386_dr_low_get_status): Adjust.
12227 * linux-low.c (linux_stop_lwp): New.
12228 * linux-low.h (linux_stop_lwp): Declare.
12229
12230 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12231 argument instead of a i386_debug_reg_state.
12232 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12233 a i386_debug_reg_state.
12234 (i386_insert_aligned_watchpoint): Adjust.
12235 (i386_remove_aligned_watchpoint): Adjust.
12236 (i386_low_stopped_data_address): Read the debug registers from the
12237 inferior instead of from the mirrors.
12238 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12239 (i386_dr_low_get_addr): Declare.
12240 (i386_dr_low_get_control): Declare.
12241 (i386_dr_low_get_status): Change prototype.
12242
12243 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12244 (i386_dr_low_get_addr): New.
12245 (i386_dr_low_get_control): New.
12246 (i386_dr_low_get_status): Adjust prototype. Return
12247 dr_status_mirror.
12248 (i386_initial_stuff): Clear dr_status_mirror and
12249 dr_control_mirror.
12250 (i386_get_thread_context): Adjust.
12251 (i386_set_thread_context): Adjust.
12252 (i386_thread_added): Adjust.
12253
5f21a75b
PA
122542010-08-24 Pedro Alves <pedro@codesourcery.com>
12255
12256 * linux-low.h (linux_thread_area): Delete declaration.
12257
3e4c1235
TS
122582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12259
12260 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12261 after its termination.
12262
1971b033
PA
122632010-08-09 Pedro Alves <pedro@codesourcery.com>
12264
12265 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12266 (gdb_wants_all_stopped): Delete.
12267 (linux_wait_1): Don't call them.
12268 * server.c (handle_v_cont): Tag all threads as want-stopped.
12269 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12270 stopped as "client-wants-stopped".
12271
310444ac
PA
122722010-07-31 Pedro Alves <pedro@codesourcery.com>
12273
12274 * Makefile.in (signals_h): New.
12275 (server_h): Depend on it.
12276 (server.o): Don't depend on $(signals_def).
12277 (signals.o): Depend on $(signals_def).
12278
a19cae16
JK
122792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12280
12281 * Makefile.in (signals_def): New.
12282 (server_h): Append include/gdb/signals.h and signals_def.
12283 (server.o): Append signals_def.
12284
30d50328
JK
122852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12286
12287 * server.c (handle_target_event): Use target_signal_to_host for
12288 resume_info.sig initialization.
12289 * target.h (struct thread_resume) <sig>: New comment.
12290
5c3216e2
OS
122912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12292
c6f46ca0
OS
12293 * server.c (handle_query): strcpy() the returned string from paddress()
12294 instead of sprintf().
5c3216e2
OS
12295 * utils.c (paddress): Return phex_nz().
12296
6bd31874
JB
122972010-07-07 Joel Brobecker <brobecker@adacore.com>
12298
12299 * server.c (handle_v_cont): Call mourn_inferior if process
12300 just exited.
12301 (myresume): Likewise.
12302
0fb4aa4b
PA
123032010-07-01 Pedro Alves <pedro@codesourcery.com>
12304
12305 Static tracepoints, and integration with UST.
12306
12307 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12308 * mem-break.c (uninsert_all_breakpoints)
12309 (reinsert_all_breakpoints): New.
12310 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12311 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12312 (gdb_agent_ust_loaded, helper_thread_id)
12313 (gdb_agent_helper_thread_id): New macros.
12314 (struct ipa_sym_addresses): Add addr_ust_loaded,
12315 addr_helper_thread_id, addr_cmd_buf.
12316 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12317 (in_process_agent_loaded_ust): New.
12318 (write_e_ust_not_loaded): New.
12319 (maybe_write_ipa_ust_not_loaded): New.
12320 (struct collect_static_trace_data_action): New.
12321 (enum tracepoint_type) <static_tracepoint>: New.
12322 (struct tracepoint) <handle>: Mention static tracepoints.
12323 (struct static_tracepoint_ctx): New.
12324 (CMD_BUF_SIZE): New.
12325 (add_tracepoint_action): Handle static tracepoint actions.
12326 (unprobe_marker_at): New.
12327 (clear_installed_tracepoints): Handle static tracepoints.
12328 (cmd_qtdp): Handle static tracepoints.
12329 (probe_marker_at): New.
12330 (cmd_qtstart): Handle static tracepoints.
12331 (response_tracepoint): Handle static tracepoints.
12332 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12333 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12334 (get_context_regcache): Handle static tracepoints.
12335 (do_action_at_tracepoint): Handle static tracepoint actions.
12336 (traceframe_find_block_type): Handle static trace data blocks.
12337 (traceframe_read_sdata): New.
12338 (download_tracepoints): Download static tracepoint actions.
12339 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12340 (GDB_PROBE_NAME): New.
12341 (ust_ops): New.
12342 (GET_UST_SYM): New.
12343 (USTF): New.
12344 (dlsym_ust): New.
12345 (ust_marker_to_static_tracepoint): New.
12346 (gdb_probe): New.
12347 (collect_ust_data_at_tracepoint): New.
12348 (gdb_ust_probe): New.
12349 (UNIX_PATH_MAX, SOCK_DIR): New.
12350 (gdb_ust_connect_sync_socket): New.
12351 (resume_thread, stop_thread): New.
12352 (run_inferior_command): New.
12353 (init_named_socket): New.
12354 (gdb_ust_socket_init): New.
12355 (cstr_to_hexstr): New.
12356 (next_st): New.
12357 (first_marker, next_marker): New.
12358 (response_ust_marker): New.
12359 (cmd_qtfstm, cmd_qtsstm): New.
12360 (unprobe_marker_at, probe_marker_at): New.
12361 (cmd_qtstmat, gdb_ust_thread): New.
12362 (gdb_ust_init): New.
12363 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12364 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12365 (ST_REGENTRY): New.
12366 (x86_64_st_collect_regmap): New.
12367 (X86_64_NUM_ST_COLLECT_GREGS): New.
12368 (AMD64_RIP_REGNUM): New.
12369 (supply_static_tracepoint_registers): New.
12370 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12371 (ST_REGENTRY): New.
12372 (i386_st_collect_regmap): New.
12373 (i386_NUM_ST_COLLECT_GREGS): New.
12374 (supply_static_tracepoint_registers): New.
12375 * server.c (handle_query): Handle qXfer:statictrace:read.
12376 <qSupported>: Report support for StaticTracepoints, and
12377 qXfer:statictrace:read features.
12378 * server.h (traceframe_read_sdata)
12379 (supply_static_tracepoint_registers): Declare.
12380 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12381 (unpack_varlen_hex): Include in IPA build.
12382 * Makefile.in (ustlibs, ustinc): New.
12383 (IPA_OBJS): Add remote-utils-ipa.o.
12384 ($(IPA_LIB)): Link -ldl and -lpthread.
12385 (UST_CFLAGS): New.
12386 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12387 * config.in, configure: Regenerate.
12388
9e4344e5
PA
123892010-06-20 Ian Lance Taylor <iant@google.com>
12390 Pedro Alves <pedro@codesourcery.com>
12391
12392 * linux-x86-low.c (always_true): Delete.
12393 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12394 trying to fool the compiler with always_true.
12395
c6beb2cb
PA
123962010-06-20 Pedro Alves <pedro@codesourcery.com>
12397
12398 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12399 conditions in gdbserver.
12400
d2ed6730
UW
124012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12402
12403 * spu-low.c (spu_read_memory): Wrap around local store limit.
12404 (spu_write_memory): Likewise.
12405
4e29fb54
PA
124062010-06-15 Pedro Alves <pedro@codesourcery.com>
12407
12408 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12409 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12410 LONGEST uses.
12411 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12412 uses.
12413 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12414 uses with LONGEST uses.
12415
6a271cae
PA
124162010-06-14 Stan Shebs <stan@codesourcery.com>
12417 Pedro Alves <pedro@codesourcery.com>
12418
12419 Bytecode compiler.
12420
12421 * linux-x86-low.c: Include limits.h.
12422 (add_insns): New.
12423 (always_true): New.
12424 (EMIT_ASM): New.
12425 (EMIT_ASM32): New.
12426 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12427 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12428 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12429 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12430 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12431 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12432 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12433 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12434 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12435 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12436 (amd64_emit_void_call_2): New.
12437 (amd64_emit_ops): New.
12438 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12439 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12440 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12441 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12442 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12443 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12444 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12445 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12446 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12447 (i386_emit_stack_adjust, i386_emit_int_call_1)
12448 (i386_emit_void_call_2): New.
12449 (i386_emit_ops): New.
12450 (x86_emit_ops): New.
12451 (the_low_target): Install x86_emit_ops.
12452 * server.h (struct emit_ops): New.
12453 (get_raw_reg_func_addr): Declare.
12454 (current_insn_ptr, emit_error): Declare.
12455 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12456 (set_trace_state_variable_value): New defines.
12457 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12458 addr_get_trace_state_variable_value and
12459 addr_set_trace_state_variable_value.
12460 (symbol_list): New fields for get_raw_reg,
12461 get_trace_state_variable_value and set_trace_state_variable_value.
12462 (condfn): New typedef.
12463 (struct tracepoint): New field `compiled_cond'.
12464 (do_action_at_tracepoint): Clear compiled_cond.
12465 (get_trace_state_variable_value, set_trace_state_variable_value):
12466 Export in the IPA.
12467 (condition_true_at_tracepoint): If there's a compiled condition,
12468 run that.
12469 (current_insn_ptr, emit_error): New globals.
12470 (struct bytecode_address): New.
12471 (get_raw_reg_func_addr): New.
12472 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12473 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12474 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12475 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12476 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12477 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12478 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12479 (compile_tracepoint_condition, compile_bytecodes): New.
12480 * target.h (emit_ops): Forward declare.
12481 (struct target_ops): New field emit_ops.
12482 (target_emit_ops): New.
12483 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12484 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12485 * linux-low.c (linux_emit_ops): New.
12486 (linux_target_ops): Install it.
12487 * linux-low.h (struct linux_target_ops): New field emit_ops.
12488
92b72907
UW
124892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12490
12491 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12492 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12493
fa593d66
PA
124942010-06-01 Pedro Alves <pedro@codesourcery.com>
12495 Stan Shebs <stan@codesourcery.com>
12496
12497 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12498 (all): Depend on $(extra_libraries).
12499 (install-only): Install the IPA.
12500 (IPA_OBJS, IPA_LIB): New.
12501 (clean): Remove the IPA lib.
12502 (IPAGENT_CFLAGS): New.
12503 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12504 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12505 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12506 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12507 * configure.ac: Check for atomic builtins support in the compiler.
12508 (IPA_DEPFILES, extra_libraries): Define.
12509 * configure.srv (ipa_obj): Add description.
12510 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12511 (i[34567]86-*-linux*): Set ipa_obj.
12512 (x86_64-*-linux*): Set ipa_obj.
12513 * linux-low.c (stabilizing_threads): New.
12514 (supports_fast_tracepoints): New.
12515 (linux_detach): Stabilize threads before detaching.
12516 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12517 the lwp is either not stabilizing, or is moving out of a jump pad.
12518 (linux_fast_tracepoint_collecting): New.
12519 (maybe_move_out_of_jump_pad): New.
12520 (enqueue_one_deferred_signal): New.
12521 (dequeue_one_deferred_signal): New.
12522 (linux_wait_for_event_1): If moving out of a jump pad, defer
12523 pending signals to later.
12524 (linux_stabilize_threads): New.
12525 (linux_wait_1): Check if threads need moving out of jump pads, and
12526 do it if so.
12527 (stuck_in_jump_pad_callback): New.
12528 (move_out_of_jump_pad_callback): New.
12529 (lwp_running): New.
12530 (linux_resume_one_lwp): Handle moving out of jump pads.
12531 (linux_set_resume_request): Dequeue deferred signals.
12532 (need_step_over_p): Also step over fast tracepoint jumps.
12533 (start_step_over): Also uninsert fast tracepoint jumps.
12534 (finish_step_over): Also reinsert fast tracepoint jumps.
12535 (linux_install_fast_tracepoint_jump): New.
12536 (linux_target_ops): Install linux_stabilize_threads and
12537 linux_install_fast_tracepoint_jump_pad.
12538 * linux-low.h (linux_target_ops) <get_thread_area,
12539 install_fast_tracepoint_jump_pad>: New fields.
12540 (struct lwp_info) <collecting_fast_tracepoint,
12541 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12542 (linux_get_thread_area): Declare.
12543 * linux-x86-low.c (jump_insn): New.
12544 (x86_get_thread_area): New.
12545 (append_insns): New.
12546 (push_opcode): New.
12547 (amd64_install_fast_tracepoint_jump_pad): New.
12548 (i386_install_fast_tracepoint_jump_pad): New.
12549 (x86_install_fast_tracepoint_jump_pad): New.
12550 (the_low_target): Install x86_get_thread_area and
12551 x86_install_fast_tracepoint_jump_pad.
12552 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12553 (struct fast_tracepoint_jump): New.
12554 (fast_tracepoint_jump_insn): New.
12555 (fast_tracepoint_jump_shadow): New.
12556 (find_fast_tracepoint_jump_at): New.
12557 (fast_tracepoint_jump_here): New.
12558 (delete_fast_tracepoint_jump): New.
12559 (set_fast_tracepoint_jump): New.
12560 (uninsert_fast_tracepoint_jumps_at): New.
12561 (reinsert_fast_tracepoint_jumps_at): New.
12562 (set_breakpoint_at): Use write_inferior_memory.
12563 (uninsert_raw_breakpoint): Use write_inferior_memory.
12564 (check_mem_read): Mask out fast tracepoint jumps.
12565 (check_mem_write): Mask out fast tracepoint jumps.
12566 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12567 (set_fast_tracepoint_jump): Declare.
12568 (delete_fast_tracepoint_jump)
12569 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12570 (reinsert_fast_tracepoint_jumps_at): Declare.
12571 * regcache.c: Don't compile many functions when building the
12572 in-process agent library.
12573 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12574 the register buffer in the heap.
12575 (free_register_cache): If the register buffer isn't owned by the
12576 regcache, don't free it.
12577 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12578 pre-existing register caches.
12579 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12580 type.
12581 (convert_ascii_to_int): : Constify `from' parameter type.
12582 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12583 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12584 the needed buffer in-place.
12585 (relocate_instruction): New.
12586 * server.c (handle_query) <qSymbols>: If the target supports
12587 tracepoints, give it a chance of looking up symbols. Report
12588 support for fast tracepoints.
12589 (handle_status): Stabilize threads.
12590 (process_serial_event): Adjust.
12591 * server.h (struct fast_tracepoint_jump): Forward declare.
12592 (struct process_info) <fast_tracepoint_jumps>: New field.
12593 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12594 (decode_X_packet, decode_M_packet): Adjust.
12595 (relocate_instruction): Declare.
12596 (in_process_agent_loaded): Declare.
12597 (tracepoint_look_up_symbols): Declare.
12598 (struct fast_tpoint_collect_status): Declare.
12599 (fast_tracepoint_collecting): Declare.
12600 (force_unlock_trace_buffer): Declare.
12601 (handle_tracepoint_bkpts): Declare.
12602 (initialize_low_tracepoint)
12603 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12604 * target.h (struct target_ops) <stabilize_threads,
12605 install_fast_tracepoint_jump_pad>: New fields.
12606 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12607 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12608 [HAVE_STDINT_H]: Include stdint.h.
12609 (trace_debug_1): Rename to ...
12610 (trace_vdebug): ... this.
12611 (trace_debug): Rename to ...
12612 (trace_debug_1): ... this. Add `level' parameter.
12613 (trace_debug): New.
12614 (ATTR_USED, ATTR_NOINLINE): New.
12615 (IP_AGENT_EXPORT): New.
12616 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12617 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12618 (about_to_request_buffer_space, trace_buffer_is_full)
12619 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12620 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12621 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12622 (traceframe_write_count, traceframes_created)
12623 (trace_state_variables)
12624 New renaming defines.
12625 (struct ipa_sym_addresses): New.
12626 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12627 (symbol_list): New.
12628 (ipa_sym_addrs): New.
12629 (all_tracepoint_symbols_looked_up): New.
12630 (in_process_agent_loaded): New.
12631 (write_e_ipa_not_loaded): New.
12632 (maybe_write_ipa_not_loaded): New.
12633 (tracepoint_look_up_symbols): New.
12634 (debug_threads) [IN_PROCESS_AGENT]: New.
12635 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12636 (UNKNOWN_SIDE_EFFECTS): New.
12637 (stop_tracing): New.
12638 (flush_trace_buffer): New.
12639 (stop_tracing_bkpt): New.
12640 (flush_trace_buffer_bkpt): New.
12641 (read_inferior_integer): New.
12642 (read_inferior_uinteger): New.
12643 (read_inferior_data_pointer): New.
12644 (write_inferior_data_pointer): New.
12645 (write_inferior_integer): New.
12646 (write_inferior_uinteger): New.
12647 (struct collect_static_trace_data_action): Delete.
12648 (enum tracepoint_type): New.
12649 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12650 <actions_str, step_actions, step_actions_str>: Only include in
12651 GDBserver.
fa593d66
PA
12652 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12653 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12654 (tracepoints): Use IP_AGENT_EXPORT.
12655 (last_tracepoint): Don't include in the IPA.
12656 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12657 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12658 (alloced_trace_state_variables): New.
12659 (trace_state_variables): Use IP_AGENT_EXPORT.
12660 (traceframe_t): Delete unused variable.
12661 (circular_trace_buffer): Don't include in the IPA.
12662 (trace_buffer_start): Delete.
12663 (struct trace_buffer_control): New.
12664 (trace_buffer_free): Delete.
12665 (struct ipa_trace_buffer_control): New.
12666 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12667 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12668 New.
12669 (trace_buffer_ctrl): New.
12670 (TRACE_BUFFER_CTRL_CURR): New.
12671 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12672 Reimplement as macros.
12673 (trace_buffer_wrap): Delete.
12674 (traceframe_write_count, traceframe_read_count)
12675 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12676 (struct tracepoint_hit_ctx) <type>: New field.
12677 (struct fast_tracepoint_ctx): New.
12678 (memory_barrier): New.
12679 (cmpxchg): New.
12680 (record_tracepoint_error): Update atomically in the IPA.
12681 (clear_inferior_trace_buffer): New.
12682 (about_to_request_buffer_space): New.
12683 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12684 updating the same buffer.
12685 (add_tracepoint): Default the tracepoint's type to trap
12686 tracepoint, and orig_size to -1.
12687 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12688 internal variables.
12689 (create_trace_state_variable): New parameter `gdb'. Handle it.
12690 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12691 (cmd_qtdp): Handle fast tracepoints.
12692 (cmd_qtdv): Adjust.
12693 (max_jump_pad_size): New.
12694 (gdb_jump_pad_head): New.
12695 (get_jump_space_head): New.
12696 (claim_jump_space): New.
12697 (sort_tracepoints): New.
12698 (MAX_JUMP_SIZE): New.
12699 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12700 IPA.
12701 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12702 support. Upload fast traceframes, and delete internal IPA
12703 breakpoints.
12704 (stop_tracing_handler): New.
12705 (flush_trace_buffer_handler): New.
12706 (cmd_qtstop): Upload fast tracepoints.
12707 (response_tracepoint): Handle fast tracepoints.
12708 (tracepoint_finished_step): Upload fast traceframes. Set the
12709 tracepoint hit context's tracepoint type.
12710 (handle_tracepoint_bkpts): New.
12711 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12712 type. Add comment about fast tracepoints.
12713 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12714 non-existing action_str field.
12715 (get_context_regcache): Handle fast tracepoints.
12716 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12717 to the regcache.
12718 (fast_tracepoint_from_jump_pad_address): New.
12719 (fast_tracepoint_from_ipa_tpoint_address): New.
12720 (collecting_t): New.
12721 (force_unlock_trace_buffer): New.
12722 (fast_tracepoint_collecting): New.
12723 (collecting): New.
12724 (gdb_collect): New.
12725 (write_inferior_data_ptr): New.
12726 (target_tp_heap): New.
12727 (target_malloc): New.
12728 (download_agent_expr): New.
12729 (UALIGN): New.
12730 (download_tracepoints): New.
12731 (download_trace_state_variables): New.
12732 (upload_fast_traceframes): New.
12733 (IPA_FIRST_TRACEFRAME): New.
12734 (IPA_NEXT_TRACEFRAME_1): New.
12735 (IPA_NEXT_TRACEFRAME): New.
12736 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12737 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12738 (gdb_jump_pad_buffer_end): New.
12739 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12740 (initialize_tracepoint): Adjust.
12741 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12742 buffer. Initialize the low module.
12743 * utils.c (PREFIX, TOOLNAME): New.
12744 (malloc_failure): Use PREFIX.
12745 (error): In the IPA, an error causes an exit.
12746 (fatal, warning): Use PREFIX.
12747 (internal_error): Use TOOLNAME.
12748 (NUMCELLS): Increase to 10.
12749 * configure, config.in: Regenerate.
12750
d149dd1d
PA
127512010-06-01 Pedro Alves <pedro@codesourcery.com>
12752
12753 * server.c (handle_query) <qSupported>: Do two passes over the
12754 qSupported string to avoid nesting strtok.
12755
f6528abd
JK
127562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12757
12758 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12759 (CDEPS): New.
12760 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12761 -Wl,--dynamic-list.
12762 * configure: Regenerate.
12763 * proc-service.list: New.
12764
ca2a87a0
JK
127652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12766
12767 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12768 New comment.
12769
363a6e9f
OS
127702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12771
12772 * gdbreplay.c (remote_open): Check error return from socket() call by
12773 its equality to -1 not by it being negative.
12774 * remote-utils.c (remote_open): Likewise.
12775
d23b6cb1
PA
127762010-05-23 Pedro Alves <pedro@codesourcery.com>
12777
12778 * config.h: Regenerate.
12779
28d3cf85
MK
127802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12781
12782 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12783 doesn't provide PTRACE_GET_THREAD_AREA.
12784
fea36a59
MK
127852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12786
12787 * linux-m68k-low.c: Include <asm/ptrace.h>
12788 (ps_get_thread_area): Implement.
12789
24b066ba
DE
127902010-05-03 Doug Evans <dje@google.com>
12791
12792 * event-loop.c (struct callback_event): New struct.
12793 (callback_list): New global.
12794 (append_callback_event, delete_callback_event): New functions.
12795 (process_callback): New function.
12796 (start_event_loop): Call it.
12797 * remote-utils.c (NOT_SCHEDULED): Define.
12798 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12799 moved out of readchar.
12800 (readchar): Rewrite. Call reschedule before returning.
12801 (reset_readchar): New function.
12802 (remote_close): Call it.
12803 (process_remaining, reschedule): New functions.
12804 * server.h (callback_handler_func): New typedef.
12805 (append_callback_event, delete_callback_event): Declare.
12806
9836d6ea
PA
128072010-05-03 Pedro Alves <pedro@codesourcery.com>
12808
12809 * proc-service.c (ps_pglobal_lookup): Use
12810 thread_db_look_up_one_symbol.
12811 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12812 parameter. Use it instead of all_symbols_looked_up.
12813 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12814 field.
12815 (all_symbols_looked_up): Don't declare.
12816 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12817 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12818 field.
12819 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12820 Set all_symbols_looked_up here.
12821 (thread_db_look_up_one_symbol): New.
12822 (thread_db_get_tls_address): Adjust.
12823 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12824 thread_db object on the heap, and tentatively set it in the
12825 process structure.
12826 (thread_db_init): Don't set all_symbols_looked_up here.
12827 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12828
7984d532
PA
128292010-05-03 Pedro Alves <pedro@codesourcery.com>
12830
12831 * linux-low.c (linux_kill, linux_detach): Adjust.
12832 (status_pending_p_callback): Remove redundant statement. Check
12833 for !TARGET_WAITIKIND_IGNORE, instead of
12834 TARGET_WAITKIND_STOPPED.
12835 (handle_tracepoints): Make sure LWP is locked. Adjust.
12836 (linux_wait_for_event_1): Adjust.
12837 (linux_cancel_breakpoints): New.
12838 (unsuspend_one_lwp): New.
12839 (unsuspend_all_lwps): New.
12840 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12841 (send_sigstop_callback): Change return type to int, add new
12842 `except' parameter and handle it.
12843 (suspend_and_send_sigstop_callback): New.
12844 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12845 pass them down. If SUSPEND, also increment the lwp's suspend
12846 count.
12847 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12848 (need_step_over_p): Don't consider suspended LWPs.
12849 (start_step_over): Adjust.
12850 (proceed_one_lwp): Change return type to int, add new `except'
12851 parameter and handle it.
12852 (unsuspend_and_proceed_one_lwp): New.
12853 (proceed_all_lwps): Use find_inferior instead of
12854 for_each_inferior.
12855 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12856 also decrement the suspend count of LWPs. Pass `except' down,
12857 instead of hacking its suspend count.
12858 (linux_pause_all): Add `freeze' parameter. Adjust.
12859 (linux_unpause_all): New.
12860 (linux_target_ops): Install linux_unpause_all.
12861 * server.c (handle_status): Adjust.
12862 * target.h (struct target_ops): New fields `unpause_all' and
12863 `cancel_breakpoints'. Add new parameter to `pause_all'.
12864 (pause_all): Add new `freeze' parameter.
12865 (unpause_all): New.
12866 (cancel_breakpoints): New.
12867 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12868 cancel breakpoints.
12869 (cmd_qtstart): Pause threads.
12870 (stop_tracing): Pause threads, and cancel breakpoints.
12871 * win32-low.c (win32_target_ops): Adjust.
12872
e471f25b
PA
128732010-05-03 Pedro Alves <pedro@codesourcery.com>
12874
12875 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12876 the inferior right away from here...
12877 (linux_wait_1): ... to here, and adjust to check the thread's
12878 last_resume_kind instead of the lwp's step or stop_expected flags.
12879
1915ef4f
PA
128802010-05-02 Pedro Alves <pedro@codesourcery.com>
12881
12882 * README: Use consistent `GDB' and `GDBserver' spellings.
12883
f9e39928
PA
128842010-05-02 Pedro Alves <pedro@codesourcery.com>
12885
12886 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12887 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12888 (linux_detach_one_lwp): Assume the lwp is stopped.
12889 (any_thread_of): Delete.
12890 (linux_detach): Stop all lwps here. Don't blindly delete all
12891 breakpoints.
12892 (delete_lwp_callback): New.
12893 (linux_mourn): Delete all lwps of the process that is gone.
12894 (linux_wait_1): Don't delete the last lwp of the process here.
12895 * mem-break.h (mark_breakpoints_out): Declare.
12896 * mem-break.c (mark_breakpoints_out): New.
12897 (free_all_breakpoints): Use it.
12898 * server.c (handle_target_event): If the process is gone, mark
12899 breakpoints out.
12900 * thread-db.c (struct thread_db) <create_bp>: New field.
12901 (thread_db_enable_reporting): Fix prototype. Store a thread event
12902 breakpoint reference in the thread_db struct.
12903 (thread_db_load_search): Clear the thread_db object.
12904 (try_thread_db_load_1): Ditto.
12905 (switch_to_process): New.
12906 (disable_thread_event_reporting): Use it.
12907 (remove_thread_event_breakpoints): New.
12908 (thread_db_detach, thread_db_mourn): Use it.
12909
1e7fc18c
PA
129102010-05-01 Pedro Alves <pedro@codesourcery.com>
12911
12912 * linux-low.c (linux_enable_event_reporting): New.
12913 (linux_wait_for_event_1, handle_extended_wait): Use it.
12914
02fc4de7
PA
129152010-04-30 Pedro Alves <pedro@codesourcery.com>
12916
12917 * linux-low.c (linux_kill_one_lwp, linux_kill)
12918 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12919 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12920 SIGSTOP even if the LWP is stopped.
12921 (send_sigstop_callback): New.
12922 (stop_all_lwps): Use send_sigstop_callback instead.
12923 (linux_resume_one_thread): Adjust.
12924 (proceed_one_lwp): Still proceed an LWP that the client has
12925 requested to stop, if we haven't reported it as stopped yet. Make
12926 sure that LWPs the client want stopped, have a pending SIGSTOP.
12927
bc3b5632
DE
129282010-04-26 Doug Evans <dje@google.com>
12929
ae1ada35
DE
12930 * server.c (handle_general_set): Make static.
12931
bc3b5632
DE
12932 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12933 Print received char after testing for error/eof instead of before.
12934 (input_interrupt): Tweak comment.
12935
65730243
DE
129362010-04-23 Doug Evans <dje@google.com>
12937
12938 * server.c (start_inferior): Print inferior argv if --debug.
12939
a8ae7dc0
AR
129402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12941
12942 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12943 * nto-x86-low.c: Include server.h
12944
1c07cc19
PM
129452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12946
12947 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12948 be consistent with other sources of this directory.
12949 (init_registers_amd64): Correct name of source file of this function
12950 in the comment.
12951
e0a61e09
PM
129522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12953
12954 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12955 64-bit executables.
12956
54709339
PM
129572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12958
12959 * win32-i386-low.c: Add 64-bit support.
12960 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12961 (init_registers_amd64): Declare.
12962 (mappings): Add 64-bit version of array.
12963 (init_windows_x86): New function.
12964 (the_low_target): Change init_arch field to init_windows_x86.
12965
e8f0053d
PM
129662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12967
12968 * win32-low.c: Adapt to support also 64-bit architecture.
12969 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12970 (get_image_name): Use SIZE_T type for local variable `done'.
12971 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12972 (toolhelp_get_dll_name): Idem.
12973 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12974 Use uintptr_t typecast to avoid warning.
12975 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12976 (handle_exception): Use phex_nz to avoid warning.
12977 (win32_wait): Remove unused local variable `process'.
12978
c481e77e
PM
129792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12980
12981 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12982 `amd64-avx.o'.
12983
12ea4b69
PM
129842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12985
12986 * configure.ac: Use `ws2_32' library for srv_mingw.
12987 * configure: Regenerate.
12988 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12989 * remote-utils.c: Likewise.
12990
f6d1620c
L
129912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12992
12993 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12994 if __x86_64__ is defined.
12995
8e642873
PM
129962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12997
12998 * configure: Regenerate.
12999
711e434b
PM
130002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13001
13002 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13003 * target.h (target_ops): New get_tib_address field.
13004 * win32-low.h (win32_thread_info): Add thread_local_base field.
13005 * win32-low.c (child_add_thread): Add tlb argument.
13006 Set thread_local_base field to TLB.
13007 (get_child_debug_event): Adapt to child_add_thread change.
13008 (win32_get_tib_address): New function.
13009 (win32_target_ops): Set get_tib_address field to
13010 win32_get_tib_address.
13011 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13012
505106cd
PA
130132010-04-12 Pedro Alves <pedro@codesourcery.com>
13014
505106cd
PA
13015 * linux-low.c (linux_mourn): Also remove the process.
13016 * server.c (handle_target_event): Don't remove the process here.
13017 * nto-low.c (nto_mourn): New.
13018 (nto_target_ops): Install it.
13019 * spu-low.c (spu_mourn): New.
13020 (spu_target_ops): Install it.
13021 * win32-low.c (win32_mourn): New.
13022 (win32_target_ops): Install it.
13023
e8470a06
PA
130242010-04-12 Pedro Alves <pedro@codesourcery.com>
13025
13026 * server.h (buffer_xml_printf): Remove redundant `;'.
13027
45ba0d02
PA
130282010-04-12 Pedro Alves <pedro@codesourcery.com>
13029
13030 * regcache.c (set_register_cache): Invalidate regcaches before
13031 changing the register cache layout.
13032 (regcache_invalidate_one): Allow a NULL regcache.
13033 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13034 regcaches before changing the register cache layout or the target
13035 regsets.
13036
59e04013
L
130372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13038
13039 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13040 variable warning on Linux/x86-64.
13041
8336d594
PA
130422010-04-11 Pedro Alves <pedro@codesourcery.com>
13043
13044 GDBserver disconnected tracing support.
13045
13046 * linux-low.c (linux_remove_process): Delete.
13047 (add_lwp): Don't set last_resume_kind here.
13048 (linux_kill): Use `mourn'.
13049 (linux_detach): Use `thread_db_detach', and `mourn'.
13050 (linux_mourn): New.
13051 (linux_attach_lwp_1): Adjust comment.
13052 (linux_attach): last_resume_kind moved the thread_info; adjust.
13053 (status_pending_p_callback): Adjust.
13054 (linux_wait_for_event_1): Adjust.
13055 (count_events_callback, select_singlestep_lwp_callback)
13056 (select_event_lwp_callback, cancel_breakpoints_callback)
13057 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13058 (proceed_one_lwp): Adjust.
13059 (linux_async): Add debug output.
13060 (linux_thread_stopped): New.
13061 (linux_pause_all): New.
13062 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13063 linux_pause_all.
13064 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13065 (thread_db_free): Delete declaration.
13066 (thread_db_detach, thread_db_mourn): Declare.
13067 * thread-db.c (thread_db_init): Use thread_db_mourn.
13068 (thread_db_free): Delete, split in two.
13069 (disable_thread_event_reporting): New.
13070 (thread_db_detach): New.
13071 (thread_db_mourn): New.
13072
13073 * server.h (struct thread_info) <last_resume_kind>: New field.
13074 <attached>: Add comment.
13075 <gdb_detached>: New field.
13076 (handler_func): Change return type to int.
13077 (handle_serial_event, handle_target_event): Ditto.
13078 (gdb_connected): Declare.
13079 (tracing): Delete.
13080 (disconnected_tracing): Declare.
13081 (stop_tracing): Declare.
13082
13083 * server.c (handle_query) <qSupported>: Report support for
13084 disconnected tracing.
13085 (queue_stop_reply_callback): Account for running threads.
13086 (gdb_wants_thread_stopped): New.
13087 (gdb_wants_all_threads_stopped): New.
13088 (gdb_reattached_process): New.
13089 (handle_status): Clear the `gdb_detached' flag of all processes.
13090 In all-stop, stop all threads.
13091 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13092 (process_serial_event): If the remote connection breaks, or if an
13093 exit was forced with "monitor exit", force an event loop exit.
13094 Handle disconnected tracing on detach.
13095 (handle_serial_event): Adjust.
13096 (handle_target_event): If GDB isn't connected, forward events back
13097 to the inferior, unless the last process exited, in which case,
13098 exit gdbserver. Adjust interface.
13099
13100 * remote-utils.c (remote_open): Don't block in accept. Instead
13101 register an event loop source on the listen socket file
13102 descriptor. Refactor bits into ...
13103 (listen_desc): ... this new global.
13104 (gdb_connected): ... this new function.
13105 (enable_async_notification): ... this new function.
13106 (handle_accept_event): ... this new function.
13107 (remote_close): Clear remote_desc.
13108
13109 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13110
13111 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13112 New fields.
13113 (mourn_inferior): Define.
13114 (target_process_qsupported): Avoid the dangling else problem.
13115 (thread_stopped): Define.
13116 (pause_all): Define.
13117 (target_waitstatus_to_string): Declare.
13118 * target.c (target_waitstatus_to_string): New.
13119
13120 * tracepoint.c (tracing): Make extern.
13121 (disconnected_tracing): New.
13122 (stop_tracing): Make extern. Handle tracing stops due to GDB
13123 disconnecting.
13124 (cmd_qtdisconnected): New.
13125 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13126 (handle_tracepoint_general_set): Handle QTDisconnected.
13127
13128 * event-loop.c (event_handler_func): Change return type to int.
13129 (process_event): Bail out if the event handler wants the event
13130 loop to stop.
13131 (handle_file_event): Ditto.
13132 (start_event_loop): Bail out if the event handler wants the event
13133 loop to stop.
13134
13135 * nto-low.c (nto_target_ops): Adjust.
13136 * spu-low.c (spu_wait): Don't remove the process here.
13137 (spu_target_ops): Adjust.
13138 * win32-low.c (win32_wait): Don't remove the process here.
13139 (win32_target_ops): Adjust.
13140
5d267c4c
PA
131412010-04-11 Pedro Alves <pedro@codesourcery.com>
13142
13143 * regcache.c (realloc_register_cache): Invalidate inferior's
13144 regcache before recreating it.
13145
623ccd72
PA
131462010-04-09 Pedro Alves <pedro@codesourcery.com>
13147
13148 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13149
219f2f23
PA
131502010-04-09 Stan Shebs <stan@codesourcery.com>
13151 Pedro Alves <pedro@codesourcery.com>
13152
13153 * server.h (LONGEST): New.
13154 (struct thread_info) <while_stepping>: New field.
13155 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13156 Declare.
13157 (initialize_tracepoint, handle_tracepoint_general_set)
13158 (handle_tracepoint_query, tracepoint_finished_step)
13159 (tracepoint_was_hit, release_while_stepping_state_list):
13160 (current_traceframe): Declare.
13161 * server.c (handle_general_set): Handle tracepoint packets.
13162 (read_memory): New.
13163 (write_memory): New.
13164 (handle_search_memory_1): Use read_memory.
13165 (handle_query): Report support for conditional tracepoints, trace
13166 state variables, and tracepoint sources. Handle tracepoint
13167 queries.
13168 (main): Initialize the tracepoints module.
13169 (process_serial_event): Handle traceframe reads/writes.
13170
13171 * linux-low.c (handle_tracepoints): New.
13172 (linux_wait_1): Call it.
13173 (linux_resume_one_lwp): Handle while-stepping.
13174 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13175 (linux_target_ops): Install them.
13176 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13177 New field.
13178 * linux-x86-low.c (x86_supports_tracepoints): New.
13179 (the_low_target). Install it.
13180
13181 * mem-break.h (delete_breakpoint): Declare.
13182 * mem-break.c (delete_breakpoint): Make external.
13183
13184 * target.h (struct target_ops): Add `supports_tracepoints',
13185 `read_pc', and `write_pc' fields.
13186 (target_supports_tracepoints): Define.
13187 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13188 (phex_nz): New.
13189
13190 * regcache.h (struct regcache) <registers_owned>: New field.
13191 (init_register_cache, regcache_cpy): Declare.
13192 (regcache_read_pc, regcache_write_pc): Declare.
13193 (register_cache_size): Declare.
13194 (supply_regblock): Declare.
13195 * regcache.c (init_register_cache): New.
13196 (new_register_cache): Use it.
13197 (regcache_cpy): New.
13198 (register_cache_size): New.
13199 (supply_regblock): New.
13200 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13201
219f2f23
PA
13202 * tracepoint.c: New.
13203
13204 * Makefile.in (OBS): Add tracepoint.o.
13205 (tracepoint.o): New rule.
13206
3a13a53b
L
132072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13208
13209 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13210 (i386-mmx.o): New.
13211 (i386-mmx.c): Likewise.
13212 (i386-mmx-linux.o): Likewise.
13213 (i386-mmx-linux.c): Likewise.
13214
13215 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13216 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13217 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13218 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13219
13220 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13221 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13222 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13223
1570b33e
L
132242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13225
13226 * Makefile.in (clean): Updated.
13227 (i386-avx.o): New.
13228 (i386-avx.c): Likewise.
13229 (i386-avx-linux.o): Likewise.
13230 (i386-avx-linux.c): Likewise.
13231 (amd64-avx.o): Likewise.
13232 (amd64-avx.c): Likewise.
13233 (amd64-avx-linux.o): Likewise.
13234 (amd64-avx-linux.c): Likewise.
13235
13236 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13237 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13238 (srv_amd64_regobj): Add amd64-avx.o.
13239 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13240 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13241 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13242 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13243 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13244 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13245 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13246
13247 * i387-fp.c: Include "i386-xstate.h".
13248 (i387_xsave): New.
13249 (i387_cache_to_xsave): Likewise.
13250 (i387_xsave_to_cache): Likewise.
13251 (x86_xcr0): Likewise.
13252
13253 * i387-fp.h (i387_cache_to_xsave): Likewise.
13254 (i387_xsave_to_cache): Likewise.
13255 (x86_xcr0): Likewise.
13256
13257 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13258 * linux-crisv32-low.c (target_regsets): Likewise.
13259 * linux-m68k-low.c (target_regsets): Likewise.
13260 * linux-mips-low.c (target_regsets): Likewise.
13261 * linux-ppc-low.c (target_regsets): Likewise.
13262 * linux-s390-low.c (target_regsets): Likewise.
13263 * linux-sh-low.c (target_regsets): Likewise.
13264 * linux-sparc-low.c (target_regsets): Likewise.
13265 * linux-xtensa-low.c (target_regsets): Likewise.
13266
13267 * linux-low.c: Include <sys/uio.h>.
13268 (regsets_fetch_inferior_registers): Support nt_type.
13269 (regsets_store_inferior_registers): Likewise.
13270 (linux_process_qsupported): New.
13271 (linux_target_ops): Add linux_process_qsupported.
13272
13273 * linux-low.h (regset_info): Add nt_type.
13274 (linux_target_ops): Add process_qsupported.
13275
13276 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13277 and <sys/uio.h>.
13278 (init_registers_i386_avx_linux): New.
13279 (init_registers_amd64_avx_linux): Likewise.
13280 (xmltarget_i386_linux_no_xml): Likewise.
13281 (xmltarget_amd64_linux_no_xml): Likewise.
13282 (PTRACE_GETREGSET): Likewise.
13283 (PTRACE_SETREGSET): Likewise.
13284 (x86_fill_xstateregset): Likewise.
13285 (x86_store_xstateregset): Likewise.
13286 (use_xml): Likewise.
13287 (x86_linux_update_xmltarget): Likewise.
13288 (x86_linux_process_qsupported): Likewise.
13289 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13290 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13291 init_registers_i386_linux here. Call
13292 x86_linux_update_xmltarget.
13293 (the_low_target): Add x86_linux_process_qsupported.
13294
13295 * server.c (handle_query): Call target_process_qsupported.
13296
13297 * target.h (target_ops): Add process_qsupported.
13298 (target_process_qsupported): New.
13299
fc7238bb
PA
133002010-04-03 Pedro Alves <pedro@codesourcery.com>
13301
13302 * inferiors.c (add_thread): Set last_status kind to
13303 TARGET_WAITKIND_IGNORE.
13304 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13305 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13306 (linux_wait_1): Move `thread' local definition to block that uses
13307 it. Don't NULL initialize `event_child'.
13308 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13309 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13310 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13311
bdabb078
PA
133122010-04-01 Pedro Alves <pedro@codesourcery.com>
13313
13314 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13315 an extended waitstatus, or by a watchpoint.
13316 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13317 thread was stepping or has been stopped by a watchpoint.
13318
d3bbe7a0
PA
133192010-04-01 Pedro Alves <pedro@codesourcery.com>
13320
13321 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13322 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13323 of another, then delete the previous, and validate all
13324 breakpoints.
13325 (validate_inserted_breakpoint): New.
13326 (delete_disabled_breakpoints): New.
13327 (validate_breakpoints): New.
13328 (check_mem_read): Validate breakpoints before trusting their
13329 shadow. Delete disabled breakpoints.
13330 (check_mem_write): Validate breakpoints before trusting they
13331 should be inserted. Delete disabled breakpoints.
13332 * mem-break.h (validate_breakpoints):
13333 * server.c (handle_query): Validate breakpoints when we see a
13334 qSymbol query.
13335
8b07ae33
PA
133362010-04-01 Pedro Alves <pedro@codesourcery.com>
13337
13338 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13339 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13340 if we could tell there's a GDB breakpoint at stop_pc.
13341 (need_step_over_p): Don't do a step over if we find a GDB
13342 breakpoint at the resume PC.
13343
13344 * mem-break.c (struct raw_breakpoint): New.
13345 (enum bkpt_type): New type `gdb_breakpoint'.
13346 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13347 fields. New field `raw'.
13348 (find_raw_breakpoint_at): New.
13349 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13350 breakpoint instead.
13351 (set_breakpoint_at): Adjust.
13352 (delete_raw_breakpoint): New.
13353 (release_breakpoint): New.
13354 (delete_breakpoint): Rename to...
13355 (delete_breakpoint_1): ... this. Add proc parameter. Use
13356 release_breakpoint. Return ENOENT.
13357 (delete_breakpoint): Reimplement.
13358 (find_breakpoint_at): Delete.
13359 (find_gdb_breakpoint_at): New.
13360 (delete_breakpoint_at): Delete.
13361 (set_gdb_breakpoint_at): New.
13362 (delete_gdb_breakpoint_at): New.
13363 (gdb_breakpoint_here): New.
13364 (set_reinsert_breakpoint): Use release_breakpoint.
13365 (uninsert_breakpoint): Rename to ...
13366 (uninsert_raw_breakpoint): ... this.
13367 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13368 (reinsert_raw_breakpoint): Change parameter type to
13369 raw_breakpoint.
13370 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13371 instead.
13372 (check_breakpoints): Adjust. Use release_breakpoint.
13373 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13374 (breakpoint_inserted_here): Ditto.
13375 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13376 Don't trust the breakpoint's shadow if it is not inserted.
13377 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13378 (delete_all_breakpoints): Adjust.
13379 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13380 use delete_breakpoint_1.
13381
13382 * mem-break.h (breakpoints_supported): Delete declaration.
13383 (set_gdb_breakpoint_at): Declare.
13384 (gdb_breakpoint_here): Declare.
13385 (delete_breakpoint_at): Delete.
13386 (delete_gdb_breakpoint_at): Declare.
13387
13388 * server.h (struct raw_breakpoint): Forward declare.
13389 (struct process_info): New field `raw_breakpoints'.
13390
13391 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13392 breakpoints.
13393
6bf5e0ba
PA
133942010-03-24 Pedro Alves <pedro@codesourcery.com>
13395
13396 * linux-low.c (status_pending_p_callback): Fix comment.
13397 (linux_wait_for_event_1): Move most of the internal breakpoint
13398 handling from here...
13399 (linux_wait_1): ... to here.
13400 (count_events_callback): New.
13401 (select_singlestep_lwp_callback): New.
13402 (select_event_lwp_callback): New.
13403 (cancel_breakpoints_callback): New.
13404 (select_event_lwp): New.
13405 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13406 priority to all LWPs that have had events that should be reported
13407 to the client. Cancel breakpoints when about to reporting the
13408 event to the client, not while stopping lwps. No longer cancel
13409 finished single-steps here.
13410 (cancel_finished_single_step): Delete.
13411 (cancel_finished_single_steps): Delete.
13412
414a389f
PA
134132010-03-24 Pedro Alves <pedro@codesourcery.com>
13414
13415 * mem-break.c (enum bkpt_type): New.
13416 (struct breakpoint): New field `type'.
13417 (set_breakpoint_at): Change return type to struct breakpoint
13418 pointer. Set type to `other_breakpoint' by default.
13419 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13420 in the breakpoint list.
13421 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13422 (reinsert_breakpoint): Rename to ...
13423 (reinsert_raw_breakpoint): ... this.
13424 (reinsert_breakpoints_at): Adjust.
13425 * mem-break.h (struct breakpoint): Declare.
13426 (set_breakpoint_at): Change return type to struct breakpoint
13427 pointer.
13428
2280c721
PA
134292010-03-24 Pedro Alves <pedro@codesourcery.com>
13430
13431 * server.c (handle_query): Assign, not compare.
13432
d50171e4
PA
134332010-03-24 Pedro Alves <pedro@codesourcery.com>
13434
13435 Teach linux gdbserver to step-over-breakpoints.
13436
13437 * linux-low.c (can_hardware_single_step): New.
13438 (supports_breakpoints): New.
13439 (handle_extended_wait): If stopping threads, read the stop pc of
13440 the new cloned LWP.
13441 (get_pc): New.
13442 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13443 low target doesn't support retrieving the PC.
13444 (add_lwp): Set last_resume_kind to resume_continue.
13445 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13446 (linux_attach): Don't clear stop_expected. Set the lwp's
13447 last_resume_kind to resume_stop.
13448 (linux_detach_one_lwp): Don't check for removed breakpoints.
13449 (check_removed_breakpoint): Delete.
13450 (status_pending_p): Rename to ...
13451 (status_pending_p_callback): ... this. Don't check for removed
13452 breakpoints. Don't consider threads that are stopped from GDB's
13453 perspective.
13454 (linux_wait_for_lwp): Always read the stop_pc here.
13455 (cancel_breakpoint): New.
13456 (step_over_bkpt): New global.
13457 (linux_wait_for_event_1): Implement stepping over breakpoints.
13458 (gdb_wants_lwp_stopped): New.
13459 (gdb_wants_all_stopped): New.
13460 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13461 single-step traps here. Store the thread's last reported target
13462 wait status.
13463 (send_sigstop): Don't clear stop_expected. Always set it,
13464 instead.
13465 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13466 (cancel_finished_single_step): New.
13467 (cancel_finished_single_steps): New.
13468 (wait_for_sigstop): Don't cancel finished single-step traps here.
13469 (linux_resume_one_lwp): Don't check for removed breakpoints.
13470 Don't set `step' on non-hardware step archs.
13471 (linux_set_resume_request): Ignore resume_stop requests if already
13472 stopping or stopped. Set the lwp's last_resume_kind.
13473 (resume_status_pending_p): Don't check for removed breakpoints.
13474 (need_step_over_p): New.
13475 (start_step_over): New.
13476 (finish_step_over): New.
13477 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13478 requests. Clear the thread's last reported target waitstatus.
13479 Don't use the `suspended' flag. Don't consider pending breakpoints.
13480 (linux_resume): Start a step-over if necessary.
13481 (proceed_one_lwp): New.
13482 (proceed_all_lwps): New.
13483 (unstop_all_lwps): New.
13484 * linux-low.h (struct lwp_info): Rewrite comment for the
13485 `suspended' flag. Add the `stop_pc' field. Delete the
13486 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13487 Add `'last_resume_kind' and `need_step_over' fields.
13488 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13489 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13490 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13491 (set_raw_breakpoint_at): New.
13492 (set_breakpoint_at): Rewrite to use it.
13493 (reinsert_breakpoint_handler): Delete.
13494 (set_reinsert_breakpoint): New.
13495 (reinsert_breakpoint_by_bp): Delete.
13496 (delete_reinsert_breakpoints): New.
13497 (uninsert_breakpoint): Rewrite.
13498 (uninsert_breakpoints_at): New.
13499 (reinsert_breakpoint): Rewrite.
13500 (reinsert_breakpoints_at): New.
13501 (check_breakpoints): Rewrite.
13502 (breakpoint_here): New.
13503 (breakpoint_inserted_here): New.
13504 (check_mem_read): Adjust.
13505 * mem-break.h (breakpoints_supported, breakpoint_here)
13506 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13507 (reinsert_breakpoint_by_bp): Delete declaration.
13508 (delete_reinsert_breakpoints): Declare.
13509 (reinsert_breakpoint): Delete declaration.
13510 (reinsert_breakpoints_at): Declare.
13511 (uninsert_breakpoint): Delete declaration.
13512 (uninsert_breakpoints_at): Declare.
13513 (check_breakpoints): Adjust prototype.
13514 * server.h: Adjust include order.
13515 (struct thread_info): Declare here. Add a `last_status' field.
13516
30ba68cb
MS
135172010-03-23 Michael Snyder <msnyder@vmware.com>
13518
13519 * server.c (crc32): New function.
13520 (handle_query): Add handling for 'qCRC:' request.
13521
b9a881c2
PA
135222010-03-23 Pedro Alves <pedro@codesourcery.com>
13523
13524 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13525 lwp had been stopped by a watchpoint.
13526
e92d13d5
PA
135272010-03-16 Pedro Alves <pedro@codesourcery.com>
13528
13529 * server.h (internal_error): Declare.
13530 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13531 * utils.c (internal_error): New function.
13532
64daa791
AS
135332010-03-15 Andreas Schwab <schwab@redhat.com>
13534
13535 * configure.srv: Fix typo setting srv_regobj.
13536
f52cd8cd
PA
135372010-03-15 Pedro Alves <pedro@codesourcery.com>
13538
13539 * linux-low.c (fetch_register): Avoid passing a non string literal
13540 format to `error'.
13541 (usr_store_inferior_registers): Ditto.
13542
93ae6fdc
PA
135432010-03-14 Pedro Alves <pedro@codesourcery.com>
13544
13545 * linux-low.c (linux_write_memory): Bail out early if peeking
13546 memory failed.
13547
c3adc08c
PA
135482010-03-14 Pedro Alves <pedro@codesourcery.com>
13549
13550 * linux-low.h (struct lwp_info): New fields
13551 `stopped_by_watchpoint' and `stopped_data_address'.
13552 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13553 here, and cache them in the lwp object.
13554 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13555 directly.
13556 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13557 field.
13558 (linux_stopped_by_watchpoint): Rewrite.
13559 (linux_stopped_data_address): Rewrite.
13560
bce522a2
PA
135612010-03-06 Simo Melenius <simo.melenius@iki.fi>
13562
13563 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13564 switching the current inferior, not before.
13565
90884b2b
L
135662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13567
13568 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13569 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13570 i386-linux.c and amd64-linux.c.
13571 (reg-i386.o): Removed.
13572 (reg-i386.c): Likewise.
13573 (reg-i386-linux.o): Likewise.
13574 (reg-i386-linux.c): Likewise.
13575 (reg-x86-64.o): Likewise.
13576 (reg-x86-64.c): Likewise.
13577 (reg-x86-64-linux.o): Likewise.
13578 (reg-x86-64-linux.c): Likewise.
13579 (i386.o): New.
13580 (i386.c): Likewise.
13581 (i386-linux.o): Likewise.
13582 (i386-linux.c): Likewise.
13583 (amd64.o): Likewise.
13584 (amd64.c): Likewise.
13585 (amd64-linux.o): Likewise.
13586 (amd64-linux.c): Likewise.
13587
13588 * configure.srv (srv_i386_regobj): New.
13589 (srv_i386_linux_regobj): Likewise.
13590 (srv_amd64_regobj): Likewise.
13591 (srv_amd64_linux_regobj): Likewise.
13592 (srv_i386_32bit_xmlfiles): Likewise.
13593 (srv_i386_64bit_xmlfiles): Likewise.
13594 (srv_i386_xmlfiles): Likewise.
13595 (srv_amd64_xmlfiles): Likewise.
13596 (srv_i386_linux_xmlfiles): Likewise.
13597 (srv_amd64_linux_xmlfiles): Likewise.
13598 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13599 srv_xmlfiles to $srv_i386_xmlfiles.
13600 (i[34567]86-*-mingw32ce*): Likewise.
13601 (i[34567]86-*-mingw*): Likewise.
13602 (i[34567]86-*-nto*): Likewise.
13603 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13604 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13605 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13606 (x86_64-*-linux*): Likewise.
13607
13608 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13609 (init_registers_amd64_linux): New.
13610 (x86_arch_setup): Replace init_registers_x86_64_linux with
13611 init_registers_amd64_linux.
13612
193f13e6
MK
136132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13614
13615 * configure.ac: Check for libdl. If it is not available link against
13616 static libthread_db.
13617 * configure: Regenerate.
13618
85d721b8
PA
136192010-02-22 Pedro Alves <pedro@codesourcery.com>
13620
13621 PR9605
13622
13623 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13624 handing a read watchpoint.
13625 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13626
6076632b
DE
136272010-02-12 Doug Evans <dje@google.com>
13628
13629 * linux-low.c (linux_supports_tracefork_flag): Document.
13630 (linux_look_up_symbols): Add comment.
13631
3327ccf7
L
136322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13633
13634 * regcache.c (supply_register): Clear regcache if buf is NULL.
13635
0718675c 136362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13637 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13638
13639 * inferiors.c (find_inferior): Add function documentation.
13640 (unloaded_dll): Handle the case where the unloaded dll has not
13641 been previously registered in the dll list.
13642
177321bd
DJ
136432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13644
13645 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13646 (thumb2_breakpoint): New.
13647 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13648
2b009048
DJ
136492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13650
13651 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13652 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13653 breakpoints.
13654
3be029c7
PA
136552010-01-21 Pedro Alves <pedro@codesourcery.com>
13656
13657 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13658
18f5de3b
JK
136592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13660
13661 * linux-s390-low.c (s390_collect_ptrace_register)
13662 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13663
3743bb4f
DE
136642010-01-21 Doug Evans <dje@google.com>
13665
14ce3065
DE
13666 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13667 (PTRACE_ARG4_TYPE): New macro.
13668 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13669 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13670 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13671 (usr_store_inferior_registers): Ditto.
13672 (linux_read_memory, linux_write_memory): Ditto.
13673 (linux_test_for_tracefork): Ditto.
13674
3743bb4f
DE
13675 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13676 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13677
8b315be5
PA
136782010-01-21 Pedro Alves <pedro@codesourcery.com>
13679
13680 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13681 target.
13682
85492558
PA
136832010-01-21 Pedro Alves <pedro@codesourcery.com>
13684
13685 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13686 prototype to take a regcache. Adjust.
13687
442ea881
PA
136882010-01-20 Pedro Alves <pedro@codesourcery.com>
13689
13690 * regcache.h (struct thread_info): Forward declare.
13691 (struct regcache): New.
13692 (new_register_cache): Adjust prototype.
13693 (get_thread_regcache): Declare.
13694 (free_register_cache): Adjust prototype.
13695 (registers_to_string, registers_from_string): Ditto.
13696 (supply_register, supply_register_by_name, collect_register)
13697 (collect_register_as_string, collect_register_by_name): Ditto.
13698 * regcache.c (struct inferior_regcache_data): Delete.
13699 (get_regcache): Rename to ...
13700 (get_thread_regcache): ... this. Adjust. Switch inferior before
13701 fetching registers.
13702 (regcache_invalidate_one): Adjust.
13703 (regcache_invalidate): Fix prototype.
13704 (new_register_cache): Return the new register cache.
13705 (free_register_cache): Change prototype.
13706 (realloc_register_cache): Adjust.
13707 (registers_to_string): Change prototype to take a regcache. Adjust.
13708 (registers_from_string): Ditto.
13709 (register_data): Ditto.
13710 (supply_register): Ditto.
13711 (supply_register_by_name): Ditto.
13712 (collect_register): Ditto.
13713 (collect_register_as_string): Ditto.
13714 (collect_register_by_name): Ditto.
13715 * server.c (process_serial_event): Adjust.
13716 * linux-low.h (regset_fill_func, regset_store_func): Change
13717 prototype.
13718 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13719 Change prototype.
13720 * linux-low.c (get_stop_pc): Adjust.
13721 (check_removed_breakpoint): Adjust.
13722 (linux_wait_for_event): Adjust.
13723 (linux_resume_one_lwp): Adjust.
13724 (fetch_register): Add regcache parameter. Adjust.
13725 (usr_store_inferior_registers): Ditto.
13726 (regsets_fetch_inferior_registers): Ditto.
13727 (regsets_store_inferior_registers): Ditto.
13728 (linux_fetch_registers, linux_store_registers): Ditto.
13729 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13730 regcache. Adjust.
43aaf8b6
PA
13731 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13732 Ditto.
442ea881
PA
13733 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13734 prototype to take a regcache.
13735 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13736 * remote-utils.c (convert_ascii_to_int, outreg)
13737 (prepare_resume_reply): Change prototype to take a regcache.
13738 Adjust.
13739 * target.h (struct target_ops) <fetch_registers, store_registers>:
13740 Change prototype to take a regcache.
13741 (fetch_inferior_registers, store_inferior_registers): Change
13742 prototype to take a regcache. Adjust.
13743 * proc-service.c (ps_lgetregs): Adjust.
13744 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13745 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13746 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13747 take a regcache. Adjust.
13748 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13749 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13750 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13751 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13752 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13753 (cris_cannot_fetch_register):
13754 (cris_breakpoint_at): Change prototype to take a regcache.
13755 Adjust.
13756 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13757 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13758 to take a regcache. Adjust.
13759 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13760 Adjust.
13761 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13762 take a regcache. Adjust.
13763 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13764 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13765 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13766 * linux-mips-low.c (mips_get_pc):
13767 (mips_set_pc): Change prototype to take a regcache. Adjust.
13768 (mips_reinsert_addr): Adjust.
13769 (mips_collect_register): Change prototype to take a regcache.
13770 Adjust.
13771 (mips_supply_register):
13772 (mips_collect_register_32bit, mips_supply_register_32bit)
13773 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13774 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13775 * linux-ppc-low.c (ppc_supply_ptrace_register)
13776 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13777 (parse_spufs_run): Adjust.
13778 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13779 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13780 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13781 take a regcache. Adjust.
13782 * linux-s390-low.c (s390_collect_ptrace_register)
13783 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13784 (s390_set_pc): Change prototype to take a regcache. Adjust.
13785 (s390_arch_setup): Adjust.
13786 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13787 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13788 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13789 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13790 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13791 regcache. Adjust.
13792 (sparc_breakpoint_at): Adjust.
13793 * linux-xtensa-low.c (xtensa_fill_gregset):
13794 (xtensa_store_gregset):
13795 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13796 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13797 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13798 prototype to take a regcache. Adjust.
13799 * win32-arm-low.c (arm_fetch_inferior_register)
13800 (arm_store_inferior_register): Change prototype to take a
13801 regcache. Adjust.
13802 * win32-i386-low.c (i386_fetch_inferior_register)
13803 (i386_store_inferior_register): Change prototype to take a
13804 regcache. Adjust.
13805 * win32-low.c (child_fetch_inferior_registers)
13806 (child_store_inferior_registers): Change prototype to take a
13807 regcache. Adjust.
13808 (win32_wait): Adjust.
13809 (win32_fetch_inferior_registers): Change prototype to take a
13810 regcache. Adjust.
13811 (win32_store_inferior_registers): Adjust.
13812 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13813 store_inferior_register>: Change prototype to take a regcache.
13814
60c3d7b0
DE
138152010-01-20 Doug Evans <dje@google.com>
13816
13817 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13818 #ifdef.
13819 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13820 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13821
dc146f7c
VP
138222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13823
13824 * linux-low.c (linux_core_of_thread): New.
13825 (compare_ints, show_process, list_threads): New.
13826 (linux_qxfer_osdata): Report threads and cores.
13827 (linux_target_op): Register linux_core_of_thread.
13828 * remote-utils.c (prepare_resume_reply): Report the core.
13829 (buffer_xml_printf): Support %d specifier.
13830 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13831 New.
13832 (handle_query): Handle qXfer:threads. Announce availability
13833 thereof.
13834 * target.h (struct target_ops): New field core_of_thread.
13835
7803799a
UW
138362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13837
13838 * Makefile.in (clean): Remove new generated files.
13839 (reg-s390.o, reg-s390.c): Remove rules.
13840 (reg-s390x.o, reg-s390x.c): Likewise.
13841 (s390-linux32.o, s390-linux32.c): Add rules.
13842 (s390-linux64.o, s390-linux64.c): Likewise.
13843 (s390x-linux64.o, s390x-linux64.c): Likewise.
13844 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13845 * linux-s390-low.c: Include <elf.h>.
13846 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13847 (init_registers_s390): Remove prototype.
13848 (init_registers_s390x): Likewise.
13849 (init_registers_s390_linux32): Add prototype.
13850 (init_registers_s390_linux64): Likewise.
13851 (init_registers_s390x_linux64): Likewise.
13852 (s390_num_regs_3264): New define.
13853 (s390_regmap_3264): New global variable.
13854 (s390_cannot_fetch_register): Remove obsolete check.
13855 (s390_cannot_store_register): Likewise.
13856 (s390_collect_ptrace_register): Handle upper/lower register halves.
13857 (s390_supply_ptrace_register): Likewise.
13858 (s390_fill_gregset): Update to register number changes.
13859 (s390_get_hwcap): New routine.
13860 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13861 Install appropriate regmap and register set.
13862
6e7ffa39
JB
138632010-01-01 Joel Brobecker <brobecker@adacore.com>
13864
13865 * server.c (gdbserver_version): Update copyright year to 2010.
13866 * gdbreplay.c (gdbreplay_version): Likewise.
13867
957f3f49
DE
138682009-12-28 Doug Evans <dje@google.com>
13869
13870 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13871 elf/external.h. Include <elf.h> instead but only if necessary.
13872
ca5c370d
PA
138732009-12-28 Pedro Alves <pedro@codesourcery.com>
13874
13875 * linux-low.c (linux_remove_process): Remove `detaching'
13876 parameter. Don't release/detach from thread_db here.
13877 (linux_kill): Release/detach from thread_db here, ...
13878 (linux_detach): ... and here, before actually detaching.
13879 (linux_wait_1): ... and here, when a process exits.
13880 * thread-db.c (any_thread_of): New.
13881 (thread_db_free): Switch the current inferior to a thread of the
13882 passed in process.
13883
4ee62156
DE
138842009-12-21 Doug Evans <dje@google.com>
13885
d90e6a88
DE
13886 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13887
c5f62d5f
DE
13888 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13889 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13890 warning ifndef __NR_tkill. Move setting of errno there too.
13891 Delete unnecessary resetting of errno after syscall.
13892 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13893
10e86dd7
DE
13894 * configure.ac: Check for dladdr.
13895 * config.in: Regenerate.
13896 * configure: Regenerate.
13897 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13898 (try_thread_db_load): Update.
13899
4ee62156
DE
13900 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13901
00f515da
DE
139022009-12-18 Doug Evans <dje@google.com>
13903
e9464885
DE
13904 * event-loop.c: Include unistd.h if it exists.
13905
07d4f67e
DE
13906 * linux-low.c (my_waitpid): Move definition away from being in
13907 between linux_tracefork_child/linux_test_for_tracefork.
13908
00f515da
DE
13909 * gdb_proc_service.h (psaddr_t): Fix type.
13910 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13911 signature to match glibc.
13912
1de1badb
DE
139132009-12-16 Doug Evans <dje@google.com>
13914
13915 * linux-low.c (linux_read_memory): Fix argument to read.
13916
aeeb81d1
PA
139172009-11-26 Pedro Alves <pedro@codesourcery.com>
13918
13919 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13920 events, don't leave current_inferior pointing at null.
13921
10357975
PA
139222009-11-26 Pedro Alves <pedro@codesourcery.com>
13923
13924 * win32-low.c (LOG): Delete.
13925 (OUTMSG): Output to stderr.
13926 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13927 on compile time LOG macro.
13928 (win32_wait): Fix debug output.
13929
cf6e3471
PA
139302009-11-26 Pedro Alves <pedro@codesourcery.com>
13931
13932 * win32-low.c (win32_add_one_solib): If the dll name is
13933 "ntdll.dll", prepend the system directory to the dll path.
13934
0c85e18e
MK
139352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13936
13937 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13938
9ac544ce 139392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13940 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13941
13942 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13943 * configure.ac: Check for __mcoldfire__ and set
13944 gdb_cv_m68k_is_coldfire.
13945 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13946 reg-cf.o and reg-m68k.o.
13947 * configure: Regenerated.
13948
fd7dd3e6
PA
139492009-11-16 Pedro Alves <pedro@codesourcery.com>
13950
13951 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13952 Pass it to thread_db_free.
13953 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13954 proper `detaching' argument to linux_remove_process.
13955 * linux-low.h (thread_db_free): Add `detaching' parameter.
13956 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13957 to thread_db_free.
13958 (thread_db_free): Add `detaching' parameter. Only
13959 call td_ta_clear_event if detaching from process.
13960
75aa492e
MK
139612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13962
13963 * thread-db.c (thread_db_free): Fix typo.
13964
21e1bee4
PP
139652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13966
13967 PR gdb/10838
13968 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13969
8838b45e
NS
139702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13971
13972 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13973 with an i686 compiler.
13974 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13975 needed.
13976 * configure: Rebuilt.
13977
8a35fb51
SL
139782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13979
13980 PR gdb/10783
13981
13982 * server.c (handle_search_memory_1): Correct read_addr initialization
13983 in loop for searching subsequent chunks.
13984
96f15937
PP
139852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13986
13987 * configure.ac: New --with-libthread-db option.
13988 * thread-db.c: Allow direct dependence on libthread_db.
13989 (thread_db_free): Adjust.
13990 * config.in: Regenerate.
13991 * configure: Likewise.
889bf7c5 13992
5f7d1694
PP
139932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13994
13995 PR gdb/10757
13996 * thread-db.c (attach_thread): New function.
13997 (maybe_attach_thread): Return success/failure.
13998 (find_new_threads_callback): Adjust.
889bf7c5
PA
13999 (thread_db_find_new_threads): Loop until no new threads.
14000
88e3b899
PA
140012009-10-13 Pedro Alves <pedro@codesourcery.com>
14002
14003 * proc-service.c (ps_lgetregs): Formatting.
14004
cdbfd419
PP
140052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14006
14007 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14008 * configure.ac: Adjust.
14009 * linux-low.h (struct process_info_private): Move members to struct
14010 thread_db.
14011 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14012 * linux-low.c (linux_remove_process): Adjust.
14013 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14014 * server.c (handle_query): Move code ...
14015 (handle_monitor_command): ... here. New function.
14016 * target.h (struct target_ops): New member.
14017 * thread-db.c (struct thread_db): New.
14018 (libthread_db_search_path): New variable.
14019 (thread_db_create_event, thread_db_enable_reporting)
14020 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14021 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14022 (try_thread_db_load_1, dladdr_to_soname): New functions.
14023 (try_thread_db_load, thread_db_load_search): New functions.
14024 (thread_db_init): Search for libthread_db.
14025 (thread_db_free): New function.
14026 (thread_db_handle_monitor_command): Likewise.
14027 * config.in: Regenerate.
14028 * configure: Regenerate.
889bf7c5 14029
4168d2d6
UW
140302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14031
14032 * spu-low.c (spu_kill): Wait for inferior to terminate.
14033 Call clear_inferiors.
14034 (spu_detach): Call clear_inferiors.
14035
81ecdfbb
RW
140362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14037
14038 * aclocal.m4: Regenerate.
14039 * config.in: Likewise.
14040 * configure: Likewise.
14041
0b9ff2c0
UW
140422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14043
14044 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14045 (parse_spufs_run): New function.
14046 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14047 (ppc_breakpoint_at): Handle SPU breakpoints.
14048
efcbbd14
UW
140492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14050
14051 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14052 (SPUFS_MAGIC): Define.
14053 (spu_enumerate_spu_ids): New function.
14054 (linux_qxfer_spu): New function.
14055 (linux_target_ops): Install linux_qxfer_spu.
14056
f4d9bade
UW
140572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14058
14059 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14060 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14061 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14062 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14063 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14064 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14065 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14066 (init_registers_powerpc_cell32l): Add prototype.
14067 (init_registers_powerpc_cell64l): Likewise.
14068 (ppc_arch_setup): Detect Cell/B.E. architecture.
14069
96e946ca
RW
140702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14071
14072 * Makefile.in (datarootdir): New variable.
14073
58d6951d
DJ
140742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14075
14076 * linux-low.c (linux_write_memory): Update debugging output.
14077 * Makefile.in (clean): Add new descriptions.
14078 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14079 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14080 * configure.srv: Add new files for arm*-*-linux*.
14081 * linux-arm-low.c: Add new declarations.
14082 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14083 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14084 (HWCAP_VFPv3D16): New.
14085 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14086 instead of __IWMMXT__.
14087 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14088 (arm_arch_setup): New.
14089 (target_regsets): Remove #ifdef. Add VFP regset.
14090 (the_low_target): Use arm_arch_setup.
14091
12b42a12
DJ
140922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14093
14094 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14095 the main thread again.
14096
ac8c974e
AR
140972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14098
14099 Adding Neutrino gdbserver.
14100 * configure: Regenerated.
14101 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14102 * configure.srv (i[34567]86-*-nto*): New target.
14103 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14104 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14105 (nto_comctrl) [__QNX__]: New function.
14106 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14107
4424e0c3 141082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14109
14110 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14111 srv_tgtobj.
14112
912cf4ba
PA
141132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14114 Pedro Alves <pedro@codesourcery.com>
14115
14116 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14117 don't support CONTEXT_EXTENDED_REGISTERS.
14118 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14119 (the_low_target): Install them.
14120 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14121 failing with ERROR_PIPE_NOT_CONNECTED.
14122
aa5ca48f
DE
141232009-06-30 Doug Evans <dje@google.com>
14124 Pierre Muller <muller@ics.u-strasbg.fr>
14125
14126 Add h/w watchpoint support to x86-linux, win32-i386.
14127 * Makefile.in (SFILES): Add i386-low.c
14128 (i386_low_h): Define.
14129 (i386-low.o): Add dependencies.
14130 (linux-x86-low.o): Add i386-low.h dependency.
14131 (win32-i386-low.o): Ditto.
14132 * i386-low.c: New file.
14133 * i386-low.h: New file.
14134 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14135 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14136 * linux-low.c (linux_add_process): Initialize arch_private.
14137 (linux_remove_process): Free arch_private.
14138 (add_lwp): Initialize arch_private.
14139 (delete_lwp): Free arch_private.
14140 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14141 provided.
14142 * linux-low.h (process_info_private): New member arch_private.
14143 (lwp_info): New member arch_private.
14144 (linux_target_ops): New members new_process, new_thread,
14145 prepare_to_resume.
14146 (ptid_of): New macro.
14147 * linux-x86-low.c: Include stddef.h, i386-low.h.
14148 (arch_process_info): New struct.
14149 (arch_lwp_info): New struct.
14150 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14151 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14152 (i386_dr_low_get_status): New function.
14153 (x86_insert_point, x86_remove_point): New functions.
14154 (x86_stopped_by_watchpoint): New function.
14155 (x86_stopped_data_address): New function.
14156 (x86_linux_new_process, x86_linux_new_thread): New functions.
14157 (x86_linux_prepare_to_resume): New function.
14158 (the_low_target): Add entries for insert_point, remove_point,
14159 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14160 prepare_to_resume.
14161 * server.c (debug_hw_points): New global.
14162 (monitor_show_help): Document set debug-hw-points.
14163 (handle_query): Process "set debug-hw-points".
14164 * server.h (debug_hw_points): Declare.
14165 (paddress): Declare.
14166 * utils.c (NUMCELLS, CELLSIZE): New macros.
14167 (get_sell, xsnprintf, paddress): New functions.
14168 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14169 remove_point, stopped_by_watchpoint, stopped_data_address.
14170 * win32-i386-low.c: Include i386-low.h.
14171 (debug_reg_state): Replaces dr.
14172 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14173 (i386_dr_low_get_status): New function.
14174 (i386_insert_point, i386_remove_point): New functions.
14175 (i386_stopped_by_watchpoint): New function.
14176 (i386_stopped_data_address): New function.
14177 (i386_initial_stuff): Update.
14178 (get_thread_context,set_thread_context,i386_thread_added): Update.
14179 (the_low_target): Add entries for insert_point,
14180 remove_point, stopped_by_watchpoint, stopped_data_address.
14181 * win32-low.c (win32_insert_watchpoint): New function.
14182 (win32_remove_watchpoint): New function.
14183 (win32_stopped_by_watchpoint): New function.
14184 (win32_stopped_data_address): New function.
14185 (win32_target_ops): Add entries for insert_watchpoint,
14186 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14187 * win32-low.h (win32_target_ops): New members insert_point,
14188 remove_point, stopped_by_watchpoint, stopped_data_address.
14189
d993e290
PA
141902009-06-25 Pedro Alves <pedro@codesourcery.com>
14191
14192 * server.c (process_serial_event): Re-return unsupported, not
14193 error, if the type isn't recognized. Re-allow supporting only
14194 insert or remove packets. Also call require_running for
14195 breakpoints. Add missing break statement to default case. Tidy.
14196 * target.h (struct target_ops): Rename insert_watchpoint to
14197 insert_point, and remove_watchpoint to remove_point.
14198
14199 * linux-low.h (struct linux_target_ops): Likewise.
14200 * linux-low.c (linux_insert_watchpoint): Rename to ...
14201 (linux_insert_point): ... this. Adjust.
14202 (linux_remove_watchpoint): Rename to ...
14203 (linux_remove_point): ... this. Adjust.
14204 (linux_target_ops): Adjust.
14205 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14206 (cris_insert_point): ... this.
14207 (cris_remove_watchpoint): Rename to ...
14208 (cris_remove_point): ... this.
14209 (the_low_target): Adjust.
14210
0f54c268
PM
142112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14212
14213 * server.c (handle_v_kill): Pass signal_pid to
14214 kill_inferior if multi_process is zero.
14215
c6314022
AR
142162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14217
14218 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14219 * target.h (target_ops): Comment for *_watchpoint to make it clear
14220 the functions can get types '0' and '1'.
14221
4463ce24
AR
142222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14223
14224 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14225 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14226 * regcache.c (get_regcache): Likewise.
14227 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14228 * win32-low.c (child_fetch_inferior_registers): Remove check for
14229 regno 0.
14230
cf8fd78b
PA
142312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14232 Pedro Alves <pedro@codesourcery.com>
14233
14234 * target.h (struct target_ops) <supports_multi_process>: New
14235 callback.
14236 (target_supports_multi_process): New.
14237 * server.c (handle_query): Even if GDB reports support, only
14238 enable multi-process if the target also supports it. Report
14239 multi-process support only if the target backend supports it.
14240 * linux-low.c (linux_supports_multi_process): New function.
14241 (linux_target_ops): Install it as target_supports_multi_process
14242 callback.
14243
47c0c975
DE
142442009-05-24 Doug Evans <dje@google.com>
14245
e09875d4
DE
14246 Global renaming of find_thread_pid to find_thread_ptid.
14247 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14248 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14249 All callers updated.
14250
e27d73f6
DE
14251 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14252 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14253 directly.
14254
47c0c975
DE
14255 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14256 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14257 (linux_resume_one_lwp): Ditto.
14258
2acc282a
DE
142592009-05-23 Doug Evans <dje@google.com>
14260
14261 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14262 from struct inferior_list_entry * to struct lwp_info *.
14263 All callers updated.
14264
9f1036c1
DE
142652009-05-13 Doug Evans <dje@google.com>
14266
14267 * linux-x86-low.c: Don't include assert.h.
14268 (x86_siginfo_fixup): Use fatal, not assert.
14269 (x86_arch_setup): Fix comment.
14270
d0722149
DE
142712009-05-12 Doug Evans <dje@google.com>
14272
14273 Biarch support for i386/amd64 gdbserver.
14274 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14275 Add linux-x86-low.c.
14276 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14277 (linux-x86-low.o): Add.
14278 * linux-x86-64-low.c: Delete.
14279 * linux-i386-low.c: Delete.
14280 * linux-x86-low.c: New file.
14281 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14282 linux-x86-low.o.
14283 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14284 linux-x86-low.o.
14285 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14286 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14287 (linux_child_pid_to_exec_file): New function.
14288 (elf_64_header_p, elf_64_file_p): New functions.
14289 (siginfo_fixup): New function.
14290 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14291 give target a chance to convert layout.
14292 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14293 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14294
fdeb2a12
DE
142952009-05-07 Doug Evans <dje@google.com>
14296
14297 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14298 (regsets_store_inferior_registers): Ditto.
14299
a6dbe5df
PA
143002009-05-06 Pedro Alves <pedro@codesourcery.com>
14301
14302 PR server/10048
14303
14304 * linux-low.c (must_set_ptrace_flags): Delete.
14305 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14306 of the global.
14307 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14308 `lwp->must_set_ptrace_flags' instead.
ba42693b 14309 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14310 (linux_wait_1): ... not here.
14311
5091eb23
DE
143122009-04-30 Doug Evans <dje@google.com>
14313
9f767825
DE
14314 * inferiors.c (started_inferior_callback): New function.
14315 (attached_inferior_callback): New function.
14316 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14317 * server.c (print_started_pid, print_attached_pid): New functions.
14318 (detach_or_kill_for_exit): New function.
14319 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14320 * server.h (have_started_inferiors_p): Declare.
14321 (have_attached_inferiors_p): Declare.
14322
5091eb23
DE
14323 * inferiors.c (remove_process): Fix memory leak, free process.
14324 * linux-low.c (linux_remove_process): New function.
14325 (linux_kill): Call it instead of remove_process.
14326 (linux_detach, linux_wait_1): Ditto.
14327
155c8968
PA
143282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14329
14330 * configure.srv: Add x86 Windows CE target.
14331
7fe519cb
UW
143322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14333
14334 * inferiors.c (get_thread_process): Make global.
14335 * server.h (get_thread_process): Add prototype.
14336 * thread-db.c (find_one_thread): Use get_thread_process
14337 instead of current_process.
14338 (thread_db_get_tls_address): Do not crash if called when
14339 thread layer is not yet initialized.
14340
5472f405
UW
143412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14342
14343 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14344 * spu-low.c (current_tid): Rename to ...
14345 (current_ptid): ... this.
14346 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14347 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14348 ptid_get_lwp (current_ptid) instead of current_tid.
14349 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14350 instead of current_tid. Use find_process_pid to verify pid
14351 argument is valid. Pass proper argument to remove_process.
14352 (spu_thread_alive): Compare current_ptid instead of current_tid.
14353 (spu_resume): Likewise.
14354
55ac2b99
PA
143552009-04-02 Pedro Alves <pedro@codesourcery.com>
14356
14357 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14358 variable.
14359
95954743
PA
143602009-04-01 Pedro Alves <pedro@codesourcery.com>
14361
14362 Implement the multiprocess extensions, and add linux multiprocess
14363 support.
14364
14365 * server.h (ULONGEST): Declare.
14366 (struct ptid, ptid_t): New.
14367 (minus_one_ptid, null_ptid): Declare.
14368 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14369 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14370 (struct inferior_list_entry): Change `id' type from unsigned from
14371 to ptid_t.
14372 (struct sym_cache, struct breakpoint, struct
14373 process_info_private): Forward declare.
14374 (struct process_info): Declare.
14375 (current_process): Declare.
14376 (all_processes): Declare.
14377 (initialize_inferiors): Declare.
14378 (add_thread): Adjust to use ptid_t.
14379 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14380 (add_process, remove_process, find_thread_pid): Declare.
14381 (find_inferior_id): Adjust to use ptid_t.
14382 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14383 (multi_process): Declare.
14384 (push_event): Adjust to use ptid_t.
14385 (read_ptid, write_ptid): Declare.
14386 (prepare_resume_reply): Adjust to use ptid_t.
14387 (clear_symbol_cache): Declare.
14388 * inferiors.c (all_processes): New.
14389 (null_ptid, minus_one_ptid): New.
14390 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14391 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14392 (add_thread): Change unsigned long to ptid. Remove gdb_id
14393 parameter. Adjust.
14394 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14395 (gdb_id_to_thread): Rename to ...
14396 (find_thread_pid): ... this. Change unsigned long to ptid.
14397 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14398 (loaded_dll, pull_pid_from_list): Adjust.
14399 (add_process, remove_process, find_process_pid)
14400 (get_thread_process, current_process, initialize_inferiors): New.
14401 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14402 (struct target_waitstatus) <related_pid>: Ditto.
14403 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14404 return type to int.
14405 (struct target_ops) <join>: Add `pid' argument.
14406 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14407 (struct target_ops) <wait>: Add `ptid' field. Change return type
14408 to ptid.
14409 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14410 (mywait): Add `ptid' argument. Change return type to ptid_t.
14411 (target_pid_to_str): Declare.
14412 * target.c (set_desired_inferior): Adjust to use ptids.
14413 (mywait): Add new `ptid' argument. Adjust.
14414 (target_pid_to_str): New.
14415 * mem-break.h (free_all_breakpoints): Declare.
14416 * mem-break.c (breakpoints): Delelete.
14417 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14418 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14419 to use per-process breakpoint list.
14420 (free_all_breakpoints): New.
14421 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14422 (symbol_cache, all_symbols_looked_up): Delete.
14423 (hexchars): New.
14424 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14425 read_ptid): New.
14426 (prepare_resume_reply): Change ptid argument's type from unsigned
14427 long to ptid_t. Adjust. Implement W;process and X;process.
14428 (free_sym_cache, clear_symbol_cache): New.
14429 (look_up_one_symbol): Adjust to per-process symbol cache. *
14430 * server.c (cont_thread, general_thread, step_thread): Change type
14431 to ptid_t.
14432 (attached): Delete.
14433 (multi_process): New.
14434 (last_ptid): Change type to ptid_t.
14435 (struct vstop_notif) <ptid>: Change type to ptid_t.
14436 (queue_stop_reply, push_event): Change `ptid' argument's type to
14437 ptid_t.
14438 (discard_queued_stop_replies): Add `pid' argument.
14439 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14440 changes. Don't reference the `attached' global.
14441 (attach_inferior): Adjust to mywait interface changes.
14442 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14443 features. Handle and report "multiprocess+". Handle
14444 "qAttached:PID".
14445 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14446 changes.
14447 (handle_v_kill): New.
14448 (handle_v_stopped): Adjust to use target_pid_to_str.
14449 (handle_v_requests): Allow multiple attaches and runs when
14450 multiprocess extensions are in effect. Handle "vKill".
14451 (myresume): Adjust to use ptids.
14452 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14453 (handle_status): Adjust to discard_queued_stop_replies interface
14454 change.
14455 (first_thread_of, kill_inferior_callback)
14456 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14457 (main): Call initialize_inferiors. Adjust to use ptids, killing
14458 and detaching from all inferiors. Handle multiprocess packet
14459 variants.
14460 * linux-low.h: Include gdb_proc_service.h.
14461 (struct process_info_private): New.
14462 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14463 <lwpid_of>: Use ptid_get_lwp.
14464 (get_lwp_thread): Adjust.
14465 (struct lwp_info): Add `dead' member.
14466 (find_lwp_pid): Declare.
14467 * linux-low.c (thread_db_active): Delete.
14468 (new_inferior): Adjust comment.
14469 (inferior_pid): Delete.
14470 (linux_add_process): New.
14471 (handle_extended_wait): Adjust.
14472 (add_lwp): Change unsigned long to ptid.
14473 (linux_create_inferior): Add process to processes table. Adjust
14474 to use ptids. Don't set new_inferior here.
14475 (linux_attach_lwp): Rename to ...
14476 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14477 it. Adjust to use ptids.
14478 (linux_attach_lwp): New.
14479 (linux_attach): Add process to processes table. Don't set
14480 new_inferior here.
14481 (struct counter): New.
14482 (second_thread_of_pid_p, last_thread_of_process_p): New.
14483 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14484 multiple processes.
14485 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14486 processes. Remove process from process table.
14487 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14488 to multiple processes.
14489 (any_thread_of): New.
14490 (linux_detach): Add `pid' argument, and handle it. Remove process
14491 from processes table.
14492 (linux_join): Add `pid' argument. Handle it.
14493 (linux_thread_alive): Change unsighed long argument to ptid_t.
14494 Consider dead lwps as not being alive.
14495 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14496 threads we're not interested in.
14497 (same_lwp, find_lwp_pid): New.
14498 (linux_wait_for_lwp): Change `pid' argument's type from int to
14499 ptid_t. Adjust.
14500 (linux_wait_for_event): Rename to ...
14501 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14502 from int to ptid_t. Adjust.
14503 (linux_wait_for_event): New.
14504 (linux_wait_1): Add `ptid' argument. Change return type to
14505 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14506 that exit from the process table.
14507 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14508 Adjust.
14509 (mark_lwp_dead): New.
14510 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14511 stopping all threads, mark its main lwp as dead.
14512 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14513 ptids.
14514 (fetch_register, usr_store_inferior_registers)
14515 (regsets_fetch_inferior_registers)
14516 (regsets_store_inferior_registers, linux_read_memory)
14517 (linux_write_memory): Inline `inferior_pid'.
14518 (linux_look_up_symbols): Adjust to use per-process
14519 `thread_db_active'.
14520 (linux_request_interrupt): Adjust to use ptids.
14521 (linux_read_auxv): Inline `inferior_pid'.
14522 (initialize_low): Don't reference thread_db_active.
14523 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14524 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14525 (ps_getpid): Return the pid of the current inferior.
14526 * thread-db.c (proc_handle, thread_agent): Delete.
14527 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14528 per-process data.
14529 (find_one_thread): Change argument type to ptid_t. Adjust to
14530 per-process data.
14531 (maybe_attach_thread): Adjust to per-process data and ptids.
14532 (thread_db_find_new_threads): Ditto.
14533 (thread_db_init): Ditto.
14534 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14535 processes table. Adjust to use ptids.
14536 (spu_kill, spu_detach): Adjust interface. Remove process from
14537 processes table.
14538 (spu_join, spu_thread_alive): Adjust interface.
14539 (spu_wait): Adjust interface. Remove process from processes
14540 table. Adjust to use ptids.
14541 * win32-low.c (current_inferior_tid): Delete.
14542 (current_inferior_ptid): New.
14543 (debug_event_ptid): New.
14544 (thread_rec): Take a ptid. Adjust.
14545 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14546 (child_delete_thread): Ditto.
14547 (do_initial_child_stuff): Add `attached' argument. Add process to
14548 processes table.
14549 (child_fetch_inferior_registers, child_store_inferior_registers):
14550 Adjust.
14551 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14552 (win32_attach): Pass 1 to do_initial_child_stuff.
14553 (win32_kill): Adjust interface. Remove process from processes
14554 table.
14555 (win32_detach): Ditto.
14556 (win32_join): Adjust interface.
14557 (win32_thread_alive): Take a ptid.
14558 (win32_resume): Adjust to use ptids.
14559 (get_child_debug_event): Ditto.
14560 (win32_wait): Adjust interface. Remove exiting process from
14561 processes table.
14562
bd99dc85
PA
145632009-04-01 Pedro Alves <pedro@codesourcery.com>
14564
14565 Non-stop mode support.
14566
14567 * server.h (non_stop): Declare.
14568 (gdb_client_data, handler_func): Declare.
14569 (delete_file_handler, add_file_handler, start_event_loop):
14570 Declare.
14571 (handle_serial_event, handle_target_event, push_event)
14572 (putpkt_notif): Declare.
14573 * target.h (enum resume_kind): New.
14574 (struct thread_resume): Replace `step' field by `kind' field.
14575 (TARGET_WNOHANG): Define.
14576 (struct target_ops) <wait>: Add `options' argument.
14577 <supports_non_stop, async, start_non_stop>: New fields.
14578 (target_supports_non_stop, target_async): New.
14579 (start_non_stop): Declare.
14580 (mywait): Add `options' argument.
14581 * target.c (mywait): Add `options' argument. Print child exit
14582 notifications here.
14583 (start_non_stop): New.
14584 * server.c (non_stop, own_buf, mem_buf): New globals.
14585 (struct vstop_notif): New.
14586 (notif_queue): New global.
14587 (queue_stop_reply, push_event, discard_queued_stop_replies)
14588 (send_next_stop_reply): New.
14589 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14590 interface changes.
14591 (attach_inferior): In non-stop mode, don't wait for the target
14592 here.
14593 (handle_general_set): Handle QNonStop.
14594 (handle_query): When handling qC, return the current general
14595 thread, instead of the first thread of the list.
14596 (handle_query): If the backend supports non-stop mode, include
14597 QNonStop+ in the qSupported query response.
14598 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14599 and non-stop mode.
14600 (handle_v_attach, handle_v_run): Handle non-stop mode.
14601 (handle_v_stopped): New.
14602 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14603 (myresume): Adjust to use resume_kind. Handle non-stop.
14604 (queue_stop_reply_callback): New.
14605 (handle_status): Handle non-stop mode.
14606 (main): Clear non_stop flag on reconnection. Use the event-loop.
14607 Refactor serial protocol handling from here ...
14608 (process_serial_event): ... to this new function. When GDB
14609 selects any thread, select one here. In non-stop mode, wait until
14610 GDB acks all pending events before exiting.
14611 (handle_serial_event, handle_target_event): New.
14612 * remote-utils.c (remote_open): Install remote_desc in the event
14613 loop.
14614 (remote_close): Remove remote_desc from the event loop.
14615 (putpkt_binary): Rename to...
14616 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14617 (putpkt_binary): New as wrapper around putpkt_binary_1.
14618 (putpkt_notif): New.
14619 (prepare_resume_reply): In non-stop mode, don't change the
14620 general_thread.
14621 * event-loop.c: New.
14622 * Makefile.in (OBJ): Add event-loop.o.
14623 (event-loop.o): New rule.
14624
14625 * linux-low.h (pid_of): Moved here.
14626 (lwpid_of): New.
14627 (get_lwp_thread): Use lwpid_of.
14628 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14629 * linux-low.c (pid_of): Delete.
14630 (inferior_pid): Use lwpid_of.
14631 (linux_event_pipe): New.
14632 (target_is_async_p): New.
14633 (delete_lwp): New.
14634 (handle_extended_wait): Use lwpid_of.
14635 (add_lwp): Don't set lwpid field.
14636 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14637 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14638 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14639 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14640 first. Adjust to linux_wait_for_event interface changes. Use
14641 lwpid_of.
14642 (linux_detach): Don't delete the main lwp here.
14643 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14644 (status_pending_p): Don't consider explicitly suspended lwps.
14645 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14646 pointer. Add OPTIONS argument. Change return type to int. Use
14647 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14648 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14649 pointer. Add status pointer argument. Return a pid instead of a
14650 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14651 changes. In non-stop mode, don't switch to a random thread.
14652 (linux_wait): Rename to...
14653 (linux_wait_1): ... this. Add target_options argument, and handle
14654 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14655 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14656 clean exit and signal exit code. Don't stop all threads in
14657 non-stop mode. In all-stop mode, only stop all threads when
14658 reporting a stop to GDB. Handle explicit thread stop requests.
14659 (async_file_flush, async_file_mark): New.
14660 (linux_wait): New.
14661 (send_sigstop): Use lwpid_of.
14662 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14663 interface changes. In non-stop mode, don't switch to a random
14664 thread.
14665 (linux_resume_one_lwp): Use lwpid_of.
14666 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14667 (linux_resume_one_thread): ... this. Handle resume_stop. In
14668 non-stop mode, don't look for pending flag in all threads.
14669 (resume_status_pending_p): Don't consider explicitly suspended
14670 threads.
14671 (my_waitpid): Reimplement. Emulate __WALL.
14672 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14673 Use lwpid_of.
14674 (sigchld_handler, linux_supports_non_stop, linux_async)
14675 (linux_start_non_stop): New.
14676 (linux_target_ops): Register linux_supports_non_stop, linux_async
14677 and linux_start_non_stop.
14678 (initialize_low): Install SIGCHLD handler.
14679 * thread-db.c (thread_db_create_event, find_one_thread)
14680 (thread_db_get_tls_address): Use lwpid_of.
14681 * win32-low.c (win32_detach): Adjust to use resume_kind.
14682 (win32_wait): Add `options' argument.
14683 * spu-low.c (spu_resume): Adjust to use resume_kind.
14684 (spu_wait): Add `options' argument.
14685
5b1c542e
PA
146862009-04-01 Pedro Alves <pedro@codesourcery.com>
14687
14688 Decouple target code from remote protocol.
14689
14690 * target.h (enum target_waitkind): New.
14691 (struct target_waitstatus): New.
14692 (struct target_ops) <wait>: Return an unsigned long. Take a
14693 target_waitstatus pointer instead of a char pointer.
14694 (mywait): Likewise.
14695 * target.c (mywait): Change prototype to return an unsigned long.
14696 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14697 * server.h (thread_from_wait, old_thread_from_wait): Delete
14698 declarations.
14699 (prepare_resume_reply): Change prototype to take a
14700 target_waitstatus.
14701 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14702 (last_status, last_ptid): New.
14703 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14704 pid instead of a signal.
14705 (attach_inferior): Remove "status" and "signal" parameters.
14706 Adjust.
14707 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14708 not as an address.
14709 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14710 (handle_v_requests, myresume): Remove "status" and "signal"
14711 parameters. Adjust.
14712 (handle_status): New.
14713 (main): Delete local `status'. Adjust.
14714 * remote-utils.c: Include target.h.
14715 (prepare_resume_reply): Change prototype to take a
14716 target_waitstatus. Adjust.
14717
14718 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14719 interface.
14720 * spu-low.c (spu_wait): Adjust.
14721 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14722 Delete.
14723 (win32_wait): Adjust.
14724
2bd7c093
PA
147252009-04-01 Pedro Alves <pedro@codesourcery.com>
14726
14727 * target.h (struct thread_resume): Delete leave_stopped member.
14728 (struct target_ops): Add a `n' argument to the `resume' callback.
14729 * server.c (start_inferior): Adjust.
14730 (handle_v_cont, myresume): Adjust.
14731 * linux-low.c (check_removed_breakpoint): Adjust to resume
14732 interface change, and to removed leave_stopped field.
14733 (resume_ptr): Delete.
14734 (struct thread_resume_array): New.
14735 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14736 resume interface change.
14737 (linux_continue_one_thread, linux_queue_one_thread)
14738 (resume_status_pending_p): Check if the resume field is NULL
14739 instead of checking the leave_stopped member.
14740 (linux_resume): Adjust to the target resume interface change.
14741 * spu-low.c (spu_resume): Adjust to the target resume interface
14742 change.
14743 * win32-low.c (win32_detach, win32_resume): Ditto.
14744
c35fafde
PA
147452009-04-01 Pedro Alves <pedro@codesourcery.com>
14746
14747 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14748 flag.
14749 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14750 pending.
14751 (linux_continue_one_thread): Only preserve the stepping flag if
14752 there's a pending breakpoint.
14753
0a59d50b
PA
147542009-03-31 Pedro Alves <pedro@codesourcery.com>
14755
14756 * server.c (main): After the inferior having exited, call
14757 remote_close before exiting gdbserver.
14758
f04c6d38
TJB
147592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14760
14761 Fix size of FPSCR in Power 7 processors.
14762 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14763 (PPC_FEATURE_HAS_DFP): New #define.
14764 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14765 size of the FPSCR.
14766
78e5cee6
PA
147672009-03-23 Pedro Alves <pedro@codesourcery.com>
14768
14769 * server.c (handle_query) Whitespace and formatting.
14770
1b3f6016
PA
147712009-03-22 Pedro Alves <pedro@codesourcery.com>
14772
14773 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14774 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14775 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14776 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14777 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14778 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14779 Makefile.in, configure.ac: Fix whitespace throughout.
14780 * configure: Regenerate.
14781
a07b2135
PA
147822009-03-22 Pedro Alves <pedro@codesourcery.com>
14783
14784 * inferiors.c (find_inferior): Make it safe for the callback
14785 function to delete the currently iterated inferior.
14786
67cc2626
PA
147872009-03-22 Pedro Alves <pedro@codesourcery.com>
14788
14789 * Makefile.in (linuw_low_h): Move higher.
14790 (thread-db.o): Depend on $(linux_low_h).
14791
54a0b537
PA
147922009-03-17 Pedro Alves <pedro@codesourcery.com>
14793
14794 Rename "process" to "lwp" throughout.
14795
14796 * linux-low.c (all_processes): Rename to...
14797 (all_lwps): ... this.
14798 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14799 (add_process): Rename to ...
14800 (add_lwp): ... this. Adjust.
14801 (linux_create_inferior): Adjust.
14802 (linux_attach_lwp): Adjust.
14803 (linux_attach): Adjust.
14804 (linux_kill_one_process): Rename to ...
14805 (linux_kill_one_lwp): ... this. Adjust.
14806 (linux_kill): Adjust.
14807 (linux_detach_one_process): Rename to ...
14808 (linux_detach_one_lwp): ... this. Adjust.
14809 (linux_detach): Adjust.
14810 (check_removed_breakpoint): Adjust.
14811 (status_pending_p): Adjust.
14812 (linux_wait_for_process): Rename to ...
14813 (linux_wait_for_lwp): ... this. Adjust.
14814 (linux_wait_for_event): Adjust.
14815 (send_sigstop): Adjust.
14816 (wait_for_sigstop): Adjust.
14817 (stop_all_processes): Rename to ...
14818 (stop_all_lwps): ... this.
14819 (linux_resume_one_process): Rename to ...
14820 (linux_resume_one_lwp): ... this. Adjust.
14821 (linux_set_resume_request, linux_continue_one_thread)
14822 (linux_queue_one_thread, resume_status_pending_p)
14823 (usr_store_inferior_registers, regsets_store_inferior_registers)
14824 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14825 Adjust.
14826 * linux-low.h (get_process): Rename to ...
14827 (get_lwp): ... this. Adjust.
14828 (get_thread_process): Rename to ...
14829 (get_thread_lwp): ... this. Adjust.
14830 (get_process_thread): Rename to ...
14831 (get_lwp_thread): ... this. Adjust.
14832 (struct process_info): Rename to ...
14833 (struct lwp_info): ... this.
14834 (all_processes): Rename to ...
14835 (all_lwps): ... this.
14836 * proc-service.c (ps_lgetregs): Adjust.
14837 * thread-db.c (thread_db_create_event, find_one_thread)
14838 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14839
0b16c5cf
PA
148402009-03-14 Pedro Alves <pedro@codesourcery.com>
14841
14842 * server.c (handle_query): Handle "qAttached".
14843
32de4b9d
NS
148442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14845
14846 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14847 GPLv3, update license URL.
14848
2aecd87f
DE
148492009-03-01 Doug Evans <dje@google.com>
14850
93efd302 14851 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14852 (server_h): Add gdb_signals.h.
14853 (signals.o): Update.
14854 * server.h (target_signal_from_host,target_signal_to_host_p)
14855 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14856
86b1f9c5
PM
148572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14858
14859 * remote-utils.c (getpkt): Also generate remote-debug
14860 information if noack_mode is set.
14861
4aa995e1
PA
148622009-02-06 Pedro Alves <pedro@codesourcery.com>
14863
14864 * server.c (handle_query): Report qXfer:siginfo:read and
14865 qXfer:siginfo:write as supported and handle them.
14866 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14867 * linux-low.c (linux_xfer_siginfo): New.
14868 (linux_target_ops): Set it.
14869
62709adf
PA
148702009-01-26 Pedro Alves <pedro@codesourcery.com>
14871
14872 * server.c (gdbserver_usage): Mention --remote-debug.
14873 (main): Accept '--remote-debug' switch.
14874
aef93bd7
DE
148752009-01-18 Doug Evans <dje@google.com>
14876
14877 * regcache.c (new_register_cache): No need to check result of xcalloc.
14878 * server.c (handle_search_memory): Back out calls to xmalloc,
14879 result is checked and error is returned to user upon failure.
14880 (handle_query): Ditto. Add more checks for result of malloc.
14881 (handle_v_cont): Check result of malloc, report error back to
14882 user upon failure.
14883 (handle_v_run): Ditto. Call freeargv.
14884 * server.h (freeargv): Declare.
14885 * utils.c (freeargv): New fn.
14886
54363045
DE
148872009-01-15 Doug Evans <dje@google.com>
14888
f626972c
DE
14889 * gdbreplay.c (perror_with_name): Make arg const char *.
14890 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14891 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14892 * utils.c (perror_with_name): Make arg const char *.
54363045 14893
18aae699
PA
148942009-01-14 Pedro Alves <pedro@codesourcery.com>
14895
14896 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14897 when handling a EXIT_PROCESS_DEBUG_EVENT.
14898
ff703abe
JB
148992009-01-06 Joel Brobecker <brobecker@adacore.com>
14900
14901 * gdbreplay.c (gdbreplay_version): Update copyright year.
14902 * server.c (gdbserver_version): Likewise.
14903
f21cc1a2 149042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14905
14906 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14907 (handle_extended_wait): Improve comment.
0e21c1ec 14908
bca929d3
DE
149092008-12-13 Doug Evans <dje@google.com>
14910
14911 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14912 * server.h (ATTR_MALLOC): New macro.
14913 (xmalloc,xcalloc,xstrdup): Declare.
14914 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14915 * inferiors.c: Ditto.
14916 * linux-low.c: Ditto.
14917 * mem-break.c: Ditto.
14918 * regcache.c: Ditto.
14919 * remote-utils.c: Ditto.
14920 * server.c: Ditto.
14921 * target.c: Ditto.
14922 * win32-low.c: Ditto.
14923
97438e3f
DE
149242008-12-12 Doug Evans <dje@google.com>
14925
896c7fbb
DE
14926 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14927 in debugging printf.
14928
97438e3f
DE
14929 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14930
e3b886f8
DE
149312008-12-09 Doug Evans <dje@google.com>
14932
14933 * linux-low.h (struct process_info): Delete member tid, unused.
14934 * thread-db.c (find_one_thread): Update.
14935 (maybe_attach_thread): Update.
14936
07e059b5
VP
149372008-12-02 Pedro Alves <pedro@codesourcery.com>
14938
889bf7c5
PA
14939 * target.h (struct target_ops): Add qxfer_osdata member.
14940 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14941 and dirent.h.
14942 (linux_qxfer_osdata): New functions.
14943 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14944 callback.
14945 * server.c (handle_query): Handle "qXfer:osdata:read:".
14946 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14947 (buffer_xml_printf): New functions.
14948 * server.h (struct buffer): New.
14949 (buffer_grow_str, buffer_grow_str0): New macros.
14950 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14951 (buffer_xml_printf): Declare.
07e059b5 14952
4cab47ab
DE
149532008-11-24 Doug Evans <dje@google.com>
14954
14955 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14956
f142445f
DJ
149572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14958
14959 * server.c (handle_v_run): Always use the supplied argument list.
14960
d0107bb6 149612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14962
d0107bb6
BW
14963 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14964 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14965
2c4ad781
TJB
149662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14967
14968 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14969 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14970 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14971 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14972 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14973 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14974 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14975 XML target descriptions.
14976 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14977 when inferior is running on an ISA 2.05 or later processor. Add
14978 special case to return offset for full 64-bit slot of FPSCR when
14979 in 32-bits.
14980
dfb64f85
DJ
149812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14982
14983 * Makefile.in (SFILES, clean): Added sparc64 files.
14984 (reg-sparc64.o, reg-sparc64.c): New.
14985 * configure.srv (sparc*-*-linux*): New configuration.
14986 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14987 syscall arguments for SPARC.
14988 (regsets_store_inferior_registers): Likewise.
14989 * linux-sparc-low.c: New file.
14990
66b6e1dd
DE
149912008-10-21 Doug Evans <dje@google.com>
14992
14993 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14994 (READLINE_DIR,READLINE_DEP): Delete.
14995 (INTERNAL_CFLAGS): Update.
14996 (LINTFLAGS): Update.
14997
9b710a42
PA
149982008-10-10 Pedro Alves <pedro@codesourcery.com>
14999
15000 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15001 whole argv from the last run, not just argv[0].
15002
5822d809
PA
150032008-09-08 Pedro Alves <pedro@codesourcery.com>
15004
15005 * regcache.c (new_register_cache): Return NULL if the register
15006 cache size isn't known yet.
15007 (free_register_cache): Avoid dereferencing a NULL regcache.
15008
74aac56f
DJ
150092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15010
15011 * configure.srv: Merge MIPS and MIPS64.
15012
400b20f5
MR
150132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15014
15015 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15016
677c5bb1
LM
150172008-08-18 Luis Machado <luisgpm@br.ibm.com>
15018
15019 * Makefile.in: Add required vsx dependencies.
15020
15021 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15022 Declare init_registers_powerpc_vsx32l.
15023 Declare init_registers_powerpc_vsx64l.
15024 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15025 (ppc_arch_setup): Check for VSX in hwcap.
15026 (ppc_fill_vsxregset): New function.
15027 (ppc_store_vsxregset): New function.
15028 Add new VSX entry in regset_info target_regsets.
15029
15030 * configure.srv: Add new VSX dependencies.
15031
a6f3e723
SL
150322008-08-12 Pedro Alves <pedro@codesourcery.com>
15033
15034 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15035 (remote_open): Set or clear transport_is_reliable.
15036 (putpkt_binary): Don't expect acks in noack mode.
15037 (getpkt): Don't send ack/nac in noack mode.
15038 * server.c (handle_general_set): Handle QStartNoAckMode.
15039 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15040 qSupported.
15041 (main): Reset noack_mode on every connection.
15042 * server.h (noack_mode): Declare.
15043
a417dc56
RW
150442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15045
15046 * Makefile.in (GDBREPLAY_OBS): New variable.
15047 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15048
3221518c
UW
150492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15050 Daniel Jacobowitz <dan@codesourcery.com>
15051
15052 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15053 (usr_store_inferior_registers): Likewise.
15054 (regsets_store_inferior_registers): Likewise.
15055
ec56be1b
PA
150562008-07-31 Rolf Jansen <rj@surtec.com>
15057 Pedro Alves <pedro@codesourcery.com>
15058
15059 * configure.ac: Check for memmem declaration.
15060 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15061 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15062 (disable_packet_qfThreadInfo): Unconditionally compile.
15063 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15064 * configure, config.in: Regenerate.
15065
2fe5e3ff
DE
150662008-07-28 Doug Kwan <dougkwan@google.com>
15067
15068 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15069 (linux_write_memory): Remove declaration of errno.
15070
836acd6d
UW
150712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15072
15073 * linux-low.c (handle_extended_wait): Do not use "status"
15074 variable uninitialized.
15075
aeba519e
PA
150762008-07-07 Pedro Alves <pedro@codesourcery.com>
15077
15078 * server.c (handle_v_attach): Inhibit reporting dll changes.
15079
db42f210
PA
150802008-06-27 Pedro Alves <pedro@codesourcery.com>
15081
15082 * remote-utils.c (prepare_resume_reply): If requested, don't
15083 output "thread:TID" in the T stop reply.
15084
15085 * server.c (disable_packet_vCont, disable_packet_Tthread)
15086 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15087 (handle_query): If requested, disable support for qC, qfThreadInfo
15088 and qsThreadInfo.
15089 (handle_v_requests): If requested, disable support for vCont.
15090 (gdbserver_show_disableable): New.
15091 (main): Handle --disable-packet and --disable-packet=LIST.
15092
15093 * server.h (disable_packet_vCont, disable_packet_Tthread)
15094 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15095
8e4c5421
CD
150962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15097
15098 * server.c (gdbserver_usage): Mention --version.
15099
6e23a804
DJ
151002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15101
15102 * Makefile.in (gdbreplay.o): New rule.
15103
90aa6a40
JM
151042008-06-06 Joseph Myers <joseph@codesourcery.com>
15105
15106 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15107 message, not gdbserver.
15108
c16158bc 151092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15110 Nathan Sidwell <nathan@codesourcery.com>
15111 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15112
15113 * acinclude.m4: Include ../../config/acx.m4.
15114 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15115 * configure, config.in: Regenerate.
15116 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15117 * server.c (gdbserver_version): Print PKGVERSION.
15118 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15119 (main): Adjust gdbserver_usage calls.
15120 * gdbreplay.c (version, host_name): Add declarations.
15121 (gdbreplay_version, gdbreplay_usage): New.
15122 (main): Accept --version and --help options.
15123
aeb75bf5
DJ
151242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15127 (arm_breakpoint_at): Handle Thumb.
15128 (the_low_target): Add comment.
15129
76b233dd
UW
151302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15131
15132 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15133
08388c79
DE
151342008-05-09 Doug Evans <dje@google.com>
15135
a3c83fae
DE
15136 * server.h (decode_search_memory_packet): Declare.
15137 * remote-utils.c (decode_search_memory_packet): New fn.
15138 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15139 (handle_search_memory): New fn.
15140 (handle_query): Process qSearch:memory packets.
15141
bb9c3d36
UW
151422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15143
15144 * regcache.c (registers_length): Remove.
15145 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15146 full register packet.
15147 * regcache.h (registers_length): Remove prototype.
15148 * server.h (PBUFSIZ): Define to 16384.
15149
7284e1be
UW
151502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15151
15152 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15153 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15154 powerpc-64l.o, and powerpc-altivec64l.o.
15155 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15156 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15157 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15158 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15159 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15160 to srv_xmlfiles.
15161
15162 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15163 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15164 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15165 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15166 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15167 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15168 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15169 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15170 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15171 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15172 (clean): Update.
15173
15174 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15175 (init_registers_powerpc_32l): ... this new prototype.
15176 (init_registers_powerpc_32): Remove, replace by ...
15177 (init_registers_powerpc_altivec32l): ... this new prototype.
15178 (init_registers_powerpc_e500): Remove, replace by ...
15179 (init_registers_powerpc_e500l): ... this new prototype.
15180 (init_registers_ppc64): Remove, replace by ...
15181 (init_registers_powerpc_64l): ... this new prototype.
15182 (init_registers_powerpc_64): Remove, replace by ...
15183 (init_registers_powerpc_altivec64l): ... this new prototype.
15184 (ppc_num_regs): Set to 73.
15185 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15186 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15187 (ppc_cannot_store_register): Handle orig_r3 and trap.
15188 (ppc_arch_setup): Update init_registers_... calls.
15189 (ppc_fill_gregset): Handle orig_r3 and trap.
15190
15191 * inferiors.c (clear_inferiors): Reset current_inferior.
15192
fdc59709
PB
151932008-04-23 Paolo Bonzini <bonzini@gnu.org>
15194
889bf7c5
PA
15195 * acinclude.m4: Add override.m4.
15196 * configure: Regenerate.
fdc59709 15197
c9b2f845
UW
151982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15199
15200 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15201 initial call to init_register_ppc64.
15202
550512b8
UW
152032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15204
43aaf8b6
PA
15205 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15206 single powerpc*-*-linux* case.
550512b8
UW
15207 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15208
b6430ec3
UW
152092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15210
15211 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15212 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15213 from reg_xmlfiles.
15214 * linux-ppc-low.c: Include <elf.h>.
15215 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15216 (ppc_hwcap): New global variable.
15217 (ppc_regmap): Remove __SPE__ #ifdef sections.
15218 (ppc_regmap_e500): New global variable.
15219 (ppc_cannot_store_register): Update __SPE__ special case.
15220 (ppc_get_hwcap): New function.
15221 (ppc_arch_setup): Use it to determine whether inferior supports
15222 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15223 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15224 Do not access registers if target does not support AltiVec.
15225 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15226 Do not access registers if target does not support SPE.
15227 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15228
52fa2412
UW
152292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * linux-low.c (disabled_regsets, num_regsets): New.
15232 (use_regsets_p): Delete.
15233 (linux_wait_for_process): Clear disabled_regsets.
15234 (regsets_fetch_inferior_registers): Check and set it.
15235 (regsets_store_inferior_registers): Likewise.
15236 (linux_fetch_registers, linux_store_registers): Do not use
15237 use_regsets_p.
15238 (initialize_low): Allocate disabled_regsets.
15239
e28b3332
DJ
152402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15241
15242 * Makefile.in (LIBOBJS): New.
15243 (OBS): Use LIBOBJS.
15244 (memmem.o): New rule.
15245 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15246 * configure: Regenerated.
15247
4536995d
UW
152482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15249
15250 * server.c (handle_query): Never return "unsupported" for
15251 qXfer:features:read queries.
15252
221c031f
UW
152532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15254
15255 * server.c (get_features_xml): Fix inverted condition.
15256 (handle_query): Always support qXfer:feature:read.
15257
ccd213ac
DJ
152582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15259
15260 * server.c (wrapper_argv): New.
15261 (start_inferior): Handle wrapper_argv. If set, expect an extra
15262 trap.
15263 (gdbserver_usage): Document --wrapper.
15264 (main): Parse --wrapper.
15265
6fe305f7
UW
152662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15267
15268 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15269 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15270 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15271 (ppc_set_pc): Likewise.
15272 (ppc_arch_setup): New function.
15273 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15274 of collect_register.
889bf7c5 15275 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15276
5b0a002e
UW
152772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15278
15279 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15280 instead of linux-ppc64-low.o.
15281 * linux-ppc64-low.c: Remove file.
15282 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15283 (linux-ppc64-low.o): Remove rule.
15284
15285 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15286 (init_registers_powerpc_64): Likewise.
15287 (ppc_regmap): Conditionally define depending on __powerpc64__.
15288 (ppc_cannot_store_register): Do not special-case "fpscr" when
15289 compiled on __powerpc64__.
15290 (ppc_collect_ptrace_register): New function.
15291 (ppc_supply_ptrace_register): New function.
15292 (ppc_breakpoint): Change type to "unsigned int".
15293 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15294 (the_low_target): Conditionally provide initializers for the
889bf7c5 15295 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15296 collect_ptrace_register and supply_ptrace_register members.
15297
9b4b61c8
UW
152982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15299
15300 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15301 * server.c (gdbserver_xmltarget): Define.
15302 (get_features_xml): Use it to replace "target.xml" and arch_string.
15303
15304 * configure.srv: Remove srv_xmltarget. Add XML files that were
15305 mentioned there to srv_xmlfiles instead. Remove conditional tests
15306 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15307 srv_xmlfiles and srv_regobj to include all possible choices.
15308 * configure.ac (srv_xmltarget): Remove.
15309 (srv_xmlfiles): Do not add "target.xml".
15310 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15311 checks for supplementary target information.
15312 * configure: Regenerate.
15313 * Makefile.in (XML_TARGET): Remove.
15314 (target.xml): Remove rule.
15315 (clean): Do not clean up target.xml.
15316 (.PRECIOUS): Do not mention target.xml.
15317
15318 * target.h (struct target_ops): Remove arch_string member.
15319 * linux-low.c (linux_arch_string): Remove.
15320 (linux_target_ops): Remove arch_string initializer.
15321 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15322 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15323 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15324 * spu-low.c (spu_arch_string): Remove.
15325 (spu_target_ops): Remove arch_string initializer.
15326 * win32-low.c (win32_arch_string): Remove.
15327 (win32_target_ops): Remove arch_string initializer.
15328 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15329 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15330 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15331
ee1a7ae4
UW
153322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15333
15334 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15335 by collect_ptrace_register and supply_ptrace_register hooks.
15336 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15337 instead of checking for the_low_target.left_pad_xfer.
15338 (usr_store_inferior_registers): Use collect_ptrace_register callback
15339 instead of checking for the_low_target.left_pad_xfer.
15340
15341 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15342 (s390_supply_ptrace_register): Likewise.
15343 (s390_fill_gregset): Call s390_collect_ptrace_register.
15344 (the_low_target): Update.
15345
15346 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15347 (ppc_supply_ptrace_register): Likewise.
15348 (the_low_target): Update.
15349
15350 * linux-i386-low.c (the_low_target): Update.
15351 * linux-x86-64-low.c (the_low_target): Update.
15352
d61ddec4
UW
153532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15354
15355 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15356 reg-s390.o and reg-s390x.o.
15357
15358 * linux-low.c (new_inferior): New global variable.
15359 (linux_create_inferior, linux_attach): Set it.
15360 (linux_wait_for_process): Call the_low_target.arch_setup after the
15361 target has stopped for the first time.
15362 (initialize_low): Do not call the_low_target.arch_setup.
15363
15364 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15365 (s390_set_pc): Likewise.
15366 (s390_arch_setup): New function.
15367 (the_low_target): Use s390_arch_setup as arch_setup routine.
15368
15369 * regcache.c (realloc_register_cache): New function.
15370 (set_register_cache): Call it for each existing regcache.
15371
d05b4ac3
UW
153722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15373
15374 * server.h (init_registers): Remove prototype.
15375
15376 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15377 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15378 instead of init_registers ().
15379 * linux-arm-low.c (init_registers_arm): Add prototype.
15380 (init_registers_arm_with_iwmmxt): Likewise.
15381 (the_low_target): Add initializer for arch_setup field.
15382 * linux-cris-low.c (init_registers_cris): Add prototype.
15383 (the_low_target): Add initializer for arch_setup field.
15384 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15385 (the_low_target): Add initializer for arch_setup field.
15386 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15387 (the_low_target): Add initializer for arch_setup field.
15388 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15389 (the_low_target): Add initializer for arch_setup field.
15390 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15391 (the_low_target): Add initializer for arch_setup field.
15392 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15393 (the_low_target): Add initializer for arch_setup field.
15394 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15395 (init_registers_mips64_linux): Likewise.
15396 (the_low_target): Add initializer for arch_setup field.
15397 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15398 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15399 (the_low_target): Add initializer for arch_setup field.
15400 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15401 (init_registers_powerpc_64): Likewise.
15402 (the_low_target): Add initializer for arch_setup field.
15403 * linux-s390-low.c (init_registers_s390): Add prototype.
15404 (init_registers_s390x): Likewise.
15405 (the_low_target): Add initializer for arch_setup field.
15406 * linux-sh-low.c (init_registers_sh): Add prototype.
15407 (the_low_target): Add initializer for arch_setup field.
15408 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15409 (the_low_target): Add initializer for arch_setup field.
15410 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15411 (the_low_target): Add initializer for arch_setup field.
15412
15413 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15414 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15415 instead of init_registers ().
15416 * win32-arm-low.c (init_registers_arm): Add prototype.
15417 (the_low_target): Add initializer for arch_setup field.
15418 * win32-i386-low.c (init_registers_i386): Add prototype.
15419 (the_low_target): Add initializer for arch_setup field.
15420
15421 * spu-low.c (init_registers_spu): Add prototype.
15422 (initialize_low): Call initialie_registers_spu () instead of
15423 initialize_registers ().
15424
fd96d250
PA
154252008-02-19 Pedro Alves <pedro@codesourcery.com>
15426
15427 * server.c (handle_v_requests): When handling the vRun and vAttach
15428 packets, if already debugging a process, don't kill it. Return an
15429 error instead.
15430
d41b6bb4
DJ
154312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15432
15433 * server.c (handle_query): Correct length check.
15434
5ac588cf
PA
154352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15436
15437 * win32-low.c (do_initial_child_stuff): Add process handle
15438 parameter. Set current_process_handle and current_process_id from the
15439 parameters. Clear globals.
15440 (win32_create_inferior): Don't set current_process_handle and
15441 current_process_id here. Instead pass them on the call to
15442 do_initial_child_stuff.
15443 (win32_attach): Likewise.
15444 (win32_clear_inferiors): New.
15445 (win32_kill): Don't close the current process handle or the
15446 current thread handle here. Instead call win32_clear_inferiors.
15447 (win32_detach): Don't open a new handle to the process. Call
15448 win32_clear_inferiors.
15449 (win32_join): Don't rely on current_process_handle; open a new
15450 handle using the process id.
15451 (win32_wait): Call win32_clear_inferiors when the inferior process
15452 has exited.
15453
ecd7ecbc
DJ
154542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15455
15456 * server.c (monitor_show_help): Add "exit".
15457
1525d545
MG
154582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15459
ecd7ecbc 15460 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15461 (clean): Add reg-xtensa.c.
15462 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15463 * configure.srv (xtensa*-*-linux*) New target.
15464 * linux-xtensa-low.c: New.
15465 * xtensa-xtregs.c: New.
1525d545 15466
59a016f0
PA
154672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15468
15469 * hostio.c: Don't include errno.h.
15470 (errno_to_fileio_errno): Move to hostio-errno.
15471 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15472 error number outputting to the target->hostio_last_error callback.
15473 (hostio_packet_error): Use FILEIO_EINVAL directly.
15474 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15475 calls to hostio_error.
15476 * hostio-errno.c: New.
15477 * server.h (hostio_last_error_from_errno): Declare.
15478 * target.h (target_ops): Add hostio_last_error member.
15479 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15480 as hostio_last_error handler.
889bf7c5 15481 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15482 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15483 (wince_hostio_last_error): New functions.
15484 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15485 as hostio_last_error handler.
15486 (win32_target_ops) [!_WIN32_WCE]: Register
15487 hostio_last_error_from_errno as hostio_last_error handler.
15488 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15489 (hostio-errno.o): New rule.
15490 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15491 * configure.srv (srv_hostio_err_objs): New variable. Default to
15492 hostio-errno.o.
15493 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15494 * configure: Regenerate.
15495
2d717e4f
DJ
154962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15499 (linux_kill, linux_detach): Clean up the process list.
15500 * remote-utils.c (remote_open): Improve port number parsing.
15501 (putpkt_binary, input_interrupt): Only send interrupts if the target
15502 is running.
15503 * server.c (extended_protocol): Make static.
15504 (attached): Define earlier.
15505 (exit_requested, response_needed, program_argv): New variables.
15506 (target_running): New.
15507 (start_inferior): Clear attached here.
15508 (attach_inferior): Set attached here.
15509 (require_running): Define.
15510 (handle_query): Use require_running and target_running. Implement
15511 "monitor exit".
15512 (handle_v_attach, handle_v_run): New.
15513 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15514 (gdbserver_usage): Update.
15515 (main): Redo argument parsing. Handle --debug and --multi. Handle
15516 --attach along with other options or after the port. Save
15517 program_argv. Support no initial program. Resynchronize
15518 communication with GDB after an error. Handle "monitor exit".
15519 Use require_running and target_running. Always allow the extended
15520 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15521 restart in extended mode.
15522 * README: Refer to the GDB manual. Update --attach usage.
15523
7407e2de
AS
155242007-12-20 Andreas Schwab <schwab@suse.de>
15525
15526 * linux-low.c (STACK_SIZE): Define.
15527 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15528 (linux_test_for_tracefork): Likewise.
15529
b65d95c5
DJ
155302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15531
15532 * linux-low.c (linux_wait_for_event): Update messages. Do not
15533 reinsert auto-delete breakpoints.
15534 * mem-break.c (struct breakpoint): Change return type of handler to
15535 int.
15536 (set_breakpoint_at): Update handler type.
15537 (reinsert_breakpoint_handler): Return 1 instead of calling
15538 delete_breakpoint.
15539 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15540 setting a new one.
15541 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15542 * mem-break.h (set_breakpoint_at): Update handler type.
15543 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15544 * win32-low.c (auto_delete_breakpoint): New.
15545 (get_child_debug_event): Use it.
15546
4e799345
DJ
155472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15548
15549 * configure.ac: Check for pread and pwrite.
15550 * hostio.c (handle_pread): Fall back to lseek and read.
15551 (handle_pwrite): Fall back to lseek and write.
15552 * config.in, configure: Regenerated.
15553
27524b67
DJ
155542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * server.c (myresume): Add own_buf argument.
15557 (main): Update calls.
15558
a20d5e98
DJ
155592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15560
15561 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15562 * remote-utils.c (remote_open): Do not call disable_async_io.
15563 (block_async_io): Delete.
15564 (unblock_async_io): Make static.
15565 (initialize_async_io): New.
15566 * server.c (handle_v_cont): Handle async I/O here.
15567 (myresume): Likewise. Move other common resume tasks here...
15568 (main): ... from here. Call initialize_async_io. Disable async
15569 I/O before the main loop.
15570 * server.h (initialize_async_io): Declare.
15571 (block_async_io, unblock_async_io): Delete prototypes.
15572 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15573
b79d787e
DJ
155742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15575
15576 * remote-utils.c (readchar): Allow binary data in received messages.
15577
d97903b2
PA
155782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15579
15580 * win32-low.c (attaching): New global.
15581 (win32_create_inferior): Clear the `attaching' global.
15582 (win32_attach): Set the `attaching' global.
15583 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15584 attaching. Only set a breakpoint at the entry point if not
15585 attaching.
15586
311de423
PA
155872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15588
15589 * server.c (main): Don't report dll events on the initial
15590 connection on attaches.
15591
6c2d16d2
PA
155922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15593
15594 * server.c (main): Relax numerical bases supported for the pid of
15595 the --attach command line argument.
15596
5ca906e6
PA
155972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15598
15599 * win32-low.c (win32_attach): Call OpenProcess before
15600 DebugActiveProcess, not after. Add last error output to error
15601 call.
15602
9c6c8194
PA
156032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15604
15605 * win32-low.c (win32_get_thread_context)
15606 (win32_set_thread_context): New functions.
15607 (thread_rec): Use win32_get_thread_context.
15608 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15609 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15610 field.
15611
4d5d1aaa
PA
156122007-12-03 Leo Zayas
15613 Pedro Alves <pedro_alves@portugalmail.pt>
15614
15615 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15616 global variables.
15617 (child_add_thread): Minor cleanup.
15618 (child_continue): Resume artificially suspended threads before
15619 calling ContinueDebugEvent.
15620 (suspend_one_thread): New.
15621 (fake_breakpoint_event): New.
15622 (get_child_debug_event): Change return type to int. Check here if
15623 gdb sent an interrupt request. If a soft interrupt was requested,
15624 fake a breakpoint event. Return 0 if there is no event to handle,
15625 and 1 otherwise.
15626 (win32_wait): Don't check here if gdb sent an interrupt request.
15627 Ensure there is a valid event to handle.
15628 (win32_request_interrupt): Add soft interruption method as last
15629 resort.
15630
c436e841
PA
156312007-12-03 Leo Zayas
15632 Pedro Alves <pedro_alves@portugalmail.pt>
15633
15634 * win32-low.h (win32_thread_info): Add descriptions to the
15635 structure members. Replace `suspend_count' counter by a
15636 `suspended' flag.
15637 * win32-low.c (thread_rec): Update condition of when to get the
15638 context from the inferior. Rely on ContextFlags being set if it
15639 has already been retrieved. Only suspend the inferior thread if
15640 we haven't already. Warn if that fails.
15641 (continue_one_thread): s/suspend_count/suspended/. Only call
15642 ResumeThread once. Warn if that fails.
15643
e7b5fa67
PA
156442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15645
15646 * win32-low.c (win32_wait): Don't read from the inferior when it
15647 has already exited.
15648
a385171d
PA
156492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15650
15651 * Makefile.in (win32_low_h): New variable.
15652 (win32-low.o): Add dependency on $(win32_low_h).
15653 (win32-arm-low.o, win32-i386-low.o): New rules.
15654
f80c84b3
DJ
156552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15656
15657 * hostio.c: Correct copyright year.
15658
a6b151f1
DJ
156592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15660
15661 * Makefile.in (OBS): Add hostio.o.
15662 (hostio.o): New rule.
15663 * server.h (handle_vFile): Declare.
15664 * hostio.c: New file.
15665 * server.c (handle_v_requests): Take packet_len and new_packet_len
15666 for binary packets. Call handle_vFile.
15667 (main): Update call to handle_v_requests.
15668
f9387fc3
DJ
156692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15670
15671 * linux-low.c: Include <sched.h>.
15672
51c2684e
DJ
156732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15674
15675 * linux-low.c (linux_tracefork_grandchild): New.
15676 (linux_tracefork_child): Use clone.
15677 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15678
75f83163
JB
156792007-10-31 Joel Brobecker <brobecker@adacore.com>
15680
15681 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15682
da5898ce
DJ
156832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15686
24a09b5f
DJ
156872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * inferiors.c (change_inferior_id): Delete.
15690 (add_pid_to_list, pull_pid_from_list): New.
15691 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15692 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15693 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15694 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15695 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15696 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15697 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15698 (using_threads): Always set to 1.
15699 (handle_extended_wait): New.
15700 (add_process): Do not set TID.
15701 (linux_create_inferior): Set must_set_ptrace_flags.
15702 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15703 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15704 (linux_thread_alive): Rename TID argument to LWPID.
15705 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15706 (linux_wait_for_event): Do not use TID or check using_threads. Update
15707 call to dead_thread_notify. Call handle_extended_wait.
15708 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15709 (send_sigstop): Delete sigstop_sent.
15710 (wait_for_sigstop): Avoid TID.
15711 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15712 (linux_test_for_tracefork): New.
15713 (linux_lookup_signals): Use thread_db_active and
15714 linux_supports_tracefork_flag.
15715 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15716 * linux-low.h (get_process_thread): Avoid TID.
15717 (struct process_ifo): Move thread_known and tid to the end. Remove
15718 sigstop_sent.
15719 (linux_attach_lwp, thread_db_init): Update prototypes.
15720 * server.h (change_inferior_id): Delete prototype.
15721 (add_pid_to_list, pull_pid_from_list): New prototypes.
15722 * thread-db.c (thread_db_use_events): New.
15723 (find_first_thread): Rename to...
15724 (find_one_thread): ...this. Update callers and messages. Do not
15725 call fatal. Check thread_db_use_events. Do not call
15726 change_inferior_id or new_thread_notify.
15727 (maybe_attach_thread): Update. Do not call new_thread_notify.
15728 (thread_db_init): Set thread_db_use_events. Check use_events.
15729 * utils.c (fatal, warning): Correct message prefix.
15730
30ed0a8f
DJ
157312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15732
15733 * Makefile.in (clean): Remove new files.
15734 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15735 (powerpc-64.o, powerpc-64.c): New rules.
15736 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15737 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15738 with SPE.
15739 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15740 SPE targets.
15741 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15742 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15743 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15744 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15745 (target_regsets): Add AltiVec and SPE register sets.
15746 * configure.ac: Check for AltiVec and SPE.
15747 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15748 (ppc_fill_vrregset, ppc_store_vrregset): New.
15749 (target_regsets): Add AltiVec register set.
15750 * configure: Regenerated.
15751
fd462a61
DJ
157522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15753
15754 * linux-low.c (O_LARGEFILE): Define.
15755 (linux_read_memory): Use /proc/PID/mem.
15756 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15757 * configure, config.in: Regenerated.
15758
69f223ed
DJ
157592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15760
15761 * linux-low.c (linux_wait_for_event): Do not pass signals while
15762 single-stepping.
15763
aec18585
PA
157642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15765
15766 * win32-low.c (create_process): New.
15767 (win32_create_inferior): Use create_process instead of
15768 CreateProcess. If create_process failed retry appending an ".exe"
15769 suffix. Store the GetLastError result immediatelly after
15770 create_process calls and use it on the call to error.
15771
34d86ddd
PA
157722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15773
15774 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15775
5a0e3bd0
JB
157762007-08-23 Joel Brobecker <brobecker@adacore.com>
15777
15778 * configure.ac: Switch license to GPLv3.
15779
f88c79e6
MS
157802007-08-01 Michael Snyder <msnyder@access-company.com>
15781
15782 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15783
6b3d9b83
PA
157842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15785
15786 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15787 typedef.
15788 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15789 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15790 CloseToolhelp32Snapshot.
15791 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15792 CloseToolhelp32Snapshot.
15793
c588c53c
MS
157942007-07-27 Michael Snyder <michael.snyder@access-company.com>
15795
15796 * server.c (main): Check for inferior exit before main loop.
15797
aa0403d9
PA
157982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15799
15800 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15801 instead of on tmp_desc.
15802
255e7678
DJ
158032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15804 Daniel Jacobowitz <dan@codesourcery.com>
15805
15806 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15807 (add_thread): Minor cleanups.
15808 (clear_inferiors): Move lower in the file. Clear the DLL
15809 list.
15810 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15811 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15812 (xml_escape_text): New.
15813 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15814 for qSupported.
15815 (handle_v_cont): Report errors.
15816 (gdbserver_version): Update.
15817 (main): Correct size of own_buf. Do not report initial DLL events.
15818 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15819 (unloaded_dll, xml_escape_text): New.
15820 * win32-low.c (enum target_waitkind): Update comments.
15821 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15822 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15823 (win32_EnumProcessModules, win32_GetModuleInformation)
15824 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15825 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15826 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15827 (win32_Module32First, win32_Module32Next, load_toolhelp)
15828 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15829 (get_child_debug_event): Handle DLL events.
15830 (win32_wait): Likewise.
15831
0d37add9
DJ
158322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15833
15834 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15835 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15836
45e2715e
PA
158372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15838
15839 * win32-low.c (handle_output_debug_string): Ignore event if not
15840 waiting.
15841
c5674cf1
PA
158422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15843
15844 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15845
2bbe3cc1
DJ
158462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15847
15848 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15849
ae13219e
DJ
158502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15851
15852 * inferiors.c (change_inferior_id): Add comment.
15853 * linux-low.c (check_removed_breakpoint): Add an early
15854 prototype. Improve debug output.
15855 (linux_attach): Doc update.
15856 (linux_detach_one_process, linux_detach): Clean up before releasing
15857 each process.
15858 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15859 * linux-low.h (struct process_info): Doc improvement.
15860 * mem-break.c (delete_all_breakpoints): New.
15861 * mem-break.h (delete_all_breakpoints): New prototype.
15862 * thread-db.c (find_first_thread): New.
15863 (thread_db_create_event): Call it instead of
15864 thread_db_find_new_threads. Clean up unused variables.
15865 (maybe_attach_thread): Remove first thread handling.
15866 (thread_db_find_new_threads): Use find_first_thread.
15867 (thread_db_get_tls_address): Likewise.
15868
4105de34
DJ
158692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * thread-db.c (thread_db_find_new_threads): Add prototype.
15872 (thread_db_create_event): Check for the main thread before adding
15873 a new thread.
15874 (maybe_attach_thread): Only enable event reporting if TID == 0.
15875 (thread_db_get_tls_address): Check for new threads.
15876
2b876972
DJ
158772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15878
15879 * linux-low.c (linux_create_inferior): Try execv before execvp.
15880 * spu-low.c (spu_create_inferior): Likewise.
15881
7a245884
DJ
158822007-06-13 Mike Frysinger <vapier@gentoo.org>
15883
15884 * linux-low.c (linux_create_inferior): Change execv to execvp.
15885 * spu-low.c (spu_create_inferior): Likewies.
15886
117ce543
DJ
158872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15888
15889 * Makefile.in (clean): Clean new files instead of deleted ones.
15890 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15891 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15892 rules.
15893 * configure.srv: Specify XML files and new regformats for MIPS and
15894 MIPS64 GNU/Linux.
15895 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15896 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15897 an entry for the restart register.
15898 (mips_cannot_fetch_register, mips_cannot_store_register)
15899 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15900 register names to match the XML descriptions.
15901 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15902 restart register instead of $0.
15903
0e7f50da
UW
159042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15905 Markus Deuling <deuling@de.ibm.com>
15906
15907 * remote-utils.c (decode_xfer_write): New function.
15908 * server.h (decode_xfer_write): Add prototype.
15909 * server.c (handle_query): Add PACKET_LEN argument. Support
15910 qXfer:spu:read and qXfer:spu:write packets.
15911 (main): Pass packet_len to handle_query.
15912 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15913 * target.h (target_ops): Add qxfer_spu.
15914
374c1d38
UW
159152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15916
15917 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15918 accessing non-seekable spufs files.
15919
bb63802a
UW
159202007-05-16 Markus Deuling <deuling@de.ibm.com>
15921
889bf7c5 15922 * server.c (handle_query): Add reply for qC packet.
bb63802a 15923
7390519e
PA
159242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15925 Leo Zayas <lerele@champenstudios@com>
15926
15927 * server.h (check_remote_input_interrupt_request): New function.
15928 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15929 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15930 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15931 (check_remote_input_interrupt_request): New function.
15932 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15933 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15934 winapi_GenerateConsoleCtrlEvent): New typedefs.
15935 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15936 to 250 ms.
15937 (win32_wait): Check for remote interrupt request
15938 with check_remote_input_interrupt_request.
15939 (win32_request_interrupt): New function.
15940 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15941
34b34921
PA
159422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15943
15944 * win32-low.c (debug_registers_changed,
15945 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15946 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15947 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15948 (thread_rec): Get context using the low target.
15949 (child_add_thread): Call thread_added on the low target,
15950 which does the same thing.
15951 (regptr): Delete.
15952 (do_initial_child_stuff): Remove debug registers references.
15953 Set context using the low target. Resume threads after
15954 setting the contexts.
15955 (child_continue): Remove dead variable. Remove debug
15956 registers references.
15957 (child_fetch_inferior_registers): Go through the low target.
15958 (do_child_store_inferior_registers): Remove.
15959 (child_store_inferior_registers): Go through the low target.
15960 (win32_resume): Remove debug registers references.
15961 Set context using the low target.
15962 (handle_exception): Change return type to void. Don't record
15963 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15964 first chance exception.
889bf7c5 15965 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15966 goto loop. Always return after waiting for debug event.
15967 (win32_wait): Convert to switch statement. Handle spurious
15968 events.
15969
15970 * win32-i386-low.c (debug_registers_changed,
15971 debug_registers_used): New.
15972 (initial_stuff): Rename to ...
15973 (i386_initial_stuff): ... this. Clear debug registers
15974 state variables.
15975 (store_debug_registers): Delete.
15976 (i386_get_thread_context): New.
15977 (load_debug_registers): Delete.
15978 (i386_set_thread_context): New.
15979 (i386_thread_added): New.
15980 (single_step): Rename to ...
15981 (i386_single_step): ... this.
15982 (do_fetch_inferior_registers): Rename to ...
15983 (i386_fetch_inferior_register): ... this.
15984 (i386_store_inferior_register): New.
15985 (the_low_target): Adapt to new interface.
15986
15987 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15988 (arm_get_thread_context): New.
15989 (arm_set_thread_context): New.
15990 (regptr): New.
15991 (do_fetch_inferior_registers): Rename to ...
15992 (arm_fetch_inferior_register): ... this.
15993 (arm_store_inferior_register): New.
15994 (arm_wince_breakpoint): Reimplement as unsigned long.
15995 (arm_wince_breakpoint_len): Define.
15996 (the_low_target): Adapt to new interface.
15997
15998 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15999 load_debug_registers. Add get_thread_context, set_thread_context,
16000 thread_added and store_inferior_register. Rename
16001 fetch_inferior_registers to fetch_inferior_register.
16002 (regptr): Remove declaration.
16003
dd6953e1
PA
160042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16005
16006 * linux-low.c (linux_detach): Change return type to int. Return 0.
16007 * spu-low.c (spu_detach): Likewise.
16008
444d6139
PA
160092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16010
16011 * target.h (target_ops): Change return type of detach to int.
16012 Add join.
16013 (join_inferior): New.
16014 * server.c (main): Don't skip detach support on mingw32.
16015 If the inferior doesn't support detaching return error.
16016 Call join_inferior instead of using waitpid.
16017 * linux-low.c (linux_join): New.
16018 (linux_target_op): Add linux_join.
16019 * spu-low.c (spu_join): New.
16020 (spu_target_ops): Add spu_join.
16021 * win32-low.c (win32_detach): Adapt to new interface.
16022 Reopen current_process_handle before detaching. Issue a child
16023 resume before detaching.
16024 (win32_join): New.
16025 (win32_target_op): Add win32_join.
16026
1d5315fe
PA
160272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16028
16029 * win32-low.c (win32-attach): Fix return value.
16030 * target.h (target_ops): Describe ATTACH return values.
16031
bf914831
PA
160322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16033
16034 * win32-low.c (GETPROCADDRESS): Define.
16035 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16036 (winapi_DebugSetProcessKillOnExit): Likewise.
16037 (win32_create_inferior): Force usage of ansi CreateProcessA.
16038 (win32_attach): Use GETPROCADDRESS.
16039 (win32_detach): Likewise.
16040
f72f3e60
PA
160412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16042
16043 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16044
ed50f18f
PA
160452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16046
16047 * win32-low.c: Commit leftover changes from 2007-03-29.
16048
0c2ead7e
DJ
160492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16050
16051 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16052 fields short instead of int. Add explicit padding.
16053 (i387_cache_to_fsave): Remove unnecessary casts.
16054 (i387_fsave_to_cache): Doc fix.
16055 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16056
73725ff3
DJ
160572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16060 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16061
d99f33d8
PA
160622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16063
16064 * configure.srv (arm*-*-mingw32ce*): Move near the other
16065 arm targets.
16066
68070c10
PA
160672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16068
2482afc6 16069 * configure.ac: Add errno checking.
68070c10
PA
16070 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16071 sys/file.h and malloc.h.
16072 (AC_CHECK_DECLS): Add perror.
16073 (srv_mingwce): Handle.
2482afc6 16074 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16075 win32-i386-low.o to srv_tgtobj.
16076 (i[34567]86-*-mingw*): Likewise.
16077 (arm*-*-mingw32ce*): Add case.
16078 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16079 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16080 [__MINGW32CE__] (strerror): New function.
16081 [__MINGW32CE__] (errno): Define to GetLastError.
16082 [__MINGW32CE__] (COUNTOF): New macro.
16083 (remote_open): Remove extra close call.
16084 * mem-break.c (delete_breakpoint_at): New function.
16085 * mem-break.h (delete_breakpoint_at): Declare.
16086 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16087 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16088 [USE_WIN32API] (read, write): Add char* casts.
16089 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16090 * server.h: Include wincecompat.h on Windows CE.
16091 [HAVE_ERRNO_H]: Check.
16092 (perror): Declare if not declared.
16093 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16094 (perror_with_name): Remove errno declaration.
16095 * wincecompat.h: New.
16096 * wincecompat.c: New.
16097 * win32-low.h: New.
16098 * win32-arm-low.c: New.
16099 * win32-i386-low.c: New.
16100 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16101 (OUTMSG2): Make it safe.
16102 (_T): New macro.
16103 (COUNTOF): New macro.
16104 (NUM_REGS): Get it from the low target.
16105 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16106 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16107 (thread_rec): Let low target handle debug registers.
16108 (child_add_thread): Likewise.
16109 (child_init_thread_list): Likewise.
16110 (continue_one_thread): Likewise.
16111 (regptr): New.
16112 (do_child_fetch_inferior_registers): Move to ...
16113 * win32-i386-low.c: ... here, and rename to ...
16114 (do_fetch_inferior_registers): ... this.
889bf7c5 16115 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16116 Go through the low target.
16117 (do_child_store_inferior_registers): Use regptr.
16118 (strwinerror): New function.
16119 (win32_create_inferior): Handle Windows CE.
16120 Use strwinerror instead of strerror on Windows error
16121 codes. Add program to the error output.
16122 Don't close the main thread handle on Windows CE.
16123 (win32_attach): Use coredll.dll on Windows CE.
16124 (win32_kill): Close current process and current
16125 thread handles.
16126 (win32_detach): Use coredll.dll on Windows CE.
16127 (win32_resume): Let low target handle debug registers, and
16128 step request.
16129 (handle_exception): Add/Remove initial breakpoint. Avoid
16130 non-existant WSTOPSIG on Windows CE.
16131 (win32_read_inferior_memory): Cast to remove warning.
16132 (win32_arch_string): Go through the low target.
16133 (initialize_low): Call set_breakpoint_data with the low
16134 target's breakpoint.
16135 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16136 FOP_REGNUM, mappings): Move to ...
16137 * win32-i386-low.c: ... here.
16138 * win32-low.c (win32_thread_info): Move to ...
16139 * win32-low.h: ... here.
16140 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16141 win32-arm-low.c and wincecompat.c.
16142 (all:): Add $EXEEXT.
16143 (install-only:): Likewise.
16144 (gdbserver:): Likewise.
16145 (gdbreplay:): Likewise.
16146 * config.in: Regenerate.
16147 * configure: Regenerate.
16148
41093d81
PA
161492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16150
16151 * win32-low.c: Rename typedef thread_info to
16152 win32_thread_info throughout.
16153
544afa54
PA
161542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16155
16156 * win32-i386-low.c: Rename to ...
16157 * win32-low.c: ... this.
16158 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16159 * Makefile.in: Likewise.
16160
bce7165d
PA
161612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16162
16163 * remote-utils.c (monitor_output): Constify msg parameter.
16164 * server.h (monitor_output): Likewise.
16165 * win32-i386-low.c (handle_output_debug_string): New.
16166 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16167 handle_output_debug_string.
16168 (get_child_debug_event): Likewise.
16169
506c7aa0
DJ
161702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16171
16172 * server.c (main): Correct strtoul check.
16173
42c81e2a
DJ
161742007-03-27 Jon Ringle <jon@ringle.org>
16175
16176 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16177
9453113a
DJ
161782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16179
16180 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16181
64a69107
DJ
161822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16183
16184 * terminal.h: Check HAVE_SGTTY_H.
16185
161862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16187
16188 * remote-utils.c (remote_open): Print out the assigned port number.
16189
c74d0ad8
DJ
161902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16191
16192 * remote-utils.c (monitor_output): New function.
16193 * server.c (debug_threads): Define here.
16194 (monitor_show_help): New function.
16195 (handle_query): Handle qRcmd.
16196 (main): Do not handle 'd' packet.
16197 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16198 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16199 of debug_threads.
16200
de7c3b4a
PA
162012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16202
16203 * Makefile.in (EXEEXT): New.
16204 (clean): Use $(EXEEXT).
16205
ef57601b
PA
162062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16207
16208 * target.h (target_ops): Rename send_signal to request_interrupt,
16209 and remove enum target_signal parameter.
16210 * linux-low.c (linux_request_interrupt): Rename from
16211 linux_send_signal, and always send SIGINT.
16212 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16213 and always send SIGINT.
16214 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16215 of send_signal.
16216 (input_interrupt): Likewise.
16217
820f2bda
PA
162182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16219
16220 * server.c (get_features_xml): Check if target implemented
16221 arch_string.
16222 * win32-i386-low.c (win32_arch_string): New.
16223 (win32_target_ops): Add win32_arch_string as arch_string member.
16224
ab39bf24
UW
162252007-02-22 Markus Deuling <deuling@de.ibm.com>
16226
16227 * spu-low.c (spu_arch_string): New.
16228 (spu_target_ops): Add spu_arch_string.
16229
61ff6e04
DJ
162302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16231
16232 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16233 * configure.ac: Do not check for terminal.h.
16234 * configure, config.in: Regenerated.
16235
fb1e4ffc
DJ
162362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16237
16238 * Makefile.in (OBS): Add $(XML_BUILTIN).
16239 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16240 (clean): Update.
16241 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16242 (arm-with-iwmmxt.c): New.
16243 * config.in, configure: Regenerate.
16244 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16245 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16246 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16247 (arm*-*-linux*): Add iWMMXt and regset support.
16248 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16249 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16250 (arm_store_wmmxregset, target_regsets): New.
16251 * server.c (get_features_xml): Take annex argument. Check builtin
16252 XML documents.
16253 (handle_query): Handle multiple annexes.
16254
0f48aa01
DJ
162552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16256
16257 * remote-utils.c [USE_WIN32API] (read, write): Define.
16258 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16259 write.
16260
23181151
DJ
162612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * linux-i386-low.c (the_low_target): Set arch_string.
16264 * linux-x86-64-low.c (the_low_target): Likewise.
16265 * linux-low.c (linux_arch_string): New.
16266 (linux_target_ops): Add it.
16267 * linux-low.h (struct linux_target_ops): Add arch_string.
16268 * server.c (write_qxfer_response): Use const void * for DATA.
16269 (get_features_xml): New.
16270 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16271 * target.h (struct target_ops): Add arch_string method.
16272
9d606399
DJ
162732007-01-03 Denis Pilat <denis.pilat@st.com>
16274 Daniel Jacobowitz <dan@codesourcery.com>
16275
16276 * linux-low.c (linux_kill): Handle being called with no threads.
16277 * win32-i386-low.c (win32_kill): Likewise.
16278 (get_child_debug_event): Clear current_process_handle.
16279
162802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16281 Daniel Jacobowitz <dan@codesourcery.com>
16282
16283 * remote-utils.c (remote_open): Check the type of specified
16284 serial port devices before opening them.
16285 * server.c (main): Kill the inferior if an error occurs during
16286 the first remote_open.
16287
a5e13d24
DJ
162882006-12-05 Markus Deuling <deuling@de.ibm.com>
16289
16290 * README: Update supported targets.
16291
186947f7
DJ
162922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16293
16294 * Makefile.in (clean): Remove reg-mips64.c.
16295 (reg-mips64.c, reg-mips64.o): New rules.
16296 * configure.srv: Handle mips64. Include regset support for mips.
16297 * linux-mips-low.c (union mips_register): New.
16298 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16299 (mips_breakpoint, mips_breakpoint_at): Use int.
16300 (mips_collect_register, mips_supply_register)
16301 (mips_collect_register_32bit, mips_supply_register_32bit)
16302 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16303 (mips_store_fpregset, target_regsets): New.
16304 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16305
a13e2c95
UW
163062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16307
16308 * configure.srv: Add target "spu*-*-*".
16309 * Makefile.in (clean): Remove reg-spu.c.
16310 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16311 * spu-low.c: New file.
16312
cb7283db
DJ
163132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16314
16315 * configure.ac: Correct td_thr_tls_get_addr test.
16316 * configure: Regenerated.
16317
89be2091
DJ
163182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16319
16320 * linux-low.c (linux_wait_for_event): Reformat. Use the
16321 pass_signals array.
16322 * remote-utils.c (decode_address_to_semicolon): New.
16323 * server.c (pass_signals, handle_general_set): New.
16324 (handle_query): Mention QPassSignals for qSupported.
16325 (main): Call handle_general_set.
16326 * server.h (pass_signals, decode_address_to_semicolon): New.
16327
000ef4f0
DJ
163282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16329
16330 * server.c (handle_query): Correct error handling for read_auxv.
16331
b7149293
UW
163322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16333
16334 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16335 and srv_linux_thread_db to yes.
16336 * linux-s390-low.c (s390_fill_gregset): New function.
16337 (target_regsets): Define data structure.
16338
dae5f5cf
DJ
163392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16340
16341 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16342 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16343 * config.in, configure: Regenerated.
16344 * inferiors.c (gdb_id_to_thread): New function.
16345 (gdb_id_to_thread_id): Use it.
16346 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16347 * linux-low.h (struct process_info): Add th member.
16348 (thread_db_get_tls_address): New prototype.
16349 * remote-utils.c (decode_address): Make non-static.
16350 * server.c (handle_query): Handle qGetTLSAddr.
16351 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16352 * target.h (struct target_ops): Add get_tls_address.
16353 * thread-db.c (maybe_attach_thread): Save the thread handle.
16354 (thread_db_get_tls_address): New.
16355
32ca6d61
DJ
163562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16357
16358 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16359 (linux_resume_one_process): Take a siginfo_t *. Update all
16360 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16361 (struct pending_signals): Add a siginfo_t.
16362 (linux_wait_for_process): Always set last_status.
16363 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16364 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16365 * linux-low.h (struct process_info): Add last_status.
16366
5ffff7c1
DJ
163672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16368
16369 * remote-utils.c (try_rle): New function.
16370 (putpkt_binary): Use it.
16371
8695c747
DJ
163722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16373
16374 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16375 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16376 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16377 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16378 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16379 point registers.
16380
290fadea
RS
163812006-08-08 Richard Sandiford <richard@codesourcery.com>
16382
16383 * server.c (terminal_fd): New variable.
16384 (old_foreground_pgrp): Likewise.
16385 (restore_old_foreground_pgrp): New function.
16386 (start_inferior): Record the terminal file descriptor in terminal_fd
16387 and its original foreground group in old_foreground_pgrp. Register
16388 restore_old_foreground_pgrp with atexit().
16389
9f2e1e63
DJ
163902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16391
16392 * server.c (handle_query): Correct qPart to qXfer.
16393
b80864fb
DJ
163942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16395
16396 * configure.ac: Check for more headers which are missing on
16397 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16398 * configure.srv: Add Cygwin and mingw32.
16399 * remote-utils.c: Don't include headers unconditionally which
16400 are missing on mingw32. Include <winsock.h> for mingw32.
16401 (remote_open): Adjust for mingw32 support. Flush
16402 standard error after writing to it.
16403 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16404 (unblock_async_io, enable_async_io, disable_async_io)
16405 (readchar, getpkt): Update for Winsock support.
16406 (prepare_resume_reply): Expect a protocol signal number.
16407 * server.c: Disable <sys/wait.h> on mingw32.
16408 (start_inferior): Adjust for mingw32 support. Flush
16409 standard error after writing to it.
16410 (attach_inferior): Likewise. Use protocol signal
16411 numbers.
16412 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16413 and names.
16414 * win32-i386-low.c: New file.
16415 * Makefile.in (XM_CLIBS): Set.
16416 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16417 (win32-i386-low.o): New dependency rule.
16418 * linux-low.c (linux_wait): Use target signal numbers.
16419 * target.h (struct target_ops): Doc fix.
16420 * server.h (target_signal_to_name): New prototype.
16421 * gdbreplay.c: Don't include headers unconditionally which
16422 are missing on mingw32. Include <winsock.h> for mingw32.
16423 (remote_close, remote_open): Adjust for Winsock support.
16424 * configure, config.in: Regenerated.
16425
0876f84a
DJ
164262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16427
16428 * server.c (decode_xfer_read, write_qxfer_response): New.
16429 (handle_query): Take a packet length argument. Handle
16430 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16431 the qSupported response.
16432 (main): Update call to handle_query.
16433
01f9e8fa
DJ
164342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16435
16436 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16437 (putpkt_binary): Renamed from putpkt and adjusted for binary
16438 data.
16439 (putpkt): New wrapper for putpkt_binary.
16440 (readchar): Don't mask off the high bit.
16441 (decode_X_packet): New function.
16442 * server.c (main): Call putpkt_binary if a handler sets the packet
16443 length. Save the length of the incoming packet. Handle 'X'.
16444 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16445
be2a5f71
DJ
164462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16447
16448 * server.c (handle_query): Handle qSupported.
16449
ea025f5f
DJ
164502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * remote-utils.c (all_symbols_looked_up): New variable.
16453 (look_up_one_symbol): Check it.
16454 * server.h (look_up_one_symbol): New declaration.
16455 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16456
9308fc88
DJ
164572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16458
16459 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16460 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16461 (PTRACE_GET_THREAD_AREA): Define.
16462 (ps_get_thread_area): New function.
16463
52fb6437
NS
164642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16465
16466 * configure.srv (m68k*-*-uclinux*): New target.
16467 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16468 (linux_resume_one_process): Remove extraneous cast.
16469 (linux_read_offsets): New.
16470 (linux_target_op): Add linux_read_offsets on mmuless systems.
16471 * server.c (handle_query): Add qOffsets logic.
16472 * target.h (struct target_ops): Add read_offsets.
16473
21b0f40c
DJ
164742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16475
16476 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16477 (PTRACE_GET_THREAD_AREA): Define.
16478 (ps_get_thread_area): New function.
16479 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16480 (linux-x86-64-low.o): Update.
16481
0050a760
DJ
164822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16483
16484 * configure.ac: Remove checks for prfpregset_t.
16485 * gdb_proc_service.h: New file.
16486 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16487 new "gdb_proc_service.h".
16488 * proc-service.c: Likewise.
16489 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16490 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16491 * Makefile.in (gdb_proc_service_h): Updated.
16492 * configure, config.in: Regenerated.
16493
b92a518e
DJ
164942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16495
16496 * remote-utils.c (prepare_resume_reply): Move declaration
16497 of gdb_id_from_wait to the top of the block.
16498
545587ee
DJ
164992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16500
16501 * linux-low.c (regsets_store_inferior_registers): Read the regset
16502 from the target before filling it.
16503
9db87ebd
DJ
165042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16505
16506 * server.c (attach_inferior): Return SIGTRAP for a successful
16507 attach.
16508
dd24457d
DJ
165092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * Makefile.in (OBS): Add version.o.
16512 (STAGESTUFF): Delete.
16513 (version.o): Add dependencies.
16514 (version.c): Replace rule.
16515 (clean): Remove version.c.
16516 * server.c (gdbserver_version): New.
16517 (gdbserver_usage): Use printf.
16518 (main): Handle --version and --help.
16519 * server.h (version, host_name): Add declarations.
16520
6f0f660e
EZ
165212005-12-23 Eli Zaretskii <eliz@gnu.org>
16522
889bf7c5
PA
16523 * linux-arm-low.c:
16524 * linux-arm-low.c:
16525 * inferiors.c:
16526 * i387-fp.h:
16527 * i387-fp.c:
16528 * gdbreplay.c:
16529 * regcache.c:
16530 * proc-service.c:
16531 * mem-break.h:
16532 * mem-break.c:
16533 * linux-x86-64-low.c:
16534 * linux-sh-low.c:
16535 * linux-s390-low.c:
16536 * linux-ppc64-low.c:
16537 * linux-ppc-low.c:
16538 * linux-mips-low.c:
16539 * linux-m68k-low.c:
16540 * linux-m32r-low.c:
16541 * linux-low.h:
16542 * linux-low.c:
16543 * linux-ia64-low.c:
16544 * linux-i386-low.c:
16545 * linux-crisv32-low.c:
16546 * thread-db.c:
16547 * terminal.h:
16548 * target.h:
16549 * target.c:
16550 * server.h:
16551 * server.c:
16552 * remote-utils.c:
16553 * regcache.h:
16554 * utils.c:
16555 * Makefile.in:
16556 * configure.ac:
6f0f660e
EZ
16557 * gdbserver.1: Add (C) after Copyright. Update the FSF
16558 address.
16559
9d1fb177
DJ
165602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16561
16562 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16563 (arm_breakpoint_at): Recognize both breakpoints.
16564 (the_low_target): Use the correct breakpoint instruction.
16565
011a70c2
DJ
165662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16567
16568 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16569 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16570 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16571 (the_low_target): Update.
16572
7fb85e41
AS
165732005-10-25 Andreas Schwab <schwab@suse.de>
16574
16575 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16576
16577 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16578 (ia64_num_regs): Reduce to 462.
16579
3db0444b
DJ
165802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16581
16582 * acinclude.m4: Correct quoting.
16583 * aclocal.m4: Regenerated.
16584
16585 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16586 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16587 (thread_db_init): Call thread_db_err_str.
16588 * configure.ac: Check for TD_VERSION.
16589 * config.in, configure: Regenerated.
16590
bee0189a
DJ
165912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16592
16593 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16594
e9d25b98
DJ
165952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16596
16597 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16598 is not available. Define HAVE_PTRACE_GETREGS if it is.
16599 * config.in, configure: Regenerated.
16600 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16601 * linux-i386-low.c, linux-m68k-low.c: Update to use
16602 HAVE_PTRACE_GETREGS.
16603 * linux-low.c (regsets_fetch_inferior_registers)
16604 (regsets_store_inferior_registers): Only return 0 if we processed
16605 GENERAL_REGS.
16606 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16607 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16608
a06660f7
DJ
166092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16610
16611 * inferiors.c (struct thread_info): Add gdb_id.
16612 (add_thread): Add gdb_id argument.
16613 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16614 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16615 calls to add_thread.
16616 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16617 * server.c (handle_query): Use thread_to_gdb_id.
16618 (handle_v_cont, main): Use gdb_id_to_thread_id.
16619 * server.h (add_thread): Update prototype.
16620 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16621 prototypes.
16622
5a1f5858
DJ
166232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16624
16625 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16626 left-padded registers.
16627 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16628 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16629
e122f1f5
SE
166302005-07-01 Steve Ellcey <sje@cup.hp.com>
16631
16632 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16633 * configure: Regenerate.
16634 * config.in: Regenerate.
16635 * server.h (NEED_DECLARATION_STRERROR):
16636 Replace with !HAVE_DECL_STRERROR.
16637
d592fa2f
DJ
166382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16639
16640 * linux-low.c (linux_wait, linux_send_signal): Don't test
16641 an unsigned long variable for > 0 if it could be MAX_ULONG.
16642 * server.c (myresume): Likewise.
16643 * target.c (set_desired_inferior): Likewise.
16644
ccbd4912
MK
166452005-06-13 Mark Kettenis <kettenis@gnu.org>
16646
16647 * configure.ac: Simplify and improve check for socklen_t.
16648 * configure, config.in: Regenerate.
16649
f450004a
DJ
166502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16651
16652 * acconfig.h: Remove.
16653 * configure.ac: Add a test for socklen_t. Use three-argument
16654 AC_DEFINE throughout.
16655 * config.in: Regenerated using autoheader 2.59.
16656 * configure: Regenerated.
16657
16658 * gdbreplay.c (socklen_t): Provide a default.
16659 (remote_open): Use socklen_t.
16660 * remote-utils.c (socklen_t): Provide a default.
16661 (remote_open): Use socklen_t.
16662 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16663 unsigned char.
16664
16665 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16666 char for buffers.
16667 * linux-low.c (linux_read_memory, linux_write_memory)
16668 (linux_read_auxv): Likewise.
16669 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16670 (check_mem_write): Likewise.
16671 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16672 Likewise.
16673 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16674 (registers_from_string, register_data): Likewise.
16675 * server.c (handle_query, main): Likewise.
16676 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16677 (decode_M_packet): Likewise.
16678 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16679 * target.h (struct target_ops): Update read_memory, write_memory,
16680 and read_auxv.
16681 (read_inferior_memory, write_inferior_memory): Update.
16682 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16683 to unsigned char *.
16684 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16685 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16686 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16687 linux-s390-low.c, linux-sh-low.c: Update for changes in
16688 read_inferior_memory and the_low_target->breakpoint.
16689
eee84df1
DJ
166902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16691
16692 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16693 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16694 * configure.srv: Add powerpc64-*-linux*.
16695 * linux-ppc64-low.c: New file.
16696
45b134e5
OF
166972005-05-23 Orjan Friberg <orjanf@axis.com>
16698
16699 * linux-cris-low.c: New file with support for CRIS.
16700 * linux-crisv32-low.c: Ditto for CRISv32.
16701 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16702 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16703 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16704 reg-crisv32.o, and reg-crisv32.c to make rules.
16705 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16706 recognized targets.
16707
48d93c75
UW
167082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16709
16710 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16711 of sizeof (PTRACE_XFER_TYPE).
16712 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16713
e013ee27
OF
167142005-05-12 Orjan Friberg <orjanf@axis.com>
16715
889bf7c5 16716 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16717 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16718 pointers for hardware watchpoint support.
16719 * linux-low.h (struct linux_target_ops): Ditto.
16720 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16721 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16722 to linux_target_ops.
16723 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16724 reply packet.
16725 * server.c (main): Recognize 'Z' and 'z' packets.
16726
b0ded00b
UW
167272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16728
16729 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16730 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16731 (the_low_target): Add new members.
16732
8643e2ad
DJ
167332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16734
16735 * proc-service.c (ps_lgetregs): Search all_processes instead of
16736 all_threads.
16737
fc620387
DJ
167382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16739
16740 * server.c (start_inferior): Change return type to int.
16741 (attach_inferior): Change sigptr to int *.
16742 (handle_v_cont, handle_v_requests): Change signal to int *.
16743 (main): Change signal to int.
16744
167452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16746
16747 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16748 * configure.srv: Add m32r*-*-linux*.
16749 * linux-m32r-low.c: New file.
16750
e0e76420
DJ
167512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16752
16753 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16754
a1928bad
DJ
167552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16756
16757 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16758 Take unsigned long arguments for PIDs.
16759 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16760 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16761 (wait_for_sigstop, linux_resume_one_process)
16762 (regsets_fetch_inferior_registers, linux_send_signal)
16763 (linux_read_auxv): Likewise. Update the types of variables holding
16764 PIDs. Update format string specifiers.
16765 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16766 * remote-utils.c (prepare_resume_reply): Likewise.
16767 * server.c (cont_thread, general_thread, step_thread)
16768 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16769 unsigned long.
16770 (handle_query): Update format specifiers.
16771 (handle_v_cont, main): Use strtoul for thread IDs.
16772 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16773 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16774 (general_thread, step_thread, thread_from_wait)
16775 (old_thread_from_wait): Update.
16776 * target.h (struct thread_resume): Use unsigned long for THREAD.
16777 (struct target_ops): Use unsigned long for arguments to attach and
16778 thread_alive.
16779
dcdb98d2
DJ
167802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16781
16782 * acinclude.m4: Include bfd/bfd.m4 directly.
16783 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16784 <agriffis@toolchain.org>.
16785 * aclocal.m4, configure: Regenerated.
16786
bec39cab
AC
167872005-01-07 Andrew Cagney <cagney@gnu.org>
16788
16789 * configure.ac: Rename configure.in, require autoconf 2.59.
16790 * configure: Re-generate.
16791
434c4c77
DJ
167922004-12-08 Daniel Jacobowitz <dan@debian.org>
16793
16794 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16795 LIBS when finished.
16796 * aclocal.m4: Regenerated.
16797 * configure: Regenerated.
16798
db1d3e1b
AS
167992004-11-21 Andreas Schwab <schwab@suse.de>
16800
16801 * linux-m68k-low.c (m68k_num_gregs): Define.
16802 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16803 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16804 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16805 (m68k_breakpoint_at): New. Add to the_low_target.
16806
16807 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16808 srv_linux_thread_db to yes.
16809
43360365
JB
168102004-10-20 Joel Brobecker <brobecker@gnat.com>
16811
16812 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16813 (ARCH_SET_FS): Likewise.
16814 (ARCH_GET_FS): Likewise.
16815 (ARCH_GET_GS): Likewise.
16816
fd500816
DJ
168172004-10-16 Daniel Jacobowitz <dan@debian.org>
16818
16819 * linux-i386-low.c (ps_get_thread_area): New.
16820 * linux-x86-64-low.c (ps_get_thread_area): New.
16821 * linux-low.c: Include <sys/syscall.h>.
16822 (linux_kill_one_process): Don't kill the first thread here.
16823 (linux_kill): Kill the first thread here.
16824 (kill_lwp): New function.
16825 (send_sigstop, linux_send_signal): Use it.
16826 * proc-service.c: Clean up #ifdefs.
16827 (fpregset_info): Delete.
16828 (ps_lgetregs): Update and enable implementation.
16829 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16830 implementations.
16831 * remote-utils.c (struct sym_cache, symbol_cache): New.
16832 (input_interrupt): Print a clearer message.
16833 (async_io_enabled): New variable.
16834 (enable_async_io, disable_async_io): Use it. Update comments.
16835 (look_up_one_symbol): Use the symbol cache.
16836 * thread-db.c (thread_db_look_up_symbols): New function.
16837 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16838
f6de3c42
DJ
168392004-10-16 Daniel Jacobowitz <dan@debian.org>
16840
16841 * configure.in: Test for -rdynamic.
16842 * configure: Regenerated.
16843 * Makefile (INTERNAL_LDFLAGS): New.
16844 (gdbserver, gdbreplay): Use it.
16845
2c0fc042
AC
168462004-09-02 Andrew Cagney <cagney@gnu.org>
16847
16848 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16849
075b3282
DJ
168502004-03-23 Daniel Jacobowitz <drow@mvista.com>
16851
16852 * linux-low.c (linux_wait): Clear all_processes list also.
16853
fa6a77dc
DJ
168542004-03-12 Daniel Jacobowitz <drow@mvista.com>
16855
16856 * linux-low.c: Include <errno.h>. Remove extern declaration of
16857 errno.
16858
6d782a97
DJ
168592004-03-12 Daniel Jacobowitz <drow@mvista.com>
16860
16861 * gdbreplay.c, server.h, utils.c: Update copyright years.
16862
3a7fb99b
DJ
168632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16864
16865 * server.c (main): Print child status or termination signal from
16866 variable 'signal', not 'sig'.
16867
c3e735a6
DJ
168682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16869
16870 * linux-low.c (linux_read_memory): Change return type to
16871 int. Check for and return error from ptrace().
16872 * target.c (read_inferior_memory): Change return type to int. Pass
16873 back return status from the_target->read_memory().
16874 * target.h (struct target_ops): Adapt *read_memory() prototype.
16875 Update comment.
16876 (read_inferior_memory): Adapt prototype.
16877 * server.c (main): Return an error packet if
16878 read_inferior_memory() returns an error.
16879
a59d1c82
DJ
168802004-03-04 Daniel Jacobowitz <drow@mvista.com>
16881
16882 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16883 Unify with other clean targets.
16884
dc3f8883
DJ
168852004-02-29 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * server.c (handle_v_cont): Call set_desired_inferior.
16888
89a208da
DJ
168892004-02-29 Daniel Jacobowitz <drow@mvista.com>
16890
16891 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16892
62ea82f5
DJ
168932004-02-29 Daniel Jacobowitz <drow@mvista.com>
16894
16895 * linux-low.c (linux_wait): Unblock async I/O.
16896 (linux_resume): Block and enable async I/O.
16897 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16898 * server.h (block_async_io, unblock_async_io): Add prototypes.
16899
6910d122
DJ
169002004-02-29 Daniel Jacobowitz <drow@mvista.com>
16901
16902 * remote-utils.c (remote_open): Print a status notice after
16903 opening a TCP port.
16904 * server.c (attach_inferior): Print a status notice after
16905 attaching.
16906
169072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16908
16909 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16910
c89dc5d4
DJ
169112004-02-26 Daniel Jacobowitz <drow@mvista.com>
16912
16913 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16914 error packet.
16915 * server.c, target.h: Update copyright years.
16916
4b8dad4a
RM
169172004-02-25 Roland McGrath <roland@redhat.com>
16918
16919 * target.h (struct target_ops): New member `read_auxv'.
16920 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16921 * linux-low.c (linux_read_auxv): New function.
16922 (linux_target_ops): Initialize `read_auxv' member to that.
16923
d7446758
JB
169242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16925
16926 Committed by Jim Blandy <jimb@redhat.com>.
16927
16928 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16929 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16930 instead of GPR_SIZE to distiguish s390 and s390x targets.
16931
5544ad89
DJ
169322004-01-31 Daniel Jacobowitz <drow@mvista.com>
16933
16934 * linux-low.c: Update copyright year.
16935 (check_removed_breakpoint): Clear pending_is_breakpoint.
16936 (linux_set_resume_request, linux_queue_one_thread)
16937 (resume_status_pending_p): New functions.
16938 (linux_continue_one_thread): Use process->resume.
16939 (linux_resume): Only resume threads if there are no pending events.
16940 * linux-low.h (struct process_info): Add resume request
16941 pointer.
16942
2a68b70e
DJ
169432004-01-30 Daniel Jacobowitz <drow@mvista.com>
16944
16945 * regcache.c (new_register_cache): Clear the allocated register
16946 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16947
64386c31
DJ
169482003-10-13 Daniel Jacobowitz <drow@mvista.com>
16949
16950 * linux-low.c (linux_resume): Take a struct thread_resume *
16951 argument.
16952 (linux_wait): Update call.
16953 (resume_ptr): New static variable.
16954 (linux_continue_one_thread): Renamed from
16955 linux_continue_one_process. Use resume_ptr.
16956 (linux_resume): Use linux_continue_one_thread.
16957 * server.c (handle_v_cont, handle_v_requests): New functions.
16958 (myresume): New function.
16959 (main): Handle 'v' case.
16960 * target.h (struct thread_resume): New type.
16961 (struct target_ops): Change argument of "resume" to struct
16962 thread_resume *.
16963 (myresume): Delete macro.
16964
c938e9b0
L
169652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16966
16967 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16968 (uninstall): Support DESTDIR.
16969
7f313d07
BC
16970Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16971
16972 * configure.srv: Add xscale*linux copy of arm*linux entry.
16973
3b2fc2ea
DJ
169742003-07-24 Daniel Jacobowitz <drow@mvista.com>
16975
16976 * linux-arm-low.c (arm_reinsert_addr): New function.
16977 (the_low_target): Add arm_reinsert_addr.
16978
1c0a559e
MK
169792003-07-08 Mark Kettenis <kettenis@gnu.org>
16980
16981 * mem-break.c: Remove whitespace at end of file.
16982
43d5792c
DJ
169832003-06-28 Daniel Jacobowitz <drow@mvista.com>
16984
16985 * configure.in: Check whether we need to prototype strerror.
16986 * server.h: Optionally prototype strerror.
16987 * gdbreplay.c (perror_with_name): Use strerror.
16988 * linux-low.c (linux_attach_lwp): Use strerror.
16989 * utils.c (perror_with_name): Use strerror.
16990 * config.in, configure: Regenerated.
16991
c8a86edf
DJ
169922003-06-28 Daniel Jacobowitz <drow@mvista.com>
16993
16994 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16995 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16996
73d37363
DJ
169972003-06-20 Daniel Jacobowitz <drow@mvista.com>
16998
16999 * Makefile.in (SFILES): Update.
17000 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17001 low-sun3.c: Remove files.
17002
6ad8ae5c
DJ
170032003-06-17 Daniel Jacobowitz <drow@mvista.com>
17004
17005 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17006 (linux_detach_one_process, linux_detach): New functions.
17007 (linux_target_ops): Add linux_detach.
17008 * server.c (main): Handle 'D' packet.
17009 * target.h (struct target_ops): Add "detach" member.
17010 (detach_inferior): Define.
17011
1581182a
MK
170122003-06-13 Mark Kettenis <kettenis@gnu.org>
17013
17014 From Kelley Cook <kelleycook@wideopenwest.com>:
17015 * configure.srv: Accept i[34567]86 variants.
17016
e5379b03
DJ
170172003-06-05 Daniel Jacobowitz <drow@mvista.com>
17018
17019 * linux-low.c (linux_wait_for_event): Correct comment typos.
17020 (linux_resume_one_process): Call check_removed_breakpoint.
17021 (linux_send_signal): New function.
17022 (linux_target_ops): Add linux_send_signal.
17023 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17024 of kill.
17025 * target.h (struct target_ops): Add send_signal.
17026
2ff29de4
JB
170272003-05-29 Jim Blandy <jimb@redhat.com>
17028
17029 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17030 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17031 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17032 away part of the register's value.
17033
254787d4
DJ
170342003-03-26 Daniel Jacobowitz <drow@mvista.com>
17035
17036 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17037 (linux_wait_for_event, linux_init_signals): Likewise.
17038
94e10508
DJ
170392003-03-17 Daniel Jacobowitz <drow@mvista.com>
17040
17041 * configure.in: Check for stdlib.h.
17042 * configure: Regenerated.
17043 * config.in: Regenerated.
17044
4c0711e0
DJ
170452003-01-04 Andreas Schwab <schwab@suse.de>
17046
17047 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17048
ef66e766
AC
170492003-01-02 Andrew Cagney <ac131313@redhat.com>
17050
17051 * Makefile.in: Remove obsolete code.
17052
a1358604
DJ
170532002-11-20 Daniel Jacobowitz <drow@mvista.com>
17054
17055 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17056 defined(PT_FPR0_HI).
17057
23ce3b1c
DJ
170582002-11-17 Stuart Hughes <seh@zee2.com>
17059
17060 * linux-arm-low.c (arm_num_regs): Increase.
17061 (arm_regmap): Include status register.
17062
170632002-11-17 Daniel Jacobowitz <drow@mvista.com>
17064
17065 * linux-low.c (register_addr): Remove incorrect -1 check.
17066
a9fa9f7d
DJ
170672002-08-29 Daniel Jacobowitz <drow@mvista.com>
17068
17069 * linux-low.c (linux_create_inferior): Call setpgid. Return
17070 the new PID.
17071 (unstopped_p, linux_signal_pid): Remove.
17072 (linux_target_ops): Remove linux_signal_pid.
17073 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17074 global instead of target method.
17075 * target.h (struct target_ops): Remove signal_pid. Update comment
17076 for create_inferior.
17077 * server.c (signal_pid): New variable.
17078 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17079 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17080 (attach_inferior): Set signal_pid.
17081
17574093
DJ
170822002-08-23 Daniel Jacobowitz <drow@mvista.com>
17083
17084 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17085
170862002-08-20 Jim Blandy <jimb@redhat.com>
17087
17088 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17089 default for this.
17090
170912002-08-01 Andrew Cagney <cagney@redhat.com>
17092
17093 * Makefile.in: Make chill references obsolete.
17094
170952002-07-24 Kevin Buettner <kevinb@redhat.com>
17096
17097 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17098 * configure: Regenerate.
17099 * config.in: Regenerate.
17100
171012002-07-09 David O'Brien <obrien@FreeBSD.org>
17102
17103 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17104 (perror_with_name, remote_close, remote_open, expect, play): Static.
17105
171062002-07-04 Michal Ludvig <mludvig@suse.cz>
17107
4b8dad4a 17108 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17109 byte offsets instead of an array of indexes.
17110 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17111
171122002-06-13 Daniel Jacobowitz <drow@mvista.com>
17113
17114 * regcache.c: Add comment.
17115
171162002-06-11 Daniel Jacobowitz <drow@mvista.com>
17117
17118 * thread-db.c: New file.
17119 * proc-service.c: New file.
17120 * acinclude.m4: New file.
17121 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17122 proc-service.o, and thread-db.o.
17123 (linux-low.o): Add USE_THREAD_DB.
17124 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17125 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17126 * aclocal.m4: Regenerated.
17127 * config.in: Regenerated.
17128 * configure: Regenerated.
17129 * configure.in: Check for proc_service.h, sys/procfs.h,
17130 thread_db.h, and linux/elf.h headrs.
17131 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17132 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17133 Check for -lthread_db and thread support.
17134 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17135 PowerPC, and SuperH.
17136 * i387-fp.c: Constify arguments.
17137 * i387-fp.h: Likewise.
17138 * inferiors.c: (struct thread_info): Renamed from
17139 `struct inferior_info'. Remove PID member. Use generic inferior
17140 list header. All uses updated.
17141 (inferiors, signal_pid): Removed.
17142 (all_threads): New variable.
17143 (get_thread): Define.
17144 (add_inferior_to_list): New function.
17145 (for_each_inferior): New function.
17146 (change_inferior_id): New function.
17147 (add_inferior): Removed.
17148 (remove_inferior): New function.
17149 (add_thread): New function.
17150 (free_one_thread): New function.
17151 (remove_thread): New function.
17152 (clear_inferiors): Use for_each_inferior and free_one_thread.
17153 (find_inferior): New function.
17154 (find_inferior_id): New function.
17155 (inferior_target_data): Update argument type.
17156 (set_inferior_target_data): Likewise.
17157 (inferior_regcache_data): Likewise.
17158 (set_inferior_regcache_data): Likewise.
17159 * linux-low.c (linux_bp_reinsert): Remove.
17160 (all_processes, stopping_threads, using_thrads)
17161 (struct pending_signals, debug_threads, pid_of): New.
17162 (inferior_pid): Replace with macro.
17163 (struct inferior_linux_data): Remove.
17164 (get_stop_pc, add_process): New functions.
17165 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17166 Use add_process and add_thread.
17167 (linux_attach_lwp): New function, based on old linux_attach. Use
17168 add_process and add_thread. Set stop_expected for new threads.
17169 (linux_attach): New function.
17170 (linux_kill_one_process): New function.
17171 (linux_kill): Kill all LWPs.
17172 (linux_thread_alive): Use find_inferior_id.
17173 (check_removed_breakpoints, status_pending_p): New functions.
17174 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17175 Update. Use WNOHANG. Wait for cloned processes also. Update process
17176 struct for the found process.
17177 (linux_wait_for_event): New function.
17178 (linux_wait): Use it. Support LWPs.
17179 (send_sigstop, wait_for_sigstop, stop_all_processes)
17180 (linux_resume_one_process, linux_continue_one_process): New functions.
17181 (linux_resume): Support LWPs.
17182 (REGISTER_RAW_SIZE): Remove.
17183 (fetch_register): Use register_size instead. Call supply_register.
17184 (usr_store_inferior_registers): Likewise. Call collect_register.
17185 Fix recursive case.
17186 (regsets_fetch_inferior_registers): Improve error message.
17187 (regsets_store_inferior_registers): Add debugging.
17188 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17189 (unstopped_p, linux_signal_pid): New functions.
17190 (linux_target_ops): Add linux_signal_pid.
17191 (linux_init_signals): New function.
17192 (initialize_low): Call it. Initialize using_threads.
17193 * regcache.c (inferior_regcache_data): Add valid
17194 flag.
17195 (get_regcache): Fetch registers lazily. Add fetch argument
17196 and update all callers.
17197 (regcache_invalidate_one, regcache_invalidate): New
17198 functions.
17199 (new_register_cache): Renamed from create_register_cache.
17200 Return the new regcache.
17201 (free_register_cache): Change argument to a void *.
17202 (registers_to_string, registers_from_string): Call get_regcache
17203 with fetch flag set.
17204 (register_data): Make static. Pass fetch flag to get_regcache.
17205 (supply_register): Call get_regcache with fetch flag clear.
17206 (collect_register): Call get_regcache with fetch flag set.
17207 (collect_register_as_string): New function.
17208 * regcache.h: Update.
17209 * remote-utils.c (putpkt): Flush after debug output and use
17210 stderr.
17211 Handle input interrupts while waiting for an ACK.
17212 (input_interrupt): Use signal_pid method.
17213 (getpkt): Flush after debug output and use stderr.
17214 (outreg): Use collect_register_as_string.
17215 (new_thread_notify, dead_thread_notify): New functions.
17216 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17217 and general_thread.
17218 (look_up_one_symbol): Flush after debug output.
17219 * server.c (step_thread, server_waiting): New variables.
17220 (start_inferior): Don't use signal_pid. Update call to mywait.
17221 (attach_inferior): Update call to mywait.
17222 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17223 (main): Don't fetch/store registers explicitly. Use
17224 set_desired_inferior. Support proposed ``Hs'' packet. Update
17225 calls to mywait.
17226 * server.h: Update.
17227 (struct inferior_list, struct_inferior_list_entry): New.
17228 * target.c (set_desired_inferior): New.
17229 (write_inferior_memory): Constify.
17230 (mywait): New function.
17231 * target.h: Update.
17232 (struct target_ops): New signal_pid method.
17233 (mywait): Removed macro, added prototype.
17234
17235 * linux-low.h (regset_func): Removed.
17236 (regset_fill_func, regset_store_func): New.
17237 (enum regset_type): New.
17238 (struct regset_info): Add type field. Use new operation types.
17239 (struct linux_target_ops): stop_pc renamed to get_pc.
17240 Add decr_pc_after_break and breakpoint_at.
17241 (get_process, get_thread_proess, get_process_thread)
17242 (strut process_info, all_processes, linux_attach_lwp)
17243 (thread_db_init): New.
17244
17245 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17246 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17247 (the_low_target): Add new members.
17248 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17249 (i386_store_fpxregset): Constify.
17250 (target_regsets): Add new kind identifier.
17251 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17252 (i386_set_pc): Add debugging.
17253 (i386_breakpoint_at): New function.
17254 (the_low_target): Add new members.
17255 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17256 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17257 (mips_breakpoint_at): New.
17258 (the_low_target): Add new members.
17259 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17260 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17261 (the_low_target): Add new members.
17262 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17263 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17264 (the_low_target): Add new members.
17265 * linux-x86-64-low.c (target_regsets): Add new kind
17266 identifier.
17267
172682002-05-15 Daniel Jacobowitz <drow@mvista.com>
17269
17270 From Martin Pool <mbp@samba.org>:
17271 * server.c (gdbserver_usage): New function.
17272 (main): Call it.
17273
172742002-05-14 Daniel Jacobowitz <drow@mvista.com>
17275
17276 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17277 stop_at -> stop_pc.
17278
172792002-05-04 Andrew Cagney <ac131313@redhat.com>
17280
17281 * Makefile.in: Remove obsolete code.
17282
172832002-04-24 Michal Ludvig <mludvig@suse.cz>
17284
17285 * linux-low.c (regsets_fetch_inferior_registers),
17286 (regsets_store_inferior_registers): Removed cast to int from
17287 ptrace() calls.
17288 * regcache.h: Added declaration of struct inferior_info.
17289
172902002-04-20 Daniel Jacobowitz <drow@mvista.com>
17291
17292 * inferiors.c (struct inferior_info): Add regcache_data.
17293 (add_inferior): Call create_register_cache.
17294 (clear_inferiors): Call free_register_cache.
17295 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17296 * regcache.c (struct inferior_regcache_data): New.
17297 (registers): Remove.
17298 (get_regcache): New function.
17299 (create_register_cache, free_register_cache): New functions.
17300 (set_register_cache): Don't initialize the register cache here.
17301 (registers_to_string, registers_from_string, register_data): Call
17302 get_regcache.
17303 * regcache.h: Add prototypes.
17304 * server.h: Likewise.
17305
173062002-04-20 Daniel Jacobowitz <drow@mvista.com>
17307
17308 * mem-break.c: New file.
17309 * mem-break.h: New file.
17310 * Makefile.in: Add mem-break.o rule; update server.h
17311 dependencies.
17312 * inferiors.c (struct inferior_info): Add target_data
17313 member.
17314 (clear_inferiors): Free target_data member if set.
17315 (inferior_target_data, set_inferior_target_data): New functions.
17316 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17317 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17318 * linux-low.c (linux_bp_reinsert): New variable.
17319 (struct inferior_linux_data): New.
17320 (linux_create_inferior): Use set_inferior_target_data.
17321 (linux_attach): Likewise. Call add_inferior.
17322 (linux_wait_for_one_inferior): New function.
17323 (linux_wait): Call it.
17324 (linux_write_memory): Add const.
17325 (initialize_low): Call set_breakpoint_data.
17326 * linux-low.h (struct linux_target_ops): Add breakpoint
17327 handling members.
17328 * server.c (attach_inferior): Remove extra add_inferior
17329 call.
17330 * server.h: Include mem-break.h. Update inferior.c
17331 prototypes.
17332 * target.c (read_inferior_memory)
17333 (write_inferior_memory): New functions.
17334 * target.h (read_inferior_memory)
17335 (write_inferior_memory): Change macros to prototypes.
17336 (struct target_ops): Update comments. Add const to write_memory
17337 definition.
17338
173392002-04-11 Daniel Jacobowitz <drow@mvista.com>
17340
17341 * linux-low.c (usr_store_inferior_registers): Support
17342 registers which are allowed to fail to store.
17343 * linux-low.h (linux_target_ops): Likewise.
17344 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17345 (ppc_cannot_store_register): FPSCR may not be storable.
17346
173472002-04-09 Daniel Jacobowitz <drow@mvista.com>
17348
17349 * server.h: Include <string.h> if HAVE_STRING_H.
17350 * ChangeLog: Correct paths in last ChangeLog entry.
17351
173522002-04-09 Daniel Jacobowitz <drow@mvista.com>
17353
17354 * linux-low.h: Remove obsolete prototypes.
17355 (struct linux_target_ops): New.
17356 (extern the_low_target): New.
17357 * linux-low.c (num_regs, regmap): Remove declarations.
17358 (register_addr): Use the_low_target explicitly.
17359 (fetch_register): Likewise.
17360 (usr_fetch_inferior_registers): Likewise.
17361 (usr_store_inferior_registers): Likewise.
17362 * linux-arm-low.c (num_regs): Remove.
17363 (arm_num_regs): Define.
17364 (arm_regmap): Renamed from regmap, made static.
17365 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17366 made static.
17367 (arm_cannot_store_register): Renamed from cannot_store_register,
17368 made static.
17369 (the_low_target): New.
17370 * linux-i386-low.c (num_regs): Remove.
17371 (i386_num_regs): Define.
17372 (i386_regmap): Renamed from regmap, made static.
17373 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17374 made static.
17375 (i386_cannot_store_register): Renamed from cannot_store_register,
17376 made static.
17377 (the_low_target): New.
17378 * linux-ia64-low.c (num_regs): Remove.
17379 (ia64_num_regs): Define.
17380 (ia64_regmap): Renamed from regmap, made static.
17381 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17382 made static.
17383 (ia64_cannot_store_register): Renamed from cannot_store_register,
17384 made static.
17385 (the_low_target): New.
17386 * linux-m68k-low.c (num_regs): Remove.
17387 (m68k_num_regs): Define.
17388 (m68k_regmap): Renamed from regmap, made static.
17389 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17390 made static.
17391 (m68k_cannot_store_register): Renamed from cannot_store_register,
17392 made static.
17393 (the_low_target): New.
17394 * linux-mips-low.c (num_regs): Remove.
17395 (mips_num_regs): Define.
17396 (mips_regmap): Renamed from regmap, made static.
17397 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17398 made static.
17399 (mips_cannot_store_register): Renamed from cannot_store_register,
17400 made static.
17401 (the_low_target): New.
17402 * linux-ppc-low.c (num_regs): Remove.
17403 (ppc_num_regs): Define.
17404 (ppc_regmap): Renamed from regmap, made static.
17405 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17406 made static.
17407 (ppc_cannot_store_register): Renamed from cannot_store_register,
17408 made static.
17409 (the_low_target): New.
17410 * linux-s390-low.c (num_regs): Remove.
17411 (s390_num_regs): Define.
17412 (s390_regmap): Renamed from regmap, made static.
17413 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17414 made static.
17415 (s390_cannot_store_register): Renamed from cannot_store_register,
17416 made static.
17417 (the_low_target): New.
17418 * linux-sh-low.c (num_regs): Remove.
17419 (sh_num_regs): Define.
17420 (sh_regmap): Renamed from regmap, made static.
17421 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17422 made static.
17423 (sh_cannot_store_register): Renamed from cannot_store_register,
17424 made static.
17425 (the_low_target): New.
17426 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17427 (the_low_target): New.
17428
174292002-04-09 Daniel Jacobowitz <drow@mvista.com>
17430
17431 * Makefile.in: Add stamp-h target.
17432 * configure.in: Create stamp-h.
17433 * configure: Regenerated.
17434
174352002-04-09 Daniel Jacobowitz <drow@mvista.com>
17436
17437 * inferiors.c: New file.
17438 * target.c: New file.
17439 * target.h: New file.
17440 * Makefile.in: Add target.o and inferiors.o. Update
17441 dependencies.
17442 * linux-low.c (inferior_pid): New static variable,
17443 moved from server.c.
17444 (linux_create_inferior): Renamed from create_inferior.
17445 Call add_inferior. Return 0 on success instead of a PID.
17446 (linux_attach): Renamed from myattach.
17447 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17448 (linux_thread_alive): Renamed from mythread_alive.
17449 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17450 child dies.
17451 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17452 (regsets_store_inferior_registers): Correct error message.
17453 Add missing ``return 0''.
17454 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17455 (linux_store_registers): Renamed from store_inferior_registers.
17456 (linux_read_memory): Renamed from read_inferior_memory.
17457 (linux_write_memory): Renamed from write_inferior_memory.
17458 (linux_target_ops): New structure.
17459 (initialize_low): Call set_target_ops ().
17460 * remote-utils.c (unhexify): New function.
17461 (hexify): New function.
17462 (input_interrupt): Send signals to ``signal_pid''.
17463 * server.c (inferior_pid): Remove.
17464 (start_inferior): Update create_inferior call.
17465 (attach_inferior): Call add_inferior.
17466 (handle_query): New function.
17467 (main): Call handle_query for `q' packets.
17468 * server.h: Include "target.h". Remove obsolete prototypes.
17469 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17470
174712002-04-09 Daniel Jacobowitz <drow@mvista.com>
17472
17473 * Makefile.in: Add WARN_CFLAGS. Update configury
17474 dependencies.
17475 * configure.in: Check for <string.h>
17476 * configure: Regenerate.
17477 * config.in: Regenerate.
17478 * gdbreplay.c: Include needed system headers.
17479 (remote_open): Remove strchr prototype.
17480 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17481 * regcache.c (supply_register): Change buf argument to const void *.
17482 (supply_register_by_name): Likewise.
17483 (collect_register): Change buf argument to void *.
17484 (collect_register_by_name): Likewise.
17485 * regcache.h: Add missing prototypes.
17486 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17487 * server.c (handle_query): New function.
17488 (attached): New static variable, moved out of main.
17489 (main): Quiet longjmp clobber warnings.
17490 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17491 * utils.c (error): Remove NORETURN.
17492 (fatal): Likewise.
This page took 3.1 seconds and 4 git commands to generate.