]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Simplify write_inferior_memory
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
c6778d00
TT
12019-08-15 Tom Tromey <tromey@adacore.com>
2
3 * target.c (write_inferior_memory): Use std::vector.
4
404f2902
FCE
52019-08-06 Frank Ch. Eigler <fche@redhat.com>
6
7 PR build/24886
8 * configure.ac: Drop enable-libmcheck support.
9 * configure, config.in: Rebuild.
10 * acinclude.m4: Don't include it.
11
4c5aa8e0
AH
122019-07-19 Alan Hayward <alan.hayward@arm.com>
13
14 * configure.srv: Remove Arm xml files.
15
7cc17433
AH
162019-07-19 Alan Hayward <alan.hayward@arm.com>
17
18 * configure.srv: Add new files. Remove xml generated files.
19 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
20 registers.
21 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
22 * linux-aarch32-tdesc.c: New file.
23 * linux-aarch32-tdesc.h: New file.
24 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
25 * linux-arm-low.c (init_registers_arm, tdesc_arm)
26 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
27 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
28 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
29 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
30 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
31 (arm_read_description): Call arm_linux_read_description.
32 (initialize_low_arch): Don't init registers.
33 * linux-arm-tdesc.c: New file.
34 * linux-arm-tdesc.h: New file.
35
166a82be
AH
362019-07-10 Alan Hayward <alan.hayward@arm.com>
37
38 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
39 Move counter inside for.
40 (arm_read_description): Check ptrace earlier.
41 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
42
268a13a5
TT
432019-07-09 Tom Tromey <tom@tromey.com>
44
45 * configure: Rebuild.
46 * configure.ac: Change common to gdbsupport.
47 * acinclude.m4: Change common to gdbsupport.
48 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
49 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
50 common to gdbsupport.
51 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
52 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
53 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
54 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
55 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
56 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
57 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
58 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
59 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
60 common to gdbsupport.
61
350fab54
AH
622019-07-04 Alan Hayward <alan.hayward@arm.com>
63
64 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
65 defines.
66 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
67
2b40fda7
AH
682019-07-04 Alan Hayward <alan.hayward@arm.com>
69
70 * configure.srv: Remove legacy xml.
71 * linux-aarch64-low.c (initialize_low_arch): Remove
72 initialize_low_tdesc call.
73 * linux-aarch64-tdesc-selftest.c: Remove file.
74 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
75 * linux-x86-low.c (initialize_low_arch): Remove
76 initialize_low_tdesc call.
77 * linux-x86-tdesc-selftest.c: Remove file.
78 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
79
7d10623d
TV
802019-06-20 Tom de Vries <tdevries@suse.de>
81
82 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
83 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
84
8d6a48df
TV
852019-06-19 Tom de Vries <tdevries@suse.de>
86
87 * debug.h (debug_write): Change return type to ssize_t.
88 * debug.c (debug_write): Same.
89
73cc7272
TT
902019-06-14 Tom Tromey <tom@tromey.com>
91
92 * configure.ac: Use new path to gnulib.
93 * configure: Rebuild.
94 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
95 to gnulib.
96
08f10e02
TT
972019-06-11 Tom Tromey <tom@tromey.com>
98
99 * Makefile.in (SFILES): Add alloc.c.
100 (OBS): Add alloc.o.
101 (IPA_OBJS): Add alloc-ipa.o.
102 (alloc-ipa.o): New target.
103 (%.o: ../%.c): New pattern rule.
104
422186a9
TT
1052019-06-10 Tom Tromey <tromey@adacore.com>
106
107 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
108 end warning with a newline.
109 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
110 newline.
111 * thread-db.c (attach_thread): Don't end warning with a newline.
112 (thread_db_notice_clone): Likewise.
113 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
114 newline.
115 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
116 end warning with a newline.
117
b02f78f9
PA
1182019-06-04 Pedro Alves <palves@redhat.com>
119
120 * server.c (captured_main): Use make_unique_xstrdup.
121
88ed7edb
TT
1222019-06-02 Tom Tromey <tom@tromey.com>
123
124 * gdbreplay.c (fromhex): Remove.
125 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
126
33a6bc35
TT
1272019-05-29 Tom Tromey <tromey@adacore.com>
128
129 * configure: Rebuild.
130
e90a813d
KB
1312019-05-06 Kevin Buettner <kevinb@redhat.com>
132
133 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
134 sign extension code on 32-bit builds.
135
353ea2d1
EZ
1362019-05-03 Eli Zaretskii <eliz@gnu.org>
137
138 * remote-utils.c:
139 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
140
b494cdff
TT
1412019-04-19 Tom Tromey <tom@tromey.com>
142
143 * server.c (struct vstop_notif): Derive from notif_event.
144 <base>: Remove.
145 (queue_stop_reply): Update.
146 (remove_all_on_match_ptid): Change type. Rewrite.
147 (discard_queued_stop_replies): Rewrite.
148 (in_queued_stop_replies_ptid): Change type.
149 (in_queued_stop_replies): Rewrite.
150 (notif_stop): Update.
151 (queue_stop_reply_callback): Update.
152 (captured_main): Don't call initialize_notif.
153 (push_stop_notification): Update.
154 * notif.c (notif_write_event, handle_notif_ack)
155 (notif_event_enque, notif_push): Update.
156 (notif_event_xfree, initialize_notif): Remove.
157 * notif.h (struct notif_event): Include <list>, not
158 "common/queue.h".
159 (struct notif_server) <queue>: Now a std::list.
160 (notif_event_p): Remove typedef.
161 (initialize_notif): Don't declare.
162 (struct notif_event): Add virtual destructor.
163
a7e559cc
AH
1642019-04-17 Alan Hayward <alan.hayward@arm.com>
165
166 * ax.c (ax_vdebug): Call debug_printf.
167 * debug.c (debug_write): New function.
168 * debug.h (debug_write): New declaration.
169 * linux-low.c (sigchld_handler): Call debug_write.
170
aeb2e706
AH
1712019-04-17 Alan Hayward <alan.hayward@arm.com>
172
173 * debug.c (debug_set_output): New function.
174 (debug_vprintf): Send output to debug_file.
175 (debug_flush): Likewise.
176 * debug.h (debug_set_output): New declaration.
177 * server.c (handle_monitor_command): Add debug-file option.
178 (captured_main): Likewise.
179
c1bc0935
AH
1802019-04-17 Alan Hayward <alan.hayward@arm.com>
181
182 * debug.c (remote_debug): Add definition.
183 * debug.h (remote_debug): Add declaration.
184 * hostio.c (remote_debug): Remove declaration.
185 * remote-utils.c (struct ui_file): Likewise.
186 (remote_debug): Likewise.
187 * remote-utils.h (remote_debug): Likewise,
188 * server.c (remote_debug): Remove definition.
189
3f52fdbc
KB
1902019-04-10 Kevin Buettner <kevinb@redhat.com>
191
192 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
193 when using a 64-bit gdbserver.
194
b0319eaa
TT
1952019-04-09 Tom Tromey <tromey@adacore.com>
196
197 * linux-low.c (select_event_lwp): Use find_thread_in_random.
198
eedc3f4f
TT
1992019-04-08 Tom Tromey <tom@tromey.com>
200
201 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
202 throw.
203 (linux_resume_one_lwp): Likewise.
204
230d2906
TT
2052019-04-08 Tom Tromey <tom@tromey.com>
206
207 * gdbreplay.c: Update.
208 * linux-low.c: Update.
209 * server.c: Update.
210
a70b8144
TT
2112019-04-08 Tom Tromey <tom@tromey.com>
212
213 * server.c: Use C++ exception handling.
214 * linux-low.c: Use C++ exception handling.
215 * gdbreplay.c: Use C++ exception handling.
216
3d6e9d23
TT
2172019-04-08 Tom Tromey <tom@tromey.com>
218
219 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
220 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
221 (captured_main, main): Update.
222 * gdbreplay.c (main): Update.
223
0570503d
PFC
2242019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
225
226 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
227 value in argument pointer, return 1 if the entry is found and 0
228 otherwise. Move comment.
229 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
230 * linux-low.h (linux_get_auxv): Declare.
231 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
232
227a9e65
TT
2332019-04-05 Tom Tromey <tromey@adacore.com>
234
235 * server.c (gdbserver_usage): Use upper-case for metasyntactic
236 variables.
237
69f4c9cc
AH
2382019-03-28 Alan Hayward <alan.hayward@arm.com>
239
240 * linux-low.c (AT_HWCAP2): Add define if not already included.
241
974c89e0
AH
2422019-03-26 Alan Hayward <alan.hayward@arm.com>
243
244 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
245 (aarch64_arch_setup): Call linux_get_hwcap.
246 * linux-arm-low.c (arm_get_hwcap): Remove function.
247 (arm_read_description): Call linux_get_hwcap.
248 * linux-low.c (linux_get_auxv): New function.
249 (linux_get_hwcap): Likewise.
250 (linux_get_hwcap2): Likewise.
251 * linux-low.h (linux_get_hwcap): New declaration.
252 (linux_get_hwcap2): Likewise.
253 * linux-ppc-low.c (ppc_get_auxv): Remove function.
254 (ppc_arch_setup): Call linux_get_hwcap.
255 * linux-s390-low.c (s390_get_hwcap): Remove function.
256 (s390_arch_setup): Call linux_get_hwcap.
257
1ef53e6b
AH
2582019-03-22 Alan Hayward <alan.hayward@arm.com>
259 Jiong Wang <jiong.wang@arm.com>
260
261 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
262 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
263 to fail.
264 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
265
ee4fbcfa
AH
2662019-03-22 Alan Hayward <alan.hayward@arm.com>
267 Jiong Wang <jiong.wang@arm.com>
268
269 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
270 (aarch64_get_hwcap): New function.
271 (aarch64_arch_setup): Read APIA hwcap.
272
6dc0ebde
AH
2732019-03-22 Alan Hayward <alan.hayward@arm.com>
274 Jiong Wang <jiong.wang@arm.com>
275
276 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
277 (initialize_low_tracepoint): Likewise.
278 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
279 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
280 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
281 (aarch64_linux_read_description): Likewise.
282 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
283
1163a4b7
JB
2842019-03-12 John Baldwin <jhb@FreeBSD.org>
285
286 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
287 i386_create_target_description for 'segments' parameter.
288 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
289 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
290 * win32-i386-low.c (i386_arch_setup): Likewise.
291
d3a70e03
TT
2922019-03-12 Tom Tromey <tromey@adacore.com>
293
294 * linux-low.c (iterate_over_lwps): Update.
295
37991b4f
TT
2962019-03-06 Tom Tromey <tom@tromey.com>
297
298 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
299 (captured_main): Use SCOPE_EXIT.
300
45950eb6
SDJ
3012019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
302
303 * configure.srv: Use '$enable_unittest' instead of '$development'
304 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
305 case.
306
43ac54fc
TT
3072019-02-27 Tom Tromey <tromey@adacore.com>
308
309 * gdbreplay.c (logchar): Handle \r\n.
310
df0da8a2
AH
3112019-02-07 Alan Hayward <alan.hayward@arm.com>
312
313 * linux-low.c (linux_attach): Add process before lwp.
314 * server.c (attach_inferior): Check if already attached.
315
1a5c2598
TT
3162019-02-07 Tom Tromey <tom@tromey.com>
317
318 * x86-tdesc.h: Rename include guard.
319 * x86-low.h: Add include guard.
320 * wincecompat.h: Rename include guard.
321 * win32-low.h: Add include guard.
322 * utils.h: Rename include guard.
323 * tracepoint.h: Rename include guard.
324 * tdesc.h: Rename include guard.
325 * target.h: Rename include guard.
326 * server.h: Rename include guard.
327 * remote-utils.h: Rename include guard.
328 * regcache.h: Rename include guard.
329 * nto-low.h: Rename include guard.
330 * notif.h: Add include guard.
331 * mem-break.h: Rename include guard.
332 * lynx-low.h: Add include guard.
333 * linux-x86-tdesc.h: Add include guard.
334 * linux-s390-tdesc.h: Add include guard.
335 * linux-ppc-tdesc-init.h: Add include guard.
336 * linux-low.h: Add include guard.
337 * linux-aarch64-tdesc.h: Add include guard.
338 * linux-aarch32-low.h: Add include guard.
339 * inferiors.h: Rename include guard.
340 * i387-fp.h: Rename include guard.
341 * hostio.h: Rename include guard.
342 * gdbthread.h: Rename include guard.
343 * gdb_proc_service.h: Rename include guard.
344 * event-loop.h: Rename include guard.
345 * dll.h: Rename include guard.
346 * debug.h: Rename include guard.
347 * ax.h: Rename include guard.
348
956cc47c
SN
3492018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
350
351 PR gdb/23985
352 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
353 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
354
a0707f3c
TT
3552019-01-25 Tom Tromey <tom@tromey.com>
356
357 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
358
0747795c
TT
3592019-01-25 Tom Tromey <tom@tromey.com>
360
361 * win32-low.c: Fix common/ includes.
362 * win32-i386-low.c: Fix common/ includes.
363 * tracepoint.c: Fix common/ includes.
364 * thread-db.c: Fix common/ includes.
365 * target.h: Fix common/ includes.
366 * symbol.c: Fix common/ includes.
367 * spu-low.c: Fix common/ includes.
368 * server.h: Fix common/ includes.
369 * server.c: Fix common/ includes.
370 * remote-utils.c: Fix common/ includes.
371 * regcache.h: Fix common/ includes.
372 * regcache.c: Fix common/ includes.
373 * nto-x86-low.c: Fix common/ includes.
374 * notif.h: Fix common/ includes.
375 * mem-break.h: Fix common/ includes.
376 * lynx-low.c: Fix common/ includes.
377 * lynx-i386-low.c: Fix common/ includes.
378 * linux-x86-tdesc-selftest.c: Fix common/ includes.
379 * linux-x86-low.c: Fix common/ includes.
380 * linux-low.c: Fix common/ includes.
381 * inferiors.h: Fix common/ includes.
382 * i387-fp.c: Fix common/ includes.
383 * hostio.c: Fix common/ includes.
384 * hostio-errno.c: Fix common/ includes.
385 * gdbthread.h: Fix common/ includes.
386 * gdbreplay.c: Fix common/ includes.
387 * fork-child.c: Fix common/ includes.
388 * event-loop.c: Fix common/ includes.
389 * ax.c:
390 (enum gdb_agent_op): Fix common/ includes.
391
be6d4f74
TT
3922019-01-21 Tom Tromey <tom@tromey.com>
393
394 * tracepoint.c: Fix includes.
395 * remote-utils.c: Fix includes.
396 * linux-x86-low.c: Fix includes.
397
66d91b39
JB
3982019-01-01 Joel Brobecker <brobecker@adacore.com>
399
400 * gdbreplay.c (gdbreplay_version): Update copyright year in
401 version message.
402 * server.c (gdbserver_version): Likewise.
403
754e3168
AH
4042018-12-05 Alan Hayward <alan.hayward@arm.com>
405
406 * linux-low.c (add_lwp): Switch ordering.
407
d105de22
TT
4082018-11-29 Tom Tromey <tom@tromey.com>
409
410 * win32-low.c (win32_join): Take pid, not process.
411 * target.h (struct target_ops) <join>: Change argument type.
412 (join_inferior): Change argument name.
413 * spu-low.c (spu_join): Take pid, not process.
414 * server.c (handle_detach): Preserve pid before destroying
415 process.
416 * lynx-low.c (lynx_join): Take pid, not process.
417 * linux-low.c (linux_join): Take pid, not process.
418
50138245
AH
4192018-11-23 Alan Hayward <alan.hayward@arm.com>
420
421 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
422 (aarch64_cannot_fetch_register): Likewise.
423 (struct linux_target_ops): Update references.
424
64f57f3d
PFC
4252018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
426
427 * linux-ppc-low.c: Include nat/linux-ptrace.h.
428
8d619c01
EBM
4292018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
430
431 * configure.srv (ipa_ppc_linux_regobj): Add
432 powerpc-isa207-htm-vsx32l-ipa.o and
433 powerpc-isa207-htm-vsx64l-ipa.o.
434 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
435 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
436 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
437 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
438 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
439 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
440 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
441 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
442 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
443 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
444 (init_registers_powerpc_isa207_htm_vsx32l)
445 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
446 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
447 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
448 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
449 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
450 (ppc_store_tm_ctarregset): New functions.
451 (ppc_regsets): Add entries for HTM regsets.
452 (ppc_arch_setup): Set htm in features struct when needed. Set
453 sizes for the HTM regsets.
454 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
455 (initialize_low_arch): Call
456 init_registers_powerpc_isa207_htm_vsx32l and
457 init_registers_powerpc_isa207_htm_vsx64l.
458 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
459 PPC_TDESC_ISA207_HTM_VSX.
460 (initialize_low_tracepoint): Call
461 init_registers_powerpc_isa207_htm_vsx32l and
462 init_registers_powerpc_isa207_htm_vsx64l.
463
232bfb86
EBM
4642018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
465
466 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
467 rs6000/power-linux-pmu.xml to srv_xmlfiles.
468 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
469 (ppc_store_pmuregset): New functions.
470 (ppc_regsets): Add entries for ebb and pmu regsets.
471 (ppc_arch_setup): Set isa207 in features struct if the ebb and
472 pmu regsets are available. Set sizes for these regsets.
473
f2cf6173
EBM
4742018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
475
476 * configure.srv (ipa_ppc_linux_regobj): Add
477 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
478 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
479 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
480 rs6000/powerpc-isa207-vsx32l.xml, and
481 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
482 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
483 <PPC_TDESC_ISA207_VSX>: New enum value.
484 (init_registers_powerpc_isa207_vsx32l): Declare.
485 (init_registers_powerpc_isa207_vsx64l): Declare.
486 * linux-ppc-low.c (ppc_fill_tarregset): New function.
487 (ppc_store_tarregset): New function.
488 (ppc_regsets): Add entry for the TAR regset.
489 (ppc_arch_setup): Set isa207 in features struct when needed. Set
490 size for the TAR regsets.
491 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
492 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
493 and init_registers_powerpc_isa207_vsx64l.
494 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
495 (initialize_low_tracepoint): Call
496 init_registers_powerpc_isa207_vsx32l and
497 init_registers_powerpc_isa207_vsx64l.
498
7ca18ed6
EBM
4992018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
500 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
501
502 * configure.srv (ipa_ppc_linux_regobj): Add
503 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
504 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
505 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
506 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
507 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
508 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
509 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
510 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
511 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
512 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
513 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
514 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
515 (ppc_hwcap): Add comment.
516 (ppc_hwcap2): New global.
517 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
518 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
519 (ppc_regsets): Add entries for the DSCR and PPR regsets.
520 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
521 when needed. Set sizes for the the DSCR and PPR regsets.
522 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
523 (initialize_low_arch): Call
524 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
525 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
526 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
527 PPC_TDESC_ISA205_PPR_DSCR_VSX.
528 (initialize_low_tracepoint): Call
529 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
530 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
531
5c849b22
PFC
5322018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
533
534 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
535
8ecfd7bd
SDJ
5362018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
537 Simon Marchi <simark@simark.ca>
538
539 * acinclude.m4: Include "../selftest.m4".
540 * configure: Regenerate.
541 * configure.ac: Use "GDB_AC_SELFTEST".
542 * configure.srv: Use "$enable_unittests" instead of
543 "$development" when checking whether unit tests have been
544 enabled.
545 * server.c (captured_main): Update message informing that
546 selftests have been disabled.
547
96643e35
TT
5482018-10-04 Tom Tromey <tom@tromey.com>
549
550 * configure: Rebuild.
551
da4ae14a
TT
5522018-10-04 Tom Tromey <tom@tromey.com>
553
554 * server.c (handle_status): Rename inner "thread".
555 (process_serial_event): Declare "res" in 'm' case.
556 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
557 (iterate_over_lwps): Rename inner "thread".
558 (linux_qxfer_libraries_svr4): Rename inner "len".
559 * gdbthread.h (find_thread_in_random): Rename inner "thread".
560
7c619dbd
GB
5612018-10-01 Gary Benson <gbenson@redhat.com>
562
563 * gdb_proc_service.h: Moved common code to
564 common/gdb_proc_service.h.
565
3795e814
GB
5662018-10-01 Gary Benson <gbenson@redhat.com>
567
568 * gdb_proc_service.h: Synchronize comments and whitespace with
569 GDB's version of this file.
570
49b036f1
TT
5712018-09-25 Tom Tromey <tom@tromey.com>
572
573 * configure: Rebuild.
574 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
575
8ff03f0b
SM
5762018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
579 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
580 ($(IPA_LIB)): Sort IPA_OBJS.
581
a1cd91dc
SM
5822018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * Makefile.in: Remove references to $(ADD_DEPS).
585
752312ba
TT
5862018-09-16 Tom Tromey <tom@tromey.com>
587
588 * remote-utils.c (remote_open): Use GNU style for metasyntactic
589 variables.
590 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
591 variables.
592
f1628857
TT
5932018-09-05 Tom Tromey <tom@tromey.com>
594
595 * configure: Rebuild.
596
ad202fcc
SM
5972018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
598
599 PR build/23399
600 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
601
d3d8724a
TT
6022018-08-27 Tom Tromey <tom@tromey.com>
603
604 PR build/23087:
605 * configure: Rebuild.
606
b4f183d2
TT
6072018-08-27 Tom Tromey <tom@tromey.com>
608
609 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
610 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
611 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
612 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
613 (s390x_emit_stack_adjust): Add casts to unsigned char.
614
4e2aa472
SM
6152018-08-22 Simon Marchi <simon.marchi@ericsson.com>
616
617 PR gdb/23374
618 PR gdb/23375
619 * server.h (struct client_state) <disable_randomization>:
620 Initialize to 1.
621
cf4088a9
SM
6222018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
623
624 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
625 variable.
626 (mips_supply_ptrace_register): Likewise.
627
a0de763e
TT
6282018-07-22 Tom Tromey <tom@tromey.com>
629
630 * configure: Rebuild.
631
b0a7723d
TT
6322018-07-22 Tom Tromey <tom@tromey.com>
633
634 * win32-low.c (win32_create_inferior): Remove unused variables.
635 * gdbreplay.c (remote_open): Remove unused variable.
636 * remote-utils.c (remote_prepare): Remove unused variable.
637 * x86-tdesc.h (X86_TDESC_H): Define.
638 (amd64_expedite_regs): Define conditionally.
639 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
640 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
641 * remote-utils.c (readchar): Remove unused variable.
642
a780ef4f
PA
6432018-07-13 Pedro Alves <palves@redhat.com>
644
645 * linux-low.c (linux_kill): Change parameter to process_info
646 pointer instead of pid. Adjust.
647 * lynx-low.c (lynx_kill): Likewise.
648 * nto-low.c (nto_kill): Likewise.
649 * spu-low.c (spu_kill): Likewise.
650 * win32-low.c (win32_kill): Likewise.
651 * server.c (handle_v_kill, kill_inferior_callback)
652 (detach_or_kill_for_exit): Adjust.
653 * target.c (kill_inferior): Change parameter to process_info
654 pointer instead of pid. Adjust.
655 * target.h (struct target_ops) <kill>: Change parameter to
656 process_info pointer instead of pid. Adjust all implementations
657 and callers.
658 (kill_inferior): Likewise.
659
ef2ddb33
PA
6602018-07-13 Pedro Alves <palves@redhat.com>
661
662 * linux-low.c (linux_detach, linux_join): Change parameter to
663 process_info pointer instead of pid. Adjust.
664 * lynx-low.c (lynx_detach, lynx_join): Likewise.
665 * nto-low.c (nto_detach): Likewise.
666 * spu-low.c (spu_detach, spu_join): Likewise.
667 * win32-low.c (win32_detach, win32_join): Likewise.
668 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
669 * target.h (struct target_ops) <detach, join>: Change parameter to
670 process_info pointer instead of pid. Adjust all implementations
671 and callers.
672 (detach_inferior, join_inferior): Rename 'pid' parameter to
673 'proc'.
674
c7ab0aef
SDJ
6752018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
676 Jan Kratochvil <jan.kratochvil@redhat.com>
677 Paul Fertser <fercerpav@gmail.com>
678 Tsutomu Seki <sekiriki@gmail.com>
679
680 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
681 (OBS): Add 'common/netstuff.o'.
682 (GDBREPLAY_OBS): Likewise.
683 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
684 (remote_open): Implement support for IPv6
685 connections.
686 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
687 and 'wspiapi.h'.
688 (handle_accept_event): Accept connections from IPv6 sources.
689 (remote_prepare): Handle IPv6-style hostnames; implement
690 support for IPv6 connections.
691 (remote_open): Implement support for printing connections from
692 IPv6 sources.
693
31445d10
PA
6942018-07-11 Pedro Alves <palves@redhat.com>
695
696 PR gdb/23377
697 * mem-break.c (any_persistent_commands): Add process_info
698 parameter and use it instead of relying on the current process.
699 Change return type to bool.
700 * mem-break.h (any_persistent_commands): Add process_info
701 parameter and change return type to bool.
702 * server.c (handle_detach): Remove require_running_or_return call.
703 Look up the process_info for the process we're about to detach.
704 If not found, return back error to GDB. Adjust
705 any_persistent_commands call to pass down a process pointer.
706
cb197132
PA
7072018-07-11 Pedro Alves <palves@redhat.com>
708
709 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
710 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
711 instead of collect_register_by_name.
712 * regcache.c (regcache_raw_get_unsigned_by_name): New.
713 * regcache.h (regcache_raw_get_unsigned_by_name): New.
714
1b919490
VB
7152018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
716 Pedro Alves <palves@redhat.com>
717
718 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
719
d7e15655
TT
7202018-07-03 Tom Tromey <tom@tromey.com>
721
722 * linux-low.c: Update.
723 * lynx-low.c: Update.
724 * mem-break.c: Update.
725 * nto-low.c: Update.
726 * remote-utils.c: Update.
727 * server.c: Update.
728 * spu-low.c: Update.
729 * target.c: Update.
730 * win32-low.c: Update.
731
26a57c92
TT
7322018-07-03 Tom Tromey <tom@tromey.com>
733
734 * server.c: Update.
735
0e998d96
TT
7362018-07-03 Tom Tromey <tom@tromey.com>
737
738 * linux-low.c: Update.
739
cc6bcb54
TT
7402018-07-03 Tom Tromey <tom@tromey.com>
741
742 * target.c: Update.
743
e38504b3
TT
7442018-07-03 Tom Tromey <tom@tromey.com>
745
746 * linux-low.c: Update.
747 * linux-mips-low.c: Update.
748 * lynx-low.c: Update.
749 * nto-low.c: Update.
750 * remote-utils.c: Update.
751 * server.c: Update.
752 * spu-low.c: Update.
753 * target.c: Update.
754 * thread-db.c: Update.
755
e99b03dc
TT
7562018-07-03 Tom Tromey <tom@tromey.com>
757
758 * linux-low.c: Update.
759 * linux-mips-low.c: Update.
760 * lynx-low.c: Update.
761 * mem-break.c: Update.
762 * nto-low.c: Update.
763 * remote-utils.c: Update.
764 * server.c: Update.
765 * spu-low.c: Update.
766 * target.c: Update.
767 * tracepoint.c: Update.
768
f2907e49
TT
7692018-07-03 Tom Tromey <tom@tromey.com>
770
771 * linux-low.c: Update.
772 * linux-ppc-low.c: Update.
773 * linux-x86-low.c: Update.
774 * proc-service.c: Update.
775 * server.c: Update.
776 * spu-low.c: Update.
777 * thread-db.c: Update.
778 * win32-low.c: Update.
779
fd79271b
TT
7802018-07-03 Tom Tromey <tom@tromey.com>
781
782 * linux-low.c: Update.
783 * lynx-low.c: Update.
784 * nto-low.c: Update.
785 * remote-utils.c: Update.
786 * spu-low.c: Update.
787 * thread-db.c: Update.
788 * win32-low.c: Update.
789
c0867626
SDJ
7902018-06-29 Joel Brobecker <brobecker@adacore.com>
791
792 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
793 parameter in call to 'amd64_create_target_description'.
794
2512d7ef
JK
7952018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
796
797 * x86-tdesc.h: Remove executable permission flag.
798
d0ac1c44
SM
7992018-06-19 Simon Marchi <simon.marchi@ericsson.com>
800
801 * configure.ac: Remove AC_PREREQ, add missing quoting.
802 * configure: Re-generate.
803 * config.in: Re-generate.
804 * aclocal.m4: Re-generate.
805
c4eb05ff
SM
8062018-06-18 Simon Marchi <simon.marchi@ericsson.com>
807
808 * tracepoint.h (current_traceframe): Remove declaration.
809
02895270
AH
8102018-06-18 Alan Hayward <alan.hayward@arm.com>
811
812 * linux-aarch64-low.c (is_sve_tdesc): New function.
813 (aarch64_sve_regs_copy_to_regcache): Likewise.
814 (aarch64_sve_regs_copy_from_regcache): Likewise.
815 (aarch64_regs_info): Add SVE checks.
816 (initialize_low_arch): Initialize SVE.
817
e9902bfc
AH
8182018-06-18 Alan Hayward <alan.hayward@arm.com>
819
820 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
821
fefa175e
AH
8222018-06-11 Alan Hayward <alan.hayward@arm.com>
823
824 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
825 (initialize_low_tracepoint): Likewise
826 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
827 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
828 param.
829 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
830 checks.
831 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
832
b91ad3ff
AH
8332018-06-11 Alan Hayward <alan.hayward@arm.com>
834
835 * server.h (PBUFSIZ): Increase size
836
f868386e
AH
8372018-06-11 Alan Hayward <alan.hayward@arm.com>
838
839 * regcache.c (regcache::raw_compare): New function.
840 * regcache.h (regcache::raw_compare): New declaration.
841
9c861883
AH
8422018-06-11 Alan Hayward <alan.hayward@arm.com>
843
844 * regcache.c (new_register_cache): Use new.
845 (free_register_cache): Use delete.
846 (register_data): Use const.
847 (supply_register): Move body inside regcache.
848 (regcache::raw_supply): New override function.
849 (collect_register): Move body inside regcache.
850 (regcache::raw_collect): New override function.
851 (regcache::get_register_status): New override function.
852 * regcache.h (struct regcache): Inherit from reg_buffer_common.
853
40591844
TT
8542018-06-09 Tom Tromey <tom@tromey.com>
855
856 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
857 declare queue.
858 (event_queue): Use std::queue.
859 (gdb_event_xfree): Remove.
860 (initialize_event_loop, process_event, wait_for_event): Update.
861
6341380d
SC
8622018-06-08 Stan Cox <scox@redhat.com>
863
864 * win32-low.c (win32_create_inferior): last_ptid and last_status
865 moved to client_state.
866
03349c93
PA
8672018-06-08 Pedro Alves <palves@redhat.com>
868
869 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
870 common/common-exceptions.o, common/common-utils.o,
871 common/errors.o, common/print-utils.o and utils.o.
872 * gdbreplay.c: Include "common-defs.h" instead of the two
873 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
874 string.h or alloca.h.
875 (perror_with_name): Delete.
876 (remote_open): Use xstrdup instead of strdup.
877 (main): Rename to ...
878 (captured_main): ... this.
879 (main): New.
880
8dcc53b3
TT
8812018-06-08 Tom Tromey <tom@tromey.com>
882
883 * linux-low.c (linux_low_read_btrace): Update.
884
c12a5089
SC
8852018-06-04 Stan Cox <scox@redhat.com>
886
887 * server.h (struct client_state): New.
888 * server.c (cont_thread, general_thread, multi_process)
889 (report_fork_events, report_vfork_events, report_exec_events)
890 (report_thread_events, swbreak_feature, hwbreak_feature)
891 (vCont_supported, disable_randomization, pass_signals)
892 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
893 Moved to client_state.
894 * remote-utils.c (remote_debug, noack_mode)
895 (transport_is_reliable): Moved to client_state.
896 * tracepoint.c (current_traceframe): Moved to client_state.
897
898 Update all callers.
899 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
900 linux-low.c, remote-utils.h, target.c: Use client_state.
901
122394f1
AH
9022018-05-31 Alan Hayward <alan.hayward@arm.com>
903
904 * configure.srv: Add new c/h file.
905
95228a0d
AH
9062018-05-31 Alan Hayward <alan.hayward@arm.com>
907
908 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
909 null VQ.
910
d8dab6c3
MR
9112018-05-25 Maciej W. Rozycki <macro@mips.com>
912
913 * gdb.arch/mips-fpregset-core.exp: New test.
914 * gdb.arch/mips-fpregset-core.c: New test source.
915
81e25b7c
EK
9162018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
917
918 PR server/23198
919 * hostio.c (require_int): Do not report overflow for integers
920 between 0xfffffff and 0x7fffffff.
921
7e947ad3
MR
9222018-05-22 Maciej W. Rozycki <macro@mips.com>
923
924 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
925 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
926 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
927 functions.
928 (the_low_target): Wire them.
929
1d75a658
PFC
9302018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
931
932 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
933 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
934 mode. Call collect_register_by_name with vscr using
935 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
936 (ppc_store_vrregset): Add and set vscr_offset variable as in
937 ppc_fill_vrregset. Call supply_register_by_name with vscr using
938 vscr_offset.
939
d078308a
PFC
9402018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
941
942 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
943 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
944 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
945
7273b5fc
PFC
9462018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
947
948 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
949 (ppc_store_vsxregset): Likewise.
950 (ppc_fill_vrregset): Likewise.
951 (ppc_store_vrregset): Likewise.
952 (ppc_fill_evrregset): Likewise.
953 (ppc_store_evrregset): Likewise.
954 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
955 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
956 needed.
957
2e077f5e
PFC
9582018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
959
960 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
961 wordsize of the inferior. Call ppc_linux_target_wordsize.
962
bd64614e
PFC
9632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
964
965 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
966 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
967 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
968 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
969 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
970 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
971 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
972 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
973 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
974 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
975 (tdesc_powerpc_e500l): Remove.
976 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
977 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
978 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
979 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
980 linux-ppc-tdesc.h.
981 (ppc_arch_setup): Remove target description matching code. Fill a
982 ppc_linux_features struct and call ppc_linux_match_description
983 with it.
984
75d74cca
MR
9852018-05-22 Maciej W. Rozycki <macro@mips.com>
986
987 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
988 width of the requested register exceeds the width of the
989 `ptrace' data type.
990 (mips_cannot_store_register): Likewise.
991
e4439e43
MR
9922018-05-21 Maciej W. Rozycki <macro@mips.com>
993
994 * linux-mips-low.c (mips_fetch_register): New function. Update
995 preceding comment.
996 (mips_store_gregset): Supply 0 rather than $restart for $zero.
997 (the_low_target): Wire `mips_fetch_register'.
998
55271bf9
JB
9992018-05-10 Joel Brobecker <brobecker@adacore.com>
1000
1001 * lynx-i386-low.c (LYNXOS_178): New macro.
1002 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1003 the layout on LynxOS-178.
1004 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1005 handle floating point registers that are not supported by
1006 LynxOS-178.
1007
1a34f210
TT
10082018-05-10 Tom Tromey <tom@tromey.com>
1009
1010 * configure: Rebuild.
1011
190852c8
JB
10122018-05-10 Joel Brobecker <brobecker@adacore.com>
1013
1014 PR server/23158:
1015 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1016 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1017 Use it to set the expedite_regs field in the given tdesc.
1018 * x86-tdesc.h: New file.
1019 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1020 Adjust following the addition of the new expedite_regs parameter
1021 to init_target_desc.
1022 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1023 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1024 (i386_linux_read_description, amd64_linux_read_description):
1025 Adjust following the addition of the new expedite_regs parameter
1026 to init_target_desc.
1027 * lynx-i386-low.c: #include "x86-tdesc.h".
1028 (lynx_i386_arch_setup): Adjust following the addition of the new
1029 expedite_regs parameter to init_target_desc.
1030 * nto-x86-low.c: #include "x86-tdesc.h".
1031 (nto_x86_arch_setup): Adjust following the addition of the new
1032 expedite_regs parameter to init_target_desc.
1033 * win32-i386-low.c: #include "x86-tdesc.h".
1034 (i386_arch_setup): Adjust following the addition of the new
1035 expedite_regs parameter to init_target_desc.
1036
7dbac825
JB
10372018-05-10 Joel Brobecker <brobecker@adacore.com>
1038
1039 PR server/23158:
1040 * win32-low.c (win32_create_inferior): Add call to my_wait
1041 setting last_status global.
1042
906994d9
JB
10432018-05-10 Joel Brobecker <brobecker@adacore.com>
1044
1045 PR server/23158:
1046 * win32-low.c (create_process): Only call gdb_tilde_expand if
1047 inferior_cwd is not NULL.
1048
8ee22052
AB
10492018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1050
1051 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1052 registers to the cache if their values have changed.
1053 (i387_xsave_to_cache): Provide default values for x87 control
1054 registers when these features are available, but disabled.
1055 * regcache.c (supply_register_by_name_zeroed): New function.
1056 * regcache.h (supply_register_by_name_zeroed): Declare new
1057 function.
1058
aff689d3
TT
10592018-05-07 Tom Tromey <tom@tromey.com>
1060
1061 * configure: Rebuild.
1062
85e26832
TT
10632018-05-04 Tom Tromey <tom@tromey.com>
1064
1065 * configure: Rebuild.
1066
a3b60e45
JK
10672018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1068 Pedro Alves <palves@redhat.com>
1069
1070 * linux-aarch64-low.c (aarch64_stopped_data_address):
1071 Likewise.
1072
632e107b
TT
10732018-04-27 Tom Tromey <tom@tromey.com>
1074
1075 * configure: Rebuild.
1076
458412c3
TT
10772018-04-23 Tom Tromey <tom@tromey.com>
1078
1079 * configure: Rebuild.
1080
f31c089e
SM
10812018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1082
1083 * Makefile.in (depcomp): Add "..".
1084 (all_deps_files): New and use it.
1085
b319b098
AH
10862018-04-18 Alan Hayward <alan.hayward@arm.com>
1087
1088 * configure.srv (aarch64*-*-linux*): Don't include xml.
1089 (i[34567]86-*-cygwin*): Likewise.
1090 (i[34567]86-*-linux*): Likewise.
1091 (i[34567]86-*-lynxos*): Likewise.
1092 (i[34567]86-*-mingw32ce*): Likewise.
1093 (i[34567]86-*-mingw*): Likewise.
1094 (i[34567]86-*-nto*): Likewise.
1095 (tic6x-*-uclinux): Likewise.
1096 (x86_64-*-linux*): Likewise.
1097 (x86_64-*-mingw*): Likewise.
1098 (x86_64-*-cygwin*): Likewise.
1099
3b74854b
AH
11002018-04-18 Alan Hayward <alan.hayward@arm.com>
1101
1102 * tdesc.c: Remove xml parameter.
1103
e98577a9
AH
11042018-04-18 Alan Hayward <alan.hayward@arm.com>
1105
1106 * server.c (get_features_xml): Remove cast.
1107 * tdesc.c (void target_desc::accept): Fill in function.
1108 (tdesc_get_features_xml): Remove old xml creation.
1109 (print_xml_feature::visit_pre): Add xml vistor.
1110 * tdesc.h (struct target_desc): Make xmltarget mutable.
1111 (tdesc_get_features_xml): Remove declaration.
1112
d278f585
AH
11132018-04-18 Alan Hayward <alan.hayward@arm.com>
1114
1115 * tdesc.c (tdesc_architecture_name): Add new function.
1116 (tdesc_osabi_name): Likewise.
1117 (tdesc_get_features_xml): Use new functions.
1118
eee8a18d
AH
11192018-04-18 Alan Hayward <alan.hayward@arm.com>
1120
1121 * tdesc.c (tdesc_create_flags): Remove.
1122 (tdesc_add_flag): Likewise.
1123 (tdesc_named_type): Likewise.
1124 (tdesc_create_union): Likewise.
1125 (tdesc_create_struct): Likewise.
1126 (tdesc_create_vector): Likewise.
1127 (tdesc_add_bitfield): Likewise.
1128 (tdesc_add_field): Likewise.
1129 (tdesc_set_struct_size): Likewise.
1130
82ec9bc7
AH
11312018-04-18 Alan Hayward <alan.hayward@arm.com>
1132
1133 * tdesc.c (~target_desc): Remove implictly deleted items.
1134 (init_target_desc): Iterate all features.
1135 (tdesc_get_features_xml): Use vector.
1136 (tdesc_create_feature): Create feature.
1137 * tdesc.h (tdesc_feature) Remove
1138 (target_desc): Add features.
1139
ea3e7d71
AH
11402018-04-18 Alan Hayward <alan.hayward@arm.com>
1141
1142 * Makefile.in: Add common/tdesc.c
1143 * tdesc.c (init_target_desc): init all reg_defs from register
1144 vector.
1145 (tdesc_create_reg): Create tdesc_reg.
1146 * tdesc.h (tdesc_feature): Add register vector.
1147
17d08cd4
SM
11482018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1149
1150 * tdesc.h (struct target_desc) <features>: Change type to
1151 std::vector<std::string>.
1152 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1153 changes.
1154 (tdesc_get_features_xml): Likewise.
1155 (tdesc_create_feature): Likewise.
1156
5cd3e386
AH
11572018-03-26 Alan Hayward <alan.hayward@arm.com>
1158
1159 * regcache.c (find_register_by_number): Return a ref.
1160 (find_regno): Use references.
1161 (register_size): Likewise.
1162 (register_data): Likewise.
1163 * tdesc.c (target_desc::~target_desc): Remove free calls.
1164 (target_desc::operator==): Use std::vector compare.
1165 (init_target_desc): Use reference.
1166 (tdesc_create_reg): Use reg constructors.
1167 * tdesc.h (struct target_desc): Replace pointer with object.
1168
dff7492c
AH
11692018-03-23 Alan Hayward <alan.hayward@arm.com>
1170
1171 * regcache.c (find_register_by_number): Make static.
1172 (find_regno): Use find_register_by_number
1173 * regcache.h (struct reg): Remove declaration.
1174
d80e5242
AH
11752018-03-23 Alan Hayward <alan.hayward@arm.com>
1176
1177 * tdesc.c (target_desc::~target_desc): Move to here.
1178 (target_desc::operator==): Likewise.
1179 * tdesc.h (target_desc::~target_desc): Move from here.
1180 (target_desc::operator==): Likewise.
1181
f69c5afb
AA
11822018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1183
1184 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1185
ce29f843
AA
11862018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1187
1188 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1189 S390_TDESC_GS.
1190 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1191 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1192 and init_registers_s390_gs_linux64.
1193
c49bd90b
AA
11942018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1195
1196 * linux-s390-low.c (s390_fill_gs): Remove function.
1197 (s390_fill_gsbc): Remove function.
1198 (s390_regsets): Set fill functions for the guarded storage regsets
1199 to NULL.
1200
7edb9bd3
AA
12012018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1202
1203 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1204 the word size. Add comment.
1205 (s390_get_wordsize): New function.
1206 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1207 pswm with it. Instead, use s390_get_wordsize to determine the
1208 word size first and derive the correct tdesc from that directly.
1209
39be3c7e
SM
12102018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1211
1212 * Makefile.in: Include silent-rules.mk.
1213 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1214 (COMPILE): Add ECHO_CXX.
1215 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1216 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1217 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1218 (version-generated.c): Add ECHO_GEN.
1219 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1220 (IPAGENT_COMPILE): Add ECHO_CXX.
1221 (%-generated.c): Add ECHO_REGDAT.
1222
3ae9ce5d
TT
12232018-03-14 Tom Tromey <tom@tromey.com>
1224
1225 PR cli/14977:
1226 * ax.c (ax_printf): Special case for NULL.
1227
e6a58aa8
SM
12282018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1229
1230 * linux-low.c (linux_qxfer_libraries_svr4): Use
1231 xml_escape_text_append.
1232
f6e8a41e
SM
12332018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1236
b9671caf
SM
12372018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1238
1239 * server.c (handle_general_set): Remove unnecessary xstrdup.
1240
e80aaf61
SM
12412018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1242
1243 * server.c (parse_debug_format_options): Adjust to
1244 delim_string_to_char_ptr_vec changes.
1245 * thread-db.c (thread_db_load_search): Adjust to
1246 dirnames_to_char_ptr_vec changes.
1247
b1223e78
MM
12482018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1249
1250 * target.h (target_enable_btrace, target_disable_btrace)
1251 (target_read_btrace, target_read_btrace_conf): Turn macro into
1252 inline function. Throw error if target method is not defined.
1253 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1254 check for btrace target method. Be prepared to handle exceptions
1255 from btrace target methods.
1256
81561546
SDJ
12572018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1258
1259 * server.c (captured_main): Change order of error message printed
1260 when the current working directory cannot be found.
1261
25e3c82c
SDJ
12622018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1263
1264 * server.c: Include "filenames.h" and "pathstuff.h".
1265 (program_name): Delete variable.
1266 (program_path): New anonymous class.
1267 (get_exec_wrapper): Use "program_path" instead of
1268 "program_name".
1269 (handle_v_run): Likewise.
1270 (captured_main): Likewise.
1271 (process_serial_event): Likewise.
1272
b4987c95
SDJ
12732018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1274
1275 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1276 (OBJS): Add "pathstuff.o".
1277 * server.c (current_directory): New global variable.
1278 (captured_main): Initialize "current_directory".
1279
f46cd62a
AH
12802018-02-26 Alan Hayward <alan.hayward@arm.com>
1281
1282 * tdesc.c: Use common/tdesc.h.
1283 * tdesc.h: Likewise.
1284
a543c5ca
AH
12852018-02-20 Alan Hayward <alan.hayward@arm.com>
1286 Simon Marchi <simon.marchi@ericsson.com>
1287
1288 * Makefile.in: Switch order of make rules.
1289
b5884fa7
AH
12902018-02-19 Alan Hayward <alan.hayward@arm.com>
1291
1292 * Makefile.in: Add common directory in build.
1293 * configure.ac: Add common reference.
1294 * configure: Regenerate.
1295
de6242d3
MM
12962018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1297
1298 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1299 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1300 * spu-low.c (spu_target_ops): Likewise.
1301 * win32-low.c (win32_target_ops): Likewise.
1302 * server.c (supported_btrace_packets): Report packets unconditionally.
1303 * target.h (target_ops) <supports_btrace>: Remove.
1304 (target_supports_btrace): Remove.
1305
9ee23a85
MM
13062018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1307
1308 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1309 (handle_btrace_disable): Change return type to void. Use exceptions
1310 to report errors.
1311 (handle_btrace_general_set): Catch exception and copy message to
1312 return message.
1313
8ce47547
TT
13142018-02-08 Tom Tromey <tom@tromey.com>
1315
1316 * linux-low.c (install_software_single_step_breakpoints): Use
1317 make_scoped_restore.
1318 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1319 (do_restore_current_thread_cleanup): Remove.
1320 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1321 declare.
1322
45dd3607
TT
13232018-02-08 Tom Tromey <tom@tromey.com>
1324
1325 * mem-break.c (set_raw_breakpoint_at): Use
1326 gdb::unique_xmalloc_ptr.
1327
e671cd59
PA
13282018-01-30 Pedro Alves <palves@redhat.com>
1329
1330 PR gdb/13211
1331 * target.c (target_terminal::terminal_state): Rename to ...
1332 (target_terminal::m_terminal_state): ... this.
1333
a0aad537
JC
13342018-01-19 James Clarke <jrtc27@jrtc27.com>
1335
1336 * linux-low.c (handle_extended_wait): Surround call to
1337 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1338
4d9b86e1
SM
13392018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1340
1341 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1342 linux_ptrace_attach_fail_reason_string now returning an
1343 std::string.
1344 (linux_attach): Likewise.
1345 * thread-db.c (attach_thread): Likewise.
1346
f517c180
EA
13472018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1348
1349 PR gdb/21559
1350 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1351 checking for fs_base/gs_base fields in struct user_regs_struct.
1352 * configure: Regenerate.
1353
9a70f35c
YQ
13542018-01-16 Yao Qi <yao.qi@linaro.org>
1355
1356 PR gdb/18749
1357 * linux-low.c (fetch_register): Call supply_register instead of
1358 error.
1359
605fd3c6
YQ
13602018-01-08 Yao Qi <yao.qi@linaro.org>
1361 Simon Marchi <simon.marchi@ericsson.com>
1362
1363 * Makefile.in (OBS): Remove selftest.o.
1364 * configure.ac: Set srv_selftest_objs if $development is true.
1365 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1366 * configure: Re-generated.
1367 * server.c (captured_main): Wrap variable selftest_filter with
1368 GDB_SELF_TEST.
1369
2cc05030
SM
13702018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1371
1372 * server.c (parse_debug_format_options): Return std::string.
1373 (handle_monitor_command, captured_main): Adjust.
1374
e379cee6
PA
13752018-01-05 Pedro Alves <palves@redhat.com>
1376
1377 PR gdb/18653
1378 * server.c (captured_main): Pass quiet=false to
1379 save_original_signals_state.
1380
82e1e79a
JB
13812018-01-01 Joel Brobecker <brobecker@adacore.com>
1382
1383 * gdbreplay.c (gdbreplay_version): Update copyright year in
1384 version message.
1385 * server.c (gdbserver_version): Likewise.
1386
8e481c3b
TT
13872017-12-08 Tom Tromey <tom@tromey.com>
1388
1389 * ax.c (ax_printf): Update.
1390
a8806230
YQ
13912017-12-07 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1394 aarch64_linux_read_description.
1395 * linux-amd64-ipa.c (idx2mask): New array.
1396 (get_ipa_tdesc): Move idx2mask out.
1397 (initialize_low_tracepoint): Initialize target descriptions.
1398 * linux-i386-ipa.c (idx2mask): New array.
1399 (get_ipa_tdesc): Move idx2mask out.
1400 (initialize_low_tracepoint): Initialize target descriptions.
1401
d4a0e8b5
SM
14022017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1403
1404 * tdesc.c (struct tdesc_type): Change return type.
1405 (tdesc_add_flag): Change parameter type.
1406 (tdesc_add_bitfield): Likewise.
1407 (tdesc_add_field): Likewise.
1408 (tdesc_set_struct_size): Likewise.
1409
798a7429
SM
14102017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1411
1412 * regcache.c (registers_to_string): Remove unused variable.
1413
c0e15c9b
SM
14142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1415
1416 * inferiors.c (for_each_inferior_with_data): Remove.
1417 * inferiors.h (for_each_inferior_with_data): Remove.
1418 * server.c (handle_qxfer_threads_worker): Change parameter type.
1419 (handle_qxfer_threads_proper): Use for_each_thread.
1420
f0045347
SM
14212017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1422
1423 * inferiors.c (for_each_inferior): Remove.
1424 (clear_inferiors): Use for_each_thread.
1425 * inferiors.h (for_each_inferior): Remove.
1426 * linux-low.c (linux_wait_for_event_filtered): Use
1427 for_each_thread.
1428 (linux_stabilize_threads): Likewise.
1429 * regcache.c (regcache_release): Likewise.
1430 * server.c (gdb_wants_all_threads_stopped): Likewise.
1431 (clear_pending_status_callback): Remove.
1432 (handle_status): Use for_each_thread.
1433 (captured_main): Likewise.
1434 * win32-low.c (child_init_thread_list): Likewise.
1435 (win32_clear_inferiors): Likewise.
1436 (fake_breakpoint_event): Likewise.
1437
9521758b
SM
14382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1439
1440 * inferiors.h (find_inferior): Remove.
1441 * inferiors.c (find_inferior): Remove.
1442
8f86d7aa
SM
14432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1444
1445 * linux-low.c (resume_status_pending_p): Update comment.
1446 (need_step_over_p): Update comment.
1447
e2b44075
SM
14482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * linux-low.c (proceed_one_lwp): Return void, change parameter
1451 type.
1452 (unsuspend_and_proceed_one_lwp): Likewise.
1453 (proceed_all_lwps): Use for_each_thread.
1454 (unstop_all_lwps): Likewise.
1455
c80825ff
SM
14562017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1457
1458 * linux-low.c (linux_resume_one_thread): Return void, take
1459 parameter directly.
1460 (linux_resume): Use for_each_thread.
1461
df3e4dbe
SM
14622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * linux-low.c (send_sigstop_callback): Return void, change
1465 parameter type. Rename to...
1466 (send_sigstop): ... this.
1467 (suspend_and_send_sigstop_callback): Return void, change parameter
1468 type. Rename to...
1469 (suspend_and_send_sigstop): ... this.
1470 (stop_all_lwps): Use for_each_thread.
1471
5a6b0a41
SM
14722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * linux-low.c (lwp_running): Return bool, remove unused
1475 argument.
1476 (linux_stabilize_threads): Use find_thread.
1477
39a64da5
SM
14782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1479
1480 * linux-low.c (select_singlestep_lwp_callback): Remove.
1481 (count_events_callback): Remove.
1482 (select_event_lwp_callback): Remove.
1483 (select_event_lwp): Use find_thread/for_each_thread.
1484
a1385b7b
SM
14852017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1486
1487 * linux-low.c (not_stopped_callback): Return bool, take filter
1488 argument directly.
1489 (linux_wait_for_event_filtered): Use find_thread.
1490 (linux_wait_1): Likewise.
1491
454296a2
SM
14922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1493
1494 * linux-low.c (same_lwp): Remove.
1495 (find_lwp_pid): Use find_thread.
1496
6b2a85da
SM
14972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * linux-low.c (delete_lwp_callback): Remove.
1500 (linux_mourn): Use for_each_thread.
1501
798a38e8
SM
15022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1503
1504 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1505 args parameter, don't check for pid.
1506 (linux_detach): Use for_each_thread.
1507
e4eb0dec
SM
15082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1509
1510 * linux-low.c (struct counter): Remove.
1511 (second_thread_of_pid_p): Remove.
1512 (last_thread_of_process_p): Use find_thread.
1513
83e1b6c1
SM
15142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1515
1516 * inferiors.c (find_inferior_in_random): Remove.
1517 * inferiors.h (find_inferior_in_random): Remove.
1518 * linux-low.c (status_pending_p_callback): Return bool, accept
1519 parameter ptid directly.
1520 (linux_wait_for_event_filtered): Use find_thread_in_random.
1521 (linux_wait_1): Likewise.
1522
8dc7b443
SM
15232017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1524
1525 * inferiors.c (find_inferior_id): Remove.
1526 (find_thread_ptid): Move implemention from find_inferior_id to
1527 here.
1528 * inferiors.h (find_inferior_id): Remove.
1529 * server.c (handle_status): Use find_thread_ptid.
1530 (process_serial_event): Likewise.
1531 * thread-db.c (find_one_thread): Likewise.
1532 (thread_db_thread_handle): Likewise.
1533 * win32-low.c (thread_rec): Likewise.
1534 (child_delete_thread): Likewise.
1535 (win32_thread_alive): Likewise.
1536 (get_child_debug_event): Likewise.
1537
da25033c
SM
15382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1539
1540 * linux-mips-low.c (update_watch_registers_callback): Return
1541 void, remove pid_p parameter, don't check for pid.
1542 (mips_insert_point, mips_remove_point): Use for_each_thread.
1543
c91bb56b
SM
15442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1545
1546 * lynx.low (lynx_delete_thread_callback): Remove.
1547 (lynx_mourn): Use for_each_thread.
1548
634a3254
SM
15492017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * regcache.c (regcache_invalidate_one): Remove.
1552 (regcache_invalidate_pid): use for_each_thread.
1553
41272101
TT
15542017-11-26 Tom Tromey <tom@tromey.com>
1555
1556 * linux-low.c (linux_create_inferior): Update.
1557
f5291a6f
UW
15582017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1559
1560 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1561
6654d750
AH
15622017-11-24 Alan Hayward <alan.hayward@arm.com>
1563
1564 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1565 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1566 * linux-aarch64-tdesc-selftest.c: New file.
1567 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1568
15692017-11-24 Alan Hayward <alan.hayward@arm.com>
1570
1571 * configure.srv: Add new file.
1572 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1573 * linux-aarch64-tdesc-selftest.c: New file.
1574 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1575
49bdb7ee
AH
15762017-11-24 Alan Hayward <alan.hayward@arm.com>
1577
1578 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1579 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1580 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1581
d6d7ce56
AH
15822017-11-24 Alan Hayward <alan.hayward@arm.com>
1583
1584 * configure.srv: Add new files.
1585 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1586 aarch64_linux_read_description.
1587 * linux-aarch64-low.c (aarch64_linux_read_description):
1588 Merge with aarch64_arch_setup.
1589 (aarch64_arch_setup): Call aarch64_linux_read_description.
1590 * linux-aarch64-tdesc.c: New file.
1591 * linux-aarch64-tdesc.h: New file.
1592
506fe5f4
YQ
15932017-11-24 Yao Qi <yao.qi@linaro.org>
1594
1595 * configure.srv: Set $srv_regobj for tic6x-linux.
1596 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1597 (tic6x_read_description): Move some code to tic6x_arch_setup.
1598 (tic6x_tdesc_test): New function.
1599 (initialize_low_arch): Call selftests::register_test.
1600
29f9a567
YQ
16012017-11-22 Yao Qi <yao.qi@linaro.org>
1602
1603 * remote-utils.c (prepare_resume_reply): Use memcpy.
1604
578290ec
SM
16052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1606
1607 * linux-low.c (kill_one_lwp_callback): Return void, take
1608 argument directly, don't filter on pid.
1609 (linux_kill): Use for_each_thread.
1610
eca55aec
SM
16112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1612
1613 * linux-low.c (need_step_over_p): Return bool, remove dummy
1614 argument.
1615 (linux_resume, proceed_all_lwps): Use find_thread.
1616
25c28b4d
SM
16172017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1618
1619 * linux-low.c (resume_status_pending_p): Return bool, remove
1620 flag_p argument.
1621 (linux_resume): Use find_thread.
1622
5fdda392
SM
16232017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1624
1625 * linux-low.c (struct thread_resume_array): Remove.
1626 (linux_set_resume_request): Return void, take arguments
1627 directly.
1628 (linux_resume): Use for_each_thread.
1629
fcb056a5
SM
16302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1631
1632 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1633 return bool, remove data argument.
1634 (linux_stabilize_threads): Use find_thread.
1635
139720c5
SM
16362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1637
1638 * linux-low.c (unsuspend_one_lwp): Remove.
1639 (unsuspend_all_lwps): Use for_each_thread, inline code from
1640 unsuspend_one_lwp.
1641
6d1e5673
SM
16422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1643
1644 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1645 * linux-low.c (struct iterate_over_lwps_args): Remove.
1646 (iterate_over_lwps_filter): Remove.
1647 (iterate_over_lwps): Use find_thread.
1648
bbf550d5
SM
16492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1650
1651 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1652 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1653 code from reset_lwp_ptrace_options_callback.
1654
00192f77
SM
16552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1656
1657 * linux-arm-low.c (struct update_registers_data): Remove.
1658 (update_registers_callback): Return void, take arguments
1659 directly, don't check thread's pid.
1660 (arm_insert_point, arm_remove_point): Use for_each_thread.
1661
2bee2b6c
SM
16622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1663
1664 * win32-low.c (continue_one_thread): Return void, take argument
1665 directly.
1666 (child_continue): Use for_each_thread.
1667
0b360f19
SM
16682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1669
1670 * win32-i386-low.c (update_debug_registers_callback): Rename
1671 to ...
1672 (update_debug_registers): ... this, return void, remove pid_p arg.
1673 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1674
f27866ba
SM
16752017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1676
1677 * inferiors.h (struct process_info): Add constructor, initialize
1678 fields..
1679 <syscalls_to_catch>: Change type to std::vector<int>.
1680 * inferiors.c (add_process): Allocate process_info with new.
1681 (remove_process): Free process_info with delete.
1682 * linux-low.c (handle_extended_wait): Adjust.
1683 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1684 * server.c (handle_general_set): Adjust.
1685
e849ea89
PA
16862017-11-16 Pedro Alves <palves@redhat.com>
1687
1688 * remote-utils.c (remote_close): Block SIGIO signals instead of
1689 uninstalling the SIGIO handler.
1690
1d0aa65c
AH
16912017-11-16 Alan Hayward <alan.hayward@arm.com>
1692
1693 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1694
3491a34c
YQ
16952017-11-16 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1698 (tic6x_store_gregset): Likewise.
1699 (tic6x_usrregs_info): Move it up.
1700
a602f924
AH
17012017-11-15 Alan Hayward <alan.hayward@arm.com>
1702
1703 * Makefile.in: Update arch rules.
1704 * configure.srv: Explicitly mark arch/ files.
1705
5616b6c3
AS
17062017-11-13 Andreas Schwab <schwab@suse.de>
1707
1708 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1709 function.
1710 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1711
d1928160
PA
17122017-11-06 Pedro Alves <palves@redhat.com>
1713
1714 * config.in, configure: Regenerate.
1715
bac608e7
SM
17162017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1717
1718 * target.c (struct thread_search): Remove.
1719 (thread_search_callback): Remove.
1720 (prepare_to_access_memory): Use for_each_thread instead of
1721 find_inferior. Inline code from thread_search_callback.
1722
eaddb425
SM
17232017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1724
1725 * server.c (struct visit_actioned_threads_data): Remove.
1726 (visit_actioned_threads): Change prototype to take arguments
1727 directly.
1728 (resume): Use find_thread instead of find_inferior.
1729
99078d34
SM
17302017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1731
1732 * server.c (queue_stop_reply_callback): Change prototype, return
1733 void.
1734 (find_status_pending_thread_callback): Remove.
1735 (handle_status): Replace find_inferior with find_thread and
1736 for_each_thread.
1737
cc628f3d
AH
17382017-10-25 Alan Hayward <alan.hayward@arm.com>
1739
1740 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1741 with REGNO.
1742 (aarch64_store_gregset): Likewise.
1743 (aarch64_fill_fpregset): Likewise.
1744 (aarch64_store_fpregset): Likewise.
1745
4d3bb80e
SM
17462017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * gdbthread.h (find_thread, for_each_thread): New functions.
1749 * inferiors.c (thread_of_pid): Remove.
1750 (find_any_thread_of_pid): Use find_thread.
1751 * linux-low.c (num_lwps): Use for_each_thread.
1752
7a7cdfa0
YQ
17532017-10-17 Yao Qi <yao.qi@linaro.org>
1754
1755 * Makefile.in: Remove one rule.
1756 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1757
e675d170
YQ
17582017-10-17 Yao Qi <yao.qi@linaro.org>
1759
1760 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1761 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1762
7eb4e0f9
YQ
17632017-10-17 Yao Qi <yao.qi@linaro.org>
1764
1765 * configure.srv: Rename arm.o with arch/arm.o.
1766
60d6cfc9
YQ
17672017-10-17 Yao Qi <yao.qi@linaro.org>
1768
1769 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1770 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1771 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1772 (arch-i386.o, arch-amd64.o): Remove rules.
1773 (arch/%.o): New rule.
1774 Update POSTCOMPILE and COMPILE.pre.
1775 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1776 * configure: Re-generated.
1777 * configure.srv: Replace arch-i386.o with arch/i386.o.
1778 Replace arch-amd64.o with arch/amd64.o.
1779
5bfda255
YQ
17802017-10-16 Yao Qi <yao.qi@linaro.org>
1781
1782 * configure: Regenerated.
1783
9c80ecd6
SM
17842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1785
1786 * inferiors.h: (struct inferior_list): Remove.
1787 (struct inferior_list_entry); Remove.
1788 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1789 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1790 get_first_inferior): Remove.
1791 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1792 find_inferior_id, find_inferior_in_random): Change signature.
1793 * inferiors.c (all_threads): Change type to
1794 std::list<thread_info *>.
1795 (get_thread): Remove macro.
1796 (find_inferior, find_inferior_id): Change signature, implement
1797 using find_thread.
1798 (find_inferior_in_random): Change signature, implement using
1799 find_thread_in_random.
1800 (for_each_inferior, for_each_inferior_with_data): Change
1801 signature, implement using for_each_thread.
1802 (add_inferior_to_list, remove_inferior): Remove.
1803 (add_thread, get_first_thread, thread_of_pid,
1804 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1805 (get_first_inferior, one_inferior_p, clear_inferior_list):
1806 Remove.
1807 (clear_inferiors, get_thread_process): Update.
1808 * gdbthread.h: Include <list>.
1809 (struct thread_info) <entry>: Remove field.
1810 <id>: New field.
1811 (all_threads): Change type to std::list<thread_info *>.
1812 (get_first_inferior): Add doc.
1813 (find_thread, for_each_thread, find_thread_in_random): New
1814 functions.
1815 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1816 * linux-arm-low.c (update_registers_callback): Update.
1817 * linux-low.c (second_thread_of_pid_p): Update.
1818 (kill_one_lwp_callback, linux_detach_lwp_callback,
1819 delete_lwp_callback, status_pending_p_callback, same_lwp,
1820 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1821 iterate_over_lwps, not_stopped_callback,
1822 resume_stopped_resumed_lwps, count_events_callback,
1823 select_singlestep_lwp_callback, select_event_lwp_callback,
1824 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1825 suspend_and_send_sigstop_callback, wait_for_sigstop,
1826 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1827 lwp_running, linux_set_resume_request, resume_status_pending_p,
1828 need_step_over_p, start_step_over, linux_resume_one_thread,
1829 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1830 reset_lwp_ptrace_options_callback): Update.
1831 * linux-mips-low.c (update_watch_registers_callback): Update.
1832 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1833 Update.
1834 (free_register_cache_thread_one): Remove.
1835 (regcache_release): Update.
1836 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1837 handle_qxfer_threads_worker): Update.
1838 (handle_query): Update, use list iterator.
1839 (visit_actioned_threads, handle_pending_status,
1840 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1841 clear_pending_status_callback, set_pending_status_callback,
1842 find_status_pending_thread_callback, handle_status,
1843 process_serial_event): Update.
1844 * target.c (thread_search_callback): Update.
1845 * thread-db.c (thread_db_get_tls_address): Update.
1846 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1847 Update.
1848 * win32-i386-low.c (update_debug_registers_callback): Update.
1849 * win32-low.c (delete_thread_info, child_delete_thread,
1850 continue_one_thread, suspend_one_thread,
1851 get_child_debug_event): Adjust.
1852
9179355e
SM
18532017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1854
1855 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1856 * inferiors.h: Include <list>.
1857 (struct process_info) <entry>: Remove field.
1858 <pid>: New field.
1859 (pid_of): Change macro to function.
1860 (ptid_of, lwpid_of): Remove macro.
1861 (all_processes): Change type to std::list<process_info *>.
1862 (ALL_PROCESSES): Remove macro.
1863 (for_each_process, find_process): New function.
1864 * inferiors.c (all_processes): Change type to
1865 std::list<process_info *>.
1866 (find_thread_process): Adjust.
1867 (add_process): Likewise.
1868 (remove_process): Likewise.
1869 (find_process_pid): Likewise.
1870 (get_first_process): Likewise.
1871 (started_inferior_callback): Remove.
1872 (have_started_inferiors_p): Adjust.
1873 (attached_inferior_callback): Remove.
1874 (have_attached_inferiors_p): Adjust.
1875 * linux-low.c (check_zombie_leaders): Likewise.
1876 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1877 (x86_linux_update_xmltarget): Adjust.
1878 * server.c (handle_query): Likewise.
1879 (gdb_reattached_process): Remove.
1880 (handle_status): Adjust.
1881 (kill_inferior_callback): Likewise.
1882 (detach_or_kill_inferior): Remove.
1883 (print_started_pid): Likewise.
1884 (print_attached_pid): Likewise.
1885 (detach_or_kill_for_exit): Update.
1886 (process_serial_event): Likewise.
1887 * linux-arm-low.c (arm_new_fork): Likewise.
1888
c9cb8905
SM
18892017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1890
1891 * dll.h: Include <list>.
1892 (struct dll_info): Add constructor.
1893 <entry>: Remove field.
1894 (all_dlls): Change type to std::list<dll_info>.
1895 * dll.c: Include <algorithm>.
1896 (get_dll): Remove macro.
1897 (all_dlls): Change type to std::list<dll_info *>.
1898 (free_one_dll): Remove.
1899 (match_dll): Likewise.
1900 (loaded_dll): Adjust.
1901 (unloaded_dll): Adjust to all_dlls type change, use
1902 std::find_if. Inline code from match_dll.
1903 (clear_dlls): Adjust to all_dlls type change.
1904 * server.c (emit_dll_description): Remove.
1905 (handle_qxfer_libraries): Adjust to all_dlls type change,
1906 integrate emit_dll_description's functionality.
1907
04ec7890
SM
19082017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1909
1910 * linux-low.h (struct linux_target_ops) <delete_process>: New
1911 field.
1912 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1913 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1914 (struct linux_target_ops): Add delete_process callback.
1915 * linux-arm-low.c (arm_delete_process): New.
1916 (struct linux_target_ops): Add delete_process callback.
1917 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1918 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1919 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1920 * linux-mips-low.c (mips_linux_delete_process): New.
1921 (struct linux_target_ops): Add delete_process callback.
1922 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1923 * linux-s390-low.c (struct linux_target_ops): Likewise.
1924 * linux-sh-low.c (struct linux_target_ops): Likewise.
1925 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1926 * linux-tile-low.c (struct linux_target_ops): Likewise.
1927 * linux-x86-low.c (x86_linux_delete_process): New.
1928 (struct linux_target_ops): Add delete_process callback.
1929 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1930
466eecee
SM
19312017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1932
1933 * linux-aarch64-low.c (the_low_target): Add thread delete
1934 callback.
1935 * linux-arm-low.c (arm_delete_thread): New function.
1936 (the_low_target): Add thread delete callback.
1937 * linux-bfin-low.c (the_low_target): Likewise.
1938 * linux-crisv32-low.c (the_low_target): Likewise.
1939 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1940 set.
1941 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1942 field.
1943 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1944 * linux-mips-low.c (mips_linux_delete_thread): New function.
1945 (the_low_target): Add thread delete callback.
1946 * linux-ppc-low.c (the_low_target): Likewise.
1947 * linux-s390-low.c (the_low_target): Likewise.
1948 * linux-sh-low.c (the_low_target): Likewise.
1949 * linux-tic6x-low.c (the_low_target): Likewise.
1950 * linux-tile-low.c (the_low_target): Likewise.
1951 * linux-x86-low.c (the_low_target): Likewise.
1952 * linux-xtensa-low.c (the_low_target): Likewise.
1953
b79f7801
YZ
19542017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1955
1956 * win32-low.c: Include "common-inferior.h".
1957
bc3b087d
SDJ
19582017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1959
1960 * inferiors.c (set_inferior_cwd): New function.
1961 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1962 (handle_query): Inform that QSetWorkingDir is supported.
1963 * win32-low.c (create_process): Pass the inferior's cwd to
1964 CreateProcess.
1965
d092c5a2
SDJ
19662017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1967
1968 * inferiors.c (current_inferior_cwd): New global variable.
1969 (get_inferior_cwd): New function.
1970 * inferiors.h (struct process_info) <cwd>: New field.
1971
7da0a886
SDJ
19722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1973
1974 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1975 (OBS): Add gdb_tilde_expand.o.
1976
289a6840
SM
19772017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1978
1979 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1980 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1981
256642e8
PA
19822017-09-29 Pedro Alves <palves@redhat.com>
1983
1984 * ax.c (gdb_parse_agent_expr): Constify.
1985 * ax.h (gdb_parse_agent_expr): Constify.
1986 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1987 Constify.
1988 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1989 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1990 * remote-utils.h (read_ptid): Constify.
1991 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1992 (process_point_options, process_serial_event): Constify.
1993 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1994 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1995 (cmd_qtbuffer): Constify.
1996
5b9ca4d4
PA
19972017-09-29 Pedro Alves <palves@redhat.com>
1998
1999 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2000 fails.
2001
94c207e0
PA
20022017-09-29 Pedro Alves <palves@redhat.com>
2003
2004 * linux-low.c (handle_extended_wait): Pass parent thread instead
2005 of process to thread_db_notice_clone.
2006 * linux-low.h (thread_db_notice_clone): Replace parent process
2007 parameter with parent thread parameter.
2008 * thread-db.c (find_one_thread): Add comment.
2009 (thread_db_notice_clone): Replace parent process parameter with
2010 parent thread parameter. Temporarily switch to the parent thread.
2011
75352e28
SDJ
20122017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2013
2014 * gdbthread.h: Include "common-gdbthread.h".
2015 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2016 "if" when validating the ptid.
2017 * remote-utils.c: Include "gdbthread.h".
2018 (prepare_resume_reply): Use "switch_to_thread".
2019 * target.c (done_accessing_memory): Likewise.
2020
ad339634
AA
20212017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2022
2023 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2024 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2025 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2026 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2027 s390x-gs-linux64-ipa.o to ipa_obj.
2028 * linux-s390-low.c (HWCAP_S390_GS): New define.
2029 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2030 New functions.
2031 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2032 (s390_arch_setup): Check for guarded-storage support and choose
2033 appropriate tdesc.
2034 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2035 init_registers_s390x_gs_linux64.
2036 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2037 enum value.
2038 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2039 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2040
cc4d742f
SM
20412017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2042
2043 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2044
f6327dcb
KB
20452017-09-21 Kevin Buettner <kevinb@redhat.com>
2046
2047 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2048 (thread_db_thread_handle): Declare.
2049 * linux-low.c (linux_target_ops): Initialize thread_handle.
2050 * server.c (handle_qxfer_threads_worker): Add support for
2051 "handle" attribute.
2052 * target.h (struct target_ops): Add new function pointer,
2053 thread_handle.
2054 (target_thread_handle): Define.
2055 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2056 field in lwp.
2057 (thread_db_thread_handle): New function.
2058
86299109
KB
20592017-09-21 Kevin Buettner <kevinb@redhat.com>
2060
2061 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2062 * linux-low.h (thread_db_notice_clone): Declare.
2063 * thread-db.c (thread_db_notice_clone): New function.
2064
f557a88a
PA
20652017-09-21 Pedro Alves <palves@redhat.com>
2066
2067 * server.c (gdb_read_memory, handle_status, process_serial_event)
2068 (handle_serial_event, handle_target_event): Adjust to
2069 set_desired_thread prototype change.
2070 * target.c (set_desired_thread): Remove 'use_general' parameter
2071 and adjust.
2072 * target.h (set_desired_thread): Remove 'use_general' parameter.
2073
223ffa71
TT
20742017-09-20 Tom Tromey <tom@tromey.com>
2075
2076 * target.c (target_terminal::terminal_state): Define.
2077 (target_terminal::init): Rename from target_terminal_init.
2078 (target_terminal::inferior): Rename from
2079 target_terminal_inferior.
2080 (target_terminal::ours): Rename from target_terminal_ours.
2081 (target_terminal::ours_for_output, target_terminal::info): New.
2082
04fd3ba9
SM
20832017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2084
2085 * server.c (accumulate_file_name_length): Remove.
2086 (emit_dll_description): Adjust to std::string change.
2087 (handle_qxfer_libraries): Use std::string to hold document.
2088
5e187554
SM
20892017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2090
2091 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2092 return type of xml_escape_text.
2093 * server.c (emit_dll_description): Likewise.
2094
1526853e
SM
20952017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2096
2097 * server.c (captured_main): Accept argument for --selftest.
2098 Update run_tests call.
2099 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2100 when registering selftests.
2101
c4dfafab
SDJ
21022017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2103
2104 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2105 instead of "VEC" for "target_desc.reg_defs".
2106 (regcache_cpy): Likewise.
2107 (registers_to_string): Likewise.
2108 (registers_from_string): Likewise.
2109 (find_regno): Likewise.
2110 (supply_regblock): Likewise.
2111 (regcache_raw_read_unsigned): Likewise.
2112 * tdesc.c (init_target_desc): Likewise.
2113 (tdesc_create_reg): Likewise.
2114 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2115 (struct target_desc) <reg_defs>: Convert to "std::vector".
2116 (target_desc): Do not initialize "reg_defs".
2117 (~target_desc): Update code to use "std::vector" instead of "VEC"
2118 for "target_desc.reg_defs".
2119 (operator==): Likewise.
2120
124aceb4
SM
21212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2122
2123 * inferiors.h (thread_to_gdb_id): Remove.
2124 * inferiors.c (thread_to_gdb_id): Remove.
2125 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2126 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2127 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2128 Likewise.
2129 * nto-low.c (nto_fetch_registers, nto_store_registers,
2130 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2131
96cde54f
SM
21322017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2133
2134 * inferiors.h (gdb_id_to_thread_id): Remove.
2135 * inferiors.c (gdb_id_to_thread_id): Remove.
2136 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2137 removal. Move pid declaration closer to where it's used.
2138
e8ca139e
SM
21392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2140
2141 * server.c (handle_detach): New function.
2142 (process_serial_event): Move code out, call handle_detach.
2143
f8a4e119
SM
21442017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2145
2146 * server.c (require_running): Rename to ...
2147 (require_running_or_return): ... this ...
2148 (require_running_or_break): ... and this.
2149 (handle_query, process_serial_event): Adjust.
2150
0eb0a407
SM
21512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2152
2153 * linux-low.c (linux_set_resume_request): Remove unused
2154 variables.
2155
785922a5
SM
21562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * server.c (first_thread_of): Remove.
2159 (process_serial_event): Replace usage of first_thread_of with
2160 find_any_thread_of_pid.
2161 * tracepoint.c (same_process_p): Remove.
2162 (gdb_agent_about_to_close): Replace usage of same_process_p with
2163 find_any_thread_of_pid.
2164 * linux-x86-low.c (same_process_callback): Remove.
2165 (x86_arch_setup_process_callback): Replace usage of
2166 same_process_callback with find_any_thread_of_pid.
2167 * thread-db.c (any_thread_of): Remove.
2168 (switch_to_process): Replace usage of any_thread_of with
2169 find_any_thread_of_pid.
2170 * inferiors.c (thread_pid_matches_callback): Remove.
2171 (find_thread_process): Adjust to use find_any_thread_of_pid.
2172
a059f00c
SDJ
21732017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2174
2175 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2176 with "!VEC_empty".
a059f00c 2177
cc397f3a
SDJ
21782017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2179
2180 * linux-low.c (handle_extended_wait): Use
2181 "allocate_target_description" instead of "XNEW".
2182 * linux-x86-low.c (initialize_low_arch): Likewise.
2183
22916b07
YQ
21842017-09-05 Yao Qi <yao.qi@linaro.org>
2185
2186 * configure.srv (srv_i386_regobj): Remove.
2187 (srv_amd64_regobj): Remove.
2188 (srv_regobj): Set it to "" for x86 non-linux targets.
2189 * linux-x86-tdesc.c (i386_linux_read_description):
2190 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2191 (init_registers_i386): Remove the declaration.
2192 (tdesc_i386): Remove the declaration.
2193 (lynx_i386_arch_setup): Call i386_create_target_description.
2194 * nto-x86-low.c: Likewise.
2195 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2196 [!__x86_64__]: include arch/i386.h.
2197 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2198
38602d55
YQ
21992017-09-05 Yao Qi <yao.qi@linaro.org>
2200
2201 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2202 i386/amd64-XXX-linux from it.
2203
44b886ff
YQ
22042017-09-05 Yao Qi <yao.qi@linaro.org>
2205
2206 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2207 false.
2208 (ipa_amd64_linux_regobj): Remove.
2209 (ipa_x32_linux_regobj): Remove.
2210
b4570e4b
YQ
22112017-09-05 Yao Qi <yao.qi@linaro.org>
2212
2213 * Makefile.in (arch-amd64.o): New rule.
2214 * configure.srv: Append arch-amd64.o.
2215 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2216 (get_ipa_tdesc): Call amd64_linux_read_description.
2217 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2218 and init_registers_amd64_XXX.
2219 * linux-x86-low.c (x86_linux_read_description): Call
2220 amd64_linux_read_description.
2221 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2222 (initialize_low_arch): Don't call init_registers_x32_XXX and
2223 init_registers_amd64_XXX.
2224 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2225 and tdesc_amd64_XXX.
2226 [__x86_64__] (amd64_tdesc_test): New function.
2227 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2228 and init_registers_amd64_XXX.
2229 * linux-x86-tdesc.c: Include arch/amd64.h.
2230 (xcr0_to_tdesc_idx): New function.
2231 (i386_linux_read_description): New function.
2232 (amd64_get_ipa_tdesc_idx): New function.
2233 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2234 (amd64_get_ipa_tdesc): Declare.
2235
d1f28ea2
YQ
22362017-09-05 Yao Qi <yao.qi@linaro.org>
2237
2238 * configure.srv (srv_i386_linux_xmlfiles): Remove
2239 i386/i386-XXX-linux.xml from it.
2240
25a93583
YQ
22412017-09-05 Yao Qi <yao.qi@linaro.org>
2242
2243 * configure.srv: Set srv_i386_linux_regobj empty if $development
2244 is false.
2245 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2246 initialize_low_tdesc.
2247 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2248 with #if initialize_low_tdesc.
2249 * linux-x86-tdesc-selftest.c: New file.
2250 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2251
5f035c07
YQ
22522017-09-05 Yao Qi <yao.qi@linaro.org>
2253
2254 * Makefile.in (arch-i386.o): New rule.
2255 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2256 (x86_64-*-linux*): Likewise.
2257 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2258 include arch/i386.h.
2259 (i386_linux_read_description): Remove code and call
2260 i386_create_target_description.
2261 * tdesc.c (allocate_target_description): New function.
2262 * tdesc.h (set_tdesc_architecture): Remove declaration.
2263 (set_tdesc_osabi): Likewise.
2264
0abe8a89
YQ
22652017-09-05 Yao Qi <yao.qi@linaro.org>
2266
2267 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2268 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2269 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2270 .xmltarget.
2271 * server.c (get_features_xml): Call tdesc_get_features_xml.
2272 * tdesc.c (set_tdesc_architecture): New function.
2273 (set_tdesc_osabi): New function.
2274 (tdesc_get_features_xml): New function.
2275 (tdesc_create_feature): Add an argument.
2276 * tdesc.h (struct target_desc) <features>: New field.
2277 <arch, osabi>: New field.
2278 (~target_desc): xfree features, arch, and osabi.
2279 (target_desc::oerator==): Don't compare .xmltarget.
2280 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2281 (set_tdesc_osabi): Likewise.
2282 (tdesc_get_features_xml): Likewise.
2283
0a188386
YQ
22842017-09-05 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-x86-tdesc.c: Include selftest.h.
2287 (i386_tdesc_test): New function.
2288 (initialize_low_tdesc): Call selftests::register_test.
2289 * tdesc.h: Include regdef.h.
2290 (target_desc): Override operator == and !=.
2291
f49ff000
YQ
22922017-09-05 Yao Qi <yao.qi@linaro.org>
2293
2294 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2295 (ipa_obj): Likewise.
2296 * linux-i386-ipa.c: Include common/x86-xstate.h
2297 (get_ipa_tdesc): Call i386_linux_read_description.
2298 (initialize_low_tracepoint): Don't call init_registers_XXX
2299 functions, call initialize_low_tdesc instead.
2300 * linux-x86-low.c (x86_linux_read_description): Call
2301 i386_linux_read_description.
2302 (initialize_low_arch): Don't call init_registers_i386_XXX
2303 functions, call initialize_low_tdesc.
2304 * linux-x86-tdesc.c: New file.
2305 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2306 (i386_get_ipa_tdesc_idx): Declare.
2307 (i386_get_ipa_tdesc): Declare.
2308 (initialize_low_tdesc): Declare.
2309
2b68ef2f
YQ
23102017-09-05 Yao Qi <yao.qi@linaro.org>
2311
2312 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2313 instead of 0.
2314
f7000548
YQ
23152017-09-05 Yao Qi <yao.qi@linaro.org>
2316
2317 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2318 * regcache.c (get_thread_regcache): Use VEC_length.
2319 (init_register_cache): Likewise.
2320 (regcache_cpy): Likewise.
2321 (registers_to_string): Iterate reg_defs via VEC_iterate.
2322 (find_regno): Likewise.
2323 (find_register_by_number): Use VEC_index.
2324 (register_size): Call find_register_by_number.
2325 (register_data): Call find_register_by_number.
2326 (supply_regblock): Use VEC_length.
2327 (regcache_raw_read_unsigned): Likewise.
2328 * tdesc.c (init_target_desc): Iterate reg_defs via
2329 VEC_iterate.
2330 (default_description): Update initializer.
2331 (copy_target_description): Don't update field num_registers.
2332 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2333 <num_registers>: Remove.
2334
50a421ac
SM
23352017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * Makefile.in (.SECONDARY): Define target.
2338
23fdd69e
SM
23392017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2340
2341 * linux-low.c (linux_wait_1): Adjust.
2342 * server.c (queue_stop_reply_callback): Adjust.
2343
0a2dde4a
SDJ
23442017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2345
2346 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2347 QEnvironmentUnset and QEnvironmentReset packets.
2348 (handle_query): Inform remote that QEnvironmentHexEncoded,
2349 QEnvironmentUnset and QEnvironmentReset are supported.
2350
6afd337d
SM
23512017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2352
2353 * inferiors.h (inferior_target_data): Rename to ...
2354 (thread_target_data): ... this.
2355 (inferior_regcache_data): Rename to ...
2356 (thread_regcache_data): ... this.
2357 (set_inferior_regcache_data): Rename to ...
2358 (set_thread_regcache_data): ... this.
2359 * inferiors.c (inferior_target_data): Rename to ...
2360 (thread_target_data): ... this.
2361 (inferior_regcache_data): Rename to ...
2362 (thread_regcache_data): ... this.
2363 (set_inferior_regcache_data): Rename to ...
2364 (set_thread_regcache_data): ... this.
2365 (free_one_thread): Update.
2366 * linux-low.h (get_thread_lwp): Update.
2367 * regcache.c (get_thread_regcache): Update.
2368 (regcache_invalidate_thread): Update.
2369 (free_register_cache_thread): Update.
2370 * win32-i386-low.c (update_debug_registers_callback): Update.
2371 (win32_get_current_dr): Update.
2372 * win32-low.c (thread_rec): Update.
2373 (delete_thread_info): Update.
2374 (continue_one_thread): Update.
2375 (suspend_one_thread): Update.
2376
a160cc46
SM
23772017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2378
2379 * inferiors.c (set_inferior_target_data): Remove.
2380 * inferiors.h (set_inferior_target_data): Remove.
2381
6d580b63
YQ
23822017-08-18 Yao Qi <yao.qi@linaro.org>
2383
2384 * Makefile.in (OBS): Add selftest.o.
2385 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2386 * configure, config.in: Re-generated.
2387 * server.c: Include common/sefltest.h.
2388 (captured_main): Handle option --selftest.
2389
f5a29eb0
YQ
23902017-08-09 Yao Qi <yao.qi@linaro.org>
2391
2392 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2393 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2394 i386-avx-mpx.o and i386-mmx.o.
2395 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2396 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2397 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2398 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2399 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2400 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2401 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2402 i386/amd64-avx-mpx.xml.
2403
57757c2f
YQ
24042017-08-09 Yao Qi <yao.qi@linaro.org>
2405
2406 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2407 and x32-avx-avx512.o.
2408 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2409 i386/x32-avx-avx512.xml.
2410
229d26fc
SM
24112017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2412
2413 * tracepoint.h (enum class fast_tpoint_collect_result): New
2414 enumeration.
2415 (fast_tracepoint_collecting): Change return type to
2416 fast_tpoint_collect_result.
2417 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2418 * linux-low.h: Include tracepoint.h.
2419 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2420 fast_tpoint_collect_result.
2421 * linux-low.c (handle_tracepoints): Adjust.
2422 (linux_fast_tracepoint_collecting): Change return type to
2423 fast_tpoint_collect_result.
2424 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2425 linux_wait_1, stuck_in_jump_pad_callback,
2426 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2427 proceed_one_lwp): Adjust to type change.
2428
2e1e43e1
YQ
24292017-07-10 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2432
adc764e7
YQ
24332017-06-29 Yao Qi <yao.qi@linaro.org>
2434
2435 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2436 Remove.
2437 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2438
a206891a
SM
24392017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2442
9a6c7d9c
SDJ
24432017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2444
2445 * linux-low.c (linux_create_inferior): Adjust code to access the
2446 environment information via 'gdb_environ' class.
2447 * lynx-low.c (lynx_create_inferior): Likewise.
2448 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2449 (get_environ): Return a pointer to 'our_environ'.
2450 (captured_main): Initialize 'our_environ'.
2451 * server.h (get_environ): Adjust prototype.
2452 * spu-low.c (spu_create_inferior): Adjust code to access the
2453 environment information via 'gdb_environ' class.
2454
ae3e2ccf
SM
24552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2456
2457 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2458 usage of "register" keyword.
2459
3e019bdc
SM
24602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2461
2462 * configure: Re-generate.
2463
8465943a
SM
24642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2465
2466 * configure: Re-generate.
2467
cf0dd6f0
SM
24682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2469
2470 * Makefile.in (COMPILE.pre): Add "-x c++".
2471
9845682b
SDJ
24722017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2473
2474 * fork-child.c: Conditionally include <signal.h>.
2475
aefd8b33
SDJ
24762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2477
2478 * server.c (handle_general_set): Handle new packet
2479 "QStartupWithShell".
2480 (handle_query): Add "QStartupWithShell" to the list of supported
2481 packets.
2482 (gdbserver_usage): Add help text explaining the
2483 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2484 options.
2485 (captured_main): Recognize and act upon the presence of the new
2486 CLI options.
2487
2090129c
SDJ
24882017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2489 Pedro Alves <palves@redhat.com>
2490
2491 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2492 * configure: Regenerate.
2493 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2494 "fork-inferior.o".
2495 (i[34567]86-*-lynxos*): Likewise.
2496 (spu*-*-*): Likewise.
2497 * fork-child.c: New file.
2498 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2499 and "environ.h".
2500 (linux_ptrace_fun): New function.
2501 (linux_create_inferior): Adjust function prototype to reflect
2502 change on "target.h". Adjust function code to use
2503 "fork_inferior".
2504 (linux_request_interrupt): Delete "signal_pid".
2505 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2506 (lynx_ptrace_fun): New function.
2507 (lynx_create_inferior): Adjust function prototype to reflect
2508 change on "target.h". Adjust function code to use
2509 "fork_inferior".
2510 * nto-low.c (nto_create_inferior): Adjust function prototype and
2511 code to reflect change on "target.h". Update comments.
2512 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2513 "common-terminal.h" and "environ.h".
2514 (terminal_fd): Moved to fork-child.c.
2515 (old_foreground_pgrp): Likewise.
2516 (restore_old_foreground_pgrp): Likewise.
2517 (last_status): Make it global.
2518 (last_ptid): Likewise.
2519 (our_environ): New variable.
2520 (startup_with_shell): Likewise.
2521 (program_name): Likewise.
2522 (program_argv): Rename to...
2523 (program_args): ...this.
2524 (wrapper_argv): New variable.
2525 (start_inferior): Delete function.
2526 (get_exec_wrapper): New function.
2527 (get_exec_file): Likewise.
2528 (get_environ): Likewise.
2529 (prefork_hook): Likewise.
2530 (post_fork_inferior): Likewise.
2531 (postfork_hook): Likewise.
2532 (postfork_child_hook): Likewise.
2533 (handle_v_run): Update code to deal with arguments coming from the
2534 remote host. Update calls from "start_inferior" to
2535 "create_inferior".
2536 (captured_main): Likewise. Initialize environment variable. Call
2537 "have_job_control".
2538 * server.h (post_fork_inferior): New prototype.
2539 (get_environ): Likewise.
2540 (last_status): Declare.
2541 (last_ptid): Likewise.
2542 (signal_pid): Likewise.
2543 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2544 (spu_ptrace_fun): New function.
2545 (spu_create_inferior): Adjust function prototype to reflect change
2546 on "target.h". Adjust function code to use "fork_inferior".
2547 * target.c (target_terminal_init): New function.
2548 (target_terminal_inferior): Likewise.
2549 (target_terminal_ours): Likewise.
2550 * target.h: Include <vector>.
2551 (struct target_ops) <create_inferior>: Update prototype.
2552 (create_inferior): Update macro.
2553 * utils.c (gdb_flush_out_err): New function.
2554 * win32-low.c (win32_create_inferior): Adjust function prototype
2555 and code to reflect change on "target.h".
2556
043a4934
SDJ
25572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2558
2559 * inferiors.c (switch_to_thread): New function.
2560
15652511
SDJ
25612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2562
2563 * Makefile.in (SFILE): Add "common/job-control.c".
2564 (OBS): Add "job-control.o".
2565
21ea5acd
SDJ
25662017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2567
2568 * Makefile: Remove "@host_makefile_frag@".
2569
e13cb306
PA
25702017-05-05 Pedro Alves <palves@redhat.com>
2571
2572 * configure: Regenerate.
2573
c94fee56
SDJ
25742017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2575
2576 * configure: Regenerate.
2577
a0ff9e1a
SM
25782017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2579
2580 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2581 software_single_step change of return type to
2582 std::vector<CORE_ADDR>.
2583 * linux-low.c (install_software_single_step_breakpoints):
2584 Likewise.
2585 * linux-low.h (install_software_single_step_breakpoints):
2586 Likewise.
2587
be628ab8
SDJ
25882017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2589
2590 * remote-utils.c: Include "gdb_termios.h" instead of
2591 "terminal.h".
2592 * terminal.h: Delete file.
2593
7c5ded6a
SDJ
25942017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2595
2596 * server.c: Include <vector>.
2597 <program_argv, wrapper_argv>: Convert to std::vector.
2598 (start_inferior): Rewrite function to use C++.
2599 (handle_v_run): Likewise. Update code that calculates the argv
2600 based on the vRun packet; use C++.
2601 (captured_main): Likewise.
2602
436252de
SM
26032017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2604
2605 * server.c (handle_v_cont): Initialize thread_resume::thread
2606 with null_ptid.
2607
9bf2a700
PA
26082017-04-05 Pedro Alves <palves@redhat.com>
2609
2610 * configure: Regenerate.
2611
a121b7c1
PA
26122017-04-05 Pedro Alves <palves@redhat.com>
2613
2614 * gdbreplay.c (sync_error): Constify.
2615 * linux-x86-low.c (push_opcode): Constify.
2616
21c8a587
PA
26172017-04-05 Pedro Alves <palves@redhat.com>
2618
2619 * win32-low.c (get_child_debug_event)
2620 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2621 Report TARGET_WAITKIND_SPURIOUS instead.
2622
fb32b4f7
PA
26232017-04-05 Pedro Alves <palves@redhat.com>
2624
e79be6e5
SM
2625 * remote-utils.c (remote_prepare, remote_open): Constify.
2626 * remote-utils.h (remote_prepare, remote_open): Constify.
2627 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2628
65dd1e59
SM
26292017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * Makefile.in (clean): Clear .deps.
2632
8fa5b777
SM
26332017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2634
2635 * .gitignore: Remove generated files, replace with wildcard.
2636 * (clean): Replace removal of generated files with wildcard.
2637 (version.c): Replace with...
2638 (version-generated.c): ...this.
2639 (xml-builtin.c): Replace with...
2640 (xml-builtin-generated.c): ...this.
2641 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2642 (%.c: *regformats*): Replace with...
2643 (%-generated.c: *regformats*): ...this.
2644
a12e714b
MF
26452017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2646
2647 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2648 (xtensa_fill_gregset): Call collect_register_by_name for
2649 threadptr register.
2650 (xtensa_store_gregset): Call supply_register_by_name for
2651 threadptr register.
2652
1a09b50a
MF
26532017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2654
2655 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2656 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2657 (xtensa_store_gregset): Call supply_register for all registers in
2658 a0_regnum..a0_regnum + C0_NREGS range.
2659
1a01e7c6
SM
26602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2661
2662 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2663 (ax-ipa.o: ax.c): Remove.
2664 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2665 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2666 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2667 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2668 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2669
36bc18a8
SM
26702017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2671
2672 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2673 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2674 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2675 (errors-ipa.o: ../common/errors.c): Remove.
2676 (format-ipa.o: ../common/format.c): Remove.
2677 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2678
a8ebe3d5
SM
26792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * Makefile.in (%-ipa.o: %.c): New rule.
2682 (tracepoint-ipa.o: tracepoint.c): Remove.
2683 (utils-ipa.o: utils.c): Remove.
2684 (remote-utils-ipa.o: remote-utils.c): Remove.
2685 (regcache-ipa.o: regcache.c): Remove.
2686 (i386-linux-ipa.o: i386-linux.c): Remove.
2687 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2688 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2689 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2690 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2691 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2692 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2693 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2694 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2695 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2696 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2697 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2698 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2699 (aarch64-ipa.o: aarch64.c): Remove.
2700 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2701 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2702 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2703 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2704 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2705 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2706 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2707 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2708 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2709 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2710 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2711 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2712 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2713 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2714 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2715 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2716 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2717 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2718 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2719 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2720 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2721 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2722 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2723 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2724 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2725 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2726 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2727 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2728 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2729 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2730 (tdesc-ipa.o: tdesc.c): Remove.
2731 (x32-linux-ipa.o: x32-linux.c): Remove.
2732 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2733 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2734
50cfacb7
SM
27352017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2736
2737 * Makefile.in (%.o: ../arch/%.c): New rule.
2738 (arm.o: ../arch/arm.c): Remove.
2739 (arm-linux.o: ../arch/arm-linux.c): Remove.
2740 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2741 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2742
c5a22423
SM
27432017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2744
2745 * Makefile.in (%.o: ../nat/%.c): New rule.
2746 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2747 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2748 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2749 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2750 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2751 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2752 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2753 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2754 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2755 (linux-personality.o: ../nat/linux-personality.c): Remove.
2756 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2757 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2758 (x86-linux.o: ../nat/x86-linux.c): Remove.
2759 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2760 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2761
6bda016b
SM
27622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2763
2764 * Makefile.in (%.o: ../common/%.c): New rule.
2765 (signals.o: ../common/signals.c): Remove.
2766 (print-utils.o: ../common/print-utils.c): Remove.
2767 (rsp-low.o: ../common/rsp-low.c): Remove.
2768 (common-utils.o: ../common/common-utils.c): Remove.
2769 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2770 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2771 (vec.o: ../common/vec.c): Remove.
2772 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2773 (xml-utils.o: ../common/xml-utils.c): Remove.
2774 (ptid.o: ../common/ptid.c): Remove.
2775 (buffer.o: ../common/buffer.c): Remove.
2776 (format.o: ../common/format.c): Remove.
2777 (filestuff.o: ../common/filestuff.c): Remove.
2778 (agent.o: ../common/agent.c): Remove.
2779 (errors.o: ../common/errors.c): Remove.
2780 (environ.o: ../common/environ.c): Remove.
2781 (common-debug.o: ../common/common-debug.c): Remove.
2782 (cleanups.o: ../common/cleanups.c): Remove.
2783 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2784 (fileio.o: ../common/fileio.c): Remove.
2785 (common-regcache.o: ../common/common-regcache.c): Remove.
2786 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2787 (new-op.o: ../common/new-op.c): Remove.
2788 (btrace-common.o: ../common/btrace-common.c): Remove.
2789
21122961
SM
27902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2791
2792 * Makefile.in (%.o: ../target/%.c): New rule.
2793 (waitstatus.o: ../target/waitstatus.c): Remove.
2794
c362e621
SM
27952017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2796
2797 * Makefile.in
2798 (%.c: ../regformats/%.dat,
2799 (%.c: ../regformats/arm/%.dat,
2800 (%.c: ../regformats/i386/%.dat,
2801 (%.c: ../regformats/rs6000/%.dat): New rules.
2802 (aarch64.c): Remove.
2803 (reg-arm.c): Remove.
2804 (arm-with-iwmmxt.c): Remove.
2805 (arm-with-vfpv2.c): Remove.
2806 (arm-with-vfpv3.c): Remove.
2807 (arm-with-neon.c): Remove.
2808 (reg-bfin.c): Remove.
2809 (reg-cris.c): Remove.
2810 (reg-crisv32.c): Remove.
2811 (i386.c): Remove.
2812 (i386-linux.c): Remove.
2813 (i386-avx.c): Remove.
2814 (i386-avx-linux.c): Remove.
2815 (i386-avx-avx512.c): Remove.
2816 (i386-avx-avx512-linux.c): Remove.
2817 (i386-mpx.c): Remove.
2818 (i386-mpx-linux.c): Remove.
2819 (i386-avx-mpx-avx512-pku.c): Remove.
2820 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2821 (i386-avx-mpx.c): Remove.
2822 (i386-avx-mpx-linux.c): Remove.
2823 (i386-mmx.c): Remove.
2824 (i386-mmx-linux.c): Remove.
2825 (reg-ia64.c): Remove.
2826 (reg-m32r.c): Remove.
2827 (reg-m68k.c): Remove.
2828 (reg-cf.c): Remove.
2829 (mips-linux.c): Remove.
2830 (mips-dsp-linux.c): Remove.
2831 (mips64-linux.c): Remove.
2832 (mips64-dsp-linux.c): Remove.
2833 (nios2-linux.c): Remove.
2834 (powerpc-32.c): Remove.
2835 (powerpc-32l.c): Remove.
2836 (powerpc-altivec32l.c): Remove.
2837 (powerpc-cell32l.c): Remove.
2838 (powerpc-vsx32l.c): Remove.
2839 (powerpc-isa205-32l.c): Remove.
2840 (powerpc-isa205-altivec32l.c): Remove.
2841 (powerpc-isa205-vsx32l.c): Remove.
2842 (powerpc-e500l.c): Remove.
2843 (powerpc-64l.c): Remove.
2844 (powerpc-altivec64l.c): Remove.
2845 (powerpc-cell64l.c): Remove.
2846 (powerpc-vsx64l.c): Remove.
2847 (powerpc-isa205-64l.c): Remove.
2848 (powerpc-isa205-altivec64l.c): Remove.
2849 (powerpc-isa205-vsx64l.c): Remove.
2850 (s390-linux32.c): Remove.
2851 (s390-linux32v1.c): Remove.
2852 (s390-linux32v2.c): Remove.
2853 (s390-linux64.c): Remove.
2854 (s390-linux64v1.c): Remove.
2855 (s390-linux64v2.c): Remove.
2856 (s390-te-linux64.c): Remove.
2857 (s390-vx-linux64.c): Remove.
2858 (s390-tevx-linux64.c): Remove.
2859 (s390x-linux64.c): Remove.
2860 (s390x-linux64v1.c): Remove.
2861 (s390x-linux64v2.c): Remove.
2862 (s390x-te-linux64.c): Remove.
2863 (s390x-vx-linux64.c): Remove.
2864 (s390x-tevx-linux64.c): Remove.
2865 (tic6x-c64xp-linux.c): Remove.
2866 (tic6x-c64x-linux.c): Remove.
2867 (tic6x-c62x-linux.c): Remove.
2868 (reg-sh.c): Remove.
2869 (reg-sparc64.c): Remove.
2870 (reg-spu.c): Remove.
2871 (amd64.c): Remove.
2872 (amd64-linux.c): Remove.
2873 (amd64-avx.c): Remove.
2874 (amd64-avx-linux.c): Remove.
2875 (amd64-avx-avx512.c): Remove.
2876 (amd64-avx-avx512-linux.c): Remove.
2877 (amd64-mpx.c): Remove.
2878 (amd64-mpx-linux.c): Remove.
2879 (amd64-avx-mpx-avx512-pku.c): Remove.
2880 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2881 (amd64-avx-mpx.c): Remove.
2882 (amd64-avx-mpx-linux.c): Remove.
2883 (x32.c): Remove.
2884 (x32-linux.c): Remove.
2885 (x32-avx.c): Remove.
2886 (x32-avx-linux.c): Remove.
2887 (x32-avx-avx512.c): Remove.
2888 (x32-avx-avx512-linux.c): Remove.
2889 (reg-xtensa.c): Remove.
2890 (reg-tilegx.c): Remove.
2891 (reg-tilegx32.c): Remove.
2892
1672e0d9
SDJ
28932017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2894
2895 * Makefile.in (SFILES): Add "common/environ.c".
2896 (OBJS): Add "common/environ.h".
2897
239b6d10
WT
28982017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2899
2900 * configure.ac: Check if the fs_base and gs_base members of
2901 `struct user_regs_struct' exist.
2902 * config.in: Regenerated.
2903 * configure: Likewise.
2904
694b382c
AT
29052017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2906
2907 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2908 target_read_memory.
2909 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2910 (get_next_pcs_syscall_next_pc): Likewise.
2911
7dc53023
LM
29122016-12-23 Luis Machado <lgustavo@codesourcery.com>
2913
2914 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2915 * nto-x86-low.c: Likewise.
2916
ad02e4fe
SM
29172016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2918
2919 * Makefile.in: Include disable-implicit-rules.mk.
2920
dcb07cfa
PA
29212016-11-23 Pedro Alves <palves@redhat.com>
2922
2923 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2924 (debug_vprintf): Use std::chrono::steady_clock instead of
2925 gettimeofday. Use '.' instead of ':'.
2926 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2927 (get_timestamp): Use std::chrono::steady_clock instead of
2928 gettimeofday.
2929
8629c02c
SM
29302016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2931
2932 * Makefile.in: Fix whitespace formatting.
2933
b593ecca
SM
29342016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2935
2936 * Makefile.in (SFILES, OBS): Flatten list and order
2937 alphabetically.
2938
9986ba08
PA
29392016-11-23 Pedro Alves <palves@redhat.com>
2940
2941 * event-loop.c (handle_file_event): Use warning.
2942 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2943 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2944 Use warning.
2945
4eefa7bc
PA
29462016-11-23 Pedro Alves <palves@redhat.com>
2947
2948 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2949 output.
2950 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2951 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2952 debug_printf and debug_flush for debug output.
2953 * server.c (handle_general_set): Likewise.
2954 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2955 output.
2956
5443506e
SM
29572016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2958
2959 * Makefile.in (.c.o): Replace rule with ...
2960 (%.o: %.c): ... this one.
2961
3b165252
SM
29622016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2963
2964 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2965 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2966 make.
2967 * configure.ac: Remove checks for the make program.
2968 * configure: Re-generate.
2969
0bcda685
PA
29702016-10-28 Pedro Alves <palves@redhat.com>
2971
2972 * Makefile.in (CXX_DIALECT): Get from configure.
2973 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2974 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2975 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2976 * config.in: Regenerate.
2977 * configure: Regenerate.
2978
c3805894
YQ
29792016-10-27 Yao Qi <yao.qi@linaro.org>
2980
2981 * linux-low.c (linux_supports_range_stepping): Return true if
2982 can_software_single_step return true.
2983
89342618
YQ
29842016-10-27 Yao Qi <yao.qi@linaro.org>
2985
2986 * inferiors.c (find_inferior_in_random): New function.
2987 * inferiors.h (find_inferior_in_random): Declare.
2988 * linux-low.c (linux_wait_for_event_filtered): Call
2989 find_inferior_in_random instead of find_inferior.
2990
e3652c84
YQ
29912016-10-27 Yao Qi <yao.qi@linaro.org>
2992
2993 * linux-low.c (linux_wait_1): If single-step breakpoints are
2994 inserted, remove them.
2995
5a04c4cf
PA
29962016-10-26 Pedro Alves <palves@redhat.com>
2997
2998 * linux-low.c (handle_extended_wait): Link parent/child fork
2999 threads.
3000 (linux_wait_1): Unlink them.
3001 (linux_set_resume_request): Ignore resume requests for
3002 already-resumed and unhandled fork child threads.
3003 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3004 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3005 New functions.
3006 (handle_v_requests) <vCont>: Don't call require_running.
3007 * server.h (in_queued_stop_replies): New declaration.
3008
cb93dc7f
YQ
30092016-10-24 Yao Qi <yao.qi@linaro.org>
3010
3011 PR server/20733
3012 * linux-aarch64-low.c (append_insns): Cast the return value to
3013 'uint32_t *'.
3014
a1078bea
YQ
30152016-10-10 Yao Qi <yao.qi@linaro.org>
3016
3017 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3018
1fb77080
SDJ
30192016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3020
3021 * target.c (target_supports_multi_process): New function, moved
3022 from...
3023 * target.h (target_supports_multi_process): ... here. Remove
3024 macro.
3025
39b5a3b9
TT
30262016-10-05 Tom Tromey <tom@tromey.com>
3027
3028 PR remote/20655:
3029 * tracepoint.c (handle_tracepoint_bkpts): Check
3030 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3031
c1d0b70a
YQ
30322016-10-05 Yao Qi <yao.qi@linaro.org>
3033
3034 * configure.srv: Update the path of arm-*.xml files.
3035
0a69eedb
YQ
30362016-10-05 Terry Guo <terry.guo@arm.com>
3037 Yao Qi <yao.qi@linaro.org>
3038
3039 * Makefile.in: Adjust the path of rules.
3040 * configure.srv: Update the path of xml files.
3041 * regformats/arm-with-iwmmxt.dat: Regenerated.
3042 * regformats/arm-with-neon.dat: Likewise.
3043 * regformats/arm-with-vfpv2.dat: Likewise.
3044 * regformats/arm-with-vfpv3.dat Likewise.
3045
17e16485
YQ
30462016-09-30 Yao Qi <yao.qi@linaro.org>
3047
3048 PR gdbserver/20627
3049 * target.c (target_stop_and_wait): Don't call
3050 target_continue_no_signal, use resume_stop instead.
3051
edeeb602
YQ
30522016-09-26 Yao Qi <yao.qi@linaro.org>
3053
3054 * linux-low.c (linux_wait_1): Call debug_exit.
3055
503b1c39
PA
30562016-09-23 Pedro Alves <palves@redhat.com>
3057
3058 * Makefile.in (SFILES): Add common/new-op.c.
3059 (OBS): Add common/new-op.o.
3060 (new-op.o): New rule.
3061
74172ecf
SM
30622016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3063
3064 * .gitinore: Ignore more files.
3065
fc6cda2e
YQ
30662016-09-21 Yao Qi <yao.qi@linaro.org>
3067
3068 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3069 23.
3070
bc1e6c81
SDJ
30712016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3072
3073 * server.c (start_inferior): Call target_mourn_inferior instead of
3074 mourn_inferior; pass ptid_t argument to it.
3075 (resume): Likewise.
3076 (handle_target_event): Likewise.
3077 * target.c (target_mourn_inferior): New function.
3078 * target.h (mourn_inferior): Delete macro.
3079
0e00e962
AA
30802016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3081
3082 * linux-low.c (lwp_is_stepping): New function.
3083
1d8cb77d
CL
30842016-09-06 Carl Love <cel@us.ibm.com>
3085
3086 * server.c (start_inferior): Fixed comment, requested comment change
3087 didn't get updated correctly. Removed reference to ptrace () call as
3088 it is only true on Linux systems.
3089
7313bced
CL
30902016-09-06 Carl Love <cel@us.ibm.com>
3091
3092 * server.c (start_inferior): Do not call
3093 function target_post_create_inferior () if the
3094 inferior process has already exited.
3095
cf6de44d
PA
30962016-09-05 Pedro Alves <palves@redhat.com>
3097
3098 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3099 (COMPILE.pre, CC_LD): Use CXX directly.
3100 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3101 * acinclude.m4: Don't include build-with-cxx.m4.
3102 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3103 * configure: Regenerate.
3104
c1da6748
AT
31052016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3106
3107 PR gdb/19495
3108 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3109 call writing data to own_buf.
3110
f2b9e3df
SDJ
31112016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3112
3113 * target.c (mywait): Call target_wait instead of
3114 the_target->wait.
3115 (target_wait): New function.
3116
049a8570
SDJ
31172016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3118
3119 * server.c (start_inferior): New variable 'ptid'. Replace calls
3120 to the_target->resume by target_continue{,_no_signal}, depending
3121 on the case.
3122 * target.c (target_stop_and_wait): Call target_continue_no_signal
3123 instead of the_target->resume.
3124 (target_continue): New function.
3125
3aa5cfa0
AT
31262016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3127
3128 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3129
754653a7
AZ
31302016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3131
3132 PR server/20491
3133 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3134 ps_prochandle.
3135 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3136 * linux-arm-low.c (ps_get_thread_area): Likewise.
3137 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3138 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3139 * linux-mips-low.c (ps_get_thread_area): Likewise.
3140 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3141 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3142 * linux-x86-low.c (ps_get_thread_area): Likewise.
3143 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3144
ed036b40
PA
31452016-08-19 Pedro Alves <palves@redhat.com>
3146
3147 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3148
c8ef42ee
PA
31492016-08-19 Pedro Alves <palves@redhat.com>
3150
3151 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3152 comment. Use memcpy instead of casting through unsigned long.
3153
9c235a72
PA
31542016-08-19 Pedro Alves <palves@redhat.com>
3155
3156 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3157 allocating around 0x80000000.
3158
201506da
PA
31592016-08-19 Pedro Alves <palves@redhat.com>
3160
3161 PR gdb/20415
3162 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3163 (x32-avx512-linux-ipa.o): New rules.
3164 * configure.ac (x86_64-*-linux*): New x32 check.
3165 * configure.srv (ipa_x32_linux_regobj): New.
3166 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3167 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3168 descriptions.
3169 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3170 descriptions.
3171 * configure: Regenerate.
3172
f348d89a
PA
31732016-08-09 Pedro Alves <palves@redhat.com>
3174
3175 PR gdb/18653
3176 * Makefile.in (OBS): Add signals-state-save-restore.o.
3177 (signals-state-save-restore.o): New rule.
3178 * config.in: Regenerate.
3179 * configure: Regenerate.
3180 * linux-low.c: Include "signals-state-save-restore.h".
3181 (linux_create_inferior): Call
3182 restore_original_signals_state.
3183 * server.c: Include "dispositions-save-restore.h".
3184 (captured_main): Call save_original_signals_state.
3185
1baf5149
PA
31862016-08-05 Pedro Alves <palves@redhat.com>
3187
3188 * configure: Regenerate.
3189
fcd4a73d
YQ
31902016-08-04 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-low.c (regsets_fetch_inferior_registers): Check
3193 errno is ESRCH or not.
3194
979659d0
YQ
31952016-08-02 Yao Qi <yao.qi@linaro.org>
3196
3197 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3198 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3199 (thread_db_load_search): Update.
3200 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3201 td_ta_set_event and td_ta_event_getmsg.
3202
6598661d
PA
32032016-07-26 Pedro Alves <palves@redhat.com>
3204
3205 PR server/20414
3206 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3207 of unsigned long for 64-bit registers and use uint32_t instead of
3208 unsigned int for 32-bit registers.
3209
9cf12d57
PA
32102016-07-26 Pedro Alves <palves@redhat.com>
3211
3212 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3213 to 'ptrace'.
3214
305450ed
TT
32152016-07-21 Tom Tromey <tom@tromey.com>
3216
3217 * configure: Rebuild.
3218
2583da7c
YQ
32192016-07-21 Yao Qi <yao.qi@linaro.org>
3220
3221 * mem-break.c (find_gdb_breakpoint): Cast bp to
3222 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3223
21536b36
YQ
32242016-07-21 Yao Qi <yao.qi@linaro.org>
3225
3226 * server.c (handle_v_requests): Support s and S actions
3227 if target_supports_software_single_step return true.
3228
8901d193
YQ
32292016-07-21 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3232 is resume_step, call maybe_hw_step.
3233 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3234 and unstop them.
3235 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3236 breakpoints or not.
3237 (proceed_one_lwp): If resume request is resume_step, install
3238 reinsert breakpoints and call maybe_hw_step.
3239
0e9a339e
YQ
32402016-07-21 Yao Qi <yao.qi@linaro.org>
3241
3242 * linux-low.c (proceed_one_lwp): Declare.
3243 (linux_resume_one_thread): Remove local variable 'step'.
3244 Lift code enqueue signal. Call proceed_one_lwp instead of
3245 linux_resume_one_lwp.
3246
4281b351
YQ
32472016-07-21 Yao Qi <yao.qi@linaro.org>
3248
3249 * linux-low.c (linux_resume_one_thread): Call
3250 enqueue_pending_signal.
3251
984a2c04
YQ
32522016-07-21 Yao Qi <yao.qi@linaro.org>
3253
3254 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3255 * inferiors.c (do_restore_current_thread_cleanup): New function.
3256 (make_cleanup_restore_current_thread): Likewise.
3257 * linux-low.c (install_software_single_step_breakpoints): Call
3258 make_cleanup_restore_current_thread. Switch current_thread to
3259 thread.
3260
bec903c9
YQ
32612016-07-21 Yao Qi <yao.qi@linaro.org>
3262
3263 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3264 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3265 (clone_one_breakpoint): Likewise.
3266 (delete_reinsert_breakpoints): Change parameter to thread.
3267 Callers updated.
3268 (has_reinsert_breakpoints): Likewise.
3269 (uninsert_reinsert_breakpoints): Likewise.
3270 (reinsert_reinsert_breakpoints): Likewise.
3271 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3272 (delete_reinsert_breakpoints): Likewise.
3273 (reinsert_reinsert_breakpoints): Likewise.
3274 (uninsert_reinsert_breakpoints): Likewise.
3275 (has_reinsert_breakpoints): Likewise.
3276
63c40ec7
YQ
32772016-07-21 Yao Qi <yao.qi@linaro.org>
3278
3279 * inferiors.c (get_thread_process): Make parameter const.
3280 * inferiors.h (get_thread_process): Update declaration.
3281 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3282 Add new parameters child_thread and parent_thread. Callers
3283 updated.
3284 * mem-break.h (clone_all_breakpoints): Update declaration.
3285
9aa76cd0
YQ
32862016-07-21 Yao Qi <yao.qi@linaro.org>
3287
3288 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3289 <command_list, handler>: Remove.
3290 (struct gdb_breakpoint): New.
3291 (struct other_breakpoint): New.
3292 (struct reinsert_breakpoint): New.
3293 (is_gdb_breakpoint): New function.
3294 (any_persistent_commands): Update command_list if
3295 is_gdb_breakpoint returns true.
3296 (set_breakpoint): Create breakpoints according to their types.
3297 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3298 (set_gdb_breakpoint_1): Likewise.
3299 (set_gdb_breakpoint): Likewise.
3300 (clear_breakpoint_conditions): Change parameter type to
3301 'struct gdb_breakpoint *'.
3302 (clear_breakpoint_commands): Likewise.
3303 (clear_breakpoint_conditions_and_commands): Likewise.
3304 (add_condition_to_breakpoint): Likewise.
3305 (add_breakpoint_condition): Likewise.
3306 (add_commands_to_breakpoint): Likewise.
3307 (check_breakpoints): Check other_breakpoint.
3308 (clone_one_breakpoint): Clone breakpopint according to its type.
3309 * mem-break.h (struct gdb_breakpoint): Declare.
3310 (set_gdb_breakpoint): Update declaration.
3311 (clear_breakpoint_conditions_and_commands): Likewise.
3312 (add_breakpoint_condition): Likewise.
3313 (add_breakpoint_commands): Likewise.
3314 * server.c (process_point_options): Change parameter type to
3315 'struct gdb_breakpoint *'.
3316
811f8301
YQ
33172016-07-21 Yao Qi <yao.qi@linaro.org>
3318
3319 * mem-break.c (set_breakpoint_at): Rename it to ...
3320 (set_breakpoint_type_at): ... it.
3321 (set_breakpoint_at): Call set_breakpoint_type_at.
3322 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3323 * mem-break.h (set_breakpoint_at): Update comments.
3324
b1c51e36
CLT
33252016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3326
3327 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3328 to buf parameter.
3329 (nios2_store_gregset): Likewise.
3330
ced2dffb
PA
33312016-07-01 Pedro Alves <palves@redhat.com>
3332 Antoine Tremblay <antoine.tremblay@ericsson.com>
3333
3334 * linux-low.c: Change interface to take the target lwp_info
3335 pointer directly and return void. Handle detaching from a zombie
3336 thread.
3337 (linux_detach_lwp_callback): New function.
3338 (linux_detach): Detach from the leader thread after detaching from
3339 the clone threads.
3340
2ac09a5b
YQ
33412016-06-28 Yao Qi <yao.qi@linaro.org>
3342
3343 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3344 for variable new_offset.
3345 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3346 (aarch64_ftrace_insn_reloc_cb): Likewise.
3347 (aarch64_ftrace_insn_reloc_tb): Likewise.
3348 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3349 PRIx64 instead of PRIx32.
3350
79e7fd4f
YQ
33512016-06-28 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3354 (the_low_target): Install arm_get_syscall_trapinfo.
3355
061fc021
YQ
33562016-06-28 Yao Qi <yao.qi@linaro.org>
3357
3358 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3359 function.
3360 (the_low_target): Install aarch64_get_syscall_trapinfo.
3361
4cc32bec
YQ
33622016-06-28 Yao Qi <yao.qi@linaro.org>
3363
3364 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3365 Callers updated.
3366 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3367 Remove parameter sysno.
3368 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3369 sysret.
3370
782c1122
AA
33712016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3372
3373 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3374 (s390_emit_ne_goto): Likewise.
3375 (s390_emit_lt_goto): Likewise.
3376 (s390_emit_le_goto): Likewise.
3377 (s390_emit_gt_goto): Likewise.
3378 (s390_emit_ge_goto): Likewise.
3379 (s390x_emit_eq_goto): Likewise.
3380 (s390x_emit_ne_goto): Likewise.
3381 (s390x_emit_lt_goto): Likewise.
3382 (s390x_emit_le_goto): Likewise.
3383 (s390x_emit_gt_goto): Likewise.
3384 (s390x_emit_ge_goto): Likewise.
3385 (s390_emit_ops_impl): Mark variable static.
3386 (s390x_emit_ops): Likewise.
3387
2e7b624b
YQ
33882016-06-17 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-low.c (handle_extended_wait): Call
3391 uninsert_reinsert_breakpoints for the parent process. Remove
3392 reinsert breakpoints from the child process. Reinsert them to
3393 the parent process when vfork is done.
3394 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3395 (reinsert_reinsert_breakpoints): New function.
3396 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3397 (reinsert_reinsert_breakpoints): Declare.
3398
8a81c5d7
YQ
33992016-06-17 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-low.c (handle_extended_wait): If the parent is doing
3402 step-over, remove the reinsert breakpoints from the forked child.
3403
f50bf8e5
YQ
34042016-06-17 Yao Qi <yao.qi@linaro.org>
3405
3406 * linux-low.c (unsuspend_all_lwps): Declare.
3407 (linux_low_filter_event): If thread exited, call finish_step_over.
3408 If step-over is finished, unsuspend other threads.
3409
8376a3cb
YQ
34102016-06-17 Yao Qi <yao.qi@linaro.org>
3411
3412 * linux-low.c (linux_resume_one_lwp_throw): Assert
3413 has_reinsert_breakpoints returns false.
3414 * mem-break.c (delete_disabled_breakpoints): Assert
3415 bp type isn't reinsert_breakpoint.
3416
f79b145d
YQ
34172016-06-17 Yao Qi <yao.qi@linaro.org>
3418
3419 * linux-low.c (maybe_hw_step): New function.
3420 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3421 (finish_step_over): Switch current_thread to lwp temporarily,
3422 and assert has_reinsert_breakpoints returns true.
3423 (proceed_one_lwp): Call maybe_hw_step.
3424 * mem-break.c (has_reinsert_breakpoints): New function.
3425 * mem-break.h (has_reinsert_breakpoints): Declare.
3426
0ae534d2
JT
34272016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3428
3429 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3430
fcdad592
YQ
34312016-05-17 Yao Qi <yao.qi@linaro.org>
3432
3433 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3434 instead of find_inferior.
3435
9e784964
YQ
34362016-05-05 Yao Qi <yao.qi@linaro.org>
3437
3438 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3439 Initialize res to zero.
3440
cf2ebb6e
YQ
34412016-05-05 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3444 to uint32_t.
3445
c1aebf87
UW
34462016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3447
3448 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3449 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3450 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3451
35fd2deb 34522016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3453 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3454
3455 * tracepoint.c (write_inferior_int8): New function.
3456 (cmd_qtenable_disable): Write enable flag using
3457 write_inferior_int8.
3458
484b3c32
YQ
34592016-04-25 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3462 (need_step_over_p): Return zero if the LWP has pending signals
3463 can be delivered on software single step target.
3464
85ba7d86
YQ
34652016-04-25 Yao Qi <yao.qi@linaro.org>
3466
3467 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3468 return instead of error.
3469
3539aa13
YQ
34702016-04-22 Yao Qi <yao.qi@linaro.org>
3471
3472 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3473 to 23.
3474
5b061e98
YQ
34752016-04-22 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3478 signal when stepping over breakpoint with software single
3479 step.
3480
3451269c
PA
34812016-04-21 Pedro Alves <palves@redhat.com>
3482
3483 * linux-s390-low.c (s390_collect_ptrace_register)
3484 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3485 add casts.
3486 (s390_check_regset): Use void * instead of gdb_byte *.
3487
a2358508
PA
34882016-04-20 Pedro Alves <palves@redhat.com>
3489
3490 * configure: Renegerate.
3491
6885166d
YQ
34922016-04-20 Yao Qi <yao.qi@linaro.org>
3493
3494 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3495 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3496 number 16.
3497 (arm_store_gregset): Likewise.
3498
2b863f51
WT
34992016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3500
3501 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3502 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3503 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3504 (amd64-avx-mpx-linux.c): New rules.
3505 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3506 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3507 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3508 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3509 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3510 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3511 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3512 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3513 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3514 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3515 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3516 * linux-x86-low.c (x86_linux_read_description): Add case for
3517 X86_XSTATE_AVX_MPX_MASK.
3518 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3519 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3520 init_registers_i386_avx_mpx_linux.
3521 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3522 (initialize_low_tracepoint): Call
3523 init_registers_i386_avx_mpx_linux.
3524 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3525 (initialize_low_tracepoint): Call
3526 init_registers_amd64_avx_mpx_linux.
3527 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3528 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3529 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3530 declarations.
3531
9b30624b
PA
35322016-04-18 Pedro Alves <palves@redhat.com>
3533
3534 * configure: Regenerate.
3535
45e3745e
AT
35362016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3537
3538 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3539 (aarch64_emit_sub): Likewise.
3540
2afc13ff
PA
35412016-04-12 Pedro Alves <palves@redhat.com>
3542
3543 * utils.c (prepare_to_throw_exception): Delete.
3544
6e774b13
SM
35452016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3546
3547 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3548
4dca19f8
MK
35492016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3550
3551 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3552
d0a9981f
MK
35532016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3554
3555 * linux-aarch64-ipa.c: Add <elf.h> include.
3556 * linux-ppc-ipa.c: Add <elf.h> include.
3557 * linux-s390-ipa.c: Add <elf.h> include.
3558
252db07e
MK
35592016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3560
3561 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3562 (get_raw_reg_ptr): Likewise.
3563 (get_trace_state_variable_value_ptr): Likewise.
3564 (set_trace_state_variable_value_ptr): Likewise.
3565 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3566 char *.
3567
14e2b6d9
MK
35682016-03-31 Wei-cheng Wang <cole945@gmail.com>
3569 Marcin Kościelnicki <koriakin@0x04.net>
3570
3571 PR/17221
3572 * linux-ppc-low.c (emit_insns): New function.
3573 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3574 (ppc_emit_prologue): New function.
3575 (ppc_emit_epilogue): New function.
3576 (ppc_emit_add): New function.
3577 (ppc_emit_sub): New function.
3578 (ppc_emit_mul): New function.
3579 (ppc_emit_lsh): New function.
3580 (ppc_emit_rsh_signed): New function.
3581 (ppc_emit_rsh_unsigned): New function.
3582 (ppc_emit_ext): New function.
3583 (ppc_emit_zero_ext): New function.
3584 (ppc_emit_log_not): New function.
3585 (ppc_emit_bit_and): New function.
3586 (ppc_emit_bit_or): New function.
3587 (ppc_emit_bit_xor): New function.
3588 (ppc_emit_bit_not): New function.
3589 (ppc_emit_equal): New function.
3590 (ppc_emit_less_signed): New function.
3591 (ppc_emit_less_unsigned): New function.
3592 (ppc_emit_ref): New function.
3593 (ppc_emit_const): New function.
3594 (ppc_emit_reg): New function.
3595 (ppc_emit_pop): New function.
3596 (ppc_emit_stack_flush): New function.
3597 (ppc_emit_swap): New function.
3598 (ppc_emit_stack_adjust): New function.
3599 (ppc_emit_call): New function.
3600 (ppc_emit_int_call_1): New function.
3601 (ppc_emit_void_call_2): New function.
3602 (ppc_emit_if_goto): New function.
3603 (ppc_emit_goto): New function.
3604 (ppc_emit_eq_goto): New function.
3605 (ppc_emit_ne_goto): New function.
3606 (ppc_emit_lt_goto): New function.
3607 (ppc_emit_le_goto): New function.
3608 (ppc_emit_gt_goto): New function.
3609 (ppc_emit_ge_goto): New function.
3610 (ppc_write_goto_address): New function.
3611 (ppc_emit_ops_impl): New static variable.
3612 (ppc64v1_emit_prologue): New function.
3613 (ppc64v2_emit_prologue): New function.
3614 (ppc64_emit_epilogue): New function.
3615 (ppc64_emit_add): New function.
3616 (ppc64_emit_sub): New function.
3617 (ppc64_emit_mul): New function.
3618 (ppc64_emit_lsh): New function.
3619 (ppc64_emit_rsh_signed): New function.
3620 (ppc64_emit_rsh_unsigned): New function.
3621 (ppc64_emit_ext): New function.
3622 (ppc64_emit_zero_ext): New function.
3623 (ppc64_emit_log_not): New function.
3624 (ppc64_emit_bit_and): New function.
3625 (ppc64_emit_bit_or): New function.
3626 (ppc64_emit_bit_xor): New function.
3627 (ppc64_emit_bit_not): New function.
3628 (ppc64_emit_equal): New function.
3629 (ppc64_emit_less_signed): New function.
3630 (ppc64_emit_less_unsigned): New function.
3631 (ppc64_emit_ref): New function.
3632 (ppc64_emit_const): New function.
3633 (ppc64v1_emit_reg): New function.
3634 (ppc64v2_emit_reg): New function.
3635 (ppc64_emit_pop): New function.
3636 (ppc64_emit_stack_flush): New function.
3637 (ppc64_emit_swap): New function.
3638 (ppc64v1_emit_call): New function.
3639 (ppc64v2_emit_call): New function.
3640 (ppc64v1_emit_int_call_1): New function.
3641 (ppc64v2_emit_int_call_1): New function.
3642 (ppc64v1_emit_void_call_2): New function.
3643 (ppc64v2_emit_void_call_2): New function.
3644 (ppc64_emit_if_goto): New function.
3645 (ppc64_emit_eq_goto): New function.
3646 (ppc64_emit_ne_goto): New function.
3647 (ppc64_emit_lt_goto): New function.
3648 (ppc64_emit_le_goto): New function.
3649 (ppc64_emit_gt_goto): New function.
3650 (ppc64_emit_ge_goto): New function.
3651 (ppc64v1_emit_ops_impl): New static variable.
3652 (ppc64v2_emit_ops_impl): New static variable.
3653 (ppc_emit_ops): New function.
3654 (linux_low_target): Wire in ppc_emit_ops.
3655
a2174ba4
MK
36562016-03-31 Wei-cheng Wang <cole945@gmail.com>
3657 Marcin Kościelnicki <koriakin@0x04.net>
3658
3659 PR/17221
3660 * Makefile.in: Add powerpc-*-ipa.o
3661 * configure.srv: Add ipa_obj for powerpc*-linux.
3662 * linux-ppc-ipa.c: New file.
3663 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3664 includes.
3665 (PPC_FIELD): New macro.
3666 (PPC_SEXT): New macro.
3667 (PPC_OP6): New macro.
3668 (PPC_BO): New macro.
3669 (PPC_LI): New macro.
3670 (PPC_BD): New macro.
3671 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3672 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3673 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3674 (ppc_get_thread_area): New function.
3675 (is_elfv2_inferior): New function.
3676 (gen_ds_form): New function.
3677 (GEN_STD): New macro.
3678 (GEN_STDU): New macro.
3679 (GEN_LD): New macro.
3680 (GEN_LDU): New macro.
3681 (gen_d_form): New function.
3682 (GEN_ADDI): New macro.
3683 (GEN_ADDIS): New macro.
3684 (GEN_LI): New macro.
3685 (GEN_LIS): New macro.
3686 (GEN_ORI): New macro.
3687 (GEN_ORIS): New macro.
3688 (GEN_LWZ): New macro.
3689 (GEN_STW): New macro.
3690 (GEN_STWU): New macro.
3691 (gen_xfx_form): New function.
3692 (GEN_MFSPR): New macro.
3693 (GEN_MTSPR): New macro.
3694 (GEN_MFCR): New macro.
3695 (GEN_MTCR): New macro.
3696 (GEN_SYNC): New macro.
3697 (GEN_LWSYNC): New macro.
3698 (gen_x_form): New function.
3699 (GEN_OR): New macro.
3700 (GEN_MR): New macro.
3701 (GEN_LWARX): New macro.
3702 (GEN_STWCX): New macro.
3703 (GEN_CMPW): New macro.
3704 (gen_md_form): New function.
3705 (GEN_RLDICL): New macro.
3706 (GEN_RLDICR): New macro.
3707 (gen_i_form): New function.
3708 (GEN_B): New macro.
3709 (GEN_BL): New macro.
3710 (gen_b_form): New function.
3711 (GEN_BNE): New macro.
3712 (GEN_LOAD): New macro.
3713 (GEN_STORE): New macro.
3714 (gen_limm): New function.
3715 (gen_atomic_xchg): New function.
3716 (gen_call): New function.
3717 (ppc_relocate_instruction): New function.
3718 (ppc_install_fast_tracepoint_jump_pad): New function.
3719 (ppc_get_min_fast_tracepoint_insn_len): New function.
3720 (ppc_get_ipa_tdesc_idx): New function.
3721 (the_low_target): Wire in the new functions.
3722 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3723 tdescs.
3724 * linux-ppc-tdesc.h: New file.
3725
a13c4696
MK
37262016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3727
3728 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3729 (alloc_jump_pad_buffer): New function.
3730 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3731 (alloc_jump_pad_buffer): New function.
3732 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3733 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3734 (alloc_jump_pad_buffer): New function.
3735 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3736 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3737 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3738 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3739
1cda1512
MK
37402016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3741
3742 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3743 * linux-amd64-ipa.c: Likewise.
3744 * linux-i386-ipa.c: Likewise.
3745 * linux-s390-ipa.c: Likewise.
3746 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3747 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3748 set_trace_state_variable_value_ptr.
3749 (struct ipa_sym_addresses): Likewise.
3750 (symbol_list): Likewise.
3751 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3752 accessing gdb_collect directly.
3753 (gdb_collect_ptr_type): New typedef.
3754 (get_raw_reg_ptr_type): New typedef.
3755 (get_trace_state_variable_value_ptr_type): New typedef.
3756 (set_trace_state_variable_value_ptr_type): New typedef.
3757 (gdb_collect_ptr): New global.
3758 (get_raw_reg_ptr): New global.
3759 (get_trace_state_variable_value_ptr): New global.
3760 (set_trace_state_variable_value_ptr): New global.
3761 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3762 accessing get_raw_reg directly.
3763 (get_get_tsv_func_addr): Likewise for
3764 get_trace_state_variable_value_ptr.
3765 (get_set_tsv_func_addr): Likewise for
3766 set_trace_state_variable_value_ptr.
3767 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3768
72fb5488
SM
37692016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3770
3771 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3772
28170b88
MK
37732016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3774
3775 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3776 packets.
3777 (relocate_instruction): Remove own_buf.
3778 * server.c (own_buf): Make global.
3779 (handle_v_requests): Make global.
3780 * server.h (own_buf): New declaration.
3781 (handle_v_requests): New prototype.
3782
f39e8743
MK
37832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3784
3785 PR 18377
3786 * linux-s390-low.c (add_insns): New function.
3787 (s390_emit_prologue): New function.
3788 (s390_emit_epilogue): New function.
3789 (s390_emit_add): New function.
3790 (s390_emit_sub): New function.
3791 (s390_emit_mul): New function.
3792 (s390_emit_lsh): New function.
3793 (s390_emit_rsh_signed): New function.
3794 (s390_emit_rsh_unsigned): New function.
3795 (s390_emit_ext): New function.
3796 (s390_emit_log_not): New function.
3797 (s390_emit_bit_and): New function.
3798 (s390_emit_bit_or): New function.
3799 (s390_emit_bit_xor): New function.
3800 (s390_emit_bit_not): New function.
3801 (s390_emit_equal): New function.
3802 (s390_emit_less_signed): New function.
3803 (s390_emit_less_unsigned): New function.
3804 (s390_emit_ref): New function.
3805 (s390_emit_if_goto): New function.
3806 (s390_emit_goto): New function.
3807 (s390_write_goto_address): New function.
3808 (s390_emit_litpool): New function.
3809 (s390_emit_const): New function.
3810 (s390_emit_call): New function.
3811 (s390_emit_reg): New function.
3812 (s390_emit_pop): New function.
3813 (s390_emit_stack_flush): New function.
3814 (s390_emit_zero_ext): New function.
3815 (s390_emit_swap): New function.
3816 (s390_emit_stack_adjust): New function.
3817 (s390_emit_set_r2): New function.
3818 (s390_emit_int_call_1): New function.
3819 (s390_emit_void_call_2): New function.
3820 (s390_emit_eq_goto): New function.
3821 (s390_emit_ne_goto): New function.
3822 (s390_emit_lt_goto): New function.
3823 (s390_emit_le_goto): New function.
3824 (s390_emit_gt_goto): New function.
3825 (s390_emit_ge_goto): New function.
3826 (s390x_emit_prologue): New function.
3827 (s390x_emit_epilogue): New function.
3828 (s390x_emit_add): New function.
3829 (s390x_emit_sub): New function.
3830 (s390x_emit_mul): New function.
3831 (s390x_emit_lsh): New function.
3832 (s390x_emit_rsh_signed): New function.
3833 (s390x_emit_rsh_unsigned): New function.
3834 (s390x_emit_ext): New function.
3835 (s390x_emit_log_not): New function.
3836 (s390x_emit_bit_and): New function.
3837 (s390x_emit_bit_or): New function.
3838 (s390x_emit_bit_xor): New function.
3839 (s390x_emit_bit_not): New function.
3840 (s390x_emit_equal): New function.
3841 (s390x_emit_less_signed): New function.
3842 (s390x_emit_less_unsigned): New function.
3843 (s390x_emit_ref): New function.
3844 (s390x_emit_if_goto): New function.
3845 (s390x_emit_const): New function.
3846 (s390x_emit_call): New function.
3847 (s390x_emit_reg): New function.
3848 (s390x_emit_pop): New function.
3849 (s390x_emit_stack_flush): New function.
3850 (s390x_emit_zero_ext): New function.
3851 (s390x_emit_swap): New function.
3852 (s390x_emit_stack_adjust): New function.
3853 (s390x_emit_int_call_1): New function.
3854 (s390x_emit_void_call_2): New function.
3855 (s390x_emit_eq_goto): New function.
3856 (s390x_emit_ne_goto): New function.
3857 (s390x_emit_lt_goto): New function.
3858 (s390x_emit_le_goto): New function.
3859 (s390x_emit_gt_goto): New function.
3860 (s390x_emit_ge_goto): New function.
3861 (s390_emit_ops): New function.
3862 (struct linux_target_ops): Fill in emit_ops hook.
3863
abd9baf9
MK
38642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3865
3866 PR 18377
3867 * Makefile.in: Add s390 IPA files.
3868 * configure.srv: Build IPA for s390.
3869 * linux-s390-ipa.c: New file.
3870 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3871 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3872 (tdesc_s390_linux32): Likewise.
3873 (init_registers_s390_linux32v1): Likewise.
3874 (tdesc_s390_linux32v1): Likewise.
3875 (init_registers_s390_linux32v2): Likewise.
3876 (tdesc_s390_linux32v2): Likewise.
3877 (init_registers_s390_linux64): Likewise.
3878 (tdesc_s390_linux64): Likewise.
3879 (init_registers_s390_linux64v1): Likewise.
3880 (tdesc_s390_linux64v1): Likewise.
3881 (init_registers_s390_linux64v2): Likewise.
3882 (tdesc_s390_linux64v2): Likewise.
3883 (init_registers_s390_te_linux64): Likewise.
3884 (tdesc_s390_te_linux64): Likewise.
3885 (init_registers_s390_vx_linux64): Likewise.
3886 (tdesc_s390_vx_linux64): Likewise.
3887 (init_registers_s390_tevx_linux64): Likewise.
3888 (tdesc_s390_tevx_linux64): Likewise.
3889 (init_registers_s390x_linux64): Likewise.
3890 (tdesc_s390x_linux64): Likewise.
3891 (init_registers_s390x_linux64v1): Likewise.
3892 (tdesc_s390x_linux64v1): Likewise.
3893 (init_registers_s390x_linux64v2): Likewise.
3894 (tdesc_s390x_linux64v2): Likewise.
3895 (init_registers_s390x_te_linux64): Likewise.
3896 (tdesc_s390x_te_linux64): Likewise.
3897 (init_registers_s390x_vx_linux64): Likewise.
3898 (tdesc_s390x_vx_linux64): Likewise.
3899 (init_registers_s390x_tevx_linux64): Likewise.
3900 (tdesc_s390x_tevx_linux64): Likewise.
3901 (have_hwcap_s390_vx): New static variable.
3902 (s390_arch_setup): Fill have_hwcap_s390_vx.
3903 (s390_get_thread_area): New function.
3904 (s390_ft_entry_gpr_esa): New const.
3905 (s390_ft_entry_gpr_zarch): New const.
3906 (s390_ft_entry_misc): New const.
3907 (s390_ft_entry_fr): New const.
3908 (s390_ft_entry_vr): New const.
3909 (s390_ft_main_31): New const.
3910 (s390_ft_main_64): New const.
3911 (s390_ft_exit_fr): New const.
3912 (s390_ft_exit_vr): New const.
3913 (s390_ft_exit_misc): New const.
3914 (s390_ft_exit_gpr_esa): New const.
3915 (s390_ft_exit_gpr_zarch): New const.
3916 (append_insns): New function.
3917 (s390_relocate_instruction): New function.
3918 (s390_install_fast_tracepoint_jump_pad): New function.
3919 (s390_get_min_fast_tracepoint_insn_len): New function.
3920 (s390_get_ipa_tdesc_idx): New function.
3921 (struct linux_target_ops): Wire in the above functions.
3922 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3923 * linux-s390-tdesc.h: New file.
3924
a4105d04
MK
39252016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3926
3927 * linux-s390-low.c (s390_supports_tracepoints): New function.
3928 (struct linux_target_ops): Fill supports_tracepoints hook.
3929
35ac8b3e
YQ
39302016-03-18 Yao Qi <yao.qi@linaro.org>
3931
3932 * linux-low.c (lwp_signal_can_be_delivered): New function.
3933 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3934
94610ec4
YQ
39352016-03-18 Yao Qi <yao.qi@linaro.org>
3936
3937 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3938 0 if signal is enqueued. Remove 'signal' from one debugging
3939 message. Move one debugging message to some lines below.
3940 Remove code setting 'signal' to 0.
3941
80aea927
YQ
39422016-03-18 Yao Qi <yao.qi@linaro.org>
3943
3944 * linux-low.c (linux_low_filter_event): Remove redundant
3945 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3946
b04fd3be
MK
39472016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3948
3949 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3950 (struct linux_target_ops): Wire in the above.
3951
c40c8d4b
YQ
39522016-03-03 Yao Qi <yao.qi@linaro.org>
3953
3954 * linux-low.c: Update comments to start_step_over.
3955
0f8288ae
YQ
39562016-03-03 Yao Qi <yao.qi@linaro.org>
3957
3958 PR server/19736
3959 * linux-low.c (handle_extended_wait): Set child suspended
3960 if event_lwp->bp_reinsert isn't zero.
3961
fdbd04a8
YQ
39622016-03-02 Yao Qi <yao.qi@linaro.org>
3963
3964 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3965 enqueue_pending_signal.
3966
6896a8fa
MK
39672016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3968
3969 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3970 is actually loaded.
3971
ab503087
MK
39722016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3973
3974 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3975 (s390_regmap_3264) [!__s390x__]: New global.
3976 (s390_collect_ptrace_register): Skip map entries containing -1.
3977 (s390_supply_ptrace_register): Ditto.
3978 (s390_fill_gprs_high): New function.
3979 (s390_store_gprs_high): New function.
3980 (s390_regsets): Add NT_S390_HIGH_GPRS.
3981 (s390_get_hwcap): Enable on 31-bit.
3982 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3983 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3984 Detect NT_S390_HIGH_GPRS.
3985 (s390_usrregs_info_3264): Enable on 31-bit.
3986 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3987 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3988
ae91f625
MK
39892016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3990
3991 PR gdb/13808
3992 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3993 * configure.srv: Ditto.
3994 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3995 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3996 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3997 (init_registers_amd64_linux): Remove prototype.
3998 (tdesc_amd64_linux): Remove declaration.
3999 (get_ipa_tdesc): New function.
4000 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4001 initialize remaining tdescs.
4002 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4003 (init_registers_i386_linux): Remove prototype.
4004 (tdesc_i386_linux): Remove declaration.
4005 (get_ipa_tdesc): New function.
4006 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4007 initialize remaining tdescs.
4008 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4009 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4010 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4011 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4012 (x86_get_ipa_tdesc_idx): New function.
4013 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4014 * linux-x86-tdesc.h: New file.
4015 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4016 (target_get_ipa_tdesc_idx): New macro.
4017 * tracepoint.c (ipa_tdesc_idx): New macro.
4018 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4019 (symbol_list): Add ipa_tdesc_idx.
4020 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4021 (ipa_tdesc): Remove.
4022 (ipa_tdesc_idx): New variable.
4023 (get_context_regcache): Use get_ipa_tdesc.
4024 (gdb_collect): Ditto.
4025 (gdb_probe): Ditto.
4026 * tracepoint.h (get_ipa_tdesc): New prototype.
4027 (ipa_tdesc): Remove.
4028
e7ad2f14
PA
40292016-02-24 Pedro Alves <palves@redhat.com>
4030
4031 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4032 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4033 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4034 Factor out common code between the USE_SIGTRAP_SIGINFO and
4035 !USE_SIGTRAP_SIGINFO blocks.
4036 (linux_low_filter_event): Call save_stop_reason instead of
4037 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4038 Update comments.
4039 (linux_wait_1): Update comments.
4040
657f9cde
WW
40412016-02-24 Wei-cheng Wang <cole945@gmail.com>
4042
4043 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4044 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4045 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4046 ppc_insert_point, ppc_remove_point.
4047
b00b61e1
MK
40482016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4049
4050 * linux-s390-low.c (s390_supports_z_point_type): New function.
4051 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4052
553cb527
YQ
40532016-02-16 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4056 PC. Get pc from regcache_read_pc.
4057
a5652c21
YQ
40582016-02-12 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4061 or linux_get_pc_32bit.
4062 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4063
ed443b61
YQ
40642016-02-12 Yao Qi <yao.qi@linaro.org>
4065
4066 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4067 arm_linux_get_next_pcs_fixup.
4068
020ecd38
MK
40692016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4070
4071 * tracepoint.c (x_tracepoint_action_download): Change
4072 write_inferior_data_ptr to write_inferior_data_pointer.
4073 (cmd_qtstart): Likewise.
4074 (write_inferior_data_ptr): Remove.
4075 (download_agent_expr): Change write_inferior_data_ptr to
4076 write_inferior_data_pointer.
4077 (download_tracepoint_1): Likewise.
4078 (download_tracepoint): Likewise.
4079 (download_trace_state_variables): Likewise.
4080
7cae9051
WW
40812016-02-11 Wei-cheng Wang <cole945@gmail.com>
4082 Marcin Kościelnicki <koriakin@0x04.net>
4083
4084 * tracepoint.c (struct tracepoint_action_ops): Remove.
4085 (struct tracepoint_action): Remove ops.
4086 (m_tracepoint_action_download, r_tracepoint_action_download)
4087 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4088 size and offset accordingly.
4089 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4090 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4091 (tracepoint_action_send, tracepoint_action_download): New functions.
4092 Helpers for trace action handlers.
4093 (add_tracepoint_action): Remove setup actions ops.
4094 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4095
9f6a71b4
YQ
40962016-02-10 Yao Qi <yao.qi@linaro.org>
4097
4098 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4099
1e94266c
SM
41002016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4101
4102 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4103 to AC_OUTPUT.
4104 * configure: Regenerate.
4105
8adce034
SM
41062016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4107
4108 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4109 void * to gdb_byte *.
4110 * linux-low.c (siginfo_fixup): Likewise.
4111 (linux_xfer_siginfo): Likewise.
4112 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4113 Likewise.
4114 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4115
93813b37
WT
41162016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4117
4118 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4119 to srv_tgtobj.
4120 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4121 to srv_tgtobj.
4122 * linux-x86-low.c [__x86_64__]: Include
4123 "nat/amd64-linux-siginfo.h".
4124 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4125 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4126 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4127 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4128 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4129 (cpt_si_fd, si_timerid, si_overrun): Move from
4130 nat/amd64-linux-siginfo.c.
4131 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4132
8424cc97
SM
41332016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * server.c (skip_to_semicolon): Remove.
4136 (process_point_options): Use strchrnul instead of
4137 skip_to_semicolon.
4138
4d18591b
YQ
41392016-01-26 Yao Qi <yao.qi@linaro.org>
4140
4141 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4142 * linux-low.c (install_software_single_step_breakpoints): Don't
4143 call regcache_read_pc.
4144 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4145 argument pc.
4146
d8020970
YQ
41472016-01-26 Yao Qi <yao.qi@linaro.org>
4148
4149 * linux-low.c (install_software_single_step_breakpoints): Call
4150 regcache_read_pc instead of get_pc.
4151
8b207339
YQ
41522016-01-26 Yao Qi <yao.qi@linaro.org>
4153
4154 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4155 (unblock_async_io): Rename to ...
4156 (block_unblock_async_io): ... it. New function.
4157 (enable_async_io): Don't install SIGIO handler. Unblock it
4158 instead.
4159 (disable_async_io): Don't ignore SIGIO. Block it instead.
4160 (initialize_async_io): Install SIGIO handler. Don't call
4161 unblock_async_io.
4162
18879fef
YQ
41632016-01-26 Yao Qi <yao.qi@linaro.org>
4164
4165 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4166 first character is '\003', call *the_target->request_interrupt.
4167
a0f8e08a
YQ
41682016-01-25 Yao Qi <yao.qi@linaro.org>
4169
4170 * remote-utils.c (new_thread_notify): Remove.
4171 (dead_thread_notify): Likewise.
4172 * remote-utils.h (new_thread_notify): Remove declaration.
4173 (dead_thread_notify): Likewise.
4174
cc5fd9ab
MK
41752016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4176
4177 * gdb.trace/pending.exp: Fix expected message on continue.
4178
99e8eb11
MK
41792016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4180
4181 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4182 it works properly on big-endian machines where sizeof (CORE_ADDR)
4183 != sizeof (void *).
4184
a994041d
PA
41852016-01-21 Pedro Alves <palves@redhat.com>
4186
4187 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4188 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4189 * configure: Regenerate.
4190
f7a6a40d
YQ
41912016-01-21 Yao Qi <yao.qi@linaro.org>
4192
4193 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4194 is_thumb and set it according to CPSR saved on the stack.
4195 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4196 arm_sigreturn_next_pc.
4197
6f69e520
YQ
41982016-01-18 Yao Qi <yao.qi@linaro.org>
4199
4200 * linux-low.c (linux_set_pc_64bit): New function.
4201 (linux_get_pc_64bit): New function.
4202 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4203 Declare.
4204 * linux-sparc-low.c (debug_threads): Remove declaration.
4205 (sparc_get_pc): Remove.
4206 (the_low_target): Use linux_get_pc_64bit instead of
4207 sparc_get_pc.
4208 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4209 (the_low_target): Use linux_get_pc_64bit and
4210 linux_set_pc_64bit.
4211
276d4552
YQ
42122016-01-18 Yao Qi <yao.qi@linaro.org>
4213
4214 * linux-arm-low.c (debug_threads): Remove declaration.
4215 (arm_get_pc, arm_set_pc): Remove.
4216 (the_low_target): Use linux_get_pc_32bit and
4217 linux_set_pc_32bit.
4218 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4219 (the_low_target): Use linux_get_pc_32bit and
4220 linux_set_pc_32bit.
4221 * linux-cris-low.c (debug_threads): Remove declaration.
4222 (cris_get_pc, cris_set_pc,): Remove.
4223 (the_low_target): Use linux_get_pc_32bit and
4224 linux_set_pc_32bit.
4225 * linux-crisv32-low.c (debug_threads): Remove declaration.
4226 (cris_get_pc, cris_set_pc): Remove.
4227 (the_low_target): Use linux_get_pc_32bit and
4228 linux_set_pc_32bit.
4229 * linux-low.c: Include inttypes.h.
4230 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4231 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4232 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4233 (the_low_target): Use linux_get_pc_32bit and
4234 linux_set_pc_32bit.
4235 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4236 (the_low_target): Use linux_get_pc_32bit and
4237 linux_set_pc_32bit.
4238 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4239 (the_low_target): Use linux_get_pc_32bit and
4240 linux_set_pc_32bit.
4241 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4242 (the_low_target): Use linux_get_pc_32bit and
4243 linux_set_pc_32bit.
4244 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4245 (the_low_target): Use linux_get_pc_32bit and
4246 linux_set_pc_32bit.
4247
eb0edac8
GB
42482016-01-18 Gary Benson <gbenson@redhat.com>
4249
4250 * configure.ac (AC_FUNC_FORK): New check.
4251 * config.in: Regenerate.
4252 * configure: Likewise.
4253
1b451dda
YQ
42542016-01-14 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4257 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4258 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4259 arm_get_next_pcs_ctor.
4260
82075af2
JS
42612016-01-12 Josh Stone <jistone@redhat.com>
4262 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4263
4264 * inferiors.h: Include "gdb_vecs.h".
4265 (struct process_info): Add syscalls_to_catch.
4266 * inferiors.c (remove_process): Free syscalls_to_catch.
4267 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4268 syscall_return stops.
4269 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4270 * server.c (handle_general_set): Handle QCatchSyscalls.
4271 (handle_query): Report support for QCatchSyscalls.
4272 * target.h (struct target_ops): Add supports_catch_syscall.
4273 (target_supports_catch_syscall): New macro.
4274 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4275 (struct lwp_info): Add syscall_state.
4276 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4277 Maintain syscall_state and syscalls_to_catch across exec.
4278 (get_syscall_trapinfo): New function, proxy to the_low_target.
4279 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4280 (linux_low_filter_event): Toggle syscall_state entry/return for
4281 syscall traps, and set it ignored for all others.
4282 (gdb_catching_syscalls_p): New function.
4283 (gdb_catch_this_syscall_p): New function.
4284 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4285 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4286 (linux_supports_catch_syscall): New function.
4287 (linux_target_ops): Install it.
4288 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4289 (the_low_target): Install it.
4290
8f13a3ce
MF
42912016-01-12 Mike Frysinger <vapier@gentoo.org>
4292
4293 * acinclude.m4: Include new ../warning.m4 file.
4294 * configure: Regenerated.
4295 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4296
5b3da067
MF
42972016-01-12 Mike Frysinger <vapier@gentoo.org>
4298
4299 * ax.c (is_goto_target): Mark static.
4300 * linux-low.c (register_addr): Likewise.
4301 (linux_fetch_registers, linux_store_registers): Likewise.
4302 * mem-break.c (any_persistent_commands): Fix old prototype.
4303 (add_commands_to_breakpoint): Mark static.
4304 * regcache.c (find_register_by_name): Delete unused func.
4305 * remote-utils.c (hex_or_minus_one): Mark static.
4306 * server.c (monitor_show_help): Mark static.
4307 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4308 handle_v_requests): Likewise.
4309
bc504a31
PA
43102016-01-12 Pedro Alves <palves@redhat.com>
4311
4312 Remove use of the registered trademark symbol throughout.
4313
5a0dd67a
YQ
43142016-01-08 Yao Qi <yao.qi@linaro.org>
4315
4316 * remote-utils.c (getpkt): If c is '\003', call target hook
4317 request_interrupt.
4318
b2ca446f
YQ
43192016-01-06 Yao Qi <yao.qi@linaro.org>
4320
4321 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4322 linux-aarch32-low.c.
4323 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4324 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4325 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4326 (thumb2_breakpoint): Declare.
4327 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4328 linux-aarch32-low.h.
4329 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4330 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4331 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4332
edd88788
JB
43332016-01-01 Joel Brobecker <brobecker@adacore.com>
4334
4335 * gdbreplay.c (gdbreplay_version): Change copyright year in
4336 version message.
4337 * server.c (gdbserver_version): Likewise.
4338
65da7f14
PP
43392015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4340
4341 * server.c (crc32_table): Delete.
4342 (crc32): Use libiberty's xcrc32 function.
4343
4abd5ed2
JB
43442015-12-22 Joel Brobecker <brobecker@adacore.com>
4345
4346 * lynx-low.c (lynx_delete_thread_callback): New function.
4347 (lynx_mourn): Properly delete our process and all of its
4348 threads. Remove call to clear_inferiors.
4349
0e50fe5c
JB
43502015-12-22 Joel Brobecker <brobecker@adacore.com>
4351
4352 * target.c (thread_search_callback): Add check that
4353 the thread_stopped target callback is not NULL before
4354 calling it.
4355
35adc03f
YQ
43562015-12-21 Yao Qi <yao.qi@linaro.org>
4357
4358 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4359 arm breakpoint.
4360
bd2b2909
AT
43612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4362
4363 * server.c (handle_query): Call target_supports_software_single_step.
4364
7fe5e27e
AT
43652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4366
4367 * linux-low.c (single_step): New function.
4368 (linux_resume_one_lwp_throw): Call single_step.
4369 (start_step_over): Likewise.
4370
d9311bfa
AT
43712015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4372
4373 * Makefile.in (SFILES): Append arch/arm-linux.c,
4374 arch/arm-get-next-pcs.c.
4375 (arm-linux.o): New rule.
4376 (arm-get-next-pcs.o): New rule.
4377 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4378 arm-linux.o.
4379 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4380 to linux-aarch32-low.c.
4381 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4382 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4383 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4384 (thumb2_breakpoint_len): Likewise.
4385 (arm_is_thumb_mode): Make non-static.
4386 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4387 from linux-aarch32-low.c.
4388 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4389 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4390 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4391 (thumb2_breakpoint_len): Likewise.
4392 (arm_is_thumb_mode): New declaration.
4393 * linux-arm-low.c: Include arch/arm-linux.h
4394 aarch/arm-get-next-pcs.h, sys/syscall.h.
4395 (get_next_pcs_ops): New struct.
4396 (get_next_pcs_addr_bits_remove): New function.
4397 (get_next_pcs_is_thumb): New function.
4398 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4399 (arm_sigreturn_next_pc): Likewise.
4400 (get_next_pcs_syscall_next_pc): Likewise.
4401 (arm_gdbserver_get_next_pcs): Likewise.
4402 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4403 Initialize.
4404 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4405 * server.h: Include gdb_vecs.h.
4406
68ce2059
AT
44072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4408
4409 * Makefile.in (SFILES): Append common/common-regcache.c.
4410 (OBS): Append common-regcache.o.
4411 (common-regcache.o): New rule.
4412 * regcache.c (init_register_cache): Initialize cache to
4413 REG_UNAVAILABLE.
4414 (regcache_raw_read_unsigned): New function.
4415 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4416 register_status enum.
4417
fa5308bd
AT
44182015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4419
4420 * linux-aarch64-low.c (the_low_targets): Rename
4421 breakpoint_reinsert_addr to get_next_pcs.
4422 * linux-arm-low.c (the_low_targets): Likewise.
4423 * linux-bfin-low.c (the_low_targets): Likewise.
4424 * linux-cris-low.c (the_low_targets): Likewise.
4425 * linux-crisv32-low.c (the_low_targets): Likewise.
4426 * linux-low.c (can_software_single_step): Likewise.
4427 (install_software_single_step_breakpoints): New function.
4428 (start_step_over): Use install_software_single_step_breakpoints.
4429 * linux-low.h: New CORE_ADDR vector.
4430 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4431 get_next_pcs.
4432 * linux-mips-low.c (the_low_targets): Likewise.
4433 * linux-nios2-low.c (the_low_targets): Likewise.
4434 * linux-sparc-low.c (the_low_targets): Likewise.
4435
4a6ed09b
PA
44362015-12-17 Pedro Alves <palves@redhat.com>
4437
4438 * linux-low.c (linux_kill_one_lwp): Remove references to
4439 LinuxThreads.
4440 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4441 to 'kill'.
4442 (linux_init_signals): Delete.
4443 (initialize_low): Adjust.
4444 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4445
7544db95
PA
44462015-12-16 Pedro Alves <palves@redhat.com>
4447
4448 * configure.ac (compiler warning flags): When testing a
4449 -Wno-foo option, check whether -Wfoo works instead.
4450 * configure: Regenerate.
4451
8020350c
DB
44522015-12-11 Don Breazeal <donb@codesourcery.com>
4453
4454 * server.c (process_serial_event): Don't exit from gdbserver
4455 in remote mode if there are still active inferiors.
4456
db91f502
YQ
44572015-12-11 Yao Qi <yao.qi@linaro.org>
4458
4459 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4460 arm_breakpoint_at if the process is 32-bit.
4461
b37a6290
YQ
44622015-12-11 Yao Qi <yao.qi@linaro.org>
4463
4464 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4465 arm breakpoint.
4466
17b1509a
YQ
44672015-12-07 Yao Qi <yao.qi@linaro.org>
4468
4469 * configure.srv: Append arm.o to srv_tgtobj for
4470 aarch64*-*-linux* target.
4471 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4472 from linux-arm-low.c.
4473 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4474 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4475 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4476 (thumb2_breakpoint_len): Likewise.
4477 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4478 (arm_breakpoint_kinds): Likewise.
4479 (arm_breakpoint_kind_from_pc): Likewise.
4480 (arm_sw_breakpoint_from_kind): Likewise.
4481 (arm_breakpoint_kind_from_current_state): Likewise.
4482 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4483 (arm_sw_breakpoint_from_kind): Declare.
4484 (arm_breakpoint_kind_from_current_state): Declare.
4485 (arm_breakpoint_at): Declare.
4486 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4487 arm_sw_breakpoint_from_kind if process is 32-bit.
4488 (aarch64_breakpoint_kind_from_pc): New function.
4489 (aarch64_breakpoint_kind_from_current_state): New function.
4490 (the_low_target): Initialize fields breakpoint_kind_from_pc
4491 and breakpoint_kind_from_current_state.
4492 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4493 linux-aarch32-low.c.
4494 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4495 (arm_breakpoint, arm_breakpoint_len): Likewise.
4496 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4497 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4498 (arm_is_thumb_mode): Likewise.
4499 (arm_breakpoint_at): Likewise.
4500 (arm_breakpoint_kind_from_pc): Likewise.
4501 (arm_sw_breakpoint_from_kind): Likewise.
4502 (arm_breakpoint_kind_from_current_state): Likewise.
4503
4504 Revert:
4505 2015-08-04 Yao Qi <yao.qi@linaro.org>
4506
4507 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4508 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4509 * server.c (extended_protocol): Remove "static".
4510 * server.h (extended_protocol): Declare it.
4511
ece66d65
JS
45122015-12-04 Josh Stone <jistone@redhat.com>
4513
4514 * target.h (struct target_ops) <arch_setup>: Rename to ...
4515 (struct target_ops) <post_create_inferior>: ... this.
4516 (target_arch_setup): Rename to ...
4517 (target_post_create_inferior): ... this, calling post_create_inferior.
4518 * server.c (start_inferior): Update target_arch_setup calls to
4519 target_post_create_inferior.
4520 * linux-low.c (linux_low_ptrace_options): Forward declare.
4521 (linux_arch_setup): Update its comment for general use.
4522 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4523 (struct linux_target_ops): Use linux_post_create_inferior.
4524 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4525 to post_create_inferior.
4526 * nto-low.c (struct nto_target_ops): Likewise.
4527 * spu-low.c (struct spu_target_ops): Likewise.
4528 * win32-low.c (struct win32_target_ops): Likewise.
4529
e58c48b4
AT
45302015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4531
4532 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4533
fbec8956
AT
45342015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4535
4536 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4537 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4538 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4539 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4540 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4541 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4542 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4543 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4544 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4545 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4546 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4547 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4548
9b4c5f87
AT
45492015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4550
4551 * linux-low.c (linux_look_up_symbols): Don't call
4552 linux_supports_traceclone.
4553 * linux-low.h (thread_db_init): Remove use_events argument.
4554 * thread-db.c (thread_db_use_event): Remove global variable.
4555 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4556 (struct thread_db) <td_create_bp>: Remove field.
4557 (thread_db_create_event): Remove function.
4558 (thread_db_enable_reporting): Likewise.
4559 (find_one_thread): Don't check for thread_db_use_events.
4560 (attach_thread): Likewise.
4561 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4562 (try_thread_db_load_1): Don't check for thread_db_use_events.
4563 (thread_db_init): Remove use_events argument and thread events
4564 handling.
4565 (remove_thread_event_breakpoints): Remove function.
4566 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4567
7d00775e
AT
45682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4569
4570 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4571 New function.
4572 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4573 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4574 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4575 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4576 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4577 Initialize.
4578 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4579 New function.
4580 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4581 * linux-low.c (can_hardware_single_step): Use
4582 supports_hardware_single_step.
4583 (can_software_single_step): New function.
4584 (start_step_over): Call can_software_single_step.
4585 (linux_supports_hardware_single_step): New function.
4586 (struct target_ops) <supports_software_single_step>: Initialize.
4587 * linux-low.h (struct linux_target_ops)
4588 <supports_hardware_single_step>: Initialize.
4589 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4590 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4591 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4592 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4593 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4594 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4595 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4597 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4598 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4599 Initialize.
4600 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4601 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4602 Initialize.
4603 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4604 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4605 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4606 New function.
4607 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4608 * target.h (struct target_ops): <supports_software_single_step>:
4609 New field.
4610 (target_supports_software_single_step): New macro.
4611
2d97cd35
AT
46122015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4613
4614 * linux-low.c (linux_wait_1): Fix pc advance condition.
4615 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4616 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4617
769ef81f
AT
46182015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4619
4620 * linux-arm-low.c (arm_is_thumb_mode): New function.
4621 (arm_breakpoint_at): Use arm_is_thumb_mode.
4622 (arm_breakpoint_kind_from_current_state): New function.
4623 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4624 Initialize.
4625 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4626 (linux_breakpoint_kind_from_current_state): New function.
4627 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4628 * linux-low.h (struct linux_target_ops)
4629 <breakpoint_kind_from_current_state>: New field.
4630 * target.h (struct target_ops): Likewise.
4631 (target_breakpoint_kind_from_current_state): New macro.
4632
1bebeeca
PA
46332015-11-30 Pedro Alves <palves@redhat.com>
4634
4635 * linux-low.c (linux_resume): Wake up the event loop before
4636 returning.
4637
a67a9fae
PA
46382015-11-30 Pedro Alves <palves@redhat.com>
4639
4640 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4641 check.
4642 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4643 to -1.
4644 * target.c (struct thread_search): New structure.
4645 (thread_search_callback): New function.
4646 (prev_general_thread): New global.
4647 (prepare_to_access_memory, done_accessing_memory): New functions.
4648 * target.h (prepare_to_access_memory, done_accessing_memory):
4649 Replace macros with function declarations.
4650
f2faf941
PA
46512015-11-30 Pedro Alves <palves@redhat.com>
4652
4653 PR 14618
4654 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4655 report TARGET_WAITKIND_NO_RESUMED.
4656 * remote-utils.c (prepare_resume_reply): Handle
4657 TARGET_WAITKIND_NO_RESUMED.
4658 * server.c (report_no_resumed): New global.
4659 (handle_query) <qSupported>: Handle "no-resumed+". Report
4660 "no-resumed+" support.
4661 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4662 return error if the client doesn't support no-resumed events.
4663 (push_stop_notification): New function.
4664 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4665 events if the client supports them.
4666
a681f9c9
PA
46672015-11-30 Pedro Alves <palves@redhat.com>
4668
4669 * linux-low.c (thread_still_has_status_pending_p): Don't check
4670 vCont;t here.
4671 (lwp_resumed): New function.
4672 (status_pending_p_callback): Return early if the LWP is not
4673 supposed to be resumed.
4674
65706a29
PA
46752015-11-30 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.c (handle_extended_wait): Assert that the LWP's
4678 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4679 thread create events, leave the new child's status pending.
4680 (linux_low_filter_event): If GDB wants to hear about thread exit
4681 events, leave the LWP marked dead and don't delete it.
4682 (linux_wait_for_event_filtered): Don't check for thread exit.
4683 (filter_exit_event): New function.
4684 (linux_wait_1): Use it, when returning an exit event.
4685 (linux_resume_one_lwp_throw): Assert that the LWP's
4686 waitstatus is TARGET_WAITKIND_IGNORE.
4687 * remote-utils.c (prepare_resume_reply): Handle
4688 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4689 * server.c (report_thread_events): New global.
4690 (handle_general_set): Handle QThreadEvents.
4691 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4692 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4693 TARGET_WAITKIND_THREAD_EXITED.
4694 * server.h (report_thread_events): Declare.
4695
56cf4bed
PA
46962015-11-30 Pedro Alves <palves@redhat.com>
4697
4698 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4699 the thread's last_resume_kind was resume_stop.
4700
500c1d85
PA
47012015-11-30 Pedro Alves <palves@redhat.com>
4702
4703 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4704 before returning.
4705
de979965
PA
47062015-11-30 Pedro Alves <palves@redhat.com>
4707
4708 * server.c (handle_v_requests): Handle vCtrlC.
4709
34c65914
PA
47102015-11-30 Pedro Alves <palves@redhat.com>
4711
4712 * gdbthread.h (find_any_thread_of_pid): Declare.
4713 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4714 functions.
4715 * server.c (handle_query): If current_thread is NULL, look for
4716 another thread of the selected process.
4717
79efa585 47182015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4719 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4720
4721 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4722 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4723 name in reply.
4724 * target.h (struct target_ops) <thread_name>: New field.
4725 (target_thread_name): New macro.
4726
80d82c19
JB
47272015-11-23 Joel Brobecker <brobecker@adacore.com>
4728
4729 * regcache.h (regcache_invalidate_pid): Add declaration.
4730 * regcache.c (regcache_invalidate_pid): New function, extracted
4731 from regcache_invalidate.
4732 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4733 Add trivial documentation comment.
4734 * lynx-low.c: Use regcache_invalidate_pid instead of
4735 regcache_invalidate.
4736
64da5dd5
JB
47372015-11-23 Joel Brobecker <brobecker@adacore.com>
4738
4739 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4740 and Elf64_auxv_t if the target is Android.
4741
37ce4055
DE
47422015-11-22 Doug Evans <xdje42@gmail.com>
4743
4744 * target.h: #include <sys/types.h>.
4745
06e03fff
PA
47462015-11-19 Pedro Alves <palves@redhat.com>
4747
4748 * linux-low.c (linux_process_qsupported): Change prototype.
4749 Adjust.
4750 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4751 Change prototype.
4752 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4753 and adjust to loop over all features.
4754 * server.c (handle_query) <qSupported>: Adjust to call
4755 target_process_qsupported once, passing it a vector of unprocessed
4756 features.
4757 * target.h (struct target_ops) <process_qsupported>: Change
4758 prototype.
4759 (target_process_qsupported): Adjust.
4760
9a084706
PA
47612015-11-19 Pedro Alves <palves@redhat.com>
4762
4763 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4764 mode.
4765 * configure: Regenerate.
4766
dad44a1f
PA
47672015-11-19 Pedro Alves <palves@redhat.com>
4768
4769 * configure: Regenerate.
4770
231c0592
YQ
47712015-11-19 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4774 type to uint32_t.
4775
6c1c9a8b
YQ
47762015-11-19 Yao Qi <yao.qi@linaro.org>
4777
4778 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4779 (struct aarch64_operand): Move enum out.
4780
9caa3311
YQ
47812015-11-19 Yao Qi <yao.qi@linaro.org>
4782
4783 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4784 struct user_fpsimd_state *.
4785 (aarch64_store_fpregset): Likewise.
4786
6a69a054
YQ
47872015-11-19 Yao Qi <yao.qi@linaro.org>
4788
4789 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4790 struct user_pt_regs *.
4791 (aarch64_store_gregset): Likewise.
4792
1798301e
PA
47932015-11-18 Pedro Alves <palves@redhat.com>
4794
4795 * Makefile.in (all_object_files): Add $IPA_OBJS.
4796
ce7715e2
PA
47972015-11-17 Pedro Alves <palves@redhat.com>
4798
4799 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4800 GDB_SIGNAL_0 and gdb_signal_to_string.
4801
c0879059
PA
48022015-11-17 Pedro Alves <palves@redhat.com>
4803
4804 * win32-low.c (handle_output_debug_string): Remove parameter.
4805 (win32_kill): Remove our_status local and adjust call to
4806 handle_output_debug_string.
4807 (get_child_debug_event): Adjust call to
4808 handle_output_debug_string.
4809
1996e237
SM
48102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4811
4812 * linux-mips-low.c (mips_fill_gregset): Add cast.
4813 (mips_store_gregset): Likewise.
4814 (mips_fill_fpregset): Likewise.
4815 (mips_store_fpregset): Likewise.
4816
cbec665b
SM
48172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4818
4819 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4820 priv.
4821
eb3e3c67
SM
48222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4823
4824 * linux-mips-low.c (mips_linux_new_thread): Change type of
4825 watch_type to enum target_hw_bp_type.
4826
171de4b8
SM
48272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4828
4829 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4830 Change return type to arm_hwbp_type.
4831
04248ead
SM
48322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4833
4834 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4835 (arm_store_gregset): Likewise.
4836 * linux-arm-low.c (arm_get_hwcap): Likewise.
4837 (arm_read_description): Likewise.
4838
04b3479c
SM
48392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4840
4841 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4842
2bc84e8a
SM
48432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4844
4845 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4846 (ppc_fill_vsxregset): Likewise.
4847 (ppc_store_vsxregset): Likewise.
4848 (ppc_fill_vrregset): Likewise.
4849 (ppc_store_vrregset): Likewise.
4850 (ppc_fill_evrregset): Likewise.
4851 (ppc_store_evrregset): Likewise.
4852
e6c5bb05
SM
48532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4854
4855 * linux-ppc-low.c (ppc_usrregs_info): Remove
4856 forward-declaration.
4857 (ppc_arch_setup): Move lower in file.
4858
7ea45d72
SM
48592015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4860
4861 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4862 (ps_pdwrite): Likewise.
4863
69291610
HW
48642015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4865
4866 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4867 to after assert checks.
4868
b42945fd
SM
48692015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4870
4871 * proc-service.c (ps_pdread): Add/adjust casts.
4872 (ps_pdwrite): Add/adjust casts.
4873
d6f85c84
SM
48742015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4875
4876 * server.c (handle_search_memory_1): Cast return value of
4877 memmem.
4878
f98cd059
SM
48792015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4880
4881 * server.c (write_qxfer_response): Change type of data to
4882 gdb_byte *.
4883
d2412fa5
PA
48842015-10-29 Pedro Alves <palves@redhat.com>
4885
4886 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4887
c17414a2
PA
48882015-10-29 Pedro Alves <palves@redhat.com>
4889
4890 * tracepoint.c (clear_installed_tracepoints): Add casts.
4891
e053fbc4
PA
48922015-10-29 Pedro Alves <palves@redhat.com>
4893
4894 * server.c (handle_v_cont, process_serial_event): Add enum
4895 gdb_signal casts to signal parsing code.
4896
add67df8
PA
48972015-10-29 Pedro Alves <palves@redhat.com>
4898
4899 * linux-low.h (NULL_REGSET): Define.
4900 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4901 * linux-arm-low.c (arm_regsets): Likewise.
4902 * linux-crisv32-low.c (cris_regsets): Likewise.
4903 * linux-m68k-low.c (m68k_regsets): Likewise.
4904 * linux-mips-low.c (mips_regsets): Likewise.
4905 * linux-nios2-low.c (nios2_regsets): Likewise.
4906 * linux-ppc-low.c (ppc_regsets): Likewise.
4907 * linux-s390-low.c (s390_regsets): Likewise.
4908 * linux-sh-low.c (sh_regsets): Likewise.
4909 * linux-sparc-low.c (sparc_regsets): Likewise.
4910 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4911 * linux-tile-low.c (tile_regsets): Likewise.
4912 * linux-x86-low.c (x86_regsets): Likewise.
4913 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4914
50bc912a
PA
49152015-10-29 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.h (NULL_REGSET): Define.
4918 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4919 * linux-arm-low.c (arm_regsets): Likewise.
4920 * linux-crisv32-low.c (cris_regsets): Likewise.
4921 * linux-m68k-low.c (m68k_regsets): Likewise.
4922 * linux-mips-low.c (mips_regsets): Likewise.
4923 * linux-nios2-low.c (nios2_regsets): Likewise.
4924 * linux-ppc-low.c (ppc_regsets): Likewise.
4925 * linux-s390-low.c (s390_regsets): Likewise.
4926 * linux-sh-low.c (sh_regsets): Likewise.
4927 * linux-sparc-low.c (sparc_regsets): Likewise.
4928 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4929 * linux-tile-low.c (tile_regsets): Likewise.
4930 * linux-x86-low.c (x86_regsets): Likewise.
4931 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4932
682b2546
DE
49332015-10-26 Doug Evans <dje@google.com>
4934
4935 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4936
963843d4
DE
49372015-10-26 Doug Evans <dje@google.com>
4938
4939 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4940
d41401ac
DE
49412015-10-26 Doug Evans <dje@google.com>
4942
4943 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4944 for debug_printf.
4945 (attach_thread, find_new_threads_callback): Ditto.
4946
3db28855
AT
49472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4948
4949 * mem-break.h (set_breakpoint_data): Remove.
4950
fb78e89c
AT
49512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4952
4953 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4954 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4955 (initialize_low): Remove set_breakpoint_data call.
4956 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4957 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4958 (initialize_low): Remove set_breakpoint_data call.
4959 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4960 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4961 (initialize_low): Remove set_breakpoint_data call.
4962
2e6ee069
AT
49632015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4964
4965 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4966 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4967 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4968 * target.h (target_breakpoint_kind_from_pc): New macro.
4969
1652a986
AT
49702015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4971
4972 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4973 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4974 the default breakpoint kind.
4975
abeead09
AT
49762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4977
4978 * linux-arm-low.c (arm_supports_z_point_type): Add software
4979 breakpoint support.
4980
b0b4b501
AT
49812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4982
4983 * linux-arm-low.c: Refactor breakpoint definitions.
4984 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4985 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4986
8689682c
AT
49872015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4988
4989 * Makefile.in: Add arm.c/o.
4990 * configure.srv: Likewise.
4991 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4992 (arm_breakpoint_kind_from_pc): New function.
4993 (arm_sw_breakpoint_from_kind): Return proper kind.
4994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4995
27165294
AT
49962015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4997
4998 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4999 removal.
5000 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5001 (struct raw_breakpoint) <size>: Remove.
5002 (struct raw_breakpoint) <kind>: Add.
5003 (bp_size): New function.
5004 (bp_opcode): Likewise.
5005 (find_raw_breakpoint_at): Adjust for kind.
5006 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5007 (remove_memory_breakpoint): Adjust for kind call bp_size.
5008 (set_raw_breakpoint_at): Adjust for kind.
5009 (set_breakpoint): Likewise.
5010 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5011 (delete_raw_breakpoint): Adjust for kind.
5012 (delete_breakpoint): Likewise.
5013 (find_gdb_breakpoint): Likewise.
5014 (set_gdb_breakpoint_1): Likewise.
5015 (set_gdb_breakpoint): Likewise.
5016 (delete_gdb_breakpoint_1): Likewise.
5017 (delete_gdb_breakpoint): Likewise.
5018 (uninsert_raw_breakpoint): Likewise.
5019 (reinsert_raw_breakpoint): Likewise.
5020 (set_breakpoint_data): Remove.
5021 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5022 (check_mem_read): Adjust for kind call bp_size.
5023 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5024 (clone_one_breakpoint): Adjust for kind.
5025 * mem-break.h (set_gdb_breakpoint): Likewise.
5026 (delete_gdb_breakpoint): Likewise.
5027 * server.c (process_serial_event): Likewise.
5028
dd373349
AT
50292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5030
5031 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5032 (struct linux_target_ops) <breakpoint>: Remove.
5033 (struct linux_target_ops) <breakpoint_len>: Remove.
5034 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5035 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5036 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5037 (arm_sw_breakpoint_from_kind): New function.
5038 * linux-bfin-low.c (bfin_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-cris-low.c (cris_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-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5054 and sw_breakpoint_from_kind to increment the pc.
5055 (linux_breakpoint_kind_from_pc): New function.
5056 (linux_sw_breakpoint_from_kind): New function.
5057 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5058 (initialize_low): Call breakpoint_kind_from_pc and
5059 sw_breakpoint_from_kind to replace breakpoint_data/len.
5060 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5061 New field.
5062 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5063 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5074 (struct linux_target_ops) <breakpoint>: Remove.
5075 (struct linux_target_ops) <breakpoint_len>: Remove.
5076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5078 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5079 (struct linux_target_ops) <breakpoint>: Remove.
5080 (struct linux_target_ops) <breakpoint_len>: Remove.
5081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5083 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5084 (struct linux_target_ops) <breakpoint>: Remove.
5085 (struct linux_target_ops) <breakpoint_len>: Remove.
5086 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5087 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5088 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5089 (struct linux_target_ops) <breakpoint>: Remove.
5090 (struct linux_target_ops) <breakpoint_len>: Remove.
5091 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5093 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5094 (struct linux_target_ops) <breakpoint>: Remove.
5095 (struct linux_target_ops) <breakpoint_len>: Remove.
5096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5098 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5099 (struct linux_target_ops) <breakpoint>: Remove.
5100 (struct linux_target_ops) <breakpoint_len>: Remove.
5101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5103 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5104 (struct linux_target_ops) <breakpoint>: Remove.
5105 (struct linux_target_ops) <breakpoint_len>: Remove.
5106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5108 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5109 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5110 (struct linux_target_ops) <breakpoint>: Remove.
5111 (struct linux_target_ops) <breakpoint_len>: Remove.
5112 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5113 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5114 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5115 (struct linux_target_ops) <breakpoint>: Remove.
5116 (struct linux_target_ops) <breakpoint_len>: Remove.
5117 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5118 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5119
4cd98a19
AT
51202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5121
5122 * linux-cris-low.c (cris_get_pc): Remove void arg.
5123
774ee6d2
AR
51242015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5125
5126 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5127 variable name.
5128
833dcd29
AR
51292015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5130
5131 * inferiors.c (thread_pid_matches_callback): New function.
5132 (find_thread_process): New function.
5133 (remove_thread): Reset current_thread.
5134 (remove_process): Assert threads have been removed first.
5135
8d689ee5
YQ
51362015-10-15 Yao Qi <yao.qi@linaro.org>
5137
5138 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5139 if it is 3.
5140 (aarch64_remove_point): Likewise.
5141 * regcache.c (regcache_register_size): New function.
5142
1c2e1515
YQ
51432015-10-12 Yao Qi <yao.qi@linaro.org>
5144
5145 * linux-aarch64-low.c: Update all callers as emit_load_store
5146 is renamed to aarch64_emit_load_store.
5147
e1c587c3
YQ
51482015-10-12 Yao Qi <yao.qi@linaro.org>
5149
5150 * linux-aarch64-low.c: Update all callers of function renaming
5151 from emit_insn to aarch64_emit_insn.
5152
b6542f81
YQ
51532015-10-12 Yao Qi <yao.qi@linaro.org>
5154
5155 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5156 arch/aarch64-insn.h.
5157 (struct aarch64_memory_operand): Likewise.
5158 (ENCODE): Likewise.
5159 (emit_insn): Move to arch/aarch64-insn.c.
5160 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5161 (emit_load_store): Move to arch/aarch64-insn.c.
5162 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5163 (can_encode_int32): Remove.
5164
246994ce
YQ
51652015-10-12 Yao Qi <yao.qi@linaro.org>
5166
5167 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5168 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5169 (aarch64_relocate_instruction): Likewise.
5170 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5171 (struct aarch64_insn_visitor): Likewise.
5172
0badd99f
YQ
51732015-10-12 Yao Qi <yao.qi@linaro.org>
5174
5175 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5176 (struct aarch64_insn_visitor): New.
5177 (struct aarch64_insn_relocation_data): New.
5178 (aarch64_ftrace_insn_reloc_b): New function.
5179 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5180 (aarch64_ftrace_insn_reloc_cb): Likewise.
5181 (aarch64_ftrace_insn_reloc_tb): Likewise.
5182 (aarch64_ftrace_insn_reloc_adr): Likewise.
5183 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5184 (aarch64_ftrace_insn_reloc_others): Likewise.
5185 (visitor): New.
5186 (aarch64_relocate_instruction): Use visitor.
5187
dfaffe9d
YQ
51882015-10-12 Yao Qi <yao.qi@linaro.org>
5189
5190 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5191 int. Add argument buf.
5192 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5193 aarch64_relocate_instruction.
5194
70b439f0
YQ
51952015-10-12 Yao Qi <yao.qi@linaro.org>
5196
5197 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5198 argument insn. Remove local variable insn. Don't call
5199 target_read_uint32.
5200 (aarch64_install_fast_tracepoint_jump_pad): Call
5201 target_read_uint32.
5202
7781c06f
YQ
52032015-09-30 Yao Qi <yao.qi@linaro.org>
5204
5205 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5206 (emit_load_store_pair): Likewise.
5207
9a3c8263
SM
52082015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5209
5210 * dll.c (match_dll): Add cast(s).
5211 (unloaded_dll): Likewise.
5212 * linux-low.c (second_thread_of_pid_p): Likewise.
5213 (delete_lwp_callback): Likewise.
5214 (count_events_callback): Likewise.
5215 (select_event_lwp_callback): Likewise.
5216 (linux_set_resume_request): Likewise.
5217 * server.c (accumulate_file_name_length): Likewise.
5218 (emit_dll_description): Likewise.
5219 (handle_qxfer_threads_worker): Likewise.
5220 (visit_actioned_threads): Likewise.
5221 * thread-db.c (any_thread_of): Likewise.
5222 * tracepoint.c (same_process_p): Likewise.
5223 (match_blocktype): Likewise.
5224 (build_traceframe_info_xml): Likewise.
5225
224c3ddb
SM
52262015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5227
5228 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5229 assignment.
5230 (gdb_unparse_agent_expr): Likewise.
5231 * hostio.c (require_data): Likewise.
5232 (handle_pread): Likewise.
5233 * linux-low.c (disable_regset): Likewise.
5234 (fetch_register): Likewise.
5235 (store_register): Likewise.
5236 (get_dynamic): Likewise.
5237 (linux_qxfer_libraries_svr4): Likewise.
5238 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5239 (set_fast_tracepoint_jump): Likewise.
5240 (uninsert_fast_tracepoint_jumps_at): Likewise.
5241 (reinsert_fast_tracepoint_jumps_at): Likewise.
5242 (validate_inserted_breakpoint): Likewise.
5243 (clone_agent_expr): Likewise.
5244 * regcache.c (init_register_cache): Likewise.
5245 * remote-utils.c (putpkt_binary_1): Likewise.
5246 (decode_M_packet): Likewise.
5247 (decode_X_packet): Likewise.
5248 (look_up_one_symbol): Likewise.
5249 (relocate_instruction): Likewise.
5250 (monitor_output): Likewise.
5251 * server.c (handle_search_memory): Likewise.
5252 (handle_qxfer_exec_file): Likewise.
5253 (handle_qxfer_libraries): Likewise.
5254 (handle_qxfer): Likewise.
5255 (handle_query): Likewise.
5256 (handle_v_cont): Likewise.
5257 (handle_v_run): Likewise.
5258 (captured_main): Likewise.
5259 * target.c (write_inferior_memory): Likewise.
5260 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5261 * tracepoint.c (init_trace_buffer): Likewise.
5262 (add_tracepoint_action): Likewise.
5263 (add_traceframe): Likewise.
5264 (add_traceframe_block): Likewise.
5265 (cmd_qtdpsrc): Likewise.
5266 (cmd_qtdv): Likewise.
5267 (cmd_qtstatus): Likewise.
5268 (response_source): Likewise.
5269 (response_tsv): Likewise.
5270 (cmd_qtnotes): Likewise.
5271 (gdb_collect): Likewise.
5272 (initialize_tracepoint): Likewise.
5273
afbe19f8
PL
52742015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5275
5276 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5277 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5278 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5279 <NOP>: New.
5280 (enum aarch64_condition_codes): New enum.
5281 (w0): New static global.
5282 (fp): Likewise.
5283 (lr): Likewise.
5284 (struct aarch64_memory_operand) <type>: New
5285 MEMORY_OPERAND_POSTINDEX type.
5286 (postindex_memory_operand): New helper function.
5287 (emit_ret): New function.
5288 (emit_load_store_pair): New function, factored out of emit_stp
5289 with support for MEMORY_OPERAND_POSTINDEX.
5290 (emit_stp): Rewrite using emit_load_store_pair.
5291 (emit_ldp): New function.
5292 (emit_load_store): Likewise.
5293 (emit_ldr): Mention post-index instruction in comment.
5294 (emit_ldrh): New function.
5295 (emit_ldrb): New function.
5296 (emit_ldrsw): Mention post-index instruction in comment.
5297 (emit_str): Likewise.
5298 (emit_subs): New function.
5299 (emit_cmp): Likewise.
5300 (emit_and): Likewise.
5301 (emit_orr): Likewise.
5302 (emit_orn): Likewise.
5303 (emit_eor): Likewise.
5304 (emit_mvn): Likewise.
5305 (emit_lslv): Likewise.
5306 (emit_lsrv): Likewise.
5307 (emit_asrv): Likewise.
5308 (emit_mul): Likewise.
5309 (emit_sbfm): Likewise.
5310 (emit_sbfx): Likewise.
5311 (emit_ubfm): Likewise.
5312 (emit_ubfx): Likewise.
5313 (emit_csinc): Likewise.
5314 (emit_cset): Likewise.
5315 (emit_nop): Likewise.
5316 (emit_ops_insns): New helper function.
5317 (emit_pop): Likewise.
5318 (emit_push): Likewise.
5319 (aarch64_emit_prologue): New function.
5320 (aarch64_emit_epilogue): Likewise.
5321 (aarch64_emit_add): Likewise.
5322 (aarch64_emit_sub): Likewise.
5323 (aarch64_emit_mul): Likewise.
5324 (aarch64_emit_lsh): Likewise.
5325 (aarch64_emit_rsh_signed): Likewise.
5326 (aarch64_emit_rsh_unsigned): Likewise.
5327 (aarch64_emit_ext): Likewise.
5328 (aarch64_emit_log_not): Likewise.
5329 (aarch64_emit_bit_and): Likewise.
5330 (aarch64_emit_bit_or): Likewise.
5331 (aarch64_emit_bit_xor): Likewise.
5332 (aarch64_emit_bit_not): Likewise.
5333 (aarch64_emit_equal): Likewise.
5334 (aarch64_emit_less_signed): Likewise.
5335 (aarch64_emit_less_unsigned): Likewise.
5336 (aarch64_emit_ref): Likewise.
5337 (aarch64_emit_if_goto): Likewise.
5338 (aarch64_emit_goto): Likewise.
5339 (aarch64_write_goto_address): Likewise.
5340 (aarch64_emit_const): Likewise.
5341 (aarch64_emit_call): Likewise.
5342 (aarch64_emit_reg): Likewise.
5343 (aarch64_emit_pop): Likewise.
5344 (aarch64_emit_stack_flush): Likewise.
5345 (aarch64_emit_zero_ext): Likewise.
5346 (aarch64_emit_swap): Likewise.
5347 (aarch64_emit_stack_adjust): Likewise.
5348 (aarch64_emit_int_call_1): Likewise.
5349 (aarch64_emit_void_call_2): Likewise.
5350 (aarch64_emit_eq_goto): Likewise.
5351 (aarch64_emit_ne_goto): Likewise.
5352 (aarch64_emit_lt_goto): Likewise.
5353 (aarch64_emit_le_goto): Likewise.
5354 (aarch64_emit_gt_goto): Likewise.
5355 (aarch64_emit_ge_got): Likewise.
5356 (aarch64_emit_ops_impl): New static global variable.
5357 (aarch64_emit_ops): New target function, return
5358 &aarch64_emit_ops_impl.
5359 (struct linux_target_ops): Install it.
5360
bb903df0
PL
53612015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5362
5363 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5364 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5365 aarch64-ipa.o.
5366 * linux-aarch64-ipa.c: New file.
5367 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5368 and endian.h.
5369 (aarch64_get_thread_area): New target method.
5370 (extract_signed_bitfield): New helper function.
5371 (aarch64_decode_ldr_literal): New function.
5372 (enum aarch64_opcodes): New enum.
5373 (struct aarch64_register): New struct.
5374 (struct aarch64_operand): New struct.
5375 (x0): New static global.
5376 (x1): Likewise.
5377 (x2): Likewise.
5378 (x3): Likewise.
5379 (x4): Likewise.
5380 (w2): Likewise.
5381 (ip0): Likewise.
5382 (sp): Likewise.
5383 (xzr): Likewise.
5384 (aarch64_register): New helper function.
5385 (register_operand): Likewise.
5386 (immediate_operand): Likewise.
5387 (struct aarch64_memory_operand): New struct.
5388 (offset_memory_operand): New helper function.
5389 (preindex_memory_operand): Likewise.
5390 (enum aarch64_system_control_registers): New enum.
5391 (ENCODE): New macro.
5392 (emit_insn): New helper function.
5393 (emit_b): New function.
5394 (emit_bcond): Likewise.
5395 (emit_cb): Likewise.
5396 (emit_tb): Likewise.
5397 (emit_blr): Likewise.
5398 (emit_stp): Likewise.
5399 (emit_ldp_q_offset): Likewise.
5400 (emit_stp_q_offset): Likewise.
5401 (emit_load_store): Likewise.
5402 (emit_ldr): Likewise.
5403 (emit_ldrsw): Likewise.
5404 (emit_str): Likewise.
5405 (emit_ldaxr): Likewise.
5406 (emit_stxr): Likewise.
5407 (emit_stlr): Likewise.
5408 (emit_data_processing_reg): Likewise.
5409 (emit_data_processing): Likewise.
5410 (emit_add): Likewise.
5411 (emit_sub): Likewise.
5412 (emit_mov): Likewise.
5413 (emit_movk): Likewise.
5414 (emit_mov_addr): Likewise.
5415 (emit_mrs): Likewise.
5416 (emit_msr): Likewise.
5417 (emit_sevl): Likewise.
5418 (emit_wfe): Likewise.
5419 (append_insns): Likewise.
5420 (can_encode_int32_in): New helper function.
5421 (aarch64_relocate_instruction): New function.
5422 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5423 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5424 (struct linux_target_ops): Install aarch64_get_thread_area,
5425 aarch64_install_fast_tracepoint_jump_pad and
5426 aarch64_get_min_fast_tracepoint_insn_len.
5427
787749ea
PL
54282015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5429
5430 * Makefile.in (aarch64-insn.o): New rule.
5431 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5432
9812b2e6
YQ
54332015-09-21 Yao Qi <yao.qi@linaro.org>
5434
5435 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5436
18fe412b
YQ
54372015-09-21 Yao Qi <yao.qi@linaro.org>
5438
5439 * tracepoint.c (max_jump_pad_size): Remove.
5440
a0cc84cd
YQ
54412015-09-18 Yao Qi <yao.qi@linaro.org>
5442
5443 * linux-aarch64-low.c: Don't include sys/uio.h.
5444 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5445
d78908cf
WW
54462015-09-16 Wei-cheng Wang <cole945@gmail.com>
5447
5448 * tracepoint.c (eval_result_type): Change prototype.
5449 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5450
d57e0d50
PA
54512015-09-15 Pedro Alves <palves@redhat.com>
5452
5453 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5454 Check whether to report exec events instead of checking whether
5455 multiprocess is enabled.
5456
5a676acc
PA
54572015-09-15 Pedro Alves <palves@redhat.com>
5458
5459 PR remote/18965
5460 * remote-utils.c (prepare_resume_reply): Merge
5461 TARGET_WAITKIND_VFORK_DONE switch case with the
5462 TARGET_WAITKIND_FORKED case.
5463
7c5d0fad
YQ
54642015-09-15 Yao Qi <yao.qi@linaro.org>
5465
5466 * server.c (handle_query): Check string comparison using
5467 "else if" instead of "if".
5468
750ce8d1
YQ
54692015-09-15 Yao Qi <yao.qi@linaro.org>
5470
5471 * server.c (vCont_supported): New global variable.
5472 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5473 matches. Append ";vContSupported+" to own_buf.
5474 (handle_v_requests): Append ";s;S" to own_buf if target supports
5475 hardware single step or vCont_supported is false.
5476 (capture_main): Set vCont_supported to zero.
5477
70b90b91
YQ
54782015-09-15 Yao Qi <yao.qi@linaro.org>
5479
5480 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5481 it to ...
5482 (linux_supports_hardware_single_step): ... New function.
5483 (linux_target_ops): Update.
5484 * lynx-low.c (lynx_target_ops): Set field
5485 supports_hardware_single_step to target_can_do_hardware_single_step.
5486 * nto-low.c (nto_target_ops): Likewise.
5487 * spu-low.c (spu_target_ops): Likewise.
5488 * win32-low.c (win32_target_ops): Likewise.
5489 * target.c (target_can_do_hardware_single_step): New function.
5490 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5491 Remove. <supports_hardware_single_step>: New field.
5492 (target_supports_conditional_breakpoints): Remove.
5493 (target_supports_hardware_single_step): New macro.
5494 (target_can_do_hardware_single_step): Declare.
5495 * server.c (handle_query): Use target_supports_hardware_single_step
5496 instead of target_supports_conditional_breakpoints.
5497
ade90bde
YQ
54982015-09-15 Yao Qi <yao.qi@linaro.org>
5499
5500 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5501 function.
5502 (struct linux_target_ops the_low_target): Install
5503 aarch64_linux_siginfo_fixup.
5504
94585166
DB
55052015-09-11 Don Breazeal <donb@codesourcery.com>
5506 Luis Machado <lgustavo@codesourcery.com>
5507
5508 * linux-low.c (linux_mourn): Static declaration.
5509 (linux_arch_setup): Move in front of
5510 handle_extended_wait.
5511 (linux_arch_setup_thread): New function.
5512 (handle_extended_wait): Handle exec events. Call
5513 linux_arch_setup_thread. Make event_lwp argument a
5514 pointer-to-a-pointer.
5515 (check_zombie_leaders): Do not check stopped threads.
5516 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5517 (linux_low_filter_event): Add lwp and thread for exec'ing
5518 non-leader thread if leader thread has been deleted.
5519 Refactor code into linux_arch_setup_thread and call it.
5520 Pass child lwp pointer by reference to handle_extended_wait.
5521 (linux_wait_for_event_filtered): Update comment.
5522 (linux_wait_1): Prevent clobbering exec event status.
5523 (linux_supports_exec_events): New function.
5524 (linux_target_ops) <supports_exec_events>: Initialize new member.
5525 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5526 new member.
5527 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5528 * server.c (report_exec_events): New global variable.
5529 (handle_query): Handle qSupported query for exec-events feature.
5530 (captured_main): Initialize report_exec_events.
5531 * server.h (report_exec_events): Declare new global variable.
5532 * target.h (struct target_ops) <supports_exec_events>: New
5533 member.
5534 (target_supports_exec_events): New macro.
5535 * win32-low.c (win32_target_ops) <supports_exec_events>:
5536 Initialize new member.
5537
0568462b
MM
55382015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5539
5540 * linux-low.c (linux_low_enable_btrace): Remove.
5541 (linux_target_ops): Replace linux_low_enable_btrace with
5542 linux_enable_btrace.
5543
39edd165
YQ
55442015-09-03 Yao Qi <yao.qi@linaro.org>
5545
5546 * linux-aarch64-low.c (aarch64_insert_point): Call
5547 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5548 returns true.
5549
1db33b5a
UW
55502015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5551
5552 * linux-low.c (check_stopped_by_breakpoint): Use
5553 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5554
ab290430
PA
55552015-08-27 Pedro Alves <palves@redhat.com>
5556
5557 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5558
8d749320
SM
55592015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5560
6711b7f8
SM
5561 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5562 the XNEW-family equivalent.
8d749320
SM
5563 (compile_bytecodes): Likewise.
5564 * dll.c (loaded_dll): Likewise.
5565 * event-loop.c (append_callback_event): Likewise.
5566 (create_file_handler): Likewise.
5567 (create_file_event): Likewise.
5568 * hostio.c (handle_open): Likewise.
5569 * inferiors.c (add_thread): Likewise.
5570 (add_process): Likewise.
5571 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5572 * linux-arm-low.c (arm_new_process): Likewise.
5573 (arm_new_thread): Likewise.
5574 * linux-low.c (add_to_pid_list): Likewise.
5575 (linux_add_process): Likewise.
5576 (handle_extended_wait): Likewise.
5577 (add_lwp): Likewise.
5578 (enqueue_one_deferred_signal): Likewise.
5579 (enqueue_pending_signal): Likewise.
5580 (linux_resume_one_lwp_throw): Likewise.
5581 (linux_resume_one_thread): Likewise.
5582 (linux_read_memory): Likewise.
5583 (linux_write_memory): Likewise.
5584 * linux-mips-low.c (mips_linux_new_process): Likewise.
5585 (mips_linux_new_thread): Likewise.
5586 (mips_add_watchpoint): Likewise.
5587 * linux-x86-low.c (initialize_low_arch): Likewise.
5588 * lynx-low.c (lynx_add_process): Likewise.
5589 * mem-break.c (set_raw_breakpoint_at): Likewise.
5590 (set_breakpoint): Likewise.
5591 (add_condition_to_breakpoint): Likewise.
5592 (add_commands_to_breakpoint): Likewise.
5593 (clone_agent_expr): Likewise.
5594 (clone_one_breakpoint): Likewise.
5595 * regcache.c (new_register_cache): Likewise.
5596 * remote-utils.c (look_up_one_symbol): Likewise.
5597 * server.c (queue_stop_reply): Likewise.
5598 (start_inferior): Likewise.
5599 (queue_stop_reply_callback): Likewise.
5600 (handle_target_event): Likewise.
5601 * spu-low.c (fetch_ppc_memory): Likewise.
5602 (store_ppc_memory): Likewise.
5603 * target.c (set_target_ops): Likewise.
5604 * thread-db.c (thread_db_load_search): Likewise.
5605 (try_thread_db_load_1): Likewise.
5606 * tracepoint.c (add_tracepoint): Likewise.
5607 (add_tracepoint_action): Likewise.
5608 (create_trace_state_variable): Likewise.
5609 (cmd_qtdpsrc): Likewise.
5610 (cmd_qtro): Likewise.
5611 (add_while_stepping_state): Likewise.
5612 * win32-low.c (child_add_thread): Likewise.
5613 (get_image_name): Likewise.
5614
ed8b7b42
YQ
56152015-08-25 Yao Qi <yao.qi@linaro.org>
5616
5617 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5618
db3cb7cb
YQ
56192015-08-25 Yao Qi <yao.qi@linaro.org>
5620
5621 * Makefile.in (aarch64-linux.o): New rule.
5622 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5623 srv_tgtobj.
5624 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5625 (aarch64_init_debug_reg_state): Make it extern.
5626 (aarch64_linux_prepare_to_resume): Remove.
5627
f6011a1c
YQ
56282015-08-25 Yao Qi <yao.qi@linaro.org>
5629
5630 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5631 lwp_arch_private_info and ptid_of_lwp.
5632
88e2cf7e
YQ
56332015-08-25 Yao Qi <yao.qi@linaro.org>
5634
5635 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5636 Find proc_info by find_process_pid. All callers updated.
5637
5e35436e
YQ
56382015-08-25 Yao Qi <yao.qi@linaro.org>
5639
5640 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5641 Remove.
5642 (debug_reg_change_callback): Remove.
5643 (aarch64_notify_debug_reg_change): Remove.
5644
4a8a7965
YQ
56452015-08-25 Yao Qi <yao.qi@linaro.org>
5646
5647 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5648 Call current_lwp_ptid.
5649
32a271ee
YQ
56502015-08-25 Yao Qi <yao.qi@linaro.org>
5651
5652 * linux-aarch64-low.c (debug_reg_change_callback): Use
5653 debug_printf.
5654
0d51c8d7
YQ
56552015-08-25 Yao Qi <yao.qi@linaro.org>
5656
5657 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5658
31a43dd5
YQ
56592015-08-25 Yao Qi <yao.qi@linaro.org>
5660
5661 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5662
8ee52567
YQ
56632015-08-25 Yao Qi <yao.qi@linaro.org>
5664
5665 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5666 the code.
5667
ff3f0f45
YQ
56682015-08-25 Yao Qi <yao.qi@linaro.org>
5669
5670 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5671 Remove.
5672 (debug_reg_change_callback): Remove argument entry and add argument
5673 lwp. Remove local variable thread. Don't print thread id in the
5674 debugging output. Don't check whether pid of thread equals to pid.
5675 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5676 iterate_over_lwps instead find_inferior.
5677
3d40fbb5
PA
56782015-08-24 Pedro Alves <palves@redhat.com>
5679
5680 * inferiors.c (get_first_process): New function.
5681 * inferiors.h (get_first_process): New declaration.
5682 * remote-utils.c (read_ptid): Default to the first process in the
5683 list, instead of to the current thread's process.
5684
438e1e42
PA
56852015-08-24 Pedro Alves <palves@redhat.com>
5686
5687 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5688 * event-loop.c: Likewise.
5689 * remote-utils.c: Likewise.
5690 * tracepoint.c: Likewise.
5691
a8c6d4fc
PA
56922015-08-24 Pedro Alves <palves@redhat.com>
5693
5694 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5695 ptid_get_lwp.
5696
99b0bb12
PA
56972015-08-21 Pedro Alves <palves@redhat.com>
5698
5699 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5700 instead of literal 1.
5701
f8904751
PA
57022015-08-21 Pedro Alves <palves@redhat.com>
5703
5704 * tdesc.c (default_description): Explicitly zero-initialize.
5705
465a859e
PA
57062015-08-21 Pedro Alves <palves@redhat.com>
5707
5708 PR gdb/18749
5709 * inferiors.c (remove_thread): Discard any pending stop reply for
5710 this thread.
5711 * server.c (remove_all_on_match_pid): Rename to ...
5712 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5713 instead of a pid.
5714 (discard_queued_stop_replies): Change parameter to a ptid. Now
5715 extern.
5716 (handle_v_kill, kill_inferior_callback, captured_main)
5717 (process_serial_event): Adjust.
5718 * server.h (discard_queued_stop_replies): Declare.
5719
f0db101d
PA
57202015-08-21 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (wait_for_sigstop): Always switch to no thread
5723 selected if the previously current thread dies.
5724 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5725 process instead of the current thread's.
5726 * remote-utils.c (input_interrupt): Don't check if there's no
5727 current thread.
5728 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5729 current thread to the general thread fails, error out.
5730 (handle_qxfer_auxv, handle_qxfer_libraries)
5731 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5732 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5733 (handle_query): Check if there's a thread selected instead of
5734 checking whether there's any thread in the thread list.
5735 (handle_qxfer_threads, handle_qxfer_btrace)
5736 (handle_qxfer_btrace_conf): Don't error out early if there's no
5737 thread in the thread list.
5738 (handle_v_cont, myresume): Don't set the current thread to the
5739 continue thread.
5740 (process_serial_event) <Hg handling>: Also set thread_id if the
5741 previous general thread is still alive.
5742 (process_serial_event) <g/G handling>: If setting the current
5743 thread to the general thread fails, error out.
5744 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5745 thread's lwp instead of the current thread's.
5746 * target.c (set_desired_thread): If the desired thread was not
5747 found, leave the current thread pointing to NULL. Return an int
5748 (boolean) indicating success.
5749 * target.h (set_desired_thread): Change return type to int.
5750
40045d91
MF
57512015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5752
5753 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5754 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5755 #includes.
5756 (ps_get_thread_area): New function.
5757
45face3b
GB
57582015-08-19 Gary Benson <gbenson@redhat.com>
5759
5760 * hostio.c (handle_pread): Do not attempt to read more data
5761 than hostio_reply_with_data can fit in a packet.
5762
16d5f642
JB
57632015-08-18 Joel Brobecker <brobecker@adacore.com>
5764
5765 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5766
a738da3a
MF
57672015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5768
5769 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5770
33ebda9d
PA
57712015-08-06 Pedro Alves <palves@redhat.com>
5772
5773 * tracepoint.c (expr_eval_result): Now an int.
5774
a44892be
PA
57752015-08-06 Pedro Alves <palves@redhat.com>
5776
5777 * gdbthread.h (struct regcache): Forward declare.
5778 (struct thread_info) <regcache_data>: Now a struct regcache
5779 pointer.
5780 * inferiors.c (inferior_regcache_data)
5781 (set_inferior_regcache_data): Now work with struct regcache
5782 pointers.
5783 * inferiors.h (struct regcache): Forward declare.
5784 (inferior_regcache_data, set_inferior_regcache_data): Now work
5785 with struct regcache pointers.
5786 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5787 (free_register_cache_thread): Remove struct regcache pointer
5788 casts.
5789
608a1e46
PA
57902015-08-06 Pedro Alves <palves@redhat.com>
5791
5792 * server.c (captured_main): On error, print the exception message
5793 to stderr, and if run_once is set, throw a quit.
5794
f0ce0d3a
PA
57952015-08-06 Pedro Alves <palves@redhat.com>
5796
5797 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5798 the current thread.
5799
bf47e248
PA
58002015-08-06 Pedro Alves <palves@redhat.com>
5801
5802 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5803 reading beyond the passed in buffer length.
5804
b6b9ffcc
PL
58052015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5806
5807 * tracepoint.c (symbol_list) <required>: Remove.
5808
863d01bd
PA
58092015-08-06 Pedro Alves <palves@redhat.com>
5810
5811 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5812 count if stopping and suspending threads.
5813 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5814 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5815 (linux_detach): Complete an ongoing step-over.
5816 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5817 throughout.
5818 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5819 (linux_wait_1): If passing a signal to the inferior after
5820 finishing a step-over, unsuspend and re-resume all lwps. If we
5821 see a single-step event but the thread should be continuing, don't
5822 pass the trap to gdb.
5823 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5824 internal_error instead of gdb_assert.
5825 (enqueue_pending_signal): New function.
5826 (check_ptrace_stopped_lwp_gone): Add debug output.
5827 (start_step_over): Use internal_error instead of gdb_assert.
5828 (complete_ongoing_step_over): New function.
5829 (linux_resume_one_thread): Don't resume a suspended thread.
5830 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5831 it stepping.
5832
00db26fa
PA
58332015-08-06 Pedro Alves <palves@redhat.com>
5834
5835 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5836 (linux_thread_alive): Use lwp_is_marked_dead.
5837 (extended_event_reported): Delete.
5838 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5839 instead of extended_event_reported.
5840 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5841 as well.
5842 (lwp_is_marked_dead): New function.
5843 (lwp_running): Use lwp_is_marked_dead.
5844 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5845 comment.
5846
ad071a30
PA
58472015-08-06 Pedro Alves <palves@redhat.com>
5848
5849 * linux-low.c (linux_wait_1): Move fork event output out of the
5850 !report_to_gdb check. Pass event_child->waitstatus to
5851 target_waitstatus_to_string instead of ourstatus.
5852
524b57e6
YQ
58532015-08-04 Yao Qi <yao.qi@linaro.org>
5854
5855 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5856 if current_thread is 32 bit.
5857
6085d6f6
YQ
58582015-08-04 Yao Qi <yao.qi@linaro.org>
5859
5860 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5861 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5862 * server.c (extended_protocol): Remove "static".
5863 * server.h (extended_protocol): Declare it.
5864
8a7e4587
YQ
58652015-08-04 Yao Qi <yao.qi@linaro.org>
5866
5867 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5868 both aarch64 and aarch32.
5869 (aarch64_set_pc): Likewise.
5870
3b53ae99
YQ
58712015-08-04 Yao Qi <yao.qi@linaro.org>
5872
5873 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5874 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5875 arm-with-neon.xml to srv_xmlfiles.
5876 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5877 (is_64bit_tdesc): New function.
5878 (aarch64_linux_read_description): New function.
5879 (aarch64_arch_setup): Call aarch64_linux_read_description.
5880 (regs_info): Rename to regs_info_aarch64.
5881 (aarch64_regs_info): Return right regs_info.
5882 (initialize_low_arch): Call initialize_low_arch_aarch32.
5883
bd9e6534
YQ
58842015-08-04 Yao Qi <yao.qi@linaro.org>
5885
5886 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5887 * linux-aarch32-low.c: New file.
5888 * linux-aarch32-low.h: New file.
5889 * linux-arm-low.c (arm_fill_gregset): Move it to
5890 linux-aarch32-low.c.
5891 (arm_store_gregset): Likewise.
5892 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5893 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5894 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5895 (regs_info): Rename to regs_info_arm.
5896 (arm_regs_info): Return regs_info_aarch32 if
5897 have_ptrace_getregset is 1 and target description is
5898 arm_with_neon or arm_with_vfpv3.
5899 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5900 Call initialize_low_arch_aarch32 instead.
5901
ded48a5e
YQ
59022015-08-04 Yao Qi <yao.qi@linaro.org>
5903
5904 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5905 * linux-low.c: ... here.
5906 * linux-low.h (have_ptrace_getregset): Declare it.
5907
96e9210f
PA
59082015-08-04 Pedro Alves <palves@redhat.com>
5909
5910 * thread-db.c (struct thread_db): Use new typedefs.
5911 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5912 CHK calls.
5913 (disable_thread_event_reporting): Cast result of dlsym to
5914 destination function pointer type.
5915 (thread_db_mourn): Use td_ta_delete_ftype.
5916
af60a1ef
SL
59172015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5918
5919 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5920 arch variant.
5921 (CDX_BREAKPOINT): Define for R2.
5922 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5923 (the_low_target): Add comments.
5924
e8b41681
YQ
59252015-07-30 Yao Qi <yao.qi@linaro.org>
5926
5927 * linux-arm-low.c (arm_hwcap): Remove it.
5928 (arm_read_description): New local variable arm_hwcap. Don't
5929 set arm_hwcap to zero.
5930
89abb039
YQ
59312015-07-30 Yao Qi <yao.qi@linaro.org>
5932
5933 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5934 Use regcache->tdesc instead.
5935 (arm_store_wmmxregset): Likewise.
5936 (arm_fill_vfpregset): Likewise.
5937 (arm_store_vfpregset): Likewise.
5938
deca266c
YQ
59392015-07-30 Yao Qi <yao.qi@linaro.org>
5940
5941 * linux-arm-low.c: Include arch/arm.h.
5942 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5943 (arm_store_gregset): Likewise.
5944
aa58a496
SM
59452015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5946
5947 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5948 ptrace's 4th parameter.
5949
50904b25
YQ
59502015-07-27 Yao Qi <yao.qi@linaro.org>
5951
5952 * configure.srv (case aarch64*-*-linux*): Don't set
5953 srv_linux_usrregs.
5954
5826e159
PA
59552015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5956
5957 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5958 sys/ptrace.h.
5959 * linux-arm-low.c: Likewise.
5960 * linux-cris-low.c: Likewise.
5961 * linux-crisv32-low.c: Likewise.
5962 * linux-low.c: Likewise.
5963 * linux-m68k-low.c: Likewise.
5964 * linux-mips-low.c: Likewise.
5965 * linux-nios2-low.c: Likewise.
5966 * linux-s390-low.c: Likewise.
5967 * linux-sparc-low.c: Likewise.
5968 * linux-tic6x-low.c: Likewise.
5969 * linux-tile-low.c: Likewise.
5970 * linux-x86-low.c: Likewise.
5971
54019719
PA
59722015-07-24 Pedro Alves <palves@redhat.com>
5973
5974 * config.in: Regenerate.
5975 * configure: Regenerate.
5976
eb7aa561
PA
59772015-07-24 Pedro Alves <palves@redhat.com>
5978
5979 * acinclude.m4: Include ../ptrace.m4.
5980 * configure.ac: Call GDB_AC_PTRACE.
5981 * config.in, configure: Regenerate.
5982
55d7b841
YQ
59832015-07-24 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-low.c (linux_create_inferior): Remove setting to
5986 proc->priv->new_inferior.
5987 (linux_attach): Likewise.
5988 (linux_low_filter_event): Likewise.
5989 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5990
c06cbd92
YQ
59912015-07-24 Yao Qi <yao.qi@linaro.org>
5992
5993 * linux-low.c (linux_arch_setup): New function.
5994 (linux_low_filter_event): If proc->tdesc is NULL and
5995 proc->attached is true, call the_low_target.arch_setup.
5996 Otherwise, keep status pending, and return.
5997 (linux_resume_one_lwp_throw): Don't call get_pc if
5998 thread->while_stepping isn't NULL. Don't call
5999 get_thread_regcache if proc->tdesc is NULL.
6000 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6001 (linux_target_ops): Install arch_setup.
6002 * server.c (start_inferior): Call the_target->arch_setup.
6003 * target.h (struct target_ops) <arch_setup>: New field.
6004 (target_arch_setup): New marco.
6005 * lynx-low.c (lynx_target_ops): Update.
6006 * nto-low.c (nto_target_ops): Update.
6007 * spu-low.c (spu_target_ops): Update.
6008 * win32-low.c (win32_target_ops): Update.
6009
5ae3ebba
YQ
60102015-07-24 Yao Qi <yao.qi@linaro.org>
6011
6012 * linux-low.c (linux_add_process): Don't set
6013 proc->priv->new_inferior.
6014 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6015 (linux_attach): Likewise.
6016
eb97750b
YQ
60172015-07-24 Yao Qi <yao.qi@linaro.org>
6018
6019 * server.c (start_inferior): Code refactor.
6020
51aee833
YQ
60212015-07-24 Yao Qi <yao.qi@linaro.org>
6022
6023 * server.c (process_serial_event): Set general_thread.
6024
af1b22f3
YQ
60252015-07-21 Yao Qi <yao.qi@linaro.org>
6026
6027 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6028 aarch64_linux_get_debug_reg_capacity.
6029
554717a3
YQ
60302015-07-17 Yao Qi <yao.qi@linaro.org>
6031
6032 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6033 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6034 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6035 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6036 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6037 (AARCH64_HWP_ALIGNMENT): Likewise.
6038 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6039 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6040 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6041 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6042 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6043 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6044 (struct aarch64_debug_reg_state): Likewise.
6045 (struct arch_lwp_info): Likewise.
6046 (aarch64_align_watchpoint): Likewise.
6047 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6048 (aarch64_watchpoint_length): Likewise.
6049 (aarch64_point_encode_ctrl_reg): Likewise
6050 (aarch64_point_is_aligned): Likewise.
6051 (aarch64_align_watchpoint): Likewise.
6052 (aarch64_linux_set_debug_regs):
6053 (aarch64_dr_state_insert_one_point): Likewise.
6054 (aarch64_dr_state_remove_one_point): Likewise.
6055 (aarch64_handle_breakpoint): Likewise.
6056 (aarch64_handle_aligned_watchpoint): Likewise.
6057 (aarch64_handle_unaligned_watchpoint): Likewise.
6058 (aarch64_handle_watchpoint): Likewise.
6059
c67ca4de
YQ
60602015-07-17 Yao Qi <yao.qi@linaro.org>
6061
6062 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6063 and don't aarch64_get_debug_reg_state. All callers update.
6064 (aarch64_handle_aligned_watchpoint): Likewise.
6065 (aarch64_handle_unaligned_watchpoint): Likewise.
6066 (aarch64_handle_watchpoint): Likewise.
6067 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6068 (aarch64_remove_point): Likewise.
6069
25abf979
YQ
60702015-07-17 Yao Qi <yao.qi@linaro.org>
6071
6072 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6073 debug_printf.
6074 (aarch64_handle_unaligned_watchpoint): Likewise.
6075
db1ff28b
JK
60762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6077
6078 Revert the previous 3 commits:
6079 Move gdb_regex* to common/
6080 Move linux_find_memory_regions_full & co.
6081 gdbserver build-id attribute generator
6082
700ca40f
JK
60832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6084 Jan Kratochvil <jan.kratochvil@redhat.com>
6085
6086 gdbserver build-id attribute generator.
6087 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6088 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6089 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6090 (find_phdr): New.
6091 (get_dynamic): Use find_pdhr to traverse program headers.
6092 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6093 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6094 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6095 (get_hex_build_id): New.
6096 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6097 to reply XML document.
6098
9904185c
JK
60992015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6100 Jan Kratochvil <jan.kratochvil@redhat.com>
6101
6102 * target.c: Include target/target-utils.h and fcntl.h.
6103 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6104 (target_fileio_read_stralloc): New functions.
6105
6e5b4429
JK
61062015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6107
6108 * Makefile.in (OBS): Add gdb_regex.o.
6109 (gdb_regex.o): New.
6110 * config.in: Rebuilt.
6111 * configure: Rebuilt.
6112
ddc98fbf
JK
61132015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6114 Jan Kratochvil <jan.kratochvil@redhat.com>
6115
6116 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6117 * Makefile.in (OBS): Add target-utils.o.
6118 (linux-maps.o, target-utils.o): New.
6119 * configure.srv (srv_linux_obj): Add linux-maps.o.
6120
e57bb7a0
PL
61212015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6122
6123 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6124 function, return 1.
6125 (the_low_target): Install it.
6126
586b02a9
PA
61272015-07-14 Pedro Alves <palves@redhat.com>
6128
6129 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6130 Instead, ignore ECHILD, and throw an error for other errnos.
6131
58c1b36c
PA
61322015-07-10 Pedro Alves <palves@redhat.com>
6133
6134 * event-loop.c (struct callback_event) <data>: Change type to
6135 gdb_client_data instance instead of gdb_client_data pointer.
6136 (append_callback_event): Adjust.
6137
421530db
PL
61382015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6139
6140 * linux-aarch64-low.c: Add comments for each linux_target_ops
6141 method. Remove comments already covered in target_ops and
6142 linux_target_ops definitions.
6143 (the_low_target): Add comments for each unimplemented method.
6144
c2d65f38
YQ
61452015-07-09 Yao Qi <yao.qi@linaro.org>
6146
6147 * linux-aarch64-low.c (aarch64_regmap): Remove.
6148 (aarch64_usrregs_info): Remove.
6149 (regs_info): Set field usrregs to NULL.
6150
b20a6524
MM
61512015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6152
6153 * linux-low.c: Include "rsp-low.h"
6154 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6155 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6156 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6157 (handle_btrace_enable_pt): New.
6158 (handle_btrace_general_set): Support "pt".
6159 (handle_btrace_conf_general_set): Support "pt:size".
6160
96c97461
PL
61612015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6162
6163 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6164 Z_PACKET_SW_BP.
6165
37d66942
PL
61662015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6167
6168 * linux-aarch64-low.c: Remove comment about endianness.
6169 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6170 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6171 memcmp.
6172
dc06243f
GB
61732015-06-24 Gary Benson <gbenson@redhat.com>
6174
6175 * linux-i386-ipa.c (stdint.h): Do not include.
6176 * lynx-i386-low.c (stdint.h): Likewise.
6177 * lynx-ppc-low.c (stdint.h): Likewise.
6178 * mem-break.c (stdint.h): Likewise.
6179 * thread-db.c (stdint.h): Likewise.
6180 * tracepoint.c (stdint.h): Likewise.
6181 * win32-low.c (stdint.h): Likewise.
6182
124e13d9
SM
61832015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6184
6185 * server.c (write_qxfer_response): Update call to
6186 remote_escape_output.
6187
909c2cda
JK
61882015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6189 Jan Kratochvil <jan.kratochvil@redhat.com>
6190
6191 Merge multiple hex conversions.
6192 * gdbreplay.c (tohex): Rename to 'fromhex'.
6193 (logchar): Use fromhex.
6194
24c05f46
JK
61952015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6196
6197 * server.c (handle_qxfer_libraries): Set `version' attribute for
6198 <library-list>.
6199
14d2069a
GB
62002015-06-10 Gary Benson <gbenson@redhat.com>
6201
6202 * target.h (struct target_ops) <multifs_open>: New field.
6203 <multifs_unlink>: Likewise.
6204 <multifs_readlink>: Likewise.
6205 * linux-low.c (nat/linux-namespaces.h): New include.
6206 (linux_target_ops): Initialize the_target->multifs_open,
6207 the_target->multifs_unlink and the_target->multifs_readlink.
6208 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6209 * hostio.c (hostio_fs_pid): New static variable.
6210 (hostio_handle_new_gdb_connection): New function.
6211 (handle_setfs): Likewise.
6212 (handle_open): Use the_target->multifs_open as appropriate.
6213 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6214 (handle_readlink): Use the_target->multifs_readlink as
6215 appropriate.
6216 (handle_vFile): Handle vFile:setfs packets.
6217 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6218 after target_handle_new_gdb_connection.
6219
4b8b5e72
GB
62202015-06-10 Gary Benson <gbenson@redhat.com>
6221
6222 * configure.ac (AC_CHECK_FUNCS): Add setns.
6223 * config.in: Regenerate.
6224 * configure: Likewise.
6225 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6226 (linux-namespaces.o): New rule.
6227 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6228
3ac2e371
GB
62292015-06-09 Gary Benson <gbenson@redhat.com>
6230
6231 * hostio.c (handle_open): Process mode argument with
6232 fileio_to_host_mode.
6233
ca9b78ce
YQ
62342015-06-01 Yao Qi <yao.qi@linaro.org>
6235
6236 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6237 * linux-x86-low.c: Likewise.
6238
bfacd19d
DB
62392015-05-28 Don Breazeal <donb@codesourcery.com>
6240
6241 * linux-low.c (handle_extended_wait): Initialize
6242 thread_info.last_resume_kind for new fork children.
6243
452003ef
PA
62442015-05-15 Pedro Alves <palves@redhat.com>
6245
6246 * target.h (target_handle_new_gdb_connection): Rewrite using if
6247 wrapped in do/while.
6248
1041a03c
JB
62492015-05-14 Joel Brobecker <brobecker@adacore.com>
6250
6251 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6252 * configure, config.in: Regenerate.
6253 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6254 Declare typedef.
6255
c269dbdb
DB
62562015-05-12 Don Breazeal <donb@codesourcery.com>
6257
6258 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6259 PTRACE_EVENT_VFORK_DONE.
6260 (linux_low_ptrace_options, extended_event_reported): Add vfork
6261 events.
6262 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6263 and "vforkdone" for RSP 'T' Stop Reply Packet.
6264 * server.h (report_vfork_events): Declare
6265 global variable.
6266
3a8a0396
DB
62672015-05-12 Don Breazeal <donb@codesourcery.com>
6268
6269 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6270 (the_low_target) <new_fork>: Initialize new member.
6271 * linux-arm-low.c (arm_new_fork): New function.
6272 (the_low_target) <new_fork>: Initialize new member.
6273 * linux-low.c (handle_extended_wait): Call new target function
6274 new_fork.
6275 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6276 * linux-mips-low.c (mips_add_watchpoint): New function
6277 extracted from mips_insert_point.
6278 (the_low_target) <new_fork>: Initialize new member.
6279 (mips_linux_new_fork): New function.
6280 (mips_insert_point): Call mips_add_watchpoint.
6281 * linux-x86-low.c (x86_linux_new_fork): New function.
6282 (the_low_target) <new_fork>: Initialize new member.
6283
de0d863e
DB
62842015-05-12 Don Breazeal <donb@codesourcery.com>
6285
6286 * linux-low.c (handle_extended_wait): Implement return value,
6287 rename argument 'event_child' to 'event_lwp', handle
6288 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6289 (linux_low_ptrace_options): New function.
6290 (linux_low_filter_event): Call linux_low_ptrace_options,
6291 use different argument fo linux_enable_event_reporting,
6292 use return value from handle_extended_wait.
6293 (extended_event_reported): New function.
6294 (linux_wait_1): Call extended_event_reported and set
6295 status to report fork events.
6296 (linux_write_memory): Add pid to debug message.
6297 (reset_lwp_ptrace_options_callback): New function.
6298 (linux_handle_new_gdb_connection): New function.
6299 (linux_target_ops): Initialize new structure member.
6300 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6301 * lynx-low.c: Initialize new structure member.
6302 * remote-utils.c (prepare_resume_reply): Implement stop reason
6303 "fork" for "T" stop message.
6304 * server.c (handle_query): Call handle_new_gdb_connection.
6305 * server.h (report_fork_events): Declare global flag.
6306 * target.h (struct target_ops) <handle_new_gdb_connection>:
6307 New member.
6308 (target_handle_new_gdb_connection): New macro.
6309 * win32-low.c: Initialize new structure member.
6310
ddcbc397
DB
63112015-05-12 Don Breazeal <donb@codesourcery.com>
6312
6313 * mem-break.c (APPEND_TO_LIST): Define macro.
6314 (clone_agent_expr): New function.
6315 (clone_one_breakpoint): New function.
6316 (clone_all_breakpoints): New function.
6317 * mem-break.h: Declare new functions.
6318
89245bc0
DB
63192015-05-12 Don Breazeal <donb@codesourcery.com>
6320
6321 * linux-low.c (linux_supports_fork_events): New function.
6322 (linux_supports_vfork_events): New function.
6323 (linux_target_ops): Initialize new structure members.
6324 (initialize_low): Call linux_check_ptrace_features.
6325 * lynx-low.c (lynx_target_ops): Initialize new structure
6326 members.
6327 * server.c (report_fork_events, report_vfork_events):
6328 New global flags.
6329 (handle_query): Add new features to qSupported packet and
6330 response.
6331 (captured_main): Initialize new global variables.
6332 * target.h (struct target_ops) <supports_fork_events>:
6333 New member.
6334 <supports_vfork_events>: New member.
6335 (target_supports_fork_events): New macro.
6336 (target_supports_vfork_events): New macro.
6337 * win32-low.c (win32_target_ops): Initialize new structure
6338 members.
6339
835205d0
GB
63402015-05-12 Gary Benson <gbenson@redhat.com>
6341
6342 * server.c (handle_qxfer_exec_file): Use current process
6343 if annex is empty.
6344
21e94bd9
SL
63452015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6346
6347 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6348 Remove HAVE_PTRACE_GETREGS conditionals.
6349 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6350 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6351
45614f15
YQ
63522015-05-08 Yao Qi <yao.qi@linaro.org>
6353
6354 * linux-low.c (linux_supports_conditional_breakpoints): New
6355 function.
6356 (linux_target_ops): Install new target method.
6357 * lynx-low.c (lynx_target_ops): Install NULL hook for
6358 supports_conditional_breakpoints.
6359 * nto-low.c (nto_target_ops): Likewise.
6360 * spu-low.c (spu_target_ops): Likewise.
6361 * win32-low.c (win32_target_ops): Likewise.
6362 * server.c (handle_query): Check
6363 target_supports_conditional_breakpoints.
6364 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6365 New field.
6366 (target_supports_conditional_breakpoints): New macro.
6367
80ad801e
PA
63682015-05-06 Pedro Alves <palves@redhat.com>
6369
6370 PR server/18081
6371 * server.c (start_inferior): If the process exits, mourn it.
6372
819843c7
GB
63732015-04-21 Gary Benson <gbenson@redhat.com>
6374
6375 * hostio.c (fileio_open_flags_to_host): Factored out to
6376 fileio_to_host_openflags in common/fileio.c. Single use
6377 updated.
6378
a2d5a9d7
MF
63792015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6380
6381 * linux-xtensa-low.c (xtensa_fill_gregset)
6382 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6383 XCHAL_HAVE_LOOP.
6384
deb44829
MF
63852015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6386
6387 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6388 (regs_info): Replace usrregs pointer with NULL.
6389
e57f1de3
GB
63902015-04-17 Gary Benson <gbenson@redhat.com>
6391
6392 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6393 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6394 * server.c (handle_qxfer_exec_file): New function.
6395 (qxfer_packets): Add exec-file entry.
6396 (handle_query): Report qXfer:exec-file:read as supported packet.
6397
62828379
RN
63982015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6399
6400 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6401
b88bb450
GB
64022015-04-09 Gary Benson <gbenson@redhat.com>
6403
6404 * hostio-errno.c (errno_to_fileio_error): Remove function.
6405 Update caller to use remote_fileio_to_fio_error.
6406
c8f4bfdd
YQ
64072015-04-09 Yao Qi <yao.qi@linaro.org>
6408
6409 * linux-low.c (linux_insert_point): Call
6410 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6411 (linux_remove_point): Call remove_memory_breakpoint if type is
6412 raw_bkpt_type_sw.
6413 * linux-x86-low.c (x86_insert_point): Don't call
6414 insert_memory_breakpoint.
6415 (x86_remove_point): Don't call remove_memory_breakpoint.
6416
41f98f02
PA
64172015-04-01 Pedro Alves <palves@redhat.com>
6418 Cleber Rosa <crosa@redhat.com>
6419
6420 * server.c (gdbserver_usage): Reorganize and extend the usage
6421 message.
6422
2bf6fb9d
PA
64232015-03-24 Pedro Alves <palves@redhat.com>
6424
6425 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6426 output. Also dump TRAP_TRACE.
6427 (linux_low_filter_event): In debug output, distinguish a
6428 resume_stop SIGSTOP from a delayed SIGSTOP.
6429
369f6daa
GB
64302015-03-24 Gary Benson <gbenson@redhat.com>
6431
6432 * linux-x86-low.c (x86_linux_new_thread): Moved to
6433 nat/x86-linux.c.
6434 (x86_linux_prepare_to_resume): Likewise.
6435
8e5d4070
GB
64362015-03-24 Gary Benson <gbenson@redhat.com>
6437
6438 * Makefile.in (x86-linux-dregs.o): New rule.
6439 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6440 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6441 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6442 (x86_linux_dr_get): Likewise.
6443 (x86_linux_dr_set): Likewise.
6444 (update_debug_registers_callback): Likewise.
6445 (x86_linux_dr_set_addr): Likewise.
6446 (x86_linux_dr_get_addr): Likewise.
6447 (x86_linux_dr_set_control): Likewise.
6448 (x86_linux_dr_get_control): Likewise.
6449 (x86_linux_dr_get_status): Likewise.
6450 (x86_linux_update_debug_registers): Likewise.
6451
2b95d440
GB
64522015-03-24 Gary Benson <gbenson@redhat.com>
6453
6454 * linux-x86-low.c (x86_linux_update_debug_registers):
6455 New function, factored out from...
6456 (x86_linux_prepare_to_resume): ...this.
6457
14b0bc68
GB
64582015-03-24 Gary Benson <gbenson@redhat.com>
6459
6460 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6461 (x86_linux_dr_set): Likewise.
6462 (update_debug_registers_callback): Likewise.
6463 (x86_linux_dr_set_addr): Likewise.
6464 (x86_linux_dr_get_addr): Likewise.
6465 (x86_linux_dr_set_control): Likewise.
6466 (x86_linux_dr_get_control): Likewise.
6467 (x86_linux_dr_get_status): Likewise.
6468 (x86_linux_prepare_to_resume): Likewise.
6469
5dfe6ca8
GB
64702015-03-24 Gary Benson <gbenson@redhat.com>
6471
6472 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6473 Use perror_with_name. Pass string through gettext.
6474 (x86_linux_dr_set): Likewise.
6475
d33472ad
GB
64762015-03-24 Gary Benson <gbenson@redhat.com>
6477
6478 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6479 (x86_linux_dr_set_addr): ...this.
6480 (x86_dr_low_get_addr): Rename to...
6481 (x86_linux_dr_get_addr): ...this.
6482 (x86_dr_low_set_control): Rename to...
6483 (x86_linux_dr_set_control): ...this.
6484 (x86_dr_low_get_control): Rename to...
6485 (x86_linux_dr_get_control): ...this.
6486 (x86_dr_low_get_status): Rename to...
6487 (x86_linux_dr_get_status): ...this.
6488 (x86_dr_low): Update with new function names.
6489
4b134ca1
GB
64902015-03-24 Gary Benson <gbenson@redhat.com>
6491
6492 * Makefile.in (x86-linux.o): New rule.
6493 * configure.srv: Add x86-linux.o to relevant targets.
6494 * linux-low.c (lwp_set_arch_private_info): New function.
6495 (lwp_arch_private_info): Likewise.
6496 * linux-x86-low.c: Include nat/x86-linux.h.
6497 (arch_lwp_info): Removed structure.
6498 (update_debug_registers_callback):
6499 Use lwp_set_debug_registers_changed.
6500 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6501 and lwp_set_debug_registers_changed.
6502 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6503
34c703da
GB
65042015-03-24 Gary Benson <gbenson@redhat.com>
6505
6506 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6507 * linux-arm-low.c (arm_new_thread): Likewise.
6508 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6509 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6510 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6511 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6512
cff068da
GB
65132015-03-24 Gary Benson <gbenson@redhat.com>
6514
6515 * linux-low.c (ptid_of_lwp): New function.
6516 (lwp_is_stopped): Likewise.
6517 (lwp_stop_reason): Likewise.
6518 * linux-x86-low.c (update_debug_registers_callback):
6519 Use lwp_is_stopped.
6520 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6521 lwp_stop_reason.
6522
b2f7c7e8
GB
65232015-03-24 Gary Benson <gbenson@redhat.com>
6524
6525 * linux-low.h (linux_stop_lwp): Remove declaration.
6526
6d4ee8c6
GB
65272015-03-24 Gary Benson <gbenson@redhat.com>
6528
6529 * linux-low.h: Include nat/linux-nat.h.
6530 * linux-low.c (iterate_over_lwps_args): New structure.
6531 (iterate_over_lwps_filter): New function.
6532 (iterate_over_lwps): Likewise.
6533 * linux-x86-low.c (update_debug_registers_callback):
6534 Update signature to what iterate_over_lwps expects.
6535 Remove PID check that iterate_over_lwps now performs.
6536 (x86_dr_low_set_addr): Use iterate_over_lwps.
6537 (x86_dr_low_set_control): Likewise.
6538
70a0bb6b
GB
65392015-03-24 Gary Benson <gbenson@redhat.com>
6540
6541 * linux-x86-low.c (x86_debug_reg_state): New function.
6542 (x86_linux_prepare_to_resume): Use the above.
6543
7b669087
GB
65442015-03-24 Gary Benson <gbenson@redhat.com>
6545
6546 * linux-low.c (current_lwp_ptid): New function.
6547 * linux-x86-low.c: Include nat/linux-nat.h.
6548 (x86_dr_low_get_addr): Use current_lwp_ptid.
6549 (x86_dr_low_get_control): Likewise.
6550 (x86_dr_low_get_status): Likewise.
6551
eef49a3d
PA
65522015-03-20 Pedro Alves <palves@redhat.com>
6553
6554 * tracepoint.c (cmd_qtstatus): Make "str" const.
6555
b2333d22
PA
65562015-03-20 Pedro Alves <palves@redhat.com>
6557
6558 * server.c (handle_general_set): Make "req_str" const.
6559
23f238d3
PA
65602015-03-19 Pedro Alves <palves@redhat.com>
6561
6562 * linux-low.c (linux_resume_one_lwp): Rename to ...
6563 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6564 instead call perror_with_name.
6565 (check_ptrace_stopped_lwp_gone): New function.
6566 (linux_resume_one_lwp): Reimplement as wrapper around
6567 linux_resume_one_lwp_throw that swallows errors if the LWP is
6568 gone.
6569
91baf43f
PA
65702015-03-19 Pedro Alves <palves@redhat.com>
6571
6572 * linux-low.c (count_events_callback, select_event_lwp_callback):
6573 No longer check whether the thread has resume_stop as last resume
6574 kind.
6575
8bf3b159
PA
65762015-03-19 Pedro Alves <palves@redhat.com>
6577
6578 * linux-low.c (count_events_callback, select_event_lwp_callback):
6579 Use the lwp's status_pending_p field, not the thread's.
6580
b90fc188
PA
65812015-03-19 Pedro Alves <palves@redhat.com>
6582
6583 * linux-low.c (select_event_lwp_callback): Update comments to
6584 no longer mention SIGTRAP.
6585
464b0089
GB
65862015-03-18 Gary Benson <gbenson@redhat.com>
6587
6588 * server.c (handle_query): Do not report vFile:fstat as supported.
6589
aa9e327f
GB
65902015-03-11 Gary Benson <gbenson@redhat.com>
6591
6592 * hostio.c (sys/types.h): New include.
6593 (sys/stat.h): Likewise.
6594 (common-remote-fileio.h): Likewise.
6595 (handle_fstat): New function.
6596 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6597
791c0056
GB
65982015-03-11 Gary Benson <gbenson@redhat.com>
6599
6600 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6601 struct stat.st_blocks and struct stat.st_blksize.
6602 * configure: Regenerate.
6603 * config.in: Likewise.
6604 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6605 (OBS): Add common-remote-fileio.o.
6606 (common-remote-fileio.o): New rule.
6607
9a9df970
PA
66082015-03-09 Pedro Alves <palves@redhat.com>
6609
6610 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6611 'struct sockaddr' pointer in 'accept' call.
6612
9eb1356e
PA
66132015-03-09 Pedro Alves <palves@redhat.com>
6614
6615 Revert:
6616 2015-03-07 Pedro Alves <palves@redhat.com>
6617 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6618 or <winsock2.h> here. Instead include "gdb_socket.h".
6619 (remote_open): Use union gdb_sockaddr_u.
6620 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6621 or <winsock2.h> here. Instead include "gdb_socket.h".
6622 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6623 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6624 or <sys/un.h>.
6625 (init_named_socket, gdb_agent_helper_thread): Use union
6626 gdb_sockaddr_u.
6627
aac331e4
PA
66282015-03-07 Pedro Alves <palves@redhat.com>
6629
6630 * configure.ac (build_warnings): Move
6631 -Wdeclaration-after-statement to the C-specific set.
6632 * configure: Regenerate.
6633
366c75fc
PA
66342015-03-07 Pedro Alves <palves@redhat.com>
6635
6636 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6637 or <winsock2.h> here. Instead include "gdb_socket.h".
6638 (remote_open): Use union gdb_sockaddr_u.
6639 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6640 or <winsock2.h> here. Instead include "gdb_socket.h".
6641 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6642 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6643 or <sys/un.h>.
6644 (init_named_socket, gdb_agent_helper_thread): Use union
6645 gdb_sockaddr_u.
6646
492d29ea
PA
66472015-03-07 Pedro Alves <palves@redhat.com>
6648
6649 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6650 instead.
6651
60a191ed
YQ
66522015-03-06 Yao Qi <yao.qi@linaro.org>
6653
6654 * linux-aarch64-low.c (aarch64_insert_point): Use
6655 show_debug_regs as a boolean.
6656 (aarch64_remove_point): Likewise.
6657
f5771b1d
PA
66582015-03-05 Pedro Alves <palves@redhat.com>
6659
6660 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6661 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6662 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6663 * nto-low.c (nto_target_ops): Likewise.
6664 * spu-low.c (spu_target_ops): Likewise.
6665 * win32-low.c (win32_target_ops): Likewise.
6666
3e572f71
PA
66672015-03-04 Pedro Alves <palves@redhat.com>
6668
72f4393d 6669 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6670 Decide whether a breakpoint triggered based on the SIGTRAP's
6671 siginfo.si_code.
72f4393d
L
6672 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6673 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6674 (linux_low_filter_event): Check for breakpoints before checking
6675 watchpoints.
6676 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6677 siginfo.si_code.
72f4393d
L
6678 (linux_stopped_by_sw_breakpoint)
6679 (linux_supports_stopped_by_sw_breakpoint)
6680 (linux_stopped_by_hw_breakpoint)
6681 (linux_supports_stopped_by_hw_breakpoint): New functions.
6682 (linux_target_ops): Install new target methods.
3e572f71 6683
1ec68e26
PA
66842015-03-04 Pedro Alves <palves@redhat.com>
6685
6686 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6687 * server.c (swbreak_feature, hwbreak_feature): New globals.
6688 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6689 (captured_main): Clear swbreak_feature and hwbreak_feature.
6690 * server.h (swbreak_feature, hwbreak_feature): Declare.
6691 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6692 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6693 supports_stopped_by_hw_breakpoint>: New fields.
6694 (target_supports_stopped_by_sw_breakpoint)
6695 (target_stopped_by_sw_breakpoint)
6696 (target_supports_stopped_by_hw_breakpoint)
6697 (target_stopped_by_hw_breakpoint): Declare.
6698
15c66dd6
PA
66992015-03-04 Pedro Alves <palves@redhat.com>
6700
6701 enum lwp_stop_reason -> enum target_stop_reason
6702 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6703 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6704 (linux_wait_1, stuck_in_jump_pad_callback)
6705 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6706 (linux_stopped_by_watchpoint):
6707 * linux-low.h (enum lwp_stop_reason): Delete.
6708 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6709 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6710
98fc70d6
YQ
67112015-03-04 Yao Qi <yao.qi@linaro.org>
6712
6713 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6714
dd2ac174
GB
67152015-03-03 Gary Benson <gbenson@redhat.com>
6716
6717 * hostio.c (handle_vFile): Fix prefix lengths.
6718
d68e53f4
MM
67192015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6720
6721 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6722 ptr_bits.
6723
bf2d68ab
AA
67242015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6725
6726 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6727 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6728 (clean): Add "rm -f" for above C files.
6729 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6730 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6731 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6732 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6733 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6734 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6735 (init_registers_s390x_vx_linux64)
6736 (init_registers_s390x_tevx_linux64)
6737 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6738 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6739 declarations.
6740 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6741 (s390_store_vxrs_high): New functions.
6742 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6743 NT_S390_VXRS_HIGH.
6744 (s390_arch_setup): Add logic for selecting one of the new target
6745 descriptions. Activate the new vector regsets if applicable.
6746 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6747 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6748 and init_registers_s390x_tevx_linux64.
6749
c966a859
PA
67502015-03-01 Pedro Alves <palves@redhat.com>
6751
6752 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6753 parameter.
6754
4180215b
PA
67552015-02-27 Pedro Alves <palves@redhat.com>
6756
6757 * linux-x86-low.c (u_debugreg_offset): New function.
6758 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6759
749bab01
PA
67602015-02-27 Pedro Alves <palves@redhat.com>
6761
6762 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6763 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6764 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6765 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6766 (ps_lsetfpregs, ps_getpid)
6767 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6768 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6769 (ps_lsetxregs, ps_plog): Declare.
6770
3c14e5a3
PA
67712015-02-27 Pedro Alves <palves@redhat.com>
6772
6773 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6774 IP_AGENT_EXPORT_FUNC.
6775 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6776 IP_AGENT_EXPORT_FUNC.
6777 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6778 (IP_AGENT_EXPORT): Delete.
6779 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6780 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6781 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6782 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6783 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6784 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6785 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6786 (traceframe_read_count, traceframe_write_count)
6787 (traceframes_created, trace_state_variables, get_raw_reg)
6788 (get_trace_state_variable_value, set_trace_state_variable_value)
6789 (ust_loaded, helper_thread_id, cmd_buf): Use
6790 IPA_SYM_EXPORTED_NAME.
6791 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6792 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6793 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6794 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6795 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6796 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6797 EXTERN_C_PUSH/EXTERN_C_POP.
6798 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6799 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6800 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6801 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6802 (traceframe_write_count, traceframe_read_count)
6803 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6804 (about_to_request_buffer_space, get_trace_state_variable_value)
6805 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6806 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6807 EXTERN_C_PUSH/EXTERN_C_POP.
6808 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6809 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6810 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6811 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6812 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6813 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6814 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6815 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6816 Define.
6817 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6818 (IP_AGENT_EXPORT_VAR_DECL): Define.
6819 (tracing): Declare.
6820 (gdb_agent_get_raw_reg): Declare.
6821
fe978cb0
PA
68222015-02-27 Tom Tromey <tromey@redhat.com>
6823 Pedro Alves <palves@redhat.com>
6824
6825 Rename symbols whose names are reserved C++ keywords throughout.
6826
3bc3d82a
PA
68272015-02-27 Pedro Alves <palves@redhat.com>
6828
6829 * Makefile.in (COMPILER): New, get it from autoconf.
6830 (CXX): Get from autoconf instead.
6831 (COMPILE.pre): Use COMPILER.
6832 (CC-LD): Rename to ...
6833 (CC_LD): ... this. Use COMPILER.
6834 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6835 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6836 * acinclude.m4: Include build-with-cxx.m4.
6837 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6838 Disable -Werror by default if building in C++ mode.
6839 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6840 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6841 the C++ compiler. Save/restore CXXFLAGS too.
6842 * configure: Regenerate.
6843
07697489
PA
68442015-02-27 Pedro Alves <palves@redhat.com>
6845
6846 * acinclude.m4: Include libiberty.m4.
6847 * configure.ac: Call libiberty_INIT.
6848 * config.in, configure: Regenerate.
6849
9beb7c4e
PA
68502015-02-26 Pedro Alves <palves@redhat.com>
6851
6852 * linux-low.c (linux_wait_1): When incrementing the PC past a
6853 program breakpoint always use the_low_target.breakpoint_len as
6854 increment, rather than the maximum between that and
6855 the_low_target.decr_pc_after_break.
6856
8090aef2
PA
68572015-02-23 Pedro Alves <palves@redhat.com>
6858
6859 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6860 thread was doing a step-over; always adjust the PC if
6861 we stepped over a permanent breakpoint.
6862 (linux_wait_1): If we stepped over breakpoint that was on top of a
6863 permanent breakpoint, manually advance the PC past it.
6864
bc9540e8
PA
68652015-02-23 Pedro Alves <palves@redhat.com>
6866
6867 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6868 modes.
6869 (x86_fill_gregset, x86_store_gregset): Use it when handling
6870 $orig_eax.
6871
2db9a427
PA
68722015-02-20 Pedro Alves <palves@redhat.com>
6873
6874 * thread-db.c: Include "nat/linux-procfs.h".
6875 (thread_db_init): Skip listing new threads if the kernel supports
6876 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6877
afa8d396
PA
68782015-02-20 Pedro Alves <palves@redhat.com>
6879
6880 * linux-low.c (status_pending_p_callback): Use ptid_match.
6881
c9587f88
AT
68822015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6883
6884 PR breakpoints/16812
6885 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6886 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6887 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6888
b05ec7a5
AT
68892015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6890
6891 PR breakpoints/15956
6892 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6893
d33501a5
MM
68942015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6895
6896 * linux-low.c (linux_low_btrace_conf): Print size.
6897 * server.c (handle_btrace_conf_general_set): New.
6898 (hanle_general_set): Call handle_btrace_conf_general_set.
6899 (handle_query): Report Qbtrace-conf:bts:size as supported.
6900
f4abbc16
MM
69012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6902
6903 * linux-low.c (linux_low_enable_btrace): Update parameters.
6904 (linux_low_btrace_conf): New.
6905 (linux_target_ops)<to_btrace_conf>: Initialize.
6906 * server.c (current_btrace_conf): New.
6907 (handle_btrace_enable): Rename to ...
6908 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6909 to target_enable_btrace. Update comment. Update users.
6910 (handle_qxfer_btrace_conf): New.
6911 (qxfer_packets): Add btrace-conf entry.
6912 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6913 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6914 (target_ops)<read_btrace_conf>: New.
6915 (target_enable_btrace): Update parameters.
6916 (target_read_btrace_conf): New.
6917
043c3577
MM
69182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6919
6920 * server.c (handle_btrace_general_set): Remove call to
6921 target_supports_btrace.
6922 (supported_btrace_packets): New.
6923 (handle_query): Call supported_btrace_packets.
6924 * target.h: include btrace-common.h.
6925 (btrace_target_info): Removed.
6926 (supports_btrace, target_supports_btrace): Update parameters.
6927
734b0e4b
MM
69282015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6929
6930 * Makefile.in (SFILES): Add common/btrace-common.c.
6931 (OBS): Add common/btrace-common.o.
6932 (btrace-common.o): Add build rules.
6933 * linux-low: Include btrace-common.h.
6934 (linux_low_read_btrace): Use struct btrace_data. Call
6935 btrace_data_init and btrace_data_fini.
6936
d6c146e9
PA
69372015-02-06 Pedro Alves <palves@redhat.com>
6938
6939 * thread-db.c (find_new_threads_callback): Add debug output.
6940
20ba1ce6
PA
69412015-02-04 Pedro Alves <palves@redhat.com>
6942
6943 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6944 (resume_stopped_resumed_lwps): New function.
6945 (linux_wait_for_event_filtered): Use it.
6946
8cc73a39
SDJ
69472015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6948
6949 * Makefile.in (SFILES): Add linux-personality.c.
6950 (linux-personality.o): New rule.
6951 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6952 list of objects to be built.
6953 * linux-low.c: Include nat/linux-personality.h.
6954 (linux_create_inferior): Remove code to disable address space
6955 randomization (moved to ../nat/linux-personality.c). Create
6956 cleanup to disable address space randomization.
6957
fb23d554
SDJ
69582015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6959
6960 * Makefile.in (posix-strerror.o): New rule.
6961 (mingw-strerror.o): Likewise.
6962 * configure: Regenerated.
6963 * configure.ac: Source file ../common/common.host. Initialize new
6964 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6965
cdf43629
YQ
69662015-01-14 Yao Qi <yao@codesourcery.com>
6967
6968 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6969 (ppc-linux.o): New rule.
6970 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6971 * configure.ac: AC_CHECK_FUNCS(getauxval).
6972 * config.in: Re-generated.
6973 * configure: Re-generated.
6974 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6975 ppc64_64bit_inferior_p
6976
514c5338
YQ
69772015-01-14 Yao Qi <yao@codesourcery.com>
6978
6979 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6980 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6981 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6982 (PT_ORIG_R3, PT_TRAP): Likewise.
6983 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6984 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6985 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6986
3368c1e5
JB
69872015-01-10 Joel Brobecker <brobecker@adacore.com>
6988
6989 * i387-fp.c (i387_cache_to_xsave): In look over
6990 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6991 zmmh_low_space field by use of zmmh_high_space.
6992
582511be
PA
69932015-01-09 Pedro Alves <palves@redhat.com>
6994
6995 * linux-low.c (step_over_bkpt): Move higher up in the file.
6996 (handle_extended_wait): Don't store the stop_pc here.
6997 (get_stop_pc): Adjust comments and rename to ...
6998 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6999 stopped for a software breakpoint or hardware breakpoint.
7000 (thread_still_has_status_pending_p): New function.
7001 (status_pending_p_callback): Use
7002 thread_still_has_status_pending_p. If the event is no longer
7003 interesting, resume the LWP.
7004 (handle_tracepoints): Add assert.
7005 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7006 (wstatus_maybe_breakpoint): New function.
7007 (cancel_breakpoint): Delete function.
7008 (check_stopped_by_watchpoint): New function, factored out from
7009 linux_low_filter_event.
7010 (lp_status_maybe_breakpoint): Delete function.
7011 (linux_low_filter_event): Remove filter_ptid argument.
7012 Leave thread group exits pending here. Store the LWP's stop PC.
7013 Always leave events pending.
7014 (linux_wait_for_event_filtered): Pull all events out of the
7015 kernel, and leave them all pending.
7016 (count_events_callback, select_event_lwp_callback): Consider all
7017 events.
7018 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7019 (select_event_lwp): Only give preference to the stepping LWP in
7020 all-stop mode. Adjust comments.
7021 (ignore_event): New function.
7022 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7023 references to cancel_breakpoints. Adjust to renames. Also give
7024 equal priority to all LWPs that have had events in non-stop mode.
7025 If reporting a software breakpoint event, unadjust the LWP's PC.
7026 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7027 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7028 Adjust.
7029 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7030 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7031 (linux_stopped_by_watchpoint): Adjust.
7032 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7033 * linux-low.h (enum lwp_stop_reason): New.
7034 (struct lwp_info) <stop_pc>: Adjust comment.
7035 <stopped_by_watchpoint>: Delete field.
7036 <stop_reason>: New field.
7037 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7038 * mem-break.c (software_breakpoint_inserted_here)
7039 (hardware_breakpoint_inserted_here): New function.
7040 * mem-break.h (software_breakpoint_inserted_here)
7041 (hardware_breakpoint_inserted_here): Declare.
7042 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7043 (cancel_breakpoints): Delete.
7044 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7045 (upload_fast_traceframes): Remove references to
7046 cancel_breakpoints.
7047
a33e3959
PA
70482015-01-09 Pedro Alves <palves@redhat.com>
7049
7050 * thread-db.c (find_new_threads_callback): Ignore thread if the
7051 kernel thread ID is -1.
7052
8784d563
PA
70532015-01-09 Pedro Alves <palves@redhat.com>
7054
7055 * linux-low.c (linux_attach_fail_reason_string): Move to
7056 nat/linux-ptrace.c, and rename.
7057 (linux_attach_lwp): Update comment.
7058 (attach_proc_task_lwp_callback): New function.
7059 (linux_attach): Adjust to rename and use
7060 linux_proc_attach_tgid_threads.
7061 (linux_attach_fail_reason_string): Delete declaration.
7062
76f2b779
JB
70632015-01-01 Joel Brobecker <brobecker@adacore.com>
7064
7065 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7066 * server.c (gdbserver_version): Likewise.
7067
fafcc06a
SDJ
70682014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7069
7070 * remote-utils.c: Include ctype.h.
7071 (input_interrupt): Explicitly handle the case when the char
7072 received is the NUL byte. Improve the printing of non-ASCII
7073 characters.
7074
beed38b8
JB
70752014-12-16 Joel Brobecker <brobecker@adacore.com>
7076
7077 * linux-low.c (linux_low_filter_event): Update call to
7078 linux_enable_event_reporting following the addition of
7079 a new parameter to that function.
7080
bf330350
CU
70812014-12-16 Catalin Udma <catalin.udma@freescale.com>
7082
7083 PR server/17457
7084 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7085 (AARCH64_FPCR_REGNO): Likewise.
7086 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7087 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7088 (aarch64_store_fpregset): Likewise.
7089
5227d625
JB
70902014-12-15 Joel Brobecker <brobecker@adacore.com>
7091
7092 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7093 Remove FIXME comment about assumption about N.
7094
f93b65a0
JB
70952014-12-13 Joel Brobecker <brobecker@adacore.com>
7096
7097 * configure.ac: If large-file support is disabled in GDBserver,
7098 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7099 * configure: Regenerate.
7100
e5a9158d
AA
71012014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7102
7103 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7104 warning upon ENODATA from ptrace.
7105 * linux-s390-low.c (s390_store_tdb): New.
7106 (s390_regsets): Add regset for NT_S390_TDB.
7107
feea5f36
AA
71082014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7109
7110 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7111 without a fill_function.
7112 * linux-s390-low.c (s390_fill_last_break): Remove.
7113 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7114 (s390_arch_setup): Use regset's size instead of fill_function for
7115 loop end condition.
7116
098dbe61
AA
71172014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7118
7119 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7120 the regset's store function when ptrace returned an error.
7121 * regcache.c (get_thread_regcache): Invalidate register cache
7122 before fetching inferior's registers.
7123
28eef672
AA
71242014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7125
7126 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7127 while-loop as for-loop.
7128 (regsets_store_inferior_registers): Likewise.
7129
bdca27a2
YQ
71302014-11-28 Yao Qi <yao@codesourcery.com>
7131
7132 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7133 * config.in, configure: Re-generate.
7134 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7135 is defined.
7136
9c232dda
YQ
71372014-11-21 Yao Qi <yao@codesourcery.com>
7138
7139 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7140 (AC_CHECK_HEADERS): Remove malloc.h.
7141 * configure: Re-generated.
7142 * config.in: Re-generated.
7143 * server.h: Don't include alloca.h and malloc.h.
7144 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7145 Don't include malloc.h.
7146
43968415
JB
71472014-11-17 Joel Brobecker <brobecker@adacore.com>
7148
7149 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7150 corresponding ERRNO check in same block.
7151
40e91bc7
PA
71522014-11-12 Pedro Alves <palves@redhat.com>
7153
7154 * server.c (cont_thread): Update comment.
7155 (start_inferior, attach_inferior): No longer clear cont_thread.
7156 (handle_v_cont): No longer set cont_thread.
7157 (captured_main): Clear cont_thread each time a GDB connects.
7158
c2c118cf
PA
71592014-11-12 Pedro Alves <palves@redhat.com>
7160
7161 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7162 thread, and don't resume all threads if the Hc thread has exited.
7163
78708b7c
PA
71642014-11-12 Pedro Alves <palves@redhat.com>
7165
7166 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7167 the process group instead of to a specific LWP.
7168
a2abc7de
PA
71692014-10-15 Pedro Alves <palves@redhat.com>
7170
7171 PR server/17487
7172 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7173 parameter.
7174 (arm_set_thread_context): Delete.
7175 (the_low_target): Adjust.
7176 * win32-i386-low.c (debug_registers_changed)
7177 (debug_registers_used): Delete.
7178 (update_debug_registers_callback): New function.
7179 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7180 needing to update their debug registers.
7181 (win32_get_current_dr): New function.
7182 (x86_dr_low_get_addr, x86_dr_low_get_control)
7183 (x86_dr_low_get_status): Fetch the debug register from the thread
7184 record's context.
7185 (i386_initial_stuff): Adjust.
7186 (i386_get_thread_context): Remove current_event parameter. Don't
7187 clear debug_registers_changed nor copy DR values to
7188 debug_reg_state.
7189 (i386_set_thread_context): Delete.
7190 (i386_prepare_to_resume): New function.
7191 (i386_thread_added): Mark the thread as needing to update irs
7192 debug registers.
7193 (the_low_target): Remove i386_set_thread_context and install
7194 i386_prepare_to_resume.
7195 * win32-low.c (win32_get_thread_context): Adjust.
7196 (win32_set_thread_context): Use SetThreadContext
7197 directly.
7198 (win32_prepare_to_resume): New function.
7199 (win32_require_context): New function, factored out from ...
7200 (thread_rec): ... this.
7201 (continue_one_thread): Call win32_prepare_to_resume on each thread
7202 we're about to continue.
7203 (win32_resume): Call win32_prepare_to_resume on the event thread.
7204 * win32-low.h (struct win32_thread_info)
7205 <debug_registers_changed>: New field.
7206 (struct win32_target_ops): Change prototype of set_thread_context,
7207 delete set_thread_context and add prepare_to_resume.
7208 (win32_require_context): New declaration.
7209
a442d071
GB
72102014-10-08 Gary Benson <gbenson@redhat.com>
7211
7212 * server.h: Do not include common-exceptions.h.
7213
6f1947e8
GB
72142014-10-08 Gary Benson <gbenson@redhat.com>
7215
7216 * server.h: Do not include cleanups.h.
7217
63b434a4
JH
72182014-09-30 James Hogan <james.hogan@imgtec.com>
7219
7220 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7221 mips64-dsp-linux.c.
7222
c4d9ceb6
YQ
72232014-09-23 Yao Qi <yao@codesourcery.com>
7224
7225 * linux-low.c (lp_status_maybe_breakpoint): New function.
7226 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7227 (count_events_callback): Likewise.
7228 (select_event_lwp_callback): Likewise.
7229 (cancel_breakpoints_callback): Likewise.
7230
89a5711c
DB
72312014-09-19 Don Breazeal <donb@codesourcery.com>
7232
7233 * linux-low.c (handle_extended_wait): Call
7234 linux_ptrace_get_extended_event.
7235 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7236 linux_is_extended_waitstatus.
7237
bffc0964
JB
72382014-09-16 Joel Brobecker <brobecker@adacore.com>
7239
7240 * Makefile.in (CPPFLAGS): Define.
7241 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7242 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7243
0bfdf32f
GB
72442014-09-16 Gary Benson <gbenson@redhat.com>
7245
7246 * inferiors.h (current_inferior): Renamed as...
7247 (current_thread): New variable. All uses updated.
7248 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7249 (maybe_move_out_of_jump_pad): Likewise.
7250 (cancel_breakpoint): Likewise.
7251 (linux_low_filter_event): Likewise.
7252 (wait_for_sigstop): Likewise.
7253 (linux_resume_one_lwp): Likewise.
7254 (need_step_over_p): Likewise.
7255 (start_step_over): Likewise.
7256 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7257 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7258 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7259 and save_inferior as saved_thread.
7260 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7261 saved_thread.
7262 (regcache_invalidate_thread): Likewise.
7263 * remote-utils.c (prepare_resume_reply): Likewise.
7264 * thread-db.c (thread_db_get_tls_address): Likewise.
7265 (disable_thread_event_reporting): Likewise.
7266 (remove_thread_event_breakpoints): Likewise.
7267 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7268 as saved_thread.
7269 * target.h (set_desired_inferior): Renamed as...
7270 (set_desired_thread): New declaration. All uses updated.
7271 * server.c (myresume): Updated comment to reference thread instead
7272 of inferior.
7273 (handle_serial_event): Likewise.
7274 (handle_target_event): Likewise.
7275
361c8ade
GB
72762014-09-12 Tom Tromey <tromey@redhat.com>
7277 Gary Benson <gbenson@redhat.com>
7278
7279 * regcache.h: Include common-regcache.h.
7280 (regcache_read_pc): Don't declare.
7281 * regcache.c (get_thread_regcache_for_ptid): New function.
7282
bd9269f7
GB
72832014-09-11 Tom Tromey <tromey@redhat.com>
7284 Gary Benson <gbenson@redhat.com>
7285
7286 * symbol.c: New file.
7287 * Makefile.in (SFILES): Add symbol.c.
7288 (OBS): Add symbol.o.
7289
f8c1d06b
GB
72902014-09-11 Gary Benson <gbenson@redhat.com>
7291
7292 * target.c (target_stop_ptid, target_continue_ptid): New
7293 functions.
7294
721ec300
GB
72952014-09-11 Tom Tromey <tromey@redhat.com>
7296 Gary Benson <gbenson@redhat.com>
7297
7298 * target.h: Include target/target.h.
7299 * target.c (target_read_memory, target_read_uint32)
7300 (target_write_memory): New functions.
7301
c5e92cca
GB
73022014-09-11 Gary Benson <gbenson@redhat.com>
7303
7304 * server.h (debug_hw_points): Don't declare.
7305 * server.c (debug_hw_points): Don't define. Replace all uses
7306 with show_debug_regs.
7307 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7308 all uses with show_debug_regs.
7309
2e4bb98a
EBM
73102014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7311
7312 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7313 endianness into account.
7314 (ppc_supply_ptrace_register): Likewise.
7315
ac740bc7
JH
73162014-09-03 James Hogan <james.hogan@imgtec.com>
7317
7318 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7319 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7320
97ea6506
GB
73212014-09-03 Gary Benson <gbenson@redhat.com>
7322
7323 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7324 ALL_DEBUG_ADDRESS_REGISTERS.
7325
df7e5265
GB
73262014-09-02 Gary Benson <gbenson@redhat.com>
7327
7328 * i386-low.h: Renamed as...
7329 * x86-low.h: New file. All type, function and variable name
7330 prefixes changed from "i386_" to "x86_". All references updated.
7331 * i386-low.c: Renamed as...
7332 * x86-low.c: New file. All type, function and variable name
7333 prefixes changed from "i386_" to "x86_". All references updated.
7334
ed859da7
GB
73352014-09-02 Gary Benson <gbenson@redhat.com>
7336
7337 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7338 (x86_linux_new_thread): Likewise.
7339
860789c7
GB
73402014-08-29 Gary Benson <gbenson@redhat.com>
7341
7342 * server.h (setjmp.h): Do not include.
7343 (toplevel): Do not declare.
7344 (common-exceptions.h): Include.
7345 (cleanups.h): Likewise.
7346 * server.c (toplevel): Do not define.
7347 (exit_code): New static global.
7348 (detach_or_kill_for_exit_cleanup): New function.
7349 (main): New function. Original main renamed to...
7350 (captured_main): New function.
7351 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7352
ff55e1b5
GB
73532014-08-29 Gary Benson <gbenson@redhat.com>
7354
7355 * Makefile.in (SFILES): Add common/common-exceptions.c.
7356 (OBS): Add common-exceptions.o.
7357 (common-exceptions.o): New rule.
7358 * utils.c (prepare_to_throw_exception): New function.
7359
e9bcb658
GB
73602014-08-29 Gary Benson <gbenson@redhat.com>
7361
7362 * config.in: Regenerate.
7363 * configure: Likewise.
7364
e3180625
GB
73652014-08-29 Gary Benson <gbenson@redhat.com>
7366
7367 * Makefile.in (SFILES): Add common/cleanups.c.
7368 (OBS): cleanups.o.
7369 (cleanups.o): New rule.
7370
e3d6ba5d
GB
73712014-08-29 Gary Benson <gbenson@redhat.com>
7372
7373 * utils.c (internal_vwarning): New function.
7374
7096e886
GB
73752014-08-28 Gary Benson <gbenson@redhat.com>
7376
7377 * utils.h (fatal): Remove declaration.
7378 * utils.c (fatal): Remove function.
7379
14ce3192
GB
73802014-08-28 Gary Benson <gbenson@redhat.com>
7381
7382 * tracepoint.c (gdb_agent_init): Replace fatal with
7383 perror_with_name.
7384 (initialize_tracepoint): Likewise.
7385
50278d59
GB
73862014-08-28 Gary Benson <gbenson@redhat.com>
7387
7388 * remote-utils.c (remote_prepare): Replace fatal with error.
7389
aa96c426
GB
73902014-08-28 Gary Benson <gbenson@redhat.com>
7391
7392 * linux-low.c (linux_async): Replace fatal with warning.
7393 Tidy up and return.
7394 (linux_start_non_stop): Return -1 if linux_async failed.
7395
f7160e97
GB
73962014-08-28 Gary Benson <gbenson@redhat.com>
7397
7398 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7399 gdb_assert.
7400 (i386_dr_low_get_addr): Remove vague comment.
7401 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7402 gdb_assert.
7403
38e08fca
GB
74042014-08-28 Gary Benson <gbenson@redhat.com>
7405
7406 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7407 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7408 internal_error.
7409 (linux_resume_one_lwp): Likewise.
7410 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7411 gdb_assert.
7412 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7413 with internal_error.
7414 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7415 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7416 (find_register_by_name): Replace fatal with internal_error.
7417 (find_regno): Likewise.
7418 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7419 * thread-db.c (thread_db_create_event): Likewise.
7420 (thread_db_load_search): Likewise.
7421 (try_thread_db_load_1): Likewise.
7422 * tracepoint.c (get_jump_space_head): Replace fatal with
7423 internal_error.
7424 (claim_trampoline_space): Likewise.
7425 (have_fast_tracepoint_trampoline_buffer): Likewise.
7426 (cmd_qtstart): Likewise.
7427 (stop_tracing): Likewise.
7428 (fast_tracepoint_collecting): Likewise.
7429 (target_malloc): Likewise.
7430 (download_tracepoint): Likewise.
7431 (download_trace_state_variables): Replace check with gdb_assert.
7432 (upload_fast_traceframes): Replace fatal with internal_error.
7433
34abf635
GB
74342014-08-19 Tom Tromey <tromey@redhat.com>
7435 Gary Benson <gbenson@redhat.com>
7436
7437 * Makefile.in (SFILES): Add common/common-debug.c.
7438 (OBS): Add common-debug.o.
7439 (common-debug.o): New rule.
7440 * debug.h (debug_printf): Don't declare.
7441 * debug.c (debug_printf): Renamed and rewritten as...
7442 (debug_vprintf): New function.
7443
f6e94d78
GB
74442014-08-19 Gary Benson <gbenson@redhat.com>
7445
7446 * utils.h: Do not include print-utils.h.
7447
9239eeab
GB
74482014-08-19 Tom Tromey <tromey@redhat.com>
7449 Gary Benson <gbenson@redhat.com>
7450
7451 * server.h: Add static assertion.
7452 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7453
ef87c8bb
GB
74542014-08-19 Tom Tromey <tromey@redhat.com>
7455 Gary Benson <gbenson@redhat.com>
7456
7457 * Makefile.in (SFILES): Add common/errors.c.
7458 (OBS): Add errors.o.
7459 (IPA_OBS): Add errors-ipa.o.
7460 (errors.o): New rule.
7461 (errors-ipa.o): Likewise.
7462 * utils.h (perror_with_name, error, warning): Don't declare.
7463 * utils.c (warning): Renamed and rewritten as...
7464 (vwarning): New function.
7465 (error): Renamed and rewritten as...
7466 (verror): New function.
7467 (internal_error): Renamed and rewritten as...
7468 (internal_verror): New function.
7469
bb974a24
GB
74702014-08-07 Gary Benson <gbenson@redhat.com>
7471
7472 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7473 * configure: Regenerate.
7474 * config.in: Likewise.
7475 * server.h: Do not include errno.h.
7476 * event-loop.c: Likewise.
7477 * hostio-errno.c: Likewise.
7478 * linux-low.c: Likewise.
7479 * remote-utils.c: Likewise.
7480 * spu-low.c: Likewise.
7481 * utils.c: Likewise.
7482 * gdbreplay.c: Unconditionally include errno.h.
7483
6d3d12eb
GB
74842014-08-07 Gary Benson <gbenson@redhat.com>
7485
7486 * server.h: Do not include string.h.
7487 * event-loop.c: Likewise.
7488 * linux-low.c: Likewise.
7489 * regcache.c: Likewise.
7490 * remote-utils.c: Likewise.
7491 * spu-low.c: Likewise.
7492 * utils.c: Likewise.
7493
dccbb609
GB
74942014-08-07 Gary Benson <gbenson@redhat.com>
7495
7496 * server.h: Do not include gdb_assert.h.
7497
e76df0d0
GB
74982014-08-07 Gary Benson <gbenson@redhat.com>
7499
7500 * server.h: Do not include common-utils.h.
7501
4cb9c816
GB
75022014-08-07 Gary Benson <gbenson@redhat.com>
7503
7504 * server.h: Do not include ptid.h.
7505 * notif.h: Likewise.
7506
3995eeee
GB
75072014-08-07 Gary Benson <gbenson@redhat.com>
7508
7509 * server.h: Do not include gdb_locale.h.
7510
cb9f1a9b
GB
75112014-08-07 Gary Benson <gbenson@redhat.com>
7512
7513 * server.h: Do not include gdb/signals.h.
7514 * win32-low.c: Likewise.
7515
a5fceff8
GB
75162014-08-07 Gary Benson <gbenson@redhat.com>
7517
7518 * server.h: Do not include pathmax.h.
7519
b9391142
GB
75202014-08-07 Gary Benson <gbenson@redhat.com>
7521
7522 * server.h: Do not include libiberty.h.
7523 * linux-bfin-low.c: Likewise.
7524
0e443c87
GB
75252014-08-07 Gary Benson <gbenson@redhat.com>
7526
7527 * server.h: Do not include ansidecl.h.
7528
8ebb3f56
GB
75292014-08-07 Gary Benson <gbenson@redhat.com>
7530
7531 * linux-x86-low.c: Do not include stddef.h.
7532 * lynx-ppc-low.c: Likewise.
7533 * tracepoint.c: Likewise.
7534
8980bdf6
GB
75352014-08-07 Gary Benson <gbenson@redhat.com>
7536
7537 * server.h: Do not include stdarg.h.
7538 * nto-low.c: Likewise.
7539
d7096f71
GB
75402014-08-07 Gary Benson <gbenson@redhat.com>
7541
7542 * server.h: Do not include stdlib.h.
7543 * inferiors.c: Likewise.
7544 * linux-low.c: Likewise.
7545 * regcache.c: Likewise.
7546 * spu-low.c: Likewise.
7547 * tracepoint.c: Likewise.
7548 * utils.c: Likewise.
7549
d02f550d
GB
75502014-08-07 Gary Benson <gbenson@redhat.com>
7551
7552 * server.h: Do not include stdio.h.
7553 * linux-low.c: Likewise.
7554 * remote-utils.c: Likewise.
7555 * spu-low.c: Likewise.
7556 * utils.c: Likewise.
7557 * wincecompat.c: Likewise.
7558
87f6c4e3
GB
75592014-08-06 Gary Benson <gbenson@redhat.com>
7560
7561 * regcache.c (init_register_cache): Move conditionals inside if.
7562
7089dca4
GB
75632014-08-06 Gary Benson <gbenson@redhat.com>
7564
7565 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7566
462f517e
GB
75672014-07-31 Gary Benson <gbenson@redhat.com>
7568
7569 * ax.h: Do not include server.h.
7570 * gdbthread.h: Likewise.
7571 * lynx-low.h: Likewise.
7572 * notif.h: Likewise.
7573
976411d6
GB
75742014-07-30 Gary Benson <gbenson@redhat.com>
7575
7576 * server.h: Include common-defs.h.
7577 Do not include config.h or build-gnulib-gdbserver/config.h.
7578
d41f6d8e
GB
75792014-07-30 Gary Benson <gbenson@redhat.com>
7580
7581 * hostio-errno.c: Move server.h to top of includes list.
7582 * inferiors.c: Likewise.
7583 * linux-x86-low.c: Likewise.
7584 * notif.c: Include server.h.
7585
314c6a35
TT
75862014-07-24 Tom Tromey <tromey@redhat.com>
7587 Gary Benson <gbenson@redhat.com>
7588
7589 * server.h (CORE_ADDR): Now unsigned.
7590
69ff6be5
PA
75912014-07-16 Pedro Alves <palves@redhat.com>
7592
7593 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7594
ce9e3fe7
PA
75952014-07-15 Pedro Alves <palves@redhat.com>
7596
7597 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7598 copy.
7599
e76126e8
PA
76002014-07-11 Pedro Alves <palves@redhat.com>
7601
7602 * linux-low.c (kill_wait_lwp): New function, based on
7603 kill_one_lwp_callback, but use my_waitpid directly.
7604 (kill_one_lwp_callback, linux_kill): Use it.
7605
8e9db26e
PA
76062014-06-23 Pedro Alves <palves@redhat.com>
7607
7608 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7609 before setting DR0..DR3.
7610
698b3e08
GB
76112014-06-20 Gary Benson <gbenson@redhat.com>
7612
7613 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7614 * configure: Regenerated.
7615 * config.in: Likewise.
7616
125f8a3d
GB
76172014-06-20 Gary Benson <gbenson@redhat.com>
7618
7619 * Makefile.in (SFILES): Update locations for files moved
7620 from common to nat.
7621 (object file files): Reordered.
7622
42995dbd
GB
76232014-06-20 Gary Benson <gbenson@redhat.com>
7624
7625 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7626 (i386_dr_low_set_addr): Likewise.
7627 (i386_dr_low_get_addr): Likewise.
7628 (i386_dr_low_can_set_control): Likewise.
7629 (i386_dr_low_set_control): Likewise.
7630 (i386_dr_low_get_control): Likewise.
7631 (i386_dr_low_get_status): Likewise.
7632 (i386_get_debug_register_length): Likewise.
7633 * linux-x86-low.c (i386_dr_low_set_addr):
7634 Changed signature. Made static.
7635 (i386_dr_low_get_addr): Likewise.
7636 (i386_dr_low_set_control): Likewise.
7637 (i386_dr_low_get_control): Likewise.
7638 (i386_dr_low_get_status): Likewise.
7639 (i386_dr_low): New global variable.
7640 * win32-i386-low.c (i386_dr_low_set_addr):
7641 Changed signature. Made static.
7642 (i386_dr_low_get_addr): Likewise.
7643 (i386_dr_low_set_control): Likewise.
7644 (i386_dr_low_get_control): Likewise.
7645 (i386_dr_low_get_status): Likewise.
7646 (i386_dr_low): New global variable.
7647
e1d2394b
MS
76482014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7649
7650 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7651 * Makefile.in (AR, AR_FLAGS): Define.
7652 * configure: Regenerate.
7653
3a8ee006
GB
76542014-06-19 Gary Benson <gbenson@redhat.com>
7655
7656 * Makefile.in (i386-dregs.o): New rule.
7657 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7658 * i386-low.c (target.h): Remove include.
7659 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7660 (DR_CONTROL_SHIFT): Likewise.
7661 (DR_CONTROL_SIZE): Likewise.
7662 (DR_RW_EXECUTE): Likewise.
7663 (DR_RW_WRITE): Likewise.
7664 (DR_RW_READ): Likewise.
7665 (DR_RW_IORW): Likewise.
7666 (DR_LEN_1): Likewise.
7667 (DR_LEN_2): Likewise.
7668 (DR_LEN_4): Likewise.
7669 (DR_LEN_8): Likewise.
7670 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7671 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7672 (DR_ENABLE_SIZE): Likewise.
7673 (DR_LOCAL_SLOWDOWN): Likewise.
7674 (DR_GLOBAL_SLOWDOWN): Likewise.
7675 (DR_CONTROL_RESERVED): Likewise.
7676 (I386_DR_CONTROL_MASK): Likewise.
7677 (I386_DR_VACANT): Likewise.
7678 (I386_DR_LOCAL_ENABLE): Likewise.
7679 (I386_DR_GLOBAL_ENABLE): Likewise.
7680 (I386_DR_DISABLE): Likewise.
7681 (I386_DR_SET_RW_LEN): Likewise.
7682 (I386_DR_GET_RW_LEN): Likewise.
7683 (I386_DR_WATCH_HIT): Likewise.
7684 (i386_wp_op_t): Likewise.
7685 (i386_show_dr): Likewise.
7686 (i386_length_and_rw_bits): Likewise.
7687 (i386_insert_aligned_watchpoint): Likewise.
7688 (i386_remove_aligned_watchpoint): Likewise.
7689 (i386_handle_nonaligned_watchpoint): Likewise.
7690 i386_update_inferior_debug_regs(): Likewise.
7691 (i386_dr_insert_watchpoint): Likewise.
7692 (i386_dr_remove_watchpoint): Likewise.
7693 (i386_dr_region_ok_for_watchpoint): Likewise.
7694 (i386_dr_stopped_data_address): Likewise.
7695 (i386_dr_stopped_by_watchpoint): Likewise.
7696
8f26655c
GB
76972014-06-19 Gary Benson <gbenson@redhat.com>
7698
7699 * i386-low.c (i386_dr_show): Renamed to
7700 i386_show_dr and made static. All uses updated.
7701 (i386_dr_length_and_rw_bits): Renamed to
7702 i386_length_and_rw_bits and made static.
7703 All uses updated.
7704 (i386_dr_insert_aligned_watchpoint): Renamed to
7705 i386_insert_aligned_watchpoint and made static.
7706 All uses updated.
7707 (i386_dr_remove_aligned_watchpoint): Renamed to
7708 i386_remove_aligned_watchpoint and made static.
7709 All uses updated.
7710 (i386_dr_update_inferior_debug_regs): Renamed to
7711 i386_update_inferior_debug_regs and made static.
7712 All uses updated.
7713
b9228891
GB
77142014-06-18 Gary Benson <gbenson@redhat.com>
7715
5171def3
GB
7716 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7717 (i386_dr_low_can_set_control): Likewise.
7718 (i386_get_debug_register_length): Likewise.
7719 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7720 (i386_dr_low_can_set_control): Likewise.
7721 (i386_get_debug_register_length): Likewise.
7722
77232014-06-17 Gary Benson <gbenson@redhat.com>
7724
b9228891
GB
7725 * i386-low.h (i386-dregs.h): New include.
7726 (DR_FIRSTADDR): Now in i386-dregs.h.
7727 (DR_LASTADDR): Likewise.
7728 (DR_NADDR): Likewise.
7729 (DR_STATUS): Likewise.
7730 (DR_CONTROL): Likewise.
7731 (i386_debug_reg_state): Likewise.
7732 (i386_dr_insert_watchpoint): Likewise.
7733 (i386_dr_remove_watchpoint): Likewise.
7734 (i386_dr_region_ok_for_watchpoint): Likewise.
7735 (i386_dr_stopped_data_address): Likewise.
7736 (i386_dr_stopped_by_watchpoint): Likewise.
7737 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7738
4be83cc2
GB
77392014-06-18 Gary Benson <gbenson@redhat.com>
7740
7741 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7742 i386_dr_insert_watchpoint.
7743 (i386_low_remove_watchpoint): Renamed to
7744 i386_dr_remove_watchpoint.
7745 (i386_low_region_ok_for_watchpoint): Renamed to
7746 i386_dr_region_ok_for_watchpoint.
7747 (i386_low_stopped_data_address): Renamed to
7748 i386_dr_stopped_data_address.
7749 (i386_low_stopped_by_watchpoint): Renamed to
7750 i386_dr_stopped_by_watchpoint.
7751 * i386-low.c (i386_show_dr): Renamed to
7752 i386_dr_show and made nonstatic. All uses updated.
7753 (i386_length_and_rw_bits): Renamed to
7754 i386_dr_length_and_rw_bits and made nonstatic.
7755 All uses updated.
7756 (i386_insert_aligned_watchpoint): Renamed to
7757 i386_dr_insert_aligned_watchpoint and made nonstatic.
7758 All uses updated.
7759 (i386_remove_aligned_watchpoint): Renamed to
7760 i386_dr_remove_aligned_watchpoint and made nonstatic.
7761 All uses updated.
7762 (i386_update_inferior_debug_regs): Renamed to
7763 i386_dr_update_inferior_debug_regs and made nonstatic.
7764 All uses updated.
7765 (i386_low_insert_watchpoint): Renamed to
7766 i386_dr_insert_watchpoint. All uses updated.
7767 (i386_low_remove_watchpoint): Renamed to
7768 i386_dr_remove_watchpoint. All uses updated.
7769 (i386_low_region_ok_for_watchpoint): Renamed to
7770 i386_dr_region_ok_for_watchpoint. All uses updated.
7771 (i386_low_stopped_data_address): Renamed to
7772 i386_dr_stopped_data_address. All uses updated.
7773 (i386_low_stopped_by_watchpoint): Renamed to
7774 i386_dr_stopped_by_watchpoint. All uses updated.
7775
131aa0d4
GB
77762014-06-18 Gary Benson <gbenson@redhat.com>
7777
7778 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7779 (i386_dr_low_can_set_control): Likewise.
7780 (i386_insert_aligned_watchpoint): New check.
7781
d9305f7f
GB
77822014-06-18 Gary Benson <gbenson@redhat.com>
7783
7784 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7785 Renamed to state.
7786
e927c9fc
GB
77872014-06-18 Gary Benson <gbenson@redhat.com>
7788
7789 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7790 instead of fatal and error.
7791 (i386_handle_nonaligned_watchpoint): Likewise.
7792
1b6d4134
GB
77932014-06-18 Gary Benson <gbenson@redhat.com>
7794
7795 * i386-low.c (i386_get_debug_register_length): New macro.
7796 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7797 (i386_show_dr): Use debug_printf instead of fprintf. Use
7798 phex to format values.
7799
6e62758f
GB
78002014-06-18 Gary Benson <gbenson@redhat.com>
7801
7802 * i386-low.h: Comment changes.
7803 * i386-low.c: Likewise.
7804
fc6e2f03
GB
78052014-06-18 Gary Benson <gbenson@redhat.com>
7806
7807 * i386-low.c: Whitespace changes.
7808
f9d1eeed
TT
78092014-06-12 Tom Tromey <tromey@redhat.com>
7810
7811 * utils.c (freeargv): Remove.
7812
0b04e523
TT
78132014-06-12 Tom Tromey <tromey@redhat.com>
7814
7815 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7816 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7817 (parse_debug_format_options): Likewise.
7818 (gdbserver_usage): Likewise.
7819 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7820 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7821 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7822 against libiberty.
7823 ($(LIBGNU)): Depend on libiberty.
7824 (all-lib): Recurse into all subdirs.
7825 (install-only): Invoke "install" target in subdirs.
7826 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7827 targets.
7828 * configure: Rebuild.
7829 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7830 for vasprintf, vsnprintf, or gettimeofday.
7831 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7832 srv_tgtobj.
7833
270c9937
JB
78342014-06-05 Joel Brobecker <brobecker@adacore.com>
7835
7836 * development.sh: Delete.
7837 * Makefile.in (config.status): Adjust dependency on development.sh.
7838 * configure.ac: Adjust development.sh source call.
7839 * configure: Regenerate.
7840
0a261ed8
PA
78412014-06-02 Pedro Alves <palves@redhat.com>
7842
7843 * ax.c (gdb_free_agent_expr): New function.
7844 * ax.h (gdb_free_agent_expr): New declaration.
7845 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7846 list.
7847 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7848 static.
7849 (clear_breakpoint_conditions_and_commands): New function.
7850 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7851 (clear_breakpoint_conditions_and_commands): New declaration.
7852
e9dae05e
RR
78532014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7854
7855 * linux-aarch64-low.c (asm/ptrace.h): Include.
7856
5876f503
JK
78572014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7858
7859 Fix TLS access for -static -pthread.
7860 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7861 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7862 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7863
802e8e6d
PA
78642014-05-20 Pedro Alves <palves@redhat.com>
7865
7866 * linux-aarch64-low.c (aarch64_insert_point)
7867 (aarch64_remove_point): No longer check whether the type is
7868 supported here. Adjust to new interface.
7869 (the_low_target): Install aarch64_supports_z_point_type as
7870 supports_z_point_type method.
7871 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7872 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7873 instead of a Z packet char. Adjust.
7874 (arm_supports_z_point_type): New function.
7875 (arm_insert_point, arm_remove_point): Adjust to new interface.
7876 (the_low_target): Install arm_supports_z_point_type.
7877 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7878 (cris_insert_point, cris_remove_point): Adjust to new interface.
7879 Don't check whether the type is supported here.
7880 (the_low_target): Install cris_supports_z_point_type.
7881 * linux-low.c (linux_supports_z_point_type): New function.
7882 (linux_insert_point, linux_remove_point): Adjust to new interface.
7883 * linux-low.h (struct linux_target_ops) <insert_point,
7884 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7885 raw_breakpoint pointer parameter.
7886 <supports_z_point_type>: New method.
7887 * linux-mips-low.c (mips_supports_z_point_type): New function.
7888 (mips_insert_point, mips_remove_point): Adjust to new interface.
7889 Use mips_supports_z_point_type.
7890 (the_low_target): Install mips_supports_z_point_type.
7891 * linux-ppc-low.c (the_low_target): Install NULL as
7892 supports_z_point_type method.
7893 * linux-s390-low.c (the_low_target): Install NULL as
7894 supports_z_point_type method.
7895 * linux-sparc-low.c (the_low_target): Install NULL as
7896 supports_z_point_type method.
7897 * linux-x86-low.c (x86_supports_z_point_type): New function.
7898 (x86_insert_point): Adjust to new insert_point interface. Use
7899 insert_memory_breakpoint. Adjust to new
7900 i386_low_insert_watchpoint interface.
7901 (x86_remove_point): Adjust to remove_point interface. Use
7902 remove_memory_breakpoint. Adjust to new
7903 i386_low_remove_watchpoint interface.
7904 (the_low_target): Install x86_supports_z_point_type.
7905 * lynx-low.c (lynx_target_ops): Install NULL as
7906 supports_z_point_type callback.
7907 * nto-low.c (nto_supports_z_point_type): New.
7908 (nto_insert_point, nto_remove_point): Adjust to new interface.
7909 (nto_target_ops): Install nto_supports_z_point_type.
7910 * mem-break.c: Adjust intro comment.
7911 (struct raw_breakpoint) <raw_type, size>: New fields.
7912 <inserted>: Update comment.
7913 <shlib_disabled>: Delete field.
7914 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7915 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7916 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7917 (raw_bkpt_type_to_target_hw_bp_type): New function.
7918 (find_enabled_raw_code_breakpoint_at): New function.
7919 (find_raw_breakpoint_at): New type and size parameters. Use them.
7920 (insert_memory_breakpoint): New function, based off
7921 set_raw_breakpoint_at.
7922 (remove_memory_breakpoint): New function.
7923 (set_raw_breakpoint_at): Reimplement.
7924 (set_breakpoint): New, based on set_breakpoint_at.
7925 (set_breakpoint_at): Reimplement.
7926 (delete_raw_breakpoint): Go through the_target->remove_point
7927 instead of assuming memory breakpoints.
7928 (find_gdb_breakpoint_at): Delete.
7929 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7930 (find_gdb_breakpoint): New function.
7931 (set_gdb_breakpoint_at): Delete.
7932 (z_type_supported): New function.
7933 (set_gdb_breakpoint_1): New function, loosely based off
7934 set_gdb_breakpoint_at.
7935 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7936 (delete_gdb_breakpoint_at): Delete.
7937 (delete_gdb_breakpoint_1): New function, loosely based off
7938 delete_gdb_breakpoint_at.
7939 (delete_gdb_breakpoint): New function.
7940 (clear_gdb_breakpoint_conditions): Rename to ...
7941 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7942 breakpoint.
7943 (add_condition_to_breakpoint): Make static.
7944 (add_breakpoint_condition): Take a struct breakpoint pointer
7945 instead of an address. Adjust.
7946 (gdb_condition_true_at_breakpoint): Rename to ...
7947 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7948 z_type parameter.
7949 (gdb_condition_true_at_breakpoint): Reimplement.
7950 (add_breakpoint_commands): Take a struct breakpoint pointer
7951 instead of an address. Adjust.
7952 (gdb_no_commands_at_breakpoint): Rename to ...
7953 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7954 parameter. Return true if no breakpoint was found. Change debug
7955 output.
7956 (gdb_no_commands_at_breakpoint): Reimplement.
7957 (run_breakpoint_commands): Rename to ...
7958 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7959 and change return type to boolean.
7960 (run_breakpoint_commands): New function.
7961 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7962 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7963 breakpoint. Go through the_target->remove_point instead of
7964 assuming memory breakpoint.
7965 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7966 software and hardware breakpoints.
7967 (reinsert_raw_breakpoint): Go through the_target->insert_point
7968 instead of assuming memory breakpoint.
7969 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7970 software and hardware breakpoints.
7971 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7972 Check both software and hardware breakpoints.
7973 (validate_inserted_breakpoint): Assert the breakpoint is a
7974 software breakpoint. Set the inserted flag to -1 instead of
7975 setting shlib_disabled.
7976 (delete_disabled_breakpoints): Adjust.
7977 (validate_breakpoints): Only validate software breakpoints.
7978 Adjust to inserted flag change.
7979 (check_mem_read, check_mem_write): Skip breakpoint types other
7980 than software breakpoints. Adjust to inserted flag change.
7981 * mem-break.h (enum raw_bkpt_type): New enum.
7982 (raw_breakpoint, struct process_info): Forward declare.
7983 (Z_packet_to_target_hw_bp_type): Delete declaration.
7984 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7985 (set_gdb_breakpoint, delete_gdb_breakpoint)
7986 (clear_breakpoint_conditions): New declarations.
7987 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7988 (breakpoint_inserted_here): Update comment.
7989 (add_breakpoint_condition, add_breakpoint_commands): Replace
7990 address parameter with a breakpoint pointer parameter.
7991 (gdb_breakpoint_here): Update comment.
7992 (delete_gdb_breakpoint_at): Delete.
7993 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7994 * server.c (process_point_options): Take a struct breakpoint
7995 pointer instead of an address. Adjust.
7996 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7997 delete_gdb_breakpoint.
7998 * spu-low.c (spu_target_ops): Install NULL as
7999 supports_z_point_type method.
8000 * target.h: Include mem-break.h.
8001 (struct target_ops) <prepare_to_access_memory>: Update comment.
8002 <supports_z_point_type>: New field.
8003 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8004 instead of a char. Also take a raw breakpoint pointer.
8005 * win32-arm-low.c (the_low_target): Install NULL as
8006 supports_z_point_type.
8007 * win32-i386-low.c (i386_supports_z_point_type): New function.
8008 (i386_insert_point, i386_remove_point): Adjust to new interface.
8009 (the_low_target): Install i386_supports_z_point_type.
8010 * win32-low.c (win32_supports_z_point_type): New function.
8011 (win32_insert_point, win32_remove_point): Adjust to new interface.
8012 (win32_target_ops): Install win32_supports_z_point_type.
8013 * win32-low.h (struct win32_target_ops):
8014 <supports_z_point_type>: New method.
8015 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8016 instead of a char. Also take a raw breakpoint pointer.
8017
932539e3
PA
80182014-05-20 Pedro Alves <palves@redhat.com>
8019
8020 * mem-break.h: Include break-common.h.
8021 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8022 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8023 (Z_packet_to_target_hw_bp_type): New declaration.
8024 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8025 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8026 (Z_PACKET_ACCESS_WP): Delete macros.
8027 (Z_packet_to_hw_type): Delete function.
8028 * i386-low.h: Don't include break-common.h here.
8029 (Z_packet_to_hw_type): Delete declaration.
8030 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8031 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8032 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8033 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8034 * linux-aarch64-low.c: Don't include break-common.h here.
8035 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8036 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8037 (Z_packet_to_target_hw_bp_type): Delete function.
8038 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8039 function.
8040 (mips_insert_point, mips_remove_point): Use
8041 Z_packet_to_target_hw_bp_type.
8042
4ff0d3d8
PA
80432014-05-20 Pedro Alves <palves@redhat.com>
8044
8045 * linux-aarch64-low.c: Include break-common.h.
8046 (enum target_point_type): Delete.
8047 (Z_packet_to_point_type): Rename to ...
8048 (Z_packet_to_target_hw_bp_type): ... this, and return a
8049 target_hw_bp_type instead.
8050 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8051 instead of an enum target_point_type.
8052 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8053 breakpoint type.
8054 (aarch64_dr_state_insert_one_point)
8055 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8056 (aarch64_handle_aligned_watchpoint)
8057 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8058 Take an enum target_hw_bp_type instead of an enum
8059 target_point_type.
8060 (aarch64_supports_z_point_type): New function.
8061 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8062 use Z_packet_to_target_hw_bp_type.
8063
786dc519
JB
80642014-05-20 Joel Brobecker <brobecker@adacore.com>
8065
8066 * configure.ac: Only use -Werror by default when DEVELOPMENT
8067 is true.
8068 * configure: Regenerate.
8069
9e0aa64f
JK
80702014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8071
8072 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8073 * linux-x86-low.c (X86_64_USER_REGS): New.
8074 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8075
2b577b92
YQ
80762014-04-28 Yao Qi <yao@codesourcery.com>
8077
8078 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8079 name.
8080
94611da2
PA
80812014-04-25 Pedro Alves <palves@redhat.com>
8082
8083 PR server/16255
8084 * linux-low.c (linux_attach_fail_reason_string): New function.
8085 (linux_attach_lwp): Delete.
8086 (linux_attach_lwp_1): Rename to ...
8087 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8088 argument. Remove "initial" parameter. Return int instead of
8089 void. Don't error or warn here.
8090 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8091 failure to attach to the tgid. Call warning when failing to
8092 attach to an lwp.
8093 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8094 argument. Remove "initial" parameter. Return int instead of
8095 void. Don't error or warn here.
8096 (linux_attach_fail_reason_string): New declaration.
8097 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8098 interface change. Use linux_attach_fail_reason_string.
8099
01f9f808
MS
81002014-04-24 Michael Sturm <michael.sturm@mintel.com>
8101 Walfred Tedeschi <walfred.tedeschi@intel.com>
8102
8103 * Makefile.in: Added rules to handle new files
8104 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8105 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8106 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8107 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8108 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8109 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8110 x32-avx512-linux.o.
8111 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8112 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8113 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8114 i386/x32-avx512.xml.
8115 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8116 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8117 i386/x32-avx512-linux.xml.
8118 * i387-fp.c (num_avx512_k_registers): New constant for number
8119 of K registers.
8120 (num_avx512_zmmh_low_registers): New constant for number of
8121 lower ZMM registers (0-15).
8122 (num_avx512_zmmh_high_registers): New constant for number of
8123 higher ZMM registers (16-31).
8124 (num_avx512_ymmh_registers): New contant for number of higher
8125 YMM registers (ymm16-31 added by avx521 on x86_64).
8126 (num_avx512_xmm_registers): New constant for number of higher
8127 XMM registers (xmm16-31 added by AVX512 on x86_64).
8128 (struct i387_xsave): Add space for AVX512 registers.
8129 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8130 Add code to handle AVX512 registers.
8131 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8132 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8133 prototypei from generated file.
8134 (tdesc_amd64_avx512_linux): Likewise.
8135 (init_registers_x32_avx512_linux): Likewise.
8136 (tdesc_x32_avx512_linux): Likewise.
8137 (init_registers_i386_avx512_linux): Likewise.
8138 (tdesc_i386_avx512_linux): Likewise.
8139 (x86_64_regmap): Add AVX512 registers.
8140 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8141 mask.
8142 (initialize_low_arch): Add code to initialize AVX512 registers.
8143
51aa91f9
PA
81442014-04-23 Pedro Alves <palves@redhat.com>
8145
8146 * mem-break.c (find_gdb_breakpoint_at): Make static.
8147 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8148
a4165e94
PA
81492014-04-23 Pedro Alves <palves@redhat.com>
8150
8151 * i386-low.c: Don't include break-common.h here.
8152 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8153 prototype to take target_hw_bp_type as argument instead of a Z
8154 packet char.
8155 * i386-low.h: Include break-common.h here.
8156 (Z_packet_to_hw_type): Declare.
8157 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8158 prototypes.
8159 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8160 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8161 (x86_remove_point): Convert the packet number to a
8162 target_hw_bp_type before calling i386_low_remove_watchpoint.
8163 * win32-i386-low.c (i386_insert_point): Convert the packet number
8164 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8165 (i386_remove_point): Convert the packet number to a
8166 target_hw_bp_type before calling i386_low_remove_watchpoint.
8167
b8acf843
PA
81682014-04-23 Pedro Alves <palves@redhat.com>
8169
8170 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8171
d708bcd1
PA
81722014-04-10 Pedro Alves <palves@redhat.com>
8173
8174 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8175 Check if the condition or command is NULL before checking if the
8176 breakpoint is known. On success, return true.
8177 * mem-break.h (add_breakpoint_condition): Document return.
8178 (add_breakpoint_commands): Add describing comment.
8179 * server.c (skip_to_semicolon): New function.
8180 (process_point_options): Use it.
8181
2eec7d5b
PA
81822014-04-09 Pedro Alves <palves@redhat.com>
8183
8184 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8185 to lwpid_of.
8186
fa96cb38
PA
81872014-02-27 Pedro Alves <palves@redhat.com>
8188
8189 PR 12702
8190 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8191 macros.
8192 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8193 output.
8194 (last_thread_of_process_p): Take a PID argument instead of a
8195 thread pointer.
8196 (linux_wait_for_lwp): Delete.
8197 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8198 functions.
8199 (linux_low_filter_event): New function, party factored out from
8200 linux_wait_for_event.
8201 (linux_wait_for_event): Rename to ...
8202 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8203 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8204 sigsuspend. Check for zombie leaders.
8205 (linux_wait_for_event): Reimplement as wrapper around
8206 linux_wait_for_event_filtered.
8207 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8208 a normal or signal exit is seen, it's the whole process exiting.
8209 (wait_for_sigstop): No longer a for_each_inferior callback.
8210 Rewrite on top of linux_wait_for_event_filtered.
8211 (stop_all_lwps): Call wait_for_sigstop directly.
8212 * server.c (resume, handle_target_event): Handle
8213 TARGET_WAITKIND_NO_RESUMED.
8214
d763de10
JB
82152014-02-26 Joel Brobecker <brobecker@adacore.com>
8216
8217 * win32-low.c (psapi_get_dll_name,
8218 * win32_CreateToolhelp32Snapshot): Delete.
8219 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8220 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8221 Delete.
8222 (handle_load_dll): Add function description.
8223 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8224
850a0f76
JB
82252014-02-26 Joel Brobecker <brobecker@adacore.com>
8226
8227 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8228 Add comment.
8229 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8230 base address when calling win32_add_one_solib.
8231 (handle_load_dll): Delete local variable load_addr.
8232 Remove 0x1000 offset applied to DLL base address when calling
8233 win32_add_one_solib.
8234 (handle_unload_dll): Add comment.
8235
f25b3fc3
JB
82362014-02-26 Joel Brobecker <brobecker@adacore.com>
8237
8238 * win32-low.c (win32_add_all_dlls): Renames
8239 win32_ensure_ntdll_loaded. Rewrite function documentation.
8240 Adjust implementation to always load all DLLs.
8241 Add 0x1000 offset to DLL base address when calling
8242 win32_add_one_solib.
8243 (child_initialization_done): New static global.
8244 (do_initial_child_stuff): Set child_initialization_done to
8245 zero during child initialization, and 1 after. Replace call
8246 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8247 Add comment.
8248 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8249 (handle_unload_dll): Add function documentation.
8250 (get_child_debug_event): Ignore load and unload DLL events
8251 during child initialization.
8252
d86d4aaf
DE
82532014-02-20 Doug Evans <dje@google.com>
8254
3bc32da3 8255 Remove global all_lwps.
d86d4aaf
DE
8256 * inferiors.h (ptid_of): Move here from linux-low.h.
8257 (pid_of, lwpid_of): Ditto.
8258 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8259 parameter is a struct thread_info * now.
8260 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8261 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8262 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8263 directly.
8264 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8265 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8266 * linux-arm-low.c (update_registers_callback): Update, "entry"
8267 parameter is a struct thread_info * now.
8268 Fetch lwpid from current_inferior directly.
8269 (arm_insert_point): Pass &all_threads to find_inferior instead of
8270 &all_lwps.
8271 (arm_remove_point): Ditto.
8272 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8273 (arm_prepare_to_resume): Fetch pid from thread.
8274 (arm_read_description): Fetch lwpid from current_inferior directly.
8275 * linux-low.c (all_lwps): Delete.
8276 (delete_lwp): Delete call to remove_inferior.
8277 (handle_extended_wait): Fetch lwpid from thread.
8278 (add_lwp): Don't set lwp->entry.id. Remove call to
8279 add_inferior_to_list.
8280 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8281 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8282 (kill_one_lwp_callback): Ditto.
8283 (linux_kill): Don't dereference NULL pointer.
8284 Fetch ptid,lwpid from thread.
8285 (get_detach_signal): Fetch ptid from thread.
8286 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8287 Simplify call to regcache_invalidate_thread.
8288 (delete_lwp_callback): Update, "entry" parameter is a
8289 struct thread_info * now. Fetch pid from thread.
8290 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8291 (status_pending_p_callback): Update, "entry" parameter is a
8292 struct thread_info * now. Fetch ptid from thread.
8293 (find_lwp_pid): Update, "entry" parameter is a
8294 struct thread_info * now.
8295 (linux_wait_for_lwp): Fetch pid from thread.
8296 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8297 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8298 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8299 (dequeue_one_deferred_signal): Ditto.
8300 (cancel_breakpoint): Fetch ptid from current_inferior.
8301 (linux_wait_for_event): Pass &all_threads to find_inferior,
8302 not &all_lwps. Fetch ptid, lwpid from thread.
8303 (count_events_callback): Update, "entry" parameter is a
8304 struct thread_info * now.
8305 (select_singlestep_lwp_callback): Ditto.
8306 (select_event_lwp_callback): Ditto.
8307 (cancel_breakpoints_callback): Ditto.
8308 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8309 not &all_lwps.
8310 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8311 (unsuspend_one_lwp): Update, "entry" parameter is a
8312 struct thread_info * now.
8313 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8314 not &all_lwps.
8315 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8316 Fetch lwpid from thread, not lwp.
8317 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8318 Pass &all_threads to find_inferior, not &all_lwps.
8319 (send_sigstop): Fetch lwpid from thread, not lwp.
8320 (send_sigstop_callback): Update, "entry" parameter is a
8321 struct thread_info * now.
8322 (suspend_and_send_sigstop_callback): Ditto.
8323 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8324 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8325 struct thread_info * now.
8326 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8327 from thread, lwp.
8328 (lwp_running): Update, "entry" parameter is a
8329 struct thread_info * now.
8330 (stop_all_lwps): Fetch ptid from thread.
8331 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8332 (linux_resume_one_lwp): Fetch lwpid from thread.
8333 (linux_set_resume_request): Update, "entry" parameter is a
8334 struct thread_info * now. Fetch pid, lwpid from thread.
8335 (resume_status_pending_p): Update, "entry" parameter is a
8336 struct thread_info * now.
8337 (need_step_over_p): Ditto. Fetch lwpid from thread.
8338 (start_step_over): Fetch lwpid from thread.
8339 (linux_resume_one_thread): Update, "entry" parameter is a
8340 struct thread_info * now. Fetch lwpid from thread.
8341 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8342 (proceed_one_lwp): Update, "entry" parameter is a
8343 struct thread_info * now. Fetch lwpid from thread.
8344 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8345 struct thread_info * now.
8346 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8347 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8348 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8349 directly.
8350 (regsets_store_inferior_registers): Ditto.
8351 (fetch_register, store_register): Ditto.
8352 (linux_read_memory, linux_write_memory): Ditto.
8353 (linux_request_interrupt): Ditto.
8354 (linux_read_auxv): Ditto.
8355 (linux_xfer_siginfo): Ditto.
8356 (linux_qxfer_spu): Ditto.
8357 (linux_qxfer_libraries_svr4): Ditto.
8358 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8359 moved to inferiors.h.
8360 (get_lwp): Delete.
8361 (get_thread_lwp): Update.
8362 (struct lwp_info): Delete member "entry". Simplify comment for
8363 member "thread".
8364 (all_lwps): Delete.
8365 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8366 current_inferior directly.
8367 (update_watch_registers_callback): Update, "entry" parameter is a
8368 struct thread_info * now. Fetch pid from thread.
8369 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8370 (mips_insert_point): Fetch lwpid from current_inferior.
8371 Pass &all_threads to find_inferior, not &all_lwps.
8372 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8373 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8374 directly.
8375 (mips_stopped_data_address): Ditto.
8376 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8377 directly.
8378 * linux-tile-low.c (tile_arch_setup): Ditto.
8379 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8380 (update_debug_registers_callback): Update, "entry" parameter is a
8381 struct thread_info * now. Fetch pid from thread.
8382 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8383 Pass &all_threads to find_inferior, not &all_lwps.
8384 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8385 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8386 Pass &all_threads to find_inferior, not &all_lwps.
8387 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8388 (i386_dr_low_get_status): Ditto.
8389 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8390 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8391 (x86_linux_read_description): Ditto.
8392 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8393
3b8361aa
DE
83942014-02-20 Doug Evans <dje@google.com>
8395
8396 * inferiors.c (get_first_inferior): Fix buglet.
8397
f7667f0d
DE
83982014-02-19 Doug Evans <dje@google.com>
8399
8400 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8401 * inferiors.c (add_thread): Change result type to struct thread_info *.
8402 All callers updated.
8403 (add_lwp): Call add_thread here instead of in callers.
8404 All callers updated.
8405 * linux-low.h (get_lwp_thread): Rewrite.
8406 (struct lwp_info): New member "thread".
8407
b3312d80
DE
84082014-02-19 Doug Evans <dje@google.com>
8409
8410 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8411 All callers updated.
8412
ecc6f45c
DE
84132014-02-19 Doug Evans <dje@google.com>
8414
8415 * inferiors.c (add_thread): Fix whitespace.
8416
649ebbca
DE
84172014-02-19 Doug Evans <dje@google.com>
8418
8419 * dll.c (clear_dlls): Replace accessing list implemention details
8420 with API function.
8421 * gdbthread.h (get_first_thread): Declare.
8422 * inferiors.c (for_each_inferior_with_data): New function.
8423 (get_first_thread): New function.
8424 (find_thread_ptid): Simplify.
8425 (get_first_inferior): New function.
8426 (clear_list): Delete.
8427 (one_inferior_p): New function.
8428 (clear_inferior_list): New function.
8429 (clear_inferiors): Update.
8430 * inferiors.h (for_each_inferior_with_data): Declare.
8431 (clear_inferior_list): Declare.
8432 (one_inferior_p): Declare.
8433 (get_first_inferior): Declare.
8434 * linux-low.c (linux_wait_for_event): Replace accessing list
8435 implemention details with API function.
8436 * server.c (target_running): Ditto.
8437 (accumulate_file_name_length): New function.
8438 (emit_dll_description): New function.
8439 (handle_qxfer_libraries): Replace accessing list implemention
8440 details with API function.
8441 (handle_qxfer_threads_worker): New function.
8442 (handle_qxfer_threads_proper): Replace accessing list implemention
8443 details with API function.
8444 (handle_query): Ditto.
8445 (visit_actioned_threads_callback_ftype): New typedef.
8446 (visit_actioned_threads_data): New struct.
8447 (visit_actioned_threads): Rewrite to be find_inferior callback.
8448 (resume): Call find_inferior.
8449 (handle_status): Replace accessing list implemention
8450 details with API function.
8451 (process_serial_event): Replace accessing list implemention details
8452 with API function.
8453 * target.c (set_desired_inferior): Replace accessing list implemention
8454 details with API function.
8455 * tracepoint.c (same_process_p): New function.
8456 (gdb_agent_about_to_close): Replace accessing list implemention
8457 details with API function.
8458 * win32-low.c (child_delete_thread): Replace accessing list
8459 implemention details with API function.
8460 (match_dll_by_basename): New function.
8461 (dll_is_loaded_by_basename): New function.
8462 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8463 details call to dll_is_loaded_by_basename.
8464
80894984
DE
84652014-02-19 Doug Evans <dje@google.com>
8466
8467 * dll.h (struct dll_info): Add comment.
8468 * gdbthread.h (struct thread_info): Add comment.
8469 (current_ptid): Simplify.
8470 * inferiors.c (add_process): Update.
8471 (remove_process): Update.
8472 * inferiors.h (struct process_info): Rename member "head" to "entry".
8473 * linux-low.c (delete_lwp): Update.
8474 (add_lwp): Update.
8475 (last_thread_of_process_p): Update.
8476 (kill_one_lwp_callback, linux_kill): Update.
8477 (status_pending_p_callback): Update.
8478 (wait_for_sigstop): Update. Simplify read of ptid.
8479 (start_step_over): Update.
8480 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8481 (get_lwp_thread): Update.
8482 (struct lwp_info): Rename member "head" to "entry".
8483 * regcache.h (inferior_list_entry): Delete.
8484 * server.c (kill_inferior_callback): Update.
8485 (detach_or_kill_inferior_callback): Update.
8486 (print_started_pid): Update.
8487 (print_attached_pid): Update.
8488 (process_serial_event): Simplify read of ptid.
8489 * thread-db.c (thread_db_create_event): Update.
8490 (thread_db_get_tls_address): Update.
8491 * win32-low.c (current_inferior_ptid): Simplify.
8492
46917d26
TT
84932014-02-19 Tom Tromey <tromey@redhat.com>
8494
8495 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8496 argument.
8497 (target_supports_btrace): Update.
8498
0759a81e
YQ
84992014-02-14 Yao Qi <yao@codesourcery.com>
8500
8501 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8502 (rsp-low-ipa.o): New target.
8503
a7191e8b
TT
85042014-02-12 Tom Tromey <tromey@redhat.com>
8505
8506 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8507 convert_ascii_to_int.
8508 * regcache.c (registers_to_string): Likewise.
8509 * remote-utils.c (decode_M_packet): Likewise.
8510 * server.c (process_serial_event): Likewise.
8511
ff0e980e
TT
85122014-02-12 Tom Tromey <tromey@redhat.com>
8513
8514 * server.c (handle_query, handle_v_run): Use hex2bin, not
8515 unhexify.
8516 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8517
e9371aff
TT
85182014-02-12 Tom Tromey <tromey@redhat.com>
8519
8520 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8521 convert_int_to_ascii.
8522 * regcache.c (registers_to_string, collect_register_as_string):
8523 Likewise.
8524 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8525 Likewise.
8526 * server.c (process_serial_event): Likewise.
8527 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8528 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8529
971dc0b8
TT
85302014-02-12 Tom Tromey <tromey@redhat.com>
8531
8532 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8533 bin2hex, not hexify.
8534 * tracepoint.c (cmd_qtstatus): Likewise.
8535
0a822afb
TT
85362014-02-12 Tom Tromey <tromey@redhat.com>
8537
8538 * remote-utils.c (monitor_output): Pass explicit length to
8539 hexify.
8540
9c3d6531
TT
85412014-02-12 Tom Tromey <tromey@redhat.com>
8542
8543 * tracepoint.c: Include rsp-low.h.
8544 * server.c: Include rsp-low.h.
8545 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8546 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8547 declare.
8548 * remote-utils.c: Include rsp-low.h.
8549 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8550 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8551 (convert_int_to_ascii, convert_ascii_to_int): Move to
8552 common/rsp-low.c.
8553 * regcache.c: Include rsp-low.h.
8554 * ax.c: Include rsp-low.h.
8555 * Makefile.in (SFILES): Add common/rsp-low.c.
8556 (OBS): Add rsp-low.o.
8557 (rsp-low.o): New target.
8558
01fd3ea5
TT
85592014-02-12 Tom Tromey <tromey@redhat.com>
8560
8561 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8562 Include print-utils.h.
8563 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8564 (plongest, thirty_two, phex_nz): Remove.
8565 * Makefile.in (SFILES): Add common/print-utils.c.
8566 (OBS): Add print-utils.o.
8567 (print-utils-ipa.o): New target.
8568 (print-utils.o): New target.
8569 (IPA_OBJS): Add print-utils-ipa.o.
8570
e99dc820
TT
85712014-02-06 Tom Tromey <tromey@redhat.com>
8572
8573 * Makefile.in (SFILES): Fix indentation.
8574
ee1e2d4f
DE
85752014-02-05 Doug Evans <dje@google.com>
8576
8577 * linux-low.c (linux_wait_for_event): Improve comment.
8578 (linux_wait_1): Keep current_inferior in sync with event_child.
8579
f5a02773
DE
85802014-01-22 Doug Evans <dje@google.com>
8581
8582 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8583
87ce2a04
DE
85842014-01-22 Doug Evans <dje@google.com>
8585
8586 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8587 * configure: Regenerate.
8588 * config.in: Regenerate.
8589 * Makefile.in (SFILES): Add debug.c.
8590 (OBS): Add debug.o.
8591 * debug.c: New file.
8592 * debug.h: New file.
8593 * linux-aarch64-low.c (*): Update all debugging printfs to use
8594 debug_printf instead of fprintf.
8595 * linux-arm-low.c (*): Ditto.
8596 * linux-cris-low.c (*): Ditto.
8597 * linux-crisv32-low.c (*): Ditto.
8598 * linux-m32r-low.c (*): Ditto.
8599 * linux-sparc-low.c (*): Ditto.
8600 * linux-x86.c (*): Ditto.
8601 * linux-low.c (*): Ditto.
8602 (linux_wait_1): Add calls to debug_enter, debug_exit.
8603 (linux_wait): Remove redundant debugging printf.
8604 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8605 (linux_resume, unstop_all_lwps): Ditto.
8606 * mem-break.c (*): Update all debugging printfs to use
8607 debug_printf instead of fprintf.
8608 * remote-utils.c (*): Ditto.
8609 * thread-db.c (*): Ditto.
8610 * server.c #include <ctype.h>, "gdb_vecs.h".
8611 (debug_threads): Moved to debug.c.
8612 (*): Update all debugging printfs to use debug_printf instead of
8613 fprintf.
8614 (start_inferior): Replace call to fflush with call to debug_flush.
8615 (monitor_show_help): Mention set debug-format.
8616 (parse_debug_format_options): New function.
8617 (handle_monitor_command): Handle "monitor set debug-format".
8618 (gdbserver_usage): Mention --debug-format.
8619 (main): Parse --debug-format.
8620 * server.h (debug_threads): Declaration moved to debug.h.
8621 #include "debug.h".
8622 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8623 trace_debug_1 that uses debug_printf.
8624 (tracepoint_look_up_symbols): Update all debugging printfs to use
8625 debug_printf instead of fprintf.
8626
e671835b
BS
86272014-01-20 Baruch Siach <baruch@tkos.co.il>
8628
8629 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8630 sys/ptrace.h.
8631
b5737fa9
PA
86322014-01-17 Pedro Alves <palves@redhat.com>
8633
ea38d2a9 8634 PR build/16445
c7faa97a
PA
8635 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8636 defined after including gdb_proc_service.h.
b5737fa9 8637
40ed484e
DE
86382014-01-16 Doug Evans <dje@google.com>
8639
8640 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8641 (match_dll): Use it.
8642
969c39fb
MM
86432014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8644
8645 * target.h (target_ops) <read_btrace>: Change parameters and
8646 return type to allow error reporting.
8647 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8648 trace reading errors on.
8649 * linux-low.c (linux_low_read_btrace): Pass trace reading
8650 errors on.
8651 (linux_low_disable_btrace): New.
8652
ab7f45ba
DE
86532014-01-15 Doug Evans <dje@google.com>
8654
8655 * inferiors.c (thread_id_to_gdb_id): Delete.
8656 * inferiors.h (thread_id_to_gdb_id): Delete.
8657
66af0f44
EZ
86582014-01-13 Eli Zaretskii <eliz@gnu.org>
8659
8660 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8661 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8662 versions.
8663
9939e131
PA
86642014-01-08 Pedro Alves <palves@redhat.com>
8665
8666 * server.c (handle_status): Don't discard previous queued stop
8667 replies or thread's pending status here.
8668 (main) <disconnection>: Do it here instead.
8669
b7ea362b
PA
86702014-01-08 Pedro Alves <palves@redhat.com>
8671
8672 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8673 * server.c (visit_actioned_threads, handle_pending_status): New
8674 function.
8675 (handle_v_cont): Factor out parts to ...
8676 (resume): ... this new function. If in all-stop, and a thread
8677 being resumed has a pending status, report it without actually
8678 resuming.
8679 (myresume): Adjust to use the new 'resume' function.
8680 (clear_pending_status_callback, set_pending_status_callback)
8681 (find_status_pending_thread_callback): New functions.
8682 (handle_status): Handle the case of multiple threads having
8683 interesting statuses to report. Report threads' real last signal
8684 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8685 with an interesting thread to report the status for, instead of
8686 always reporting the status of the first thread.
8687
28498c42
JB
86882014-01-01 Joel Brobecker <brobecker@adacore.com>
8689
8690 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8691 * gdbreplay.c (gdbreplay_version): Likewise.
8692
f45c82da
YZ
86932013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8694
8695 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8696 iov.iov_len with the real length in use.
8697
379a5e2d
JB
86982013-12-13 Joel Brobecker <brobecker@adacore.com>
8699
8700 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8701 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8702 for all targets that use win32-low.c.
8703 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8704 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8705
4210d83e
PA
87062013-12-13 Pedro Alves <palves@redhat.com>
8707
8708 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8709 if equal to TARGET_WAITKIND_LOADED.
8710 * win32-low.c (cached_status): New static global.
8711 (win32_wait): Add declaration.
8712 (do_initial_child_stuff): Flush all initial pending debug events
8713 up to the initial breakpoint.
8714 (win32_wait): If CACHED_STATUS was set, return that instead
8715 of doing a real wait. Remove the code resuming the execution
8716 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8717 during the initial phase. Also remove the code changing
8718 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8719 TARGET_WAITKIND_STOPPED.
8720
e7f0d979
YQ
87212013-12-11 Yao Qi <yao@codesourcery.com>
8722
8723 * notif.c (handle_notif_ack): Return 0 if no notification
8724 matches.
8725
ebcf782c
DE
87262013-11-20 Doug Evans <dje@google.com>
8727
8728 * linux-low.c (linux_set_resume_request): Fix comment.
8729
20ad9378
DE
87302013-11-20 Doug Evans <dje@google.com>
8731
8732 * linux-low.c (resume_status_pending_p): Tweak comment.
8733
a196ebeb
WT
87342013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8735
8736 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8737 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8738 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8739 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8740 (srv_amd64_regobj): Add amd64-mpx.o.
8741 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8742 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8743 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8744 * i387-fp.c (num_pl_bnd_register) Added constant.
8745 (num_pl_bnd_cfg_registers) Added constant.
8746 (struct i387_xsave) Added reserved area and MPX fields.
8747 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8748 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8749 function.
8750 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8751 (init_registers_amd64_mpx_linux): Declare new function.
8752 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8753 (x86_64_regmap): Add MPX registers.
8754 (x86_linux_read_description): Add MPX case.
8755 (initialize_low_arch): Initialize MPX targets.
8756
0080a2f6
TT
87572013-11-18 Tom Tromey <tromey@redhat.com>
8758
8759 * configure: Rebuild.
8760 * configure.ac: Don't check for stdlib.h.
8761 * gdbreplay.c: Unconditionally include stdlib.h.
8762
2978b111
TT
87632013-11-18 Tom Tromey <tromey@redhat.com>
8764
8765 * config.in: Rebuild.
8766 * configure: Rebuild.
8767 * configure.ac: Don't use AC_HEADER_DIRENT.
8768
a3d08894
TT
87692013-11-18 Tom Tromey <tromey@redhat.com>
8770
8771 * server.h: Don't check HAVE_STRING_H.
8772 * gdbreplay.c: Don't check HAVE_STRING_H.
8773 * configure: Rebuild.
8774
0a5dd17d
TT
87752013-11-18 Tom Tromey <tromey@redhat.com>
8776
8777 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8778 LIBGNU.
8779
1bd2f0ba
TT
87802013-11-08 Tom Tromey <tromey@redhat.com>
8781
8782 * configure, config.in: Rebuild.
8783 * configure.ac: Remove unused configury.
8784
3266f10b
TT
87852013-11-08 Tom Tromey <tromey@redhat.com>
8786
8787 * acinclude.m4: Include common.m4, codeset.m4.
8788 * configure, config.in: Rebuild.
8789 * configure.ac: Use GDB_AC_COMMON.
8790
6682d959
AA
87912013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8792
8793 * linux-s390-low.c (HWCAP_S390_TE): New define.
8794 (s390_arch_setup): Consider the TE field in the HWCAP for
8795 determining 'have_regset_tdb'.
8796
fd0a4d76
SDJ
87972013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8798
8799 PR gdb/16014
8800 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8801 call to sizeof.
8802
1a3d890b
PA
88032013-10-02 Pedro Alves <palves@redhat.com>
8804
8805 * server.c (process_serial_event): Don't output "GDBserver
8806 exiting" if GDB is connected through stdio.
8807 * target.c (mywait): Likewise, be silent if GDB is connected
8808 through stdio.
8809
97ad4581
JB
88102013-10-01 Joel Brobecker <brobecker@adacore.com>
8811
8812 * lynx-low.c (lynx_add_threads_after_attach): New function.
8813 (lynx_attach): Remove call to add_thread. Add call to
8814 lynx_add_threads_after_attach instead.
8815
5b4e221c
MF
88162013-09-28 Mike Frysinger <vapier@gentoo.org>
8817
8818 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8819 * config.in, configure: Regenerated.
8820
ee47b2f8
YQ
88212013-09-18 Yao Qi <yao@codesourcery.com>
8822
8823 PR server/15959
8824 * server.c (start_inferior): Clear 'resume_info'.
8825
d6707650 88262013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8827
d6707650
JW
8828 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8829 for each register.
8830
9243dd0e 88312013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8832
9243dd0e
JW
8833 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8834 linux-tile-low.o to srv_tgtobj.
8835
c623a6ef
WN
88362013-09-16 Will Newton <will.newton@linaro.org>
8837
8838 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8839 out regs.
8840
fb71d39e
PA
88412013-09-06 Pedro Alves <palves@redhat.com>
8842
8843 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8844 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8845 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8846 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8847 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8848 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8849
8e7e9910
PA
88502013-09-06 Pedro Alves <palves@redhat.com>
8851
8852 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8853 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8854
7c3a12ca
PA
88552013-09-06 Pedro Alves <palves@redhat.com>
8856
8857 * linux-amd64-ipa.c: Include tracepoint.h.
8858 * linux-i386-ipa.c: Include tracepoint.h.
8859
8eb3d7b6
RW
88602013-09-06 Ricard Wanderlof <ricardw@axis.com>
8861
8862 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8863 (ps_get_thread_area): New function.
8864
eddddb9d
RW
88652013-09-06 Ricard Wanderlof <ricardw@axis.com>
8866
8867 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8868 (initialize_low_arch): Call init_registers_crisv32 rather than
8869 init_register_crisv32.
8870
533b0600
PA
88712013-09-05 Pedro Alves <palves@redhat.com>
8872
8873 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8874 to ...
8875 * hostio.h: ... this new file.
8876 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8877 win32-low.c: Include hostio.h.
8878
0ce3d3b5
PA
88792013-09-05 Pedro Alves <palves@redhat.com>
8880
8881 * server.h (gdb_client_data, handler_func, callback_handler_func)
8882 (delete_file_handler, add_file_handler, append_callback_event)
8883 (delete_callback_event, start_event_loop, initialize_event_loop):
8884 Move to event-loop.h and include it.
8885 * event-loop.h: New file.
8886
799cdc37
PA
88872013-09-05 Pedro Alves <palves@redhat.com>
8888
8889 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8890 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8891 (loaded_dll, unloaded_dll): Move to ...
8892 * dll.h: ... this new file.
8893 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8894
6a6bbd9d
PA
88952013-09-05 Pedro Alves <palves@redhat.com>
8896
8897 * server.h (current_process, get_thread_process, all_processes)
8898 (add_inferior_to_list, for_each_inferior, current_inferior)
8899 (remove_inferior, add_process, remove_process, find_process_pid)
8900 (have_started_inferiors_p, have_attached_inferiors_p)
8901 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8902 (clear_inferiors, find_inferior, find_inferior_id)
8903 (inferior_target_data, set_inferior_target_data)
8904 (inferior_regcache_data, set_inferior_regcache_data): Move to
8905 inferiors.h, and include it.
8906 * inferiors.h: New file.
8907
f699aaba
PA
89082013-09-05 Pedro Alves <palves@redhat.com>
8909
8910 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8911 Move ...
72f4393d 8912 * ax.h: ... here.
f699aaba 8913
c144c7a0
PA
89142013-09-05 Pedro Alves <palves@redhat.com>
8915
8916 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8917 tracepoint.h.
8918 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8919 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8920 (handle_tracepoint_general_set, handle_tracepoint_query)
8921 (tracepoint_finished_step, tracepoint_was_hit)
8922 (release_while_stepping_state_list, current_traceframe)
8923 (in_readonly_region, traceframe_read_mem)
8924 (fetch_traceframe_registers, traceframe_read_sdata)
8925 (traceframe_read_info, struct fast_tpoint_collect_status)
8926 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8927 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8928 (supply_fast_tracepoint_registers)
8929 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8930 (ipa_tdesc, claim_trampoline_space)
8931 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8932 (agent_mem_read, agent_get_trace_state_variable_value)
8933 (agent_set_trace_state_variable_value, agent_tsv_read)
8934 (agent_mem_read_string, get_raw_reg_func_addr)
8935 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8936 * tracepoint.h: ... this new file.
8937
ff42e6ab
PA
89382013-09-05 Pedro Alves <palves@redhat.com>
8939
8940 * server.h (perror_with_name, error, fatal, warning, paddress)
8941 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8942 include it.
8943 * utils.h: New file.
8944
541af0f4
PA
89452013-09-05 Pedro Alves <palves@redhat.com>
8946
8947 * server.h (remote_debug, noack_mode, transport_is_reliable)
8948 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8949 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8950 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8951 (write_enn, initialize_async_io, enable_async_io)
8952 (disable_async_io, check_remote_input_interrupt_request)
8953 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8954 (dead_thread_notify, prepare_resume_reply)
8955 (decode_address_to_semicolon, decode_address, decode_m_packet)
8956 (decode_M_packet, decode_X_packet, decode_xfer_write)
8957 (decode_search_memory_packet, unhexify, hexify)
8958 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8959 (look_up_one_symbol, relocate_instruction)
8960 (monitor_output): Move to remote-utils.h, and include it.
8961 * remote-utils.h: New file.
8962
eebdf26b
PA
89632013-09-05 Pedro Alves <palves@redhat.com>
8964
8965 * server.h (_): Delete.
8966
3aafd2ff
PA
89672013-09-02 Pedro Alves <palves@redhat.com>
8968
8969 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8970 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8971 allocated.
8972 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8973
cee83bcb
PM
89742013-09-02 Pierre Muller <muller@sourceware.org>
8975
8976 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8977 or WriteProcessMemory complete successfully and handle
8978 ERROR_PARTIAL_COPY error.
8979
9a13b2fa
PA
89802013-09-02 Pedro Alves <palves@redhat.com>
8981
8982 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8983 error instead of EIO.
8984
602e3198
JK
89852013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8986
8987 PR server/15604
8988 * linux-low.c: Include filestuff.h.
8989 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8990 * lynx-low.c: Include filestuff.h.
8991 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8992 * server.c: Include filestuff.h.
8993 (main): Call notice_open_fds.
8994 * spu-low.c: Include filestuff.h.
8995 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8996
96d7229d
LM
89972013-08-22 Luis Machado <lgustavo@codesourcery.com>
8998
8999 * Makefile.in: Explain why ../target and ../nat are not
9000 listed as include file search paths.
9001 (linux-waitpid.o): New object file rule.
9002 * configure.srv (srv_native_linux_obj): New variable.
9003 Replace all occurrences of linux native object files with
9004 $srv_native_linux_obj.
9005 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9006 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9007 (linux_enable_event_reporting): Remove declaration.
9008 (my_waitpid): Moved to common/linux-waitpid.c.
9009 (linux_wait_for_event): Pass ptid when calling
9010 linux_enable_event_reporting.
9011 (linux_supports_tracefork_flag): Remove.
9012 (linux_enable_event_reporting): Likewise.
9013 (linux_tracefork_grandchild): Remove.
9014 (STACK_SIZE): Moved to common/linux-ptrace.c.
9015 (linux_tracefork_child): Remove.
9016 (linux_test_for_tracefork): Remove.
9017 (linux_look_up_symbols): Call linux_supports_traceclone.
9018 (initialize_low): Remove call to linux_test_for_tracefork.
9019 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9020 common/linux-ptrace.h.
9021 (PTRACE_TYPE_ARG4): Likewise.
9022 Include linux-ptrace.h.
9023
32940073
PA
90242013-08-21 Pedro Alves <palves@redhat.com>
9025
9026 * config.in: Renegerate.
9027
33b60d58 90282013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9029
33b60d58
LM
9030 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9031 (SFILES): Remove $(srcdir)/common/target-common.c and
9032 add $(srcdir)/target/waitstatus.c.
9033 (OBS): Remove target-common.o and add waitstatus.o.
9034 (server_h): Remove $(srcdir)/../common/target-common.h and
9035 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9036 and $(srcdir)/../target/waitstatus.h.
9037 (target-common.o): Remove.
9038 (waitstatus.o): New target object file.
9039 * target.h: Do not include target-common.h and
9040 include target/resume.h, target/wait.h and
9041 target/waitstatus.h.
9042
b8e1b30e
LM
90432013-08-13 Luis Machado <lgustavo@codesourcery.com>
9044
9045 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9046 to PTRACE_TYPE_ARG3.
9047 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9048 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9049 PTRACE_TYPE_ARG4.
9050 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9051 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9052
7a60ad40
YQ
90532013-07-27 Jie Zhang <jie@codesourcery.com>
9054 Daniel Jacobowitz <dan@codesourcery.com>
9055 Yao Qi <yao@codesourcery.com>
9056
9057 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9058 (mips-linux-watch.o): New rule.
9059 (mips_linux_watch_h): New variable.
9060 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9061 srv_tgtobj.
9062 * linux-mips-low.c: Include mips-linux-watch.h.
9063 (struct arch_process_info, struct arch_lwp_info): New.
9064 (update_watch_registers_callback): New function.
9065 (mips_linux_new_process, mips_linux_new_thread) New functions.
9066 (mips_linux_prepare_to_resume, mips_insert_point): New
9067 functions.
9068 (mips_remove_point, mips_stopped_by_watchpoint): New
9069 functions.
9070 (rsp_bp_type_to_target_hw_bp_type): New function.
9071 (mips_stopped_data_address): New function.
9072 (the_low_target): Add watchpoint support functions.
9073
de6f69ad
YQ
90742013-07-27 Yao Qi <yao@codesourcery.com>
9075
9076 * i386-low.c: Include break-common.h.
9077 (enum target_hw_bp_type): Remove.
9078
3360c0bf
LM
90792013-07-24 Luis Machado <lgustavo@codesourcery.com>
9080
9081 * Makefile.in (SFILES): /common/target-common.c.
9082 (OBS): Add target-common.o.
9083 (server_h): Add $(srcdir)/../common/target-common.h.
9084 (target-common.o): New target.
9085 * server.c (queue_stop_reply_callback): Free
9086 status string after use.
9087 * target.c (target_waitstatus_to_string): Remove.
9088 * target.h: Include target-common.h.
9089 (resume_kind): Likewise.
9090 (target_waitkind): Likewise.
9091 (target_waitstatus): Likewise.
9092 (TARGET_WNOHANG): Likewise.
9093
bd885420
YQ
90942013-07-04 Yao Qi <yao@codesourcery.com>
9095
9096 * Makefile.in (host_alias): Use @host_noncanonical@.
9097 (target_alias): Use @target_noncanonical@.
9098 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9099 ACX_NONCANONICAL_HOST.
9100 * configure: Regenerated.
9101
9102 Revert:
9103 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9104
9105 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9106 * configure: Rebuild.
9107 * Makefile.in (version_host, version_target): Get from configure.
9108 (version.c): Use $(version_host) and $(version_target).
9109
17ef446e
PA
91102013-07-03 Pedro Alves <palves@redhat.com>
9111
9112 * Makefile.in (config.status): Depend on development.sh.
9113 * acinclude.m4: Include libmcheck.m4.
9114 * configure: Regenerate.
9115
7a9a7487
MG
91162013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9117
9118 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9119 attribute inside the parentheses.
9120 (winapi_DebugSetProcessKillOnExit): Ditto.
9121 (winapi_DebugBreakProcess): Ditto.
9122 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9123
49b64de6
MG
91242013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9125
9126 * notif.h (notif_event): Add a dummy member to avoid compiler
9127 errors.
9128
d5749ee7
PA
91292013-07-01 Pedro Alves <palves@redhat.com>
9130
9131 * hostio.c (HOSTIO_PATH_MAX): Define.
9132 (require_filename, handle_open, handle_unlink, handle_readlink):
9133 Use it.
9134
d8d2a3ee
PA
91352013-07-01 Pedro Alves <palves@redhat.com>
9136
9137 * server.h: Include "pathmax.h".
9138 * linux-low.c: Don't include sys/param.h.
9139 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9140 MAXPATHLEN.
9141 * win32-low.c: Don't include sys/param.h.
9142 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9143
bc7dea8d
PA
91442013-07-01 Pedro Alves <palves@redhat.com>
9145
9146 * event-loop.c: Don't check HAVE_UNISTD_H before including
9147 <unistd.h>.
9148 * gdbreplay.c: Likewise.
9149 * remote-utils.c: Likewise.
9150 * server.c: Likewise.
9151 * configure.ac: Don't check for unistd.h.
9152 * configure: Regenerate.
9153
d6c2da54
TT
91542013-06-28 Tom Tromey <tromey@redhat.com>
9155
9156 * Makefile.in (version.c): Use version.in, not
9157 common/version.in.
9158
257b6bec
MG
91592013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9160
9161 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9162 * configure: Rebuild.
9163 * Makefile.in (version_host, version_target): Get from configure.
9164 (version.c): Use $(version_host) and $(version_target).
9165
86ebe149
DK
91662013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9167
9168 Fix trace-status to output user name without trailing colon.
9169 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9170
f30aa5af
DK
91712013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9172
9173 Fix trace-status to output proper start-time and stop-time.
9174 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9175 output start time and stop time in hex as gdb expects.
9176
28a93511
YQ
91772013-06-26 Pedro Alves <pedro@codesourcery.com>
9178
9179 * tracepoint.c (build_traceframe_info_xml): Output trace state
9180 variables present in the trace buffer.
9181
01208463
TT
91822013-06-24 Tom Tromey <tromey@redhat.com>
9183
9184 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9185 create-version.sh.
9186 (version.o): Remove.
9187 * gdbreplay.c: Include version.h.
9188 (version, host_name): Don't declare.
9189 * server.h: Include version.h.
9190 (version, host_name): Don't declare.
9191
760256f9
PA
91922013-06-12 Pedro Alves <palves@redhat.com>
9193
9194 * linux-x86-low.c (linux_is_elf64): Delete global.
9195 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9196 with local linux_pid_exe_is_elf_64_file use.
9197
030031ee
PA
91982013-06-11 Pedro Alves <palves@redhat.com>
9199
9200 * linux-low.c (regset_disabled, disable_regset): New functions.
9201 (regsets_fetch_inferior_registers)
9202 (regsets_store_inferior_registers): Use them.
9203 (initialize_regsets_info); Don't allocate the disabled_regsets
9204 array here.
9205 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9206 comment.
9207
5da6eb0a
PA
92082013-06-11 Pedro Alves <palves@redhat.com>
9209
9210 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9211 xmalloc.
9212
7e5aaa09
PA
92132013-06-11 Pedro Alves <palves@redhat.com>
9214
9215 * linux-x86-low.c (initialize_low_arch): Call
9216 init_registers_x32_avx_linux.
9217
d878444c
JK
92182013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9219
9220 Fix compatibility with Android Bionic.
9221 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9222 it is not empty.
9223
3aee8918
PA
92242013-06-07 Pedro Alves <palves@redhat.com>
9225
5f2b57b5 9226 PR server/14823
3aee8918
PA
9227 * Makefile.in (OBS): Add tdesc.o.
9228 (IPA_OBJS): Add tdesc-ipa.o.
9229 (tdesc-ipa.o): New rule.
9230 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9231 interface.
9232 * linux-low.c (new_inferior): Delete.
9233 (disabled_regsets, num_regsets): Delete.
9234 (linux_add_process): Adjust to set the new per-process
9235 new_inferior flag.
9236 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9237 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9238 was a stop. When calling arch_setup, switch the current inferior
9239 to the thread that got an event.
9240 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9241 (regsets_fetch_inferior_registers)
9242 (regsets_store_inferior_registers): New regsets_info parameter.
9243 Adjust to use it.
9244 (linux_register_in_regsets): New regs_info parameter. Adjust to
9245 use it.
9246 (register_addr, fetch_register, store_register): New usrregs_info
9247 parameter. Adjust to use it.
9248 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9249 parameter regs_info. Adjust to use it.
9250 (linux_fetch_registers): Get the current inferior's regs_info, and
9251 adjust to use it.
9252 (linux_store_registers): Ditto.
9253 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9254 (initialize_low): Don't initialize the target_regsets here. Call
9255 initialize_low_arch.
9256 * linux-low.h (target_regsets): Delete declaration.
9257 (struct regsets_info): New.
9258 (struct usrregs_info): New.
9259 (struct regs_info): New.
9260 (struct process_info_private) <new_inferior>: New field.
9261 (struct linux_target_ops): Delete the num_regs, regmap, and
9262 regset_bitmap fields. New field regs_info.
9263 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9264 * i387-fp.c (num_xmm_registers): Delete.
9265 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9266 calls to new interface.
9267 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9268 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9269 Infer the number of xmm registers from the regcache's target
9270 description.
9271 * i387-fp.h (num_xmm_registers): Delete.
9272 * inferiors.c (add_thread): Don't install the thread's regcache
9273 here.
9274 * proc-service.c (gregset_info): Fetch the current inferior's
9275 regs_info. Adjust to use it.
9276 * regcache.c: Include tdesc.h.
9277 (register_bytes, reg_defs, num_registers)
9278 (gdbserver_expedite_regs): Delete.
9279 (get_thread_regcache): If the thread doesn't have a regcache yet,
9280 create one, instead of aborting gdbserver.
9281 (regcache_invalidate_one): Rename to ...
9282 (regcache_invalidate_thread): ... this.
9283 (regcache_invalidate_one): New.
9284 (regcache_invalidate): Only invalidate registers of the current
9285 process.
9286 (init_register_cache): Add target_desc parameter, and use it.
9287 (new_register_cache): Ditto. Assert the target description has a
9288 non zero registers_size.
9289 (regcache_cpy): Add assertions. Adjust.
9290 (realloc_register_cache, set_register_cache): Delete.
9291 (registers_to_string, registers_from_string): Adjust.
9292 (find_register_by_name, find_regno, find_register_by_number)
9293 (register_cache_size): Add target_desc parameter, and use it.
9294 (free_register_cache_thread, free_register_cache_thread_one)
9295 (regcache_release, register_cache_size): New.
9296 (register_size): Add target_desc parameter, and use it.
9297 (register_data, supply_register, supply_register_zeroed)
9298 (supply_regblock, supply_register_by_name, collect_register)
9299 (collect_register_as_string, collect_register_by_name): Adjust.
9300 * regcache.h (struct target_desc): Forward declare.
9301 (struct regcache) <tdesc>: New field.
9302 (init_register_cache, new_register_cache): Add target_desc
9303 parameter.
9304 (regcache_invalidate_thread): Declare.
9305 (regcache_invalidate_one): Delete declaration.
9306 (regcache_release): Declare.
9307 (find_register_by_number, register_cache_size, register_size)
9308 (find_regno): Add target_desc parameter.
9309 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9310 declarations.
9311 * remote-utils.c: Include tdesc.h.
9312 (outreg, prepare_resume_reply): Adjust.
9313 * server.c: Include tdesc.h.
9314 (gdbserver_xmltarget): Delete declaration.
9315 (get_features_xml, process_serial_event): Adjust.
9316 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9317 declare.
9318 (struct process_info) <tdesc>: New field.
9319 (ipa_tdesc): Declare.
9320 * tdesc.c: New file.
9321 * tdesc.h: New file.
9322 * tracepoint.c: Include tdesc.h.
9323 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9324 (get_context_regcache): Adjust to pass ipa_tdesc down.
9325 (do_action_at_tracepoint): Adjust to get the register cache size
9326 from the context regcache's description.
9327 (traceframe_walk_blocks): Adjust to get the register cache size
9328 from the current trace frame's description.
9329 (traceframe_get_pc): Adjust to get current trace frame's
9330 description and pass it down.
9331 (gdb_collect): Adjust to get the register cache size from the
9332 IPA's description.
9333 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9334 (gdbserver_xmltarget): Delete.
9335 (initialize_low_tracepoint): Set the ipa's target description.
9336 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9337 (initialize_low_tracepoint): Set the ipa's target description.
9338 * linux-x86-low.c: Include tdesc.h.
9339 [__x86_64__] (is_64bit_tdesc): New.
9340 (ps_get_thread_area, x86_get_thread_area): Use it.
9341 (i386_cannot_store_register): Rename to ...
9342 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9343 (i386_cannot_fetch_register): Rename to ...
9344 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9345 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9346 to new interface.
9347 (target_regsets): Rename to ...
9348 (x86_regsets): ... this.
9349 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9350 interface.
9351 (x86_siginfo_fixup): Use is_64bit_tdesc.
9352 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9353 (tdesc_x32_avx_linux, tdesc_x32_linux)
9354 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9355 Declare.
9356 (x86_linux_update_xmltarget): Delete.
9357 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9358 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9359 (AMD64_LINUX_USER64_CS): New.
9360 (x86_linux_read_description): New, based on
9361 x86_linux_update_xmltarget.
9362 (same_process_callback): New.
9363 (x86_arch_setup_process_callback): New.
9364 (x86_linux_update_xmltarget): New.
9365 (x86_regsets_info): New.
9366 (amd64_linux_regs_info): New.
9367 (i386_linux_usrregs_info): New.
9368 (i386_linux_regs_info): New.
9369 (x86_linux_regs_info): New.
9370 (x86_arch_setup): Reimplement.
9371 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9372 (x86_emit_ops): Ditto.
9373 (the_low_target): Adjust. Install x86_linux_regs_info,
9374 x86_cannot_fetch_register, and x86_cannot_store_register.
9375 (initialize_low_arch): New.
9376 * linux-ia64-low.c (tdesc_ia64): Declare.
9377 (ia64_fetch_register): Adjust.
9378 (ia64_usrregs_info, regs_info): New globals.
9379 (ia64_regs_info): New function.
9380 (the_low_target): Adjust.
9381 (initialize_low_arch): New function.
9382 * linux-sparc-low.c (tdesc_sparc64): Declare.
9383 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9384 Adjust.
9385 (sparc_arch_setup): New function.
9386 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9387 (the_low_target): Adjust.
9388 (initialize_low_arch): New function.
9389 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9390 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9391 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9392 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9393 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9394 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9395 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9396 (tdesc_powerpc_isa205_vsx64l): Declare.
9397 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9398 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9399 (ppc_set_pc, ppc_get_hwcap): Adjust.
9400 (ppc_usrregs_info): Forward declare.
9401 (!__powerpc64__) ppc_regmap_adjusted: New global.
9402 (ppc_arch_setup): Adjust to the current process'es target
9403 description.
9404 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9405 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9406 (ppc_store_evrregset): Adjust.
9407 (target_regsets): Rename to ...
9408 (ppc_regsets): ... this, and make static.
9409 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9410 (ppc_regs_info): New function.
9411 (the_low_target): Adjust.
9412 (initialize_low_arch): New function.
9413 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9414 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9415 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9416 (tdesc_s390x_linux64v2): Declare.
9417 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9418 (s390_fill_gregset, s390_store_last_break): Adjust.
9419 (target_regsets): Rename to ...
9420 (s390_regsets): ... this, and make static.
9421 (s390_get_pc, s390_set_pc): Adjust.
9422 (s390_get_hwcap): New target_desc parameter, and use it.
9423 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9424 (s390_arch_setup): Adjust to set the current process'es target
9425 description. Don't adjust the regmap.
9426 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9427 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9428 (regs_info_3264): New globals.
9429 (s390_regs_info): New function.
9430 (the_low_target): Adjust.
9431 (initialize_low_arch): New function.
9432 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9433 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9434 [__mips64] (init_registers_mips_linux)
9435 (init_registers_mips_dsp_linux): Delete defines.
9436 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9437 (have_dsp): New global.
9438 (mips_read_description): New, based on mips_arch_setup.
9439 (mips_arch_setup): Reimplement.
9440 (get_usrregs_info): New function.
9441 (mips_cannot_fetch_register, mips_cannot_store_register)
9442 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9443 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9444 (target_regsets): Rename to ...
9445 (mips_regsets): ... this, and make static.
9446 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9447 (dsp_regs_info, regs_info): New globals.
9448 (mips_regs_info): New function.
9449 (the_low_target): Adjust.
9450 (initialize_low_arch): New function.
9451 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9452 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9453 Declare.
9454 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9455 (arm_read_description): New, with bits factored from
9456 arm_arch_setup.
9457 (arm_arch_setup): Reimplement.
9458 (target_regsets): Rename to ...
9459 (arm_regsets): ... this, and make static.
9460 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9461 (arm_regs_info): New function.
9462 (the_low_target): Adjust.
9463 (initialize_low_arch): New function.
9464 * linux-m68k-low.c (tdesc_m68k): Declare.
9465 (target_regsets): Rename to ...
9466 (m68k_regsets): ... this, and make static.
9467 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9468 (m68k_regs_info): New function.
9469 (m68k_arch_setup): New function.
9470 (the_low_target): Adjust.
9471 (initialize_low_arch): New function.
9472 * linux-sh-low.c (tdesc_sharch): Declare.
9473 (target_regsets): Rename to ...
9474 (sh_regsets): ... this, and make static.
9475 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9476 (sh_regs_info, sh_arch_setup): New functions.
9477 (the_low_target): Adjust.
9478 (initialize_low_arch): New function.
9479 * linux-bfin-low.c (tdesc_bfin): Declare.
9480 (bfin_arch_setup): New function.
9481 (bfin_usrregs_info, regs_info): New globals.
9482 (bfin_regs_info): New function.
9483 (the_low_target): Adjust.
9484 (initialize_low_arch): New function.
9485 * linux-cris-low.c (tdesc_cris): Declare.
9486 (cris_arch_setup): New function.
9487 (cris_usrregs_info, regs_info): New globals.
9488 (cris_regs_info): New function.
9489 (the_low_target): Adjust.
9490 (initialize_low_arch): New function.
9491 * linux-cris-low.c (tdesc_crisv32): Declare.
9492 (cris_arch_setup): New function.
9493 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9494 (cris_regs_info): New function.
9495 (the_low_target): Adjust.
9496 (initialize_low_arch): New function.
9497 * linux-m32r-low.c (tdesc_m32r): Declare.
9498 (m32r_arch_setup): New function.
9499 (m32r_usrregs_info, regs_info): New globals.
9500 (m32r_regs_info): Adjust.
9501 (initialize_low_arch): New function.
9502 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9503 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9504 (tic6x_usrregs_info): Forward declare.
9505 (tic6x_read_description): New function, based on ...
9506 (tic6x_arch_setup): ... this. Reimplement.
9507 (target_regsets): Rename to ...
9508 (tic6x_regsets): ... this, and make static.
9509 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9510 (tic6x_regs_info): New function.
9511 (the_low_target): Adjust.
9512 (initialize_low_arch): New function.
9513 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9514 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9515 (target_regsets): Rename to ...
9516 (xtensa_regsets): ... this, and make static.
9517 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9518 globals.
9519 (xtensa_arch_setup, xtensa_regs_info): New functions.
9520 (the_low_target): Adjust.
9521 (initialize_low_arch): New function.
9522 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9523 (nios2_arch_setup): Set the current process'es tdesc.
9524 (target_regsets): Rename to ...
9525 (nios2_regsets): ... this.
9526 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9527 (nios2_regs_info): New function.
9528 (the_low_target): Adjust.
9529 (initialize_low_arch): New function.
a261b8f5
PA
9530 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9531 (aarch64_arch_setup): Set the current process'es tdesc.
9532 (target_regsets): Rename to ...
9533 (aarch64_regsets): ... this.
9534 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9535 (aarch64_regs_info): New function.
9536 (the_low_target): Adjust.
9537 (initialize_low_arch): New function.
3aee8918
PA
9538 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9539 globals.
9540 (target_regsets): Rename to ...
9541 (tile_regsets): ... this.
9542 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9543 (tile_regs_info): New function.
9544 (tile_arch_setup): Set the current process'es tdesc.
9545 (the_low_target): Adjust.
9546 (initialize_low_arch): New function.
9547 * spu-low.c (tdesc_spu): Declare.
9548 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9549 * win32-arm-low.c (tdesc_arm): Declare.
9550 (arm_arch_setup): New function.
9551 (the_low_target): Install arm_arch_setup instead of
9552 init_registers_arm.
9553 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9554 (init_windows_x86): Rename to ...
9555 (i386_arch_setup): ... this. Set `win32_tdesc'.
9556 (the_low_target): Adjust.
9557 * win32-low.c (win32_tdesc): New global.
9558 (child_add_thread): Don't create the thread cache here.
9559 (do_initial_child_stuff): Set the new process'es tdesc.
9560 * win32-low.h (struct target_desc): Forward declare.
9561 (win32_tdesc): Declare.
9562 * lynx-i386-low.c (tdesc_i386): Declare global.
9563 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9564 * lynx-low.c (lynx_tdesc): New global.
9565 (lynx_add_process): Set the new process'es tdesc.
9566 * lynx-low.h (struct target_desc): Forward declare.
9567 (lynx_tdesc): Declare global.
9568 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9569 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9570 * nto-low.c (nto_tdesc): New global.
9571 (do_attach): Set the new process'es tdesc.
9572 * nto-low.h (struct target_desc): Forward declare.
9573 (nto_tdesc): Declare.
9574 * nto-x86-low.c (tdesc_i386): Declare.
9575 (nto_x86_arch_setup): Set `nto_tdesc'.
9576
b1fbec62
GB
95772013-06-04 Gary Benson <gbenson@redhat.com>
9578
9579 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9580 to qSupported response when appropriate.
9581 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9582 with nonzero-length annex.
9583 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9584 arguments supplied in annex.
9585
d1ec4ce7
DE
95862013-05-31 Doug Evans <dje@google.com>
9587
ac44adcb 9588 PR server/15594
d1ec4ce7
DE
9589 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9590 64 bits in 64-cross-32 environment.
9591
9b25f2d3
PA
95922013-05-28 Pedro Alves <palves@redhat.com>
9593
9594 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9595 (aarch64-without-fpu.c): Delete rule.
9596 * configure.srv (aarch64*-*-linux*): Remove references to
9597 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9598 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9599 declaration.
9600
6740dc9c
PA
96012013-05-24 Pedro Alves <palves@redhat.com>
9602
9603 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9604 instead of strchr/decode_address. Error if the range isn't split
9605 with a ','. Don't assume there's be a ':' in the action.
9606
c2d6af84
PA
96072013-05-23 Yao Qi <yao@codesourcery.com>
9608 Pedro Alves <palves@redhat.com>
9609
9610 * linux-low.c (lwp_in_step_range): New function.
9611 (linux_wait_1): If the thread was range stepping and stopped
9612 outside the stepping range, report the stop to GDB. Otherwise,
9613 continue stepping. Add range stepping debug output.
9614 (linux_set_resume_request): Copy the step range from the resume
9615 request to the lwp.
9616 (linux_supports_range_stepping): New.
9617 (linux_target_ops) <supports_range_stepping>: Set to
9618 linux_supports_range_stepping.
9619 * linux-low.h (struct linux_target_ops)
9620 <supports_range_stepping>: New field.
9621 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9622 * linux-x86-low.c (x86_supports_range_stepping): New.
9623 (the_low_target) <supports_range_stepping>: Set to
9624 x86_supports_range_stepping.
9625 * server.c (handle_v_cont): Handle 'r' action.
9626 (handle_v_requests): Append ";r" if the target supports range
9627 stepping.
9628 * target.h (struct thread_resume) <step_range_start,
9629 step_range_end>: New fields.
9630 (struct target_ops) <supports_range_stepping>:
9631 New field.
9632 (target_supports_range_stepping): New macro.
9633
58794e1a
JB
96342013-05-17 Joel Brobecker <brobecker@adacore.com>
9635
9636 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9637 confusion in comment.
9638
d631c5a7
JB
96392013-05-17 Joel Brobecker <brobecker@adacore.com>
9640
9641 * lynx-low.c (struct process_info_private): New type.
9642 (lynx_add_process): New function.
9643 (lynx_create_inferior, lynx_attach): Replace calls to
9644 add_process by calls to lynx_add_process.
9645 (lynx_resume): If PTID is null, then try using
9646 current_process()->private->last_wait_event_ptid.
9647 Add comments.
9648 (lynx_clear_inferiors): Delete. The contents of that function
9649 has been inlined in lynx_mourn;
9650 (lynx_wait_1): Save the ptid in the process's private data.
9651 (lynx_mourn): Free the process' private data. Replace call
9652 to lynx_clear_inferiors by call to clear_inferiors.
9653
96f7a20f
YQ
96542013-05-17 Yao Qi <yao@codesourcery.com>
9655
9656 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9657 the right place.
9658
db0dfaa0
LM
96592013-05-16 Luis Machado <lgustavo@codesourcery.com>
9660
9661 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9662 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9663 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9664 PT_TEXT_END_ADDR guards. Update comments.
9665 (linux_target_op) <read_offsets>: Conditionally define to
9666 linux_read_offsets if the target is UCLIBC and if it defines
9667 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9668
68f5f838
SL
96692013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9670 Andrew Jenner <andrew@codesourcery.com>
9671
9672 * Makefile.in (SFILES): Add linux-nios2-low.c.
9673 (clean): Add action to delete nios2-linux.c.
9674 (nios2-linux.c): New rule.
9675 * configure.srv: Add nios2*-*-linux*.
9676 * linux-nios2-low.c: New.
9677
1ebff1fd
HAQ
96782013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9679
9680 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9681
f6150862
HZ
96822013-04-25 Hui Zhu <hui@codesourcery.com>
9683
9684 PR gdb/15186
f6150862
HZ
9685 * ax.c (ax_printf): Add fflush.
9686
614c279d
TT
96872013-04-22 Tom Tromey <tromey@redhat.com>
9688
9689 * Makefile.in (SFILES): Add filestuff.c.
9690 (OBS): Add filestuff.o.
9691 (filestuff.o): New target.
9692 * config.in, configure: Rebuild.
9693 * configure.ac: Check for fdwalk, pipe2.
9694
7d4e5717
PA
96952013-04-17 Pedro Alves <palves@redhat.com>
9696
9697 * configure.ac (USE_THREAD_DB): Delete variable.
9698 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9699 Don't AC_SUBST USE_THREAD_DB.
9700 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9701 * config.in, configure: Regenerate.
9702
d5c93e41
PA
97032013-04-16 Pedro Alves <palves@redhat.com>
9704
9705 * linux-low.h (struct lwp_info) <thread_known>: Move under
9706 the USE_THREAD_DB #ifdef.
9707
04f5fe89
PA
97082013-04-16 Pedro Alves <palves@redhat.com>
9709
9710 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9711 (linux-low.o): Delete rule.
9712 * linux-low.h: Always include "gdb_thread_db.h" instead of
9713 conditionally including thread_db.h.
9714 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9715 HAVE_THREAD_DB_H.
9716
480b27bf
JK
97172013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9718
9719 * Makefile.in (install-only): Fix make install regression.
9720
43662968
JK
97212013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9722
9723 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9724 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9725 installation.
9726 * gdbserver.1: Remove.
9727
3e74e146
PA
97282013-03-22 Pedro Alves <palves@redhat.com>
9729
9730 * linux-low.c (handle_extended_wait): Don't call
9731 linux_enable_event_reporting.
9732
a8347a2a
TT
97332013-03-15 Tony Theodore <tonyt@logyst.com>
9734
9735 PR build/9098:
9736 * Makefile.in (SHELL): Use @SHELL@.
9737
eeb56fa7
SDJ
97382013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9739
9740 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9741 compiler warning.
9742
4fa7e2ff
JB
97432013-03-13 Joel Brobecker <brobecker@adacore.com>
9744
9745 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9746 Remove extraneous NULL element.
9747
8ddb1965
YQ
97482013-03-13 Yao Qi <yao@codesourcery.com>
9749
9750 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9751 'V' block in trace frame.
9752
9accd112
MM
97532013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9754
9755 * target.h (struct target_ops): Add btrace ops.
9756 (target_supports_btrace): New macro.
9757 (target_enable_btrace): New macro.
9758 (target_disable_btrace): New macro.
9759 (target_read_btrace): New macro.
9760 * gdbthread.h (struct thread_info): Add btrace field.
9761 * server.c: Include btrace-common.h.
9762 (handle_btrace_general_set): New function.
9763 (handle_btrace_enable): New function.
9764 (handle_btrace_disable): New function.
9765 (handle_general_set): Call handle_btrace_general_set.
9766 (handle_qxfer_btrace): New function.
9767 (struct qxfer qxfer_packets[]): Add btrace entry.
9768 * inferiors.c (remove_thread): Disable btrace.
9769 * linux-low: Include linux-btrace.h.
9770 (linux_low_enable_btrace): New function.
9771 (linux_low_read_btrace): New function.
9772 (linux_target_ops): Add btrace ops.
9773 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9774 Add srv_linux_btrace=yes.
9775 (x86_64-*-linux*): Add linux-btrace.o.
9776 Add srv_linux_btrace=yes.
9777 * configure.ac: Define HAVE_LINUX_BTRACE.
9778 * config.in: Regenerated.
9779 * configure: Regenerated.
9780
5cc22e4c
MM
97812013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9782
9783 * server.c (handle_qxfer): Preserve error message if -3 is
9784 returned.
9785 (qxfer): Document the -3 return value.
9786
7c97f91e
MM
97872013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9788
9789 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9790 (linux_btrace_h): New variable.
9791 (linux-btrace.o): New rule.
9792
be9a119c 97932013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9794 Hafiz Abid Qadeer <abidh@codesourcery.com>
9795
9796 * tracepoint.c (trace_buffer_size): New global.
9797 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9798 (init_trace_buffer): Change to one-argument function. Allocate
9799 trace buffer memory.
9800 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9801 handle QTBuffer:size packet.
9802 (cmd_bigqtbuffer_size): New function.
9803 (initialize_tracepoint): Call init_trace_buffer with
9804 DEFAULT_TRACE_BUFFER_SIZE.
9805 * server.c (handle_query): Add QTBuffer:size in the
9806 supported packets.
9807
e64f7499
YQ
98082013-03-07 Yao Qi <yao@codesourcery.com>
9809
9810 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9811 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9812 of -1.
9813 (cmd_qtsp): Adjust condition. Do post increment.
9814 Set cur_action and cur_step_action back to 0.
9815
f0ae6fc3
PA
98162013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9817
9818 PR server/15236
9819 * linux-low.c (linux_write_memory): Return early success if LEN is
9820 zero.
9821
b5b0b0af
CV
98222013-03-05 Corinna Vinschen <vinschen@redhat.de>
9823
334ad4a8 9824 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9825
589bc927
TT
98262013-02-28 Tom Tromey <tromey@redhat.com>
9827
9828 * configure.ac: Invoke AC_SYS_LARGEFILE.
9829 * configure, config.in: Rebuild.
9830
dfe07582
CV
98312013-02-28 Corinna Vinschen <vinschen@redhat.com>
9832
9833 * win32-low.c: Throughout, fix format strings and casts of
9834 printf-like functions to avoid type related warnings on all
9835 platforms.
9836 (get_child_debug_event): Print dwDebugEventCode as hex since
9837 that's how it's usually documented.
9838
736cd585
YQ
98392013-02-28 Yao Qi <yao@codesourcery.com>
9840
9841 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9842 pulongest.
9843
e1f58301
JW
98442013-02-27 Jiong Wang <jiwang@tilera.com>
9845
9846 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9847 (reg-tilegx32.c): New rule.
9848 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9849 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9850 different register info initializer according to elf class.
9851 (init_registers_tilgx32): New function. The tilegx32 register info
9852 initializer.
9853 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9854 (tile_store_gregset): Likewise.
9855
d171ca78
YQ
98562013-02-27 Yao Qi <yao@codesourcery.com>
9857
9858 * server.c (process_point_options): Print debug message when
9859 debug_threads is true.
9860
282bbdf3
YQ
98612013-02-26 Yao Qi <yao@codesourcery.com>
9862
9863 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9864
aca22551
PA
98652013-02-19 Pedro Alves <palves@redhat.com>
9866 Kai Tietz <ktietz@redhat.com>
9867
9868 PR gdb/15161
9869
9870 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9871 instead of strtoul to extract address from packet.
9872 (process_serial_event) <'z'>: Likewise.
9873
4f3cee1c
YQ
98742013-02-18 Yao Qi <yao@codesourcery.com>
9875
9876 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9877
8e1d55a3
PA
98782013-02-14 Pedro Alves <palves@redhat.com>
9879
9880 Plug memory leak.
9881
9882 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9883 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9884
458820da
PA
98852013-02-14 Pedro Alves <palves@redhat.com>
9886
9887 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9888
baea0dae
PA
98892013-02-14 Pedro Alves <palves@redhat.com>
9890
9891 * tracepoint.c (save_string): Delete.
9892 (add_tracepoint_action): Use savestring instead of save_string.
9893
0b1afbb3
PA
98942013-02-12 Pedro Alves <palves@redhat.com>
9895
9896 * linux-xtensa-low.c: Ditto.
9897 * xtensa-xtregs.c: Ditto.
9898
8a4ac37e
PA
98992013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9900
9901 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9902 thread_db.
9903
148de6bb
MS
99042013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9905
9906 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9907 aarch64_num_wp_regs and aarch64_num_bp_regs to
9908 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9909
55fac6e0
MS
99102013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9911
9912 * linux-aarch64-low.c (ps_get_thread_area): Replace
9913 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9914
176eb98c
MS
99152013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9916 Marcus Shawcroft <marcus.shawcroft@arm.com>
9917 Nigel Stephens <nigel.stephens@arm.com>
9918 Yufeng Zhang <yufeng.zhang@arm.com>
9919
9920 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9921 (aarch64.c, aarch64-without-fpu.c): New targets.
9922 * configure.srv (aarch64*-*-linux*): New.
9923 * linux-aarch64-low.c: New file.
9924
56f7af9c
MS
99252013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9926
43aaf8b6 9927 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9928 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9929 (dequeue_one_deferred_signal, linux_resume_one_thread)
9930 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9931 (linux_tracefork_grandchild, linux_test_for_tracefork)
9932 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9933 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9934 where the argument is 0.
9935
60f662b0
YQ
99362013-01-25 Yao Qi <yao@codesourcery.com>
9937
9938 * event-loop.c: Include "queue.h".
9939 (gdb_event_p): New typedef.
9940 (struct gdb_event) <next_event>: Remove.
9941 (event_queue): Change to QUEUE(gdb_event_p).
9942 (async_queue_event): Remove.
9943 (gdb_event_xfree): New.
9944 (initialize_event_loop): New.
9945 (process_event): Use API from QUEUE.
9946 (wait_for_event): Likewise.
9947 * server.c (main): Call initialize_event_loop.
9948 * server.h (initialize_event_loop): Declare.
9949
5ae4861a
YQ
99502013-01-18 Yao Qi <yao@codesourcery.com>
9951
9952 * ax.h (struct eval_agent_expr_context): New.
9953 (gdb_eval_agent_expr): Update declaration.
9954 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9955 TFRAME. Add new argument CTX.
9956 * server.h (struct eval_agent_expr_context): Declare.
9957 (agent_mem_read, agent_tsv_read): Update declaration.
9958 (agent_mem_read_string): Likewise.
9959 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9960 (add_traceframe_block): Add new argument TPOINT.
9961 Increase TPOINT->traceframe_usage.
9962 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9963 eval_tracepoint_agent_expr.
9964 (condition_true_at_tracepoint): Likewise.
9965 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9966 (agent_mem_read_string, agent_tsv_read): Likewise.
9967
85e00e85
YQ
99682013-01-16 Yao Qi <yao@codesourcery.com>
9969
9970 * linux-low.c (linux_resume_one_lwp): Don't check
9971 'lwp->bp_reinsert != 0'.
9972
4039cf45
JB
99732013-01-07 Joel Brobecker <brobecker@adacore.com>
9974 Pedro Alves <palves@redhat.com>
9975
9976 * lynx-low.c (ptrace_request_to_str): Define a temporary
9977 macro and use it to simplify this function's implementation.
9978
9044dee2
JB
99792013-01-07 Joel Brobecker <brobecker@adacore.com>
9980
9981 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9982 sets errno.
9983
e6352c8f
JB
99842013-01-07 Joel Brobecker <brobecker@adacore.com>
9985
9986 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9987
50681a27
JB
99882013-01-07 Joel Brobecker <brobecker@adacore.com>
9989
9990 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9991
3f6e77ef
JB
99922013-01-07 Joel Brobecker <brobecker@adacore.com>
9993
9994 * lynx-low.c (lynx_resume): Use the resume_info parameter
9995 to determine the ptid for the lynx_ptrace call, unless
9996 it is equal to minus_one_ptid, in which case we use the
9997 ptid of the current_inferior.
9998 (lynx_wait_1): After having received a thread create/exit
9999 event, resume the inferior's execution using the signaling
10000 thread's ptid, rather than the old ptid.
10001
7fda33ae
JB
100022013-01-07 Joel Brobecker <brobecker@adacore.com>
10003
10004 * lynx-low.c (lynx_resume): Delete variable ret.
10005
b9786c74
JB
100062013-01-01 Joel Brobecker <brobecker@adacore.com>
10007
10008 * gdbreplay.c (gdbreplay_version): Update copyright year.
10009 * server.c (gdbserver_version): Likewise.
10010
8b93d60f
JB
100112012-12-17 Joel Brobecker <brobecker@adacore.com>
10012
10013 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10014 new thread.
10015
037335a7
JB
100162012-12-17 Joel Brobecker <brobecker@adacore.com>
10017
10018 * lynx-low.c (ptrace_request_to_str): Add handling for
10019 PTRACE_GETTRACESIG.
10020
52d4cbd8
JB
100212012-12-17 Joel Brobecker <brobecker@adacore.com>
10022
10023 * lynx-low.c (lynx_attach): Delete variable new_process.
10024
ab8f6ca9
JB
100252012-12-17 Joel Brobecker <brobecker@adacore.com>
10026
10027 * lynx-low.c (lynx_create_inferior): Delete variable
10028 new_process.
10029
78cbc024
JB
100302012-12-17 Joel Brobecker <brobecker@adacore.com>
10031
10032 * lynx-low.c (ptrace_request_to_str): Do not handle
10033 PTRACE_GETTHREADLIST if this macro does not exist.
10034
14a00470
YQ
100352012-12-15 Yao Qi <yao@codesourcery.com>
10036
10037 * Makefile.in (OBS): Add notif.o.
10038 * notif.c, notif.h: New.
10039 * server.c: Include "notif.h".
10040 (struct vstop_notif) <next>: Remove.
10041 <base>: New field.
10042 (queue_stop_reply): Update.
10043 (push_event, send_next_stop_reply): Remove.
10044 (discard_queued_stop_replies): Update.
10045 (notif_stop): New variable.
10046 (handle_v_stopped): Remove.
10047 (handle_v_requests): Don't call handle_v_stopped. Call
10048 handle_ack_notif instead.
10049 (queue_stop_reply_callback): Call notif_event_enque instead
10050 of queue_stop_reply.
10051 (handle_status): Don't call send_next_stop_reply, call
10052 notif_write_event instead.
10053 (kill_inferior_callback): Likewise.
10054 (detach_or_kill_inferior_callback): Likewise.
10055 (main): Call initialize_notif.
10056 (process_serial_event): Call QUEUE_is_empty.
10057 (handle_target_event): Call notif_push instead of push event.
10058 * server.h (push_event): Remove declaration.
10059
61c125b9
TT
100602012-12-10 Tom Tromey <tromey@redhat.com>
10061
10062 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10063 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10064 macros.
10065 (.c.o): Rewrite.
10066 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10067 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10068 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10069 (amd64-linux-ipa.o, ax.o): Rewrite.
10070 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10071 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10072 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10073 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10074 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10075 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10076 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10077 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10078 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10079 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10080 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10081 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10082 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10083 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10084 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10085 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10086 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10087 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10088 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10089 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10090 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10091 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10092 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10093 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10094 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10095 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10096 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10097 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10098 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10099 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10100 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10101 (reg-tilegx.o): Remove.
10102 (all_object_files): New macro.
10103 Include .deps files.
10104 * aclocal.m4, configure: Rebuild.
10105 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10106 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10107 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10108
e90e9ad9
TT
101092012-12-05 Tom Tromey <tromey@redhat.com>
10110
10111 PR gdb/14917:
10112 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10113
02d403bf 101142012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10115
10116 * configure.ac: Check for linux/perf_event.h.
10117 * config.in: Regenerated.
10118 * configure: Regenerated.
10119
0270a750
PA
101202012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10121
10122 * hostio.c (handle_readlink): Decrease buffer size
10123 parameter passed to readlink by one byte.
10124
8c29b58e
YQ
101252012-11-26 Yao Qi <yao@codesourcery.com>
10126
10127 * configure.ac (build_warnings): Append '-Wempty-body'.
10128 * configure: Regenerated.
10129 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10130 body.
10131
8bdce1ff
PM
101322012-11-15 Pierre Muller <muller@sourceware.org>
10133
10134 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10135 * config.in: Regenerate.
10136 * configure: Regenerate.
10137 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10138 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10139 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10140 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10141 header.
10142 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10143 instead of <sys/wait.h> header.
10144 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10145
02d403bf 101462012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10147
10148 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10149 (various make rules): Remove -DGDBSERVER
10150
fbd5db48
YQ
101512012-11-09 Yao Qi <yao@codesourcery.com>
10152
10153 * spu-low.c (current_ptid): Move it to ..
10154 * gdbthread.h: ... here. New.
10155 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10156 * server.c (myresume, process_serial_event): Likewise.
10157 * thread-db.c (thread_db_find_new_threads): Likewise.
10158 * tracepoint.c (run_inferior_command): Likewise.
10159
b3dc46ff
AB
101602012-10-01 Andrew Burgess <aburgess@broadcom.com>
10161
10162 * server.c (handle_search_memory_1): Include access length in
10163 warning message.
10164
07c04788
HPN
101652012-09-05 Michael Brandt <michael.brandt@axis.com>
10166
10167 * linux-crisv32-low.c: Fix compile errors.
10168
918d227b
YQ
101692012-09-04 Yao Qi <yao@codesourcery.com>
10170
10171 * tracepoint.c (cmd_qtsv): Adjust debug message.
10172 Don't check CUR_TPOINT.
10173
18c1b81a
YQ
101742012-08-28 Yao Qi <yao@codesourcery.com>
10175
10176 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10177 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10178 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10179 Remove declarations of xmalloc, xreallloc, xstrdup and
10180 freeargv.
10181 * Makefile.in (libiberty_h): New.
10182 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10183 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10184
dc82f37b
YQ
101852012-08-23 Yao Qi <yao@codesourcery.com>
10186
10187 * server.h: Remove declaration of 'xsnprintf'.
10188
406b1477
KS
101892012-08-22 Keith Seitz <keiths@redhat.com>
10190
10191 * server.h: Include build-gnulib-gbserver/config.h.
10192 * gdbreplay.c: Likewise.
10193
e6712ff1
DE
101942012-08-08 Doug Evans <dje@google.com>
10195
10196 * Makefile.in (SFILES): Add gdb_vecs.c.
10197 (OBS): Add gdb_vecs.o.
10198 (gdb_vecs_h, host_defs_h): New variables.
10199 (thread-db.o): Add $(gdb_vecs_h) dependency.
10200 (gdb_vecs.o): New rule.
10201 * thread-db.c: #include "gdb_vecs.h".
10202 (thread_db_load_search): Use a vector to iterate over path elements.
10203 Handle text appearing after "$pdir".
10204
10205 * configure.ac: Add check for strstr.
10206 * config.in: Regenerate.
10207 * configure: Regenerate.
10208
7c3270ae
UW
102092012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10210
10211 * hostio.c (handle_pread): If pread fails, fall back to attempting
10212 lseek/read.
10213 (handle_pwrite): Likewise for pwrite.
10214
b62e2b27
UW
102152012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10216
10217 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10218 between unsupported TYPE and unimplementable ADDR/LEN combination.
10219 (arm_insert_point): Act on new return value.
10220
78a99e91
PA
102212012-07-31 Pedro Alves <palves@redhat.com>
10222
10223 * server.c (process_point_options): Only skip tokens if we find
10224 one that is unrecognized. Don't treat 'X' specially while
10225 skipping unrecognized tokens.
10226
fcf303ab
UW
102272012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10228
10229 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10230 to 4-byte-align HW breakpoint addresses for Thumb.
10231
7255706c
YQ
102322012-07-27 Yao Qi <yao@codesourcery.com>
10233
10234 PR remote/14161.
10235
10236 * server.h: Declare gdb_agent_about_to_close.
10237 * target.c (kill_inferior): Include "agent.h".
10238 New. Send command 'kill'.
10239 * target.h (kill_inferior): Removed macro.
10240 * tracepoint.c (gdb_agent_about_to_close): New.
10241 (gdb_agent_helper_thread): Handle command 'close'.
10242 Wait endlessly until the inferior stops.
10243 Install gdb_agent_remove_socket to atexit hook.
10244 (agent_socket_name): New static variable.
10245 (gdb_agent_socket_init): Replace local variable 'name' with
10246 'agent_socket_name'.
10247 (gdb_agent_remove_socket): New.
10248
5a3f286f
YQ
102492012-07-27 Yao Qi <yao@codesourcery.com>
10250
10251 * server.c (process_point_options): Stop at 'X' when parsing.
10252
961bd387
ME
102532012-07-19 Michael Eager <eager@eagercon.com>
10254
a261b8f5 10255 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10256 to hw_execute.
10257 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10258 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10259 hardware breakpoint.
10260
aa7c7447
JK
102612012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10262
10263 * gdbserver/linux-low.c (initialize_low): Call
10264 linux_ptrace_init_warnings.
10265
7f216e7c
DE
102662012-07-02 Doug Evans <dje@google.com>
10267
10268 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10269 pointer to int.
10270
d3ce09f5
SS
102712012-07-02 Stan Shebs <stan@codesourcery.com>
10272
10273 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10274 (ax.o): Add it to build rule.
10275 (ax-ipa.o): Ditto.
10276 (OBS): Add format.o.
10277 (IPA_OBS): Add format.o.
10278 * server.c (handle_query): Claim support for breakpoint commands.
10279 (process_point_options): Add command case.
10280 (process_serial_event): Leave running if there are printfs in
10281 effect.
10282 * mem-break.h (any_persistent_commands): Declare.
10283 (add_breakpoint_commands): Declare.
10284 (gdb_no_commands_at_breakpoint): Declare.
10285 (run_breakpoint_commands): Declare.
10286 * mem-break.c (struct point_command_list): New struct.
10287 (struct breakpoint): New field command_list.
10288 (any_persistent_commands): New function.
10289 (add_commands_to_breakpoint): New function.
10290 (add_breakpoint_commands): New function.
10291 (gdb_no_commands_at_breakpoint): New function.
10292 (run_breakpoint_commands): New function.
10293 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10294 locally.
10295 * ax.c: Include format.h.
10296 (ax_printf): New function.
10297 (gdb_eval_agent_expr): Add printf opcode.
10298
2f8f6aed
YQ
102992012-06-13 Yao Qi <yao@codesourcery.com>
10300
10301 * server.c (start_inferior): Remove duplicated writes to fields
10302 'last_resume_kind' and 'last_status' of 'current_inferior'.
10303
0c9070b3
YQ
103042012-06-12 Yao Qi <yao@codesourcery.com>
10305 Pedro Alves <palves@redhat.com>
10306
10307 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10308 comment.
10309 * server.c (handle_v_cont): Extend comment.
10310
c52daf70
YQ
103112012-06-11 Yao Qi <yao@codesourcery.com>
10312
10313 * linux-low.c (linux_attach): Add 'static'.
10314
d38bbb0a
YQ
103152012-06-06 Yao Qi <yao@codesourcery.com>
10316
10317 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10318
89dc0afd
JK
103192012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10320
10321 Fix gcc -flto compilation warning.
10322 * server.c (main): Make variable multi_mode and attach volatile.
10323
75f62ce7
TJB
103242012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10325
10326 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10327 if the platform doesn't know about it.
10328
65f479b6
PA
103292012-05-30 Jeff Kenton <jkenton@tilera.com>
10330
10331 * Makefile.in (SFILES): Add linux-tile-low.c.
10332 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10333 * configure.srv: Handle tilegx-*-linux*.
10334 * linux-tile-low.c: New file.
10335
0c5bf5a9
JK
103362012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10337
10338 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10339
a493e3e2
PA
103402012-05-24 Pedro Alves <palves@redhat.com>
10341
10342 PR gdb/7205
10343
43aaf8b6 10344 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10345
2ea28649
PA
103462012-05-24 Pedro Alves <palves@redhat.com>
10347
10348 PR gdb/7205
10349
10350 Replace target_signal with gdb_signal throughout.
10351
8d409d16
MR
103522012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10353
10354 * linux-low.c (linux_store_registers): Avoid the copying sequence
10355 when no data has been retrieved by ptrace.
10356
23512c01
MGD
103572012-05-22 Will Deacon <will.deacon@arm.com>
10358
10359 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10360 Include asm/ptrace.h.
10361 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10362 already defined.
10363
4934b29e
MR
103642012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10365
10366 * linux-low.c (linux_store_registers): Don't re-retrieve data
10367 with ptrace that has already been obtained from /proc. Always
10368 copy any data retrieved with ptrace to the buffer supplied.
10369
bde24c0a
PA
103702012-05-11 Yao Qi <yao@codesourcery.com>
10371 Pedro Alves <palves@redhat.com>
10372
10373 * linux-low.c (enum stopping_threads_kind): New.
10374 (stopping_threads): Change type to `enum stopping_threads_kind'.
10375 (handle_extended_wait): If stopping and suspending threads, leave
10376 the new_lwp suspended too.
10377 (linux_wait_for_event): Adjust.
10378 (stop_all_lwps): Set `stopping_threads' to
10379 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10380 whether we're suspending threads or just stopping them. Assert no
10381 recursion happens.
10382
623b6bdf
YQ
103832012-04-29 Yao Qi <yao@codesourcery.com>
10384
10385 * server.h: Move some code to ...
10386 * gdbthread.h: ... here. New.
10387 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10388 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10389 (nto-low.o, win32-low.o): Likewise.
10390 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10391 * regcache.c, remote-utils.c, server.c: Likewise.
10392 * target.c, tracepoint.c, win32-low.c: Likewise.
10393
f15f9948
TJB
103942012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10395
10396 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10397 (PTRACE_ARG4_TYPE): Likewise.
10398 (PTRACE_XFER_TYPE): Likewise.
10399 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10400 ptrace to PTRACE_ARG3_TYPE.
10401 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10402 (PTRACE_ARG4_TYPE): Likewise.
10403 (PTRACE_XFER_TYPE): Likewise.
10404 (linux_detach_one_lwp): Cast fourth argument of
10405 ptrace to long then PTRACE_ARG4_TYPE.
10406 (regsets_fetch_inferior_registers): Cast third argument of
10407 ptrace to long then PTRACE_ARG3_TYPE.
10408 (regsets_store_inferior_registers): Likewise.
10409
38ea300a
PA
104102012-04-20 Pedro Alves <palves@redhat.com>
10411
10412 * configure: Regenerate.
10413
c971b7fa
PA
104142012-04-19 Pedro Alves <palves@redhat.com>
10415
43aaf8b6 10416 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10417 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10418 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10419 (all, install-only, uninstall, clean-info, all-lib, clean): No
10420 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10421 (maintainer-clean realclean distclean): Use subdir_do.
10422 (subdir_do): New.
10423 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10424 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10425 * acinclude.m4: Include acx_configure_dir.m4.
10426 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10427 calls. Call AC_PROG_RANLIB. Configure gnulib using
10428 ACX_CONFIGURE_DIR.
10429 (GNULIB): New.
10430 (GNULIB_STDINT_H): Adjust.
10431 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10432 * gdbreplay.c: Include build-gnulib/config.h.
10433 * server.h: Likewise.
10434 * aclocal.m4: Regenerate.
10435 * config.in: Regenerate.
10436 * configure: Regenerate.
c971b7fa 10437
809277f8
PA
104382012-04-19 Pedro Alves <palves@redhat.com>
10439
10440 * Makefile.in (LIBGNU, INCGNU): Adjust.
10441 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10442 (all, install-only, uninstall, clean-info, all-lib, clean)
10443 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10444 * configure.ac: Adjust AC_OUTPUT output.
10445 * aclocal.m4: Regenerate.
10446 * configure: Regenerate.
10447
fd9bb8b8
PA
104482012-04-19 Pedro Alves <palves@redhat.com>
10449
10450 * Makefile.in (generated_files): New.
10451 (server_h): Remove the explicit dependency on config.h, and depend
10452 on $generated_files.
10453
1c298c66
PA
104542012-04-19 Pedro Alves <palves@redhat.com>
10455
10456 * Makefile.in (INCGNU): Add -Ignulib.
10457
57c4b50b
PA
104582012-04-19 Pedro Alves <palves@redhat.com>
10459
10460 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10461 (INCGNU): ... this, and spell out -I here.
10462 (GNULIB_LIB): Rename to ...
10463 (LIBGNU): ... this.
10464 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10465
1030e047
PA
104662012-04-19 Pedro Alves <palves@redhat.com>
10467
10468 * config.in: Regenerate.
10469
447d4319
PA
104702012-04-19 Pedro Alves <palves@redhat.com>
10471
10472 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10473 * server.h (memmem): Remove declaration.
10474 * config.in: Regenerate.
10475 * configure: Regenerate.
10476
aad9eab9
YQ
104772012-04-19 Yao Qi <yao@codesourcery.com>
10478
10479 * Makefile.in (SFILES): Add common/vec.c.
10480 (OBS): Add vec.o.
10481 (vec.o): New rule.
10482
3e10640f
YQ
104832012-04-19 Yao Qi <yao@codesourcery.com>
10484
10485 * remote-utils.c (prepare_resume_reply): Replace with macro
10486 target_core_of_thread.
10487 * server.c (handle_qxfer_threads_proper): Likewise.
10488 * target.h (traget_core_of_thread): New macro.
10489
71622373
PA
104902012-04-18 Pedro Alves <palves@redhat.com>
10491
10492 * aclocal.m4: Regenerate.
10493 * configure: Regenerate.
10494
80d26939
YQ
104952012-04-16 Yao Qi <yao@codesourcery.com>
10496
10497 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10498 duplicated on address.
10499
42476b70
YQ
105002012-04-16 Yao Qi <yao@codesourcery.com>
10501
10502 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10503 (struct tracepoint_action_ops) <send>: New field.
10504 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10505 (agent_expr_send, x_tracepoint_action_send): New.
10506 (l_tracepoint_action_send): New.
10507 (cmd_qtdp): Download and install tracepoint
10508 according to `use_agent'.
10509 (run_inferior_command): Add one more parameter `len'.
10510 Update callers.
10511 (tracepoint_send_agent): New.
10512 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10513
7bc83639
YQ
105142012-04-16 Yao Qi <yao@codesourcery.com>
10515
10516 * tracepoint.c (download_tracepoints): Moved to ...
10517 (cmd_qtstart): ... here.
10518
5f18041e
YQ
105192012-04-14 Yao Qi <yao@codesourcery.com>
10520
10521 * tracepoint.c: Include inttypes.h.
10522 (struct collect_memory_action): Use sized types.
10523 (struct tracepoint): Likewise.
10524 (cmd_qtdp, stop_tracing): Update print specifiers.
10525 (cmd_qtp, response_tracepoint): Likewise.
10526 (collect_data_at_tracepoint): Likewise.
10527 (collect_data_at_step): Likewise.
10528
55a8c076
YQ
105292012-04-14 Yao Qi <yao@codesourcery.com>
10530
10531 Import gnulib module inttypes.
10532 * aclocal.m4, config.in, configure: Regenerated.
10533
dc750257
YQ
105342012-04-14 Yao Qi <yao@codesourcery.com>
10535
10536 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10537 Makefile and config.status at last.
10538
0ab5faf9
YQ
105392012-04-13 Yao Qi <yao@codesourcery.com>
10540
10541 * tracepoint.c: Include stdint.h unconditionally.
10542
18f5fd81
TJB
105432012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10544
10545 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10546 on BFD_HAVE_SYS_PROCFS_TYPE.
10547 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10548 * configure: Regenerate.
10549 * config.in: Likewise.
10550
4d47af5c
L
105512012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10552
10553 * Makefile.in (clean): Also remove x32.c x32-linux.c
10554 x32-avx.c x32-avx-linux.c.
10555 (x32.o): New target.
10556 (x32.c): Likewise.
10557 (x32-linux.o): Likewise.
10558 (x32-linux.c): Likewise.
10559 (x32-avx.o): Likewise.
10560 (x32-avx.c): Likewise.
10561 (x32-avx-linux.o): Likewise.
10562 (x32-avx-linux.c): Likewise.
10563
10564 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10565 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10566 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10567 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10568 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10569 i386/x32-avx-linux.xml.
10570
10571 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10572 (init_registers_x32_avx_linux): Likwise.
10573 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10574 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10575
ecedbe58
PA
105762012-04-13 Pedro Alves <palves@redhat.com>
10577
10578 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10579 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10580 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10581 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10582 the sub-make.
10583
c92b5177
L
105842012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10585
10586 * linux-x86-low.c (compat_x32_clock_t): New.
10587 (compat_x32_siginfo_t): Likewise.
10588 (compat_x32_siginfo_from_siginfo): Likewise.
10589 (siginfo_from_compat_x32_siginfo): Likewise.
10590 (linux_is_elf64): Likewise.
10591 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10592 and siginfo_from_compat_x32_siginfo for x32.
10593 (x86_arch_setup): Set linux_is_elf64.
10594
214d508e
L
105952012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10596
10597 PR gdb/13969
10598 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10599 e_machine field.
10600 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10601 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10602 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10603 compatible with process.
10604
c9a1864a
YQ
106052012-04-12 Yao Qi <yao@codesourcery.com>
10606
10607 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10608 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10609 (install-only, install-info, clean): Handle sub dir gnulib.
10610 (all-lib, am--refresh): New targets.
10611 (memmem.o): Remove target.
10612 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10613 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10614 (AC_REPLACE_FUNCS): Remove memmem.
10615 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10616 (AC_OUTPUT): Generate Makefile in gnulib/.
10617 * aclocal.m4, config.in, configure: Regenerated.
10618
367ba2c2
MR
106192012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10620
10621 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10622
9d236627
PA
106232012-04-05 Pedro Alves <palves@redhat.com>
10624
10625 -Werror=strict-aliasing
10626
10627 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10628 pointer.
10629
111217b3
PA
106302012-04-04 Pedro Alves <palves@redhat.com>
10631
10632 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10633 (sparc_store_gregset_from_stack, sparc_store_gregset)
10634 (sparc_breakpoint_at): Fix formatting.
10635
8365dcf5
TJB
106362012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10637
10638 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10639 are available.
10640 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10641 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10642 * config.in: Regenerate.
10643 * configure: Likewise.
10644
689cc2ae
PA
106452012-03-29 Pedro Alves <palves@redhat.com>
10646
10647 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10648 Correct ptrace arguments.
10649
c14dfd32
PA
106502012-03-28 Pedro Alves <palves@redhat.com>
10651
10652 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10653 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10654 (IA64_FR1_REGNUM): New defines.
10655 (ia64_fetch_register): New.
10656 (the_low_target): Install it.
10657 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10658 field.
10659 * linux-low.c (linux_fetch_registers): Try the
10660 the_low_target.fetch_register hook first.
10661
10662 * linux-arm-low.c (the_low_target): Adjust.
10663 * linux-bfin-low.c (the_low_target): Adjust.
10664 * linux-cris-low.c (the_low_target): Adjust.
10665 * linux-crisv32-low.c (the_low_target): Adjust.
10666 * linux-m32r-low.c (the_low_target): Adjust.
10667 * linux-m68k-low.c (the_low_target): Adjust.
10668 * linux-mips-low.c (the_low_target): Adjust.
10669 * linux-ppc-low.c (the_low_target): Adjust.
10670 * linux-s390-low.c (the_low_target): Adjust.
10671 * linux-sh-low.c (the_low_target): Adjust.
10672 * linux-sparc-low.c (the_low_target): Adjust.
10673 * linux-tic6x-low.c (the_low_target): Adjust.
10674 * linux-x86-low.c (the_low_target): Adjust.
10675 * linux-xtensa-low.c (the_low_target): Adjust.
10676
63c88e13
PA
106772012-03-26 Pedro Alves <palves@redhat.com>
10678
10679 * server.c (handle_qxfer_libraries): Don't bail early if
10680 the_target->qxfer_libraries_svr4 is not NULL.
10681
fb723180
PA
106822012-03-26 Pedro Alves <palves@redhat.com>
10683
10684 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10685
0afae3cf
PA
106862012-03-23 Pedro Alves <palves@redhat.com>
10687
10688 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10689 "library-list-svr4" element's start tag when the the DSO list is
10690 empty.
10691
485f1ee4
PA
106922012-03-23 Pedro Alves <palves@redhat.com>
10693
10694 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10695 a variable whose type size is the same as the inferior's pointer
10696 size.
10697
a5362b9a
TS
106982012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10699
10700 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10701 struct siginfo.
10702 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10703 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10704 * linux-low.h: Include <signal.h>.
10705 (struct siginfo): Remove forward declaration.
10706 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10707 struct siginfo.
10708
d226c142
MF
107092012-03-21 Mike Frysinger <vapier@gentoo.org>
10710
10711 * .gitignore: Ignore more files.
10712
122f36ef
PA
107132012-03-19 Pedro Alves <palves@redhat.com>
10714 Jan Kratochvil <jan.kratochvil@redhat.com>
10715
10716 * server.c (cont_thread, general_thread): Add describing comments.
10717 (start_inferior): Clear `cont_thread'.
10718 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10719 of a process.
10720
fc3e5175
YQ
107212012-03-15 Yao Qi <yao@codesourcery.com>
10722
10723 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10724 handling to ...
10725 (cmd_qtdp): ... here.
10726
8d0d92cd
YQ
107272012-03-15 Yao Qi <yao@codesourcery.com>
10728
10729 * tracepoint.c (struct tracepoint_action_ops): New.
10730 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10731 (m_tracepoint_action_download): New.
10732 (r_tracepoint_action_download): New.
10733 (x_tracepoint_action_download): New.
10734 (l_tracepoint_action_download): New.
10735 (add_tracepoint_action): Install `action->ops' according type.
10736 (download_tracepoint_1): Move code `download' function pointer
10737 of various tracepoint_action_ops.
10738
87b0bb13
JK
107392012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10740
10741 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10742 linux_ptrace_attach_warnings.
10743
5f572dec
JK
107442012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10745
10746 * Makefile.in (linux-ptrace.o): New.
10747 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10748 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10749 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10750 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10751 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10752 of these targets.
10753 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10754
f4647387
YQ
107552012-03-08 Yao Qi <yao@codesourcery.com>
10756 Pedro Alves <palves@redhat.com>
10757
10758 Fix PR server/13392.
10759 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10760 offset of JMP insn.
10761 * tracepoint.c (remove_tracepoint): New.
10762 (cmd_qtdp): Call remove_tracepoint when failed to install.
10763
9b224c5e
PA
107642012-03-07 Pedro Alves <palves@redhat.com>
10765
10766 * linux-low.c (get_detach_signal): New.
10767 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10768 Pass on pending signals to PTRACE_DETACH. Check the result of the
10769 ptrace call.
10770 * server.c (program_signals, program_signals_p): New.
10771 (handle_general_set): Handle QProgramSignals.
10772 * server.h (program_signals, program_signals_p): Declare.
10773
e237a7e2
JK
107742012-03-05 Pedro Alves <palves@redhat.com>
10775 Jan Kratochvil <jan.kratochvil@redhat.com>
10776
10777 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10778 New comment why.
10779
5808517f
YQ
107802012-03-03 Yao Qi <yao@codesourcery.com>
10781
10782 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10783 agent_look_up_symbols.
10784
58b4daa5
YQ
107852012-03-03 Yao Qi <yao@codesourcery.com>
10786
10787 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10788 (linux-x86-low.o): Likewise.
10789 * server.h: Remove in_process_agent_loaded.
10790 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10791 common/agent.c.
10792 Update callers.
10793
8ffcbaaf
YQ
107942012-03-03 Yao Qi <yao@codesourcery.com>
10795
10796 * tracepoint.c (gdb_agent_capability): New global.
10797 (in_process_agent_loaded_ust): Renamed to
10798 `in_process_agent_supports_ust'.
10799 Update callers.
10800 (in_process_agent_supports_ust): Call agent_capability_check.
10801 (clear_installed_tracepoints): Assert that agent supports
10802 agent.
10803
d1feda86
YQ
108042012-03-03 Yao Qi <yao@codesourcery.com>
10805
10806 * linux-low.c (linux_supports_agent): New.
10807 (linux_target_ops): Initialize field `supports_agent' with
10808 linux_supports_agent.
10809 * target.h (struct target_ops) <supports_agent>: New.
10810 (target_supports_agent): New macro.
10811 * server.c (handle_general_set): Handle packet 'QAgent'.
10812 (handle_query): Send `QAgent+'.
10813 * Makefile.in (server.o): Depends on agent.h.
10814
2fa291ac
YQ
108152012-03-03 Yao Qi <yao@codesourcery.com>
10816
10817 * Makefile.in (OBS): Add agent.o.
10818 Add new rule for agent.o.
10819 Track dependence of tracepoint.c on agent.h.
10820 * tracepoint.c (run_inferior_command_1):
10821 (run_inferior_command): Call agent_run_command.
10822 (gdb_ust_connect_sync_socket): Deleted. Move it to
10823 common/agent.c.
10824 (resume_thread, stop_thread): Likewise.
10825 (gdb_ust_socket_init): Renamed to ...
10826 (gdb_agent_socket_init): ... New.
10827 (gdb_ust_thread): Renamed to ...
10828 (gdb_agent_helper_thread): ... New.
10829 (gdb_ust_init): Move some code to ...
10830 (gdb_agent_init): ... here. New.
10831 [HAVE_UST]: Call gdb_ust_init.
10832 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10833 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10834 * config.in, configure: Regenerated.
10835
05044653
PA
108362012-03-02 Pedro Alves <palves@redhat.com>
10837
10838 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10839 * linux-low.c (struct simple_pid_list): New.
10840 (stopped_pids): New a struct simple_pid_list pointer.
10841 (add_to_pid_list, pull_pid_from_list): New.
10842 (handle_extended_wait): Don't assume the first signal new children
10843 report is SIGSTOP. Adjust call to pull_pid_from_list.
10844 (linux_wait_for_lwp): Adjust.
10845
8d00225b
YQ
108462012-03-02 Yao Qi <yao@codesourcery.com>
10847
10848 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10849 debug log.
10850
19560ba5
YQ
108512012-03-02 Yao Qi <yao@codesourcery.com>
10852
10853 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10854 `stop_pc' and `tpoint'. Update caller.
10855
1faeff08
MR
108562012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10857
10858 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10859 * linux-low.c (use_linux_regsets): New macro.
10860 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10861 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10862 (linux_register_in_regsets): New function.
10863 (usr_fetch_inferior_registers): Skip registers covered by
10864 regsets.
10865 (usr_store_inferior_registers): Likewise.
10866 (usr_fetch_inferior_registers): New macro.
10867 (usr_store_inferior_registers): Likewise.
10868 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10869 (linux_store_registers): Likewise.
10870 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10871 prototype.
10872 (init_registers_mips64_dsp_linux): Likewise.
10873 (init_registers_mips_linux): New macro.
10874 (init_registers_mips_dsp_linux): Likewise.
10875 (mips_dsp_num_regs): Likewise.
10876 (DSP_BASE, DSP_CONTROL): New fallback macros.
10877 (mips_base_regs): New macro.
10878 (mips_regmap): Use it. Fix the size.
10879 (mips_dsp_regmap): New variable.
10880 (mips_dsp_regset_bitmap): Likewise.
10881 (mips_arch_setup): New function.
10882 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10883 than mips_regmap.
10884 (mips_cannot_store_register): Likewise.
10885 (the_low_target): Update .arch_setup, .num_regs and .regmap
10886 initializers. Add .regset_bitmap initializer.
10887 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10888 initializer.
10889 * linux-bfin-low.c (the_low_target): Likewise.
10890 * linux-cris-low.c (the_low_target): Likewise.
10891 * linux-crisv32-low.c (the_low_target): Likewise.
10892 * linux-ia64-low.c (the_low_target): Likewise.
10893 * linux-m32r-low.c (the_low_target): Likewise.
10894 * linux-m68k-low.c (the_low_target): Likewise.
10895 * linux-ppc-low.c (the_low_target): Likewise.
10896 * linux-s390-low.c (the_low_target): Likewise.
10897 * linux-sh-low.c (the_low_target): Likewise.
10898 * linux-sparc-low.c (the_low_target): Likewise.
10899 * linux-tic6x-low.c (the_low_target): Likewise.
10900 * linux-x86-low.c (the_low_target): Likewise.
10901 * linux-xtensa-low.c (the_low_target): Likewise.
10902 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10903 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10904 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10905 srv_xmlfiles.
10906 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10907 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10908
c03e6ccc
YQ
109092012-02-29 Yao Qi <yao@codesourcery.com>
10910 Pedro Alves <palves@redhat.com>
10911
10912 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10913 `step_over_finished' is true.
10914
644cebc9
PA
109152012-02-27 Pedro Alves <palves@redhat.com>
10916
10917 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10918 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10919
c14d7ab2
PA
109202012-02-27 Pedro Alves <palves@redhat.com>
10921
10922 PR server/9684
10923 * linux-low.c (pid_is_stopped): New.
10924 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10925
412c89dd
LM
109262012-02-25 Luis Machado <lgustavo@codesourcery.com>
10927
10928 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10929 of conditions.
10930
b745defe
MR
109312012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10932
10933 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10934
9f3a5c85
LM
109352012-02-24 Luis Machado <lgustavo@codesourcery>
10936
10937 * server.c (handle_query): Advertise support for target-side
10938 breakpoint condition evaluation.
10939 (process_point_options): New function.
10940 (process_serial_event): When inserting a breakpoint, check for
10941 a target-side condition that should be evaluated.
10942
10943 * mem-break.c: Include regcache.h and ax.h.
10944 (point_cond_list_t): New data structure.
10945 (breakpoint) <cond_list>: New field.
10946 (find_gdb_breakpoint_at): Make non-static.
10947 (delete_gdb_breakpoint_at): Clear any target-side
10948 conditions.
10949 (clear_gdb_breakpoint_conditions): New function.
10950 (add_condition_to_breakpoint): Likewise.
10951 (add_breakpoint_condition): Likewise.
10952 (gdb_condition_true_at_breakpoint): Likewise.
10953 (gdb_breakpoint_here): Return result directly instead
10954 of going through a local variable.
10955
10956 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10957 (clear_gdb_breakpoint_conditions): Likewise.
10958 (add_breakpoint_condition): Likewise.
10959 (gdb_condition_true_at_breakpoint): Likewise.
10960
10961 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10962 (need_step_over_p): Take target-side breakpoint condition into
10963 consideration.
10964
5e1dc496
LM
109652012-02-24 Luis Machado <lgustavo@codesourcery>
10966
10967 * server.h: Include tracepoint.h.
10968 (agent_mem_read, agent_get_trace_state_variable_value,
10969 agent_set_trace_state_variable_value,
10970 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10971 get_set_tsv_func_addr): New prototypes.
10972
10973 * ax.h: New include file.
10974 * ax.c: New source file.
10975
10976 * tracepoint.c: Include ax.h.
10977 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10978 agent_expr, eval_result_type): Move to ax.h.
10979 (parse_agent_expr): Rename to ...
10980 (gdb_parse_agent_expr): ... this, make it non-static and move
10981 to ax.h.
10982 (unparse_agent_expr) Rename to ...
10983 (gdb_unparse_agent_expr): ... this, make it non-static and move
10984 to ax.h.
10985 (eval_agent_expr): Rename to ...
10986 (eval_tracepoint_agent_expr): ... this.
10987 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10988 forward declarations.
10989 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10990 (agent_get_trace_state_variable_value): New function.
10991 (agent_set_trace_state_variable_value): New function.
10992 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10993 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10994 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10995 (condition_true_at_tracepoint): Likewise.
10996 (parse_agent_expr): Rename to ...
10997 (gdb_parse_agent_expr): ... this and move to ax.c.
10998 (unparse_agent_expr): Rename to ...
10999 (gdb_unparse_agent_expr): ... this and move to ax.c.
11000 (gdb_agent_op_name): Move to ax.c.
11001 (eval_agent_expr): Rename to ...
11002 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11003 and move to ax.c.
11004 (eval_tracepoint_agent_expr): New function.
11005 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 11006 non-static.
5e1dc496
LM
11007 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11008 ax.c.
11009 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11010 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11011 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11012 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11013 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11014 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11015 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11016 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11017 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11018 (compile_bytecodes): Remove forward declaration.
11019 (is_goto_target): Move to ax.c.
11020 (compile_bytecodes): Move to ax.c and call
11021 agent_get_trace_state_variable_value (...) and
11022 agent_set_trace_state_variable_value (...).
11023
11024 * Makefile.in: Update ax.c and IPA dependencies.
11025
277e4e52
PA
110262012-02-24 Pedro Alves <palves@redhat.com>
11027
11028 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11029 (cmd_bigqtbuffer_circular): ... this. Only handle
11030 'QTBuffer:circular:'.
11031 (handle_tracepoint_general_set): Adjust.
11032
bf4c19f7
YQ
110332012-02-16 Yao Qi <yao@codesourcery.com>
11034
11035 * inferiors.c: Move code to ...
11036 * dll.c: .... here. New.
11037 * server.h: Declare clear_dlls.
11038 * Makefile.in (SFILES): Add dll.c.
11039 (OBS): Add dll.o
11040 (dll.o): New rule.
11041
d73f2619
YQ
110422012-02-11 Yao Qi <yao@codesourcery.com>
11043
11044 * server.c: (handle_monitor_command): Add a new parameter
11045 `own_buf'.
11046 (handle_query): Update caller.
11047
f8255c2a
JB
110482012-02-09 Joel Brobecker <brobecker@adacore.com>
11049
11050 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11051 * configure, config.in: Regenerate.
11052 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11053 is not defined.
11054
da84f473
PA
110552012-02-02 Pedro Alves <palves@redhat.com>
11056
11057 Try SIGKILL first, then PTRACE_KILL.
11058 * linux-low.c (linux_kill_one_lwp): New.
11059 (linux_kill_one_lwp): Rename to ...
11060 (kill_one_lwp_callback): ... this. Use the new
11061 linux_kill_one_lwp.
11062
e886a173
PA
110632012-02-02 Pedro Alves <palves@redhat.com>
11064
11065 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11066 inferior.
11067
be07f1a2
PA
110682012-01-27 Pedro Alves <palves@redhat.com>
11069
11070 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11071 (elf_64_file_p): Make static.
11072 (linux_pid_exe_is_elf_64_file): New.
11073 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11074 Delete declarations.
11075 (linux_pid_exe_is_elf_64_file): Declare.
11076 * linux-x86-low.c (x86_arch_setup): Use
11077 linux_pid_exe_is_elf_64_file.
11078
d8301ad1
JK
110792012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11080
11081 * linux-low.c (linux_wait_for_event_1): Rename to ...
11082 (linux_wait_for_event): ... here and merge it with former
11083 linux_wait_for_event - new variable wait_ptid, use it.
11084 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11085
01b17894
PA
110862012-01-23 Pedro Alves <palves@redhat.com>
11087
11088 * server.c (main): Avoid yet another case of infinite loop while
11089 detaching/killing after a longjmp.
11090
e825046f
JK
110912012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11092
11093 Code cleanup.
11094 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11095
b9e7b9c3
UW
110962012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11097
11098 * hostio.c (handle_readlink): New function.
11099 (handle_vFile): Call it to handle "vFile:readlink" packets.
11100
901f9912
UW
111012012-01-20 Pedro Alves <palves@redhat.com>
11102 Ulrich Weigand <ulrich.weigand@linaro.org>
11103
11104 * server.c (handle_v_requests): Only support vAttach and vRun to
11105 start multiple processes when in extended protocol mode.
11106
fc1ab1a0
PA
111072012-01-17 Pedro Alves <palves@redhat.com>
11108
11109 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11110 memalign plus mprotect to allocate the scratch buffer.
11111
7d5d4e98
PA
111122012-01-13 Pedro Alves <palves@redhat.com>
11113
11114 * server.c (attach_inferior): Clear `cont_thread'.
11115
f128d5e9
PA
111162012-01-13 Pedro Alves <palves@redhat.com>
11117
11118 * server.c (main): Avoid infinite loop while detaching/killing
11119 after a longjmp.
11120
06db92f0
DE
111212012-01-09 Doug Evans <dje@google.com>
11122
11123 * server.c (start_inferior): Set last_ptid in --wrapper case.
11124
32d92999
YQ
111252012-01-06 Yao Qi <yao@codesourcery.com>
11126
11127 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11128 defined.
11129 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11130
5e0a92a9
YQ
111312012-01-04 Yao Qi <yao@codesourcery.com>
11132
11133 * tracepoint.c (cmd_qtdp): Print debug message
11134 for static tracepoint.
11135
ae639e8c
YQ
111362012-01-04 Yao Qi <yao@codesourcery.com>
11137
11138 * tracepoint.c (trace_vdebug): Differentiate debug message
11139 between gdbserver and IPA.
11140
f72429c5
YQ
111412012-01-03 Yao Qi <yao@codesourcery.com>
11142
11143 * tracepoint.c (tracepoint_was_hit): Don't collect for
11144 static tracepoint.
11145
12c3e59c
JB
111462012-01-02 Joel Brobecker <brobecker@adacore.com>
11147
11148 * terminal.h: Reformat copyright header.
11149
67827812
JB
111502012-01-02 Joel Brobecker <brobecker@adacore.com>
11151
11152 * server.c (gdbserver_version): Update copyright year.
11153 * gdbreplay.c (gdbreplay_version): Likewise.
11154
3e52c33d
JK
111552011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11156
11157 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11158
11159 Revert:
11160 2011-12-18 Hui Zhu <teawater@gmail.com>
11161 * linux-low.c (linux_create_inferior): Save return value to ret.
11162
66f1260e
HZ
111632011-12-18 Hui Zhu <teawater@gmail.com>
11164
11165 * linux-low.c (linux_create_inferior): Save return value to ret.
11166
e77616d7
DE
111672011-12-16 Doug Evans <dje@google.com>
11168
e7b06c57
DE
11169 * linux-low.c (linux_create_inferior): If stdio connection,
11170 redirect stdin from /dev/null, stdout to stderr.
11171 * remote-utils.c (remote_is_stdio): New static global.
11172 (remote_connection_is_stdio): New function.
11173 (remote_prepare): Handle stdio connection.
11174 (remote_open): Ditto.
11175 (remote_close): Don't close stdin for stdio connections.
11176 (read_prim,write_prim): New functions. Replace all calls to
11177 read/write to these.
11178 * server.c (main): Watch for "-" argument. Move call to
11179 remote_prepare before start_inferior.
11180 * server.h (STDIO_CONNECTION_NAME): New macro.
11181 (remote_connection_is_stdio): Declare.
11182
e77616d7
DE
11183 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11184 in debugging output.
11185
82067193
YQ
111862011-12-15 Yao Qi <yao@codesourcery.com>
11187
11188 * tracepoint.c: Include sys/syscall.h.
11189 (gdb_ust_thread): Remove preprocessor conditional.
11190
82bfbe7e
PA
111912011-12-14 Pedro Alves <pedro@codesourcery.com>
11192
11193 * linux-low.c (linux_detach_one_lwp): Call
11194 the_low_target.prepare_to_resume before detaching.
11195
712c6575
YQ
111962011-12-14 Yao Qi <yao@codesourcery.com>
11197
11198 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11199 of write.
11200
d54d1edf
YQ
112012011-12-14 Yao Qi <yao@codesourcery.com>
11202
11203 * i386-low.c (i386_low_stopped_data_address): Initialize local
11204 variable `control'.
11205
6210a125
PA
112062011-12-13 Pedro Alves <pedro@codesourcery.com>
11207
11208 PR remote/13492
11209
11210 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11211 DR_CONTROL unless necessary. Extend comments.
11212 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11213 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11214
2ece8244
YQ
112152011-12-13 Yao Qi <yao@codesourcery.com>
11216
11217 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11218 macros.
11219 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11220
784867a5
JK
112212011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11222
11223 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11224 Print new debug message for such case.
11225
6bf36717
JK
112262011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11227
11228 Fix overlapping memcpy.
11229 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11230 the read_inferior_memory transfer.
11231 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11232 write_inferior_memory transfer.
11233 (set_fast_tracepoint_jump): New variable buf. Use it for the
11234 read_inferior_memory and write_inferior_memory transfers.
11235 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11236 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11237 Use it for the write_inferior_memory transfer.
11238 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11239 buffers.
11240
50275556
MR
112412011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11242
11243 * linux-low.c (fetch_register, store_register): Make code
11244 consistent, fix formatting.
11245
7325beb4
MR
112462011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11247
11248 * linux-low.c (usr_store_inferior_registers): Factor out code
11249 to handle individual registers into...
11250 (store_register): ... this new function.
11251
c642a434
UW
112522011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11253
11254 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11255 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11256 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11257 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11258 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11259 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11260 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11261 (srv_xmlfiles): Add new XML files.
11262
11263 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11264 and <sys/uio.h>.
11265 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11266 (init_registers_s390_linux32v1): Add prototype.
11267 (init_registers_s390_linux32v2): Likewise.
11268 (init_registers_s390_linux64v1): Likewise.
11269 (init_registers_s390_linux64v2): Likewise.
11270 (init_registers_s390x_linux64v1): Likewise.
11271 (init_registers_s390x_linux64v2): Likewise.
11272 (s390_num_regs): Increment to 52.
11273 (s390_regmap): Add orig_r2 register.
11274 (s390_num_regs_3264): Increment to 68.
11275 (s390_regmap_3264): Add orig_r2 register.
11276 (s390_collect_ptrace_register): Handle orig_r2 register.
11277 (s390_supply_ptrace_register): Likewise.
11278 (s390_fill_last_break): New function.
11279 (s390_store_last_break): Likewise.
11280 (s390_fill_system_call): New function.
11281 (s390_store_system_call): Likewise.
11282 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11283 register sets.
11284 (s390_check_regset): New function.
11285 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11286 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11287 Update target_regsets for available register sets.
11288
2268b414
JK
112892011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11290 Jan Kratochvil <jan.kratochvil@redhat.com>
11291
11292 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11293 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11294 New.
11295 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11296 * linux-low.h (struct process_info_private): New member r_debug.
11297 * server.c (handle_qxfer_libraries): Call
11298 the_target->qxfer_libraries_svr4.
11299 (handle_qxfer_libraries_svr4): New function.
11300 (qxfer_packets): New entry "libraries-svr4".
11301 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11302 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11303 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11304 PACKET_qXfer_libraries_svr4.
11305
d6db1fab
UW
113062011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11307
11308 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11309 PSW address/mask between 8-byte and 16-byte formats.
11310 (s390_supply_ptrace_register): Likewise.
11311 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11312 basic addressing mode bit.
11313
242f5f1c
SS
113142011-11-24 Stan Shebs <stan@codesourcery.com>
11315
11316 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11317
f196051f
SS
113182011-11-17 Stan Shebs <stan@codesourcery.com>
11319
11320 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11321 (tracing_start_time): New global.
11322 (tracing_stop_time): New global.
11323 (tracing_user_name): New global.
11324 (tracing_notes): New global.
11325 (tracing_stop_note): New global.
11326 (cmd_qtstart): Set traceframe_usage, start_time.
11327 (stop_tracing): Set stop_time.
11328 (cmd_qtstatus): Report additional status.
11329 (cmd_qtp): New function.
11330 (handle_tracepoint_query): Call it.
11331 (cmd_qtnotes): New function.
11332 (handle_tracepoint_general_set): Call it.
11333 (get_timestamp): Rename from tsv_get_timestamp.
11334
405f8e94
SS
113352011-11-14 Stan Shebs <stan@codesourcery.com>
11336 Kwok Cheung Yeung <kcy@codesourcery.com>
11337
11338 * linux-x86-low.c (small_jump_insn): New.
11339 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11340 trampoline and error message, build a trampoline and issue a small
11341 jump instruction to it.
11342 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11343 trampoline and error message.
11344 (x86_get_min_fast_tracepoint_insn_len): New.
11345 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11346 * linux-low.h (struct linux_target_ops): Add arguments to
11347 install_fast_tracepoint_jump_pad operation, add new operation.
11348 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11349 arguments.
11350 (linux_get_min_fast_tracepoint_insn_len): New function.
11351 (linux_target_op): Add new operation.
11352 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11353 (gdb_trampoline_buffer_end): Ditto.
11354 (gdb_trampoline_buffer_error): Ditto.
11355 (struct ipa_sym_addresses): Add fields for new IPA variables.
11356 (symbol_list): Add entries for new IPA variables.
11357 (struct tracepoint): Add fields to hold the address range of the
11358 trampoline used by the tracepoint.
11359 (trampoline_buffer_head): New static variable.
11360 (trampoline_buffer_tail): Ditto.
11361 (claim_trampoline_space): New function.
11362 (have_fast_tracepoint_trampoline_buffer): New function.
11363 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11364 structure.
11365 (install_fast_tracepoint): Ditto, also add error buffer argument.
11366 (cmd_qtminftpilen): New function.
11367 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11368 (fast_tracepoint_from_trampoline_address): New function.
11369 (fast_tracepoint_collecting): Handle trampoline as part of jump
11370 pad space.
11371 (set_trampoline_buffer_space): New function.
11372 (initialize_tracepoint): Initialize new IPA variables.
11373 * target.h (struct target_ops): Add arguments to
11374 install_fast_tracepoint_jump_pad operation, add new
11375 get_min_fast_tracepoint_insn_len operation.
11376 (target_get_min_fast_tracepoint_insn_len): New.
11377 (install_fast_tracepoint_jump_pad): Add arguments.
11378 * server.h (IPA_BUFSIZ): Define.
11379 * linux-i386-ipa.c: Include extra header files.
11380 (initialize_fast_tracepoint_trampoline_buffer): New function.
11381 (initialize_low_tracepoint): Call it.
11382 * server.h (set_trampoline_buffer_space): Declare.
11383 (claim_trampoline_space): Ditto.
11384 (have_fast_tracepoint_trampoline_buffer): Ditto.
11385
1e4d1764
YQ
113862011-11-14 Yao Qi <yao@codesourcery.com>
11387
11388 * server.c (handle_query): Handle InstallInTrace for qSupported.
11389 * tracepoint.c (add_tracepoint): Sort list.
11390 (install_tracepoint, download_tracepoint): New.
11391 (cmd_qtdp): Call them to install and download tracepoints.
11392 (sort_tracepoints): Removed.
11393 (cmd_qtstart): Update.
11394
5c73ff4e
YQ
113952011-11-14 Yao Qi <yao@codesourcery.com>
11396
11397 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11398 * mem-break.h: Declare.
11399 * tracepoint.c (cmd_qtstart): Move some code to ...
11400 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11401 New.
11402 (download_tracepoints): Move some code to ...
11403 (download_tracepoint_1): ... here. New.
11404
86a30030
YQ
114052011-11-08 Yao Qi <yao@codesourcery.com>
11406
11407 * remote-utils.c (relocate_instruction): A comment fix.
11408
8d26e50c
JB
114092011-11-07 Joel Brobecker <brobecker@adacore.com>
11410
11411 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11412 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11413 dr_status_mirror and dr_control_mirror from debug_reg_state.
11414 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11415 (i386_initial_stuff): Remove use of deleted globals.
11416 (i386_get_thread_context, i386_set_thread_context,
11417 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11418 from debug_reg_state.
11419
a59306a3
YQ
114202011-11-05 Yao Qi <yao@codesourcery.com>
11421
11422 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11423 address as TPOINT's.
11424
3065dfb6
SS
114252011-11-02 Stan Shebs <stan@codesourcery.com>
11426
11427 * tracepoint.c (agent_mem_read_string): New function.
11428 (eval_agent_expr): Call it for tracenz.
11429 * server.c (handle_query): Report support for tracenz.
11430
fd0d8c7c
YQ
114312011-11-02 Yao Qi <yao@codesourcery.com>
11432
11433 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11434
609086b1
YQ
114352011-11-02 Yao Qi <yao@codesourcery.com>
11436
11437 * target.h: Fix a typo in comment.
11438
b9fd1791
PA
114392011-10-31 Pedro Alves <pedro@codesourcery.com>
11440
11441 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11442 clobber the breakpoints' shadows with fast tracepoint jumps.
11443 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11444 * target.c (write_inferior_memory): Also pass MYADDR down to
11445 check_mem_write.
11446
03583c20
UW
114472011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11448
11449 * configure.ac: Check support for personality routine.
11450 * configure: Regenerate.
11451 * config.in: Likewise.
11452 * linux-low.c: Include <sys/personality.h>.
11453 Define ADDR_NO_RANDOMIZE if necessary.
11454 (linux_create_inferior): Disable address space randomization when
11455 forking inferior, if requested.
11456 (linux_supports_disable_randomization): New function.
11457 (linux_target_ops): Install it.
11458 * server.h (disable_randomization): Declare.
11459 * server.c (disable_randomization): New global variable.
11460 (handle_general_set): Handle QDisableRandomization.
11461 (handle_query): Likewise for qSupported.
11462 (main): Support --disable-randomization and --no-disable-randomization
11463 command line arguments.
11464 * target.h (struct target_ops): Add supports_disable_randomization.
11465 (target_supports_disable_randomization): New macro.
11466
723b724b
MF
114672011-09-29 Mike Frysinger <vapier@gentoo.org>
11468
11469 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11470 ifdef check.
11471 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11472 [!PT_GETDSBT] (target_loadmap): New definition.
11473 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11474 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11475 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11476 and PT_GETDSBT to LINUX_LOADMAP.
11477 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11478 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11479
55329a5c 114802011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11481
11482 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11483 (arm_linux_hwbp_cap): New static variable.
11484 (arm_linux_get_hwbp_cap): Replace by ...
11485 (arm_linux_init_hwbp_cap): ... this new function.
11486 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11487 (arm_linux_get_hw_watchpoint_count): Likewise.
11488 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11489 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11490 (arm_prepare_to_resume): Use perror_with_name instead of error.
11491
55329a5c 114922011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11493
11494 * linux-arm-low.c: Include <signal.h>.
11495 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11496 (struct arm_linux_hwbp_cap): New data type.
11497 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11498 (struct arm_linux_hw_breakpoint): New data type.
11499 (MAX_BPTS, MAX_WPTS): Define.
11500 (struct arch_process_info, struct arch_lwp_info): New data types.
11501 (arm_linux_get_hwbp_cap): New function.
11502 (arm_linux_get_hw_breakpoint_count): Likewise.
11503 (arm_linux_get_hw_watchpoint_count): Likewise.
11504 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11505 (arm_hwbp_control_initialize): Likewise.
11506 (arm_hwbp_control_is_enabled): Likewise.
11507 (arm_hwbp_control_is_initialized): Likewise.
11508 (arm_hwbp_control_disable): Likewise.
11509 (arm_linux_hw_breakpoint_equal): Likewise.
11510 (arm_linux_hw_point_initialize): Likewise.
11511 (struct update_registers_data): New data structure.
11512 (update_registers_callback: New function.
11513 (arm_insert_point): Likewise.
11514 (arm_remove_point): Likewise.
11515 (arm_stopped_by_watchpoint): Likewise.
11516 (arm_stopped_data_address): Likewise.
11517 (arm_new_process): Likewise.
11518 (arm_new_thread): Likewise.
11519 (arm_prepare_to_resume): Likewise.
11520 (the_low_target): Register arm_insert_point, arm_remove_point,
11521 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11522 arm_new_thread, and arm_prepare_to_resume.
11523
6b9801d4
SS
115242011-09-15 Stan Shebs <stan@codesourcery.com>
11525
11526 * server.h (struct emit_ops): Add compare-goto fields.
11527 * tracepoint.c (gdb_agent_op_sizes): New table.
11528 (emit_eq_goto): New function.
11529 (emit_ne_goto): New function.
11530 (emit_lt_goto): New function.
11531 (emit_le_goto): New function.
11532 (emit_gt_goto): New function.
11533 (emit_ge_goto): New function.
11534 (is_goto_target): New function.
11535 (compile_bytecodes): Recognize special cases of compare-goto
11536 combinations and call specialized emitters for them.
11537 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11538 (amd64_emit_ne_goto): New function.
11539 (amd64_emit_lt_goto): New function.
11540 (amd64_emit_le_goto): New function.
11541 (amd64_emit_gt_goto): New function.
11542 (amd64_emit_ge_goto): New function.
11543 (amd64_emit_ops): Add the new functions.
11544 (i386_emit_eq_goto): New function.
11545 (i386_emit_ne_goto): New function.
11546 (i386_emit_lt_goto): New function.
11547 (i386_emit_le_goto): New function.
11548 (i386_emit_gt_goto): New function.
11549 (i386_emit_ge_goto): New function.
11550 (i386_emit_ops): Add the new functions.
11551
bf15cbda
SS
115522011-09-08 Stan Shebs <stan@codesourcery.com>
11553
11554 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11555 (i386_emit_epilogue): Restore %ebx.
11556
943ca1dd
JZ
115572011-08-31 Jie Zhang <jzhang918@gmail.com>
11558
11559 * server.c (step_thread): Remove definition.
11560 (process_serial_event): Don't handle Hs.
11561 * server.h (step_thread): Remove declaration.
11562 * target.c (set_desired_inferior): Remove use of step_thread.
11563
e3deef73
LM
115642011-08-24 Luis Machado <lgustavo@codesourcery.com>
11565
11566 * linux-low.c: Include linux-procfs.h.
11567 (linux_attach_lwp_1): Update comments.
11568 (linux_attach): Scan for existing threads when attaching to a
11569 process that is the tgid.
11570 * Makefile.in: Update dependencies.
11571
13da1c97
LM
115722011-08-24 Luis Machado <lgustavo@codesourcery.com>
11573
11574 * configure.srv: Add linux-procfs.o dependencies.
11575
881127c9
YQ
115762011-08-14 Yao Qi <yao@codesourcery.com>
11577
11578 * target.h (struct target_ops): Fix indent.
11579 * win32-low.c (win32_target_ops): Fix comment.
11580
58dbd541
YQ
115812011-08-14 Andrew Jenner <andrew@codesourcery.com>
11582 Yao Qi <yao@codesourcery.com>
11583
11584 * Makefile.in (clean): Remove tic6x-*.c files.
11585 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11586 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11587 (tic6x-c64xp-linux.c): Likewise.
11588 * configure.srv: Add support for tic6x-*-uclinux.
11589 * linux-tic6x-low.c: New.
11590 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11591
78d85199
YQ
115922011-08-14 Andrew Stubbs <ams@codesourcery.com>
11593 Yao Qi <yao@codesourcery.com>
11594
11595 * target.h (struct target_ops): Add read_loadmap.
11596 * linux-low.c (struct target_loadseg): New type.
11597 (struct target_loadmap): New type.
11598 (linux_read_loadmap): New function.
11599 (linux_target_ops): Add linux_read_loadmap.
11600 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11601 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11602 to NULL.
78d85199 11603
a959a88d
EZ
116042011-08-05 Eli Zaretskii <eliz@gnu.org>
11605
11606 * win32-low.c: Include <stdint.h>.
11607
1ced966e
PA
116082011-07-22 Pedro Alves <pedro@codesourcery.com>
11609
11610 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11611 to the inferior here.
11612 (i386_remove_aligned_watchpoint): Ditto.
11613 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11614 fit part of the watchpoint in the debug registers.
11615 (i386_update_inferior_debug_regs): New.
11616 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11617 registers, and only update the inferior on success.
11618 (i386_low_remove_watchpoint): Ditto.
11619
d26e3629
KY
116202011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11621
11622 * linux-low.c (compare_ints, unique, list_threads, show_process,
11623 linux_core_of_thread): Delete.
11624 (linux_target_ops): Change linux_core_of_thread to
11625 linux_common_core_of_thread.
11626 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11627 * utils.c (malloc_failure): Change type of argument.
11628 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11629 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11630 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11631 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11632 (IPA_OBJS): Add common-utils-ipa.o.
11633 (ptid_h, linux_osdata_h): New macros.
11634 (server_h): Add common/common-utils.h, common/xml-utils.h,
11635 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11636 common/ptid.h.
11637 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11638 ptid.o, buffer.o): New rules.
11639 (linux-low.o): Add common/linux-osdata.h as a dependency.
11640 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11641 * configure.ac: Add AC_HEADER_DIRENT check.
11642 * config.in: Regenerate.
11643 * configure: Regenerate.
11644 * remote-utils.c (xml_escape_text): Delete.
11645 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11646 buffer_xml_printf): Move to common/buffer.c.
11647 * server.c (main): Remove call to initialize_inferiors.
11648 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11649 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11650 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11651 internal_error, gdb_assert, gdb_assert_fail): Delete.
11652 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11653 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11654 common/buffer.h.
11655 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11656 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11657 initialize_inferiors): Delete.
11658
2275a1a7
PA
116592011-07-20 Pedro Alves <pedro@codesourcery.com>
11660
11661 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11662 symbol error.
11663
0a5b1e09
PA
116642011-05-31 Pedro Alves <pedro@codesourcery.com>
11665
11666 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11667 assertion.
11668 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11669
6938fd34
YQ
116702011-05-26 Yao Qi <yao@codesourcery.com>
11671
11672 * Makefile.in (thread-db.o): Track dependence to
11673 common/gdb_thread_db.h.
11674 * thread-db.c: include gdb_thread_db.h from right place.
11675
b481f9e0
TT
116762011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11677
11678 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11679 __FILE__ and __LINE__ to internal_error.
11680
98a5dd13
DE
116812011-05-13 Doug Evans <dje@google.com>
11682
11683 * thread-db.c (try_thread_db_load_from_sdir): New function.
11684 (try_thread_db_load_from_dir): New function.
11685 (thread_db_load_search): Handle $sdir, ignore $pdir.
11686 Remove trying of system directories if search of
11687 libthread-db-search-path fails, that is now done via $sdir.
11688
d248b706
KY
116892011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11690
11691 * server.c (handle_query): Add EnableDisableTracepoints to the list
11692 of supported features.
43aaf8b6 11693 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11694 tracepoints.
43aaf8b6
PA
11695 (cmd_qtenable_disable): New.
11696 (cmd_qtstart): Install tracepoints even if disabled.
11697 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11698 receiving a QTEnable or QTDisable packet.
11699 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11700 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11701 tracepoints.
11702 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11703
84e578fb
DE
117042011-05-10 Doug Evans <dje@google.com>
11705
11706 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11707
71f55dd8
DE
117082011-05-04 Doug Evans <dje@google.com>
11709
11710 * linux-low.c (linux_join): Skip process lookup.
11711 * spu-low.c (spu_join): Ditto.
11712 * server.c (join_inferiors_callback): Delete.
11713 (process_serial_event): For 'D' packet (detach) call join_inferior
11714 directly.
11715
4d393d60
JM
117162011-05-04 Joseph Myers <joseph@codesourcery.com>
11717
11718 * README: Don't mention xscale*-*-linux*.
11719 * configure.srv (xscale*-*-linux*): Don't handle target.
11720
b00ad6ff
NF
117212011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11722
11723 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11724 casting pointers.
11725 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11726 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11727 (i386_emit_void_call_2): Likewise.
11728
af96c192
YQ
117292011-04-26 Yao Qi <yao@codesourcery.com>
11730
43aaf8b6
PA
11731 * linux-low.c: Move common macros to linux-ptrace.h.
11732 Include linux-ptrace.h.
af96c192
YQ
11733 * Makefile.in (linux_ptrace_h): New.
11734 (linux-low.o): Depends on linux-ptrace.h.
11735
03f2bd59
JK
117362011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11737
11738 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11739 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11740 (remote_prepare): New function with most of the TCP code from ...
11741 (remote_open): ... here. Detect PORT here unconditionally. Move also
11742 setting transport_is_reliable.
11743 * server.c (run_once): New variable.
11744 (gdbserver_usage): Document it.
11745 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11746 the first run if RUN_ONCE.
11747 * server.h (run_once, remote_prepare): New declarations.
11748
7a9dd1b2
TT
117492011-04-19 Tom Tromey <tromey@redhat.com>
11750
11751 * win32-low.c (handle_load_dll): Remove duplicate "the".
11752
81239425
PM
117532011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11754
11755 Remove support for old Cygwin 1.5 versions.
11756 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11757 function to avoid warning.
11758 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11759 warning.
11760
9e0627f1
PM
117612011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11762
11763 * gdbserver/server.h (Macro _): Define it if not available.
11764
588eebee
MS
117652011-03-14 Michael Snyder <msnyder@vmware.com>
11766
348af9f7 11767 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11768
43f70d4c
JB
117692011-03-10 Joel Brobecker <brobecker@adacore.com>
11770
11771 * Makefile.in (maintainer-clean realclean distclean): Remove
11772 "make ... subdir_do" command.
11773
348af9f7
MS
117742011-03-10 Michael Snyder <msnyder@vmware.com>
11775
11776 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11777
11778 * server.c (handle_v_run): Free alloced buffer on early return.
11779
e637a4f5
YQ
117802011-03-09 Yao Qi <yao@codesourcery.com>
11781
11782 Revert:
11783 2011-03-04 Yao Qi <yao@codesourcery.com>
11784
11785 * Makefile.in: Remove GNU make feature --directory.
11786
11787 2011-03-05 Yao Qi <yao@codesourcery.com>
11788
11789 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11790 (subdir_do): New make target. Copied from gdb/Makefile.
11791 (maintainer-clean, realclean, distclean, clean): Call corresponding
11792 make targets in common/Makefile.
11793
11794 2011-02-11 Yao Qi <yao@codesourcery.com>
11795
11796 * configure.ac: Call AC_PROG_RANLIB.
11797 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11798 * configure: Regenerate.
11799
e6edda56
JK
118002011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11801
11802 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11803
e5141119
JB
118042011-03-06 Yao Qi <yao@codesourcery.com>
11805
11806 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11807
64794aa4
JB
118082011-03-05 Yao Qi <yao@codesourcery.com>
11809
11810 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11811 (subdir_do): New make target. Copied from gdb/Makefile.
11812 (maintainer-clean, realclean, distclean, clean): Call corresponding
11813 make targets in common/Makefile.
11814
7a762829
YQ
118152011-03-04 Yao Qi <yao@codesourcery.com>
11816
11817 * Makefile.in: Remove GNU make feature --directory.
11818
348af9f7
MS
118192011-03-04 Michael Snyder <msnyder@vmware.com>
11820
11821 * server.c (queue_stop_reply): Call xmalloc not malloc.
11822
118232011-03-02 Michael Snyder <msnyder@vmware.com>
11824
11825 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11826
9f72fee2
MS
118272011-02-28 Michael Snyder <msnyder@vmware.com>
11828
588eebee
MS
11829 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11830 (cmd_qtframe): Ditto.
11831 (cmd_qtbuffer): Ditto.
11832 (cmd_bigqtbuffer): Ditto.
11833
9f72fee2
MS
11834 * utils.c (decimal2str): Initialize 'width' to nine, then
11835 don't mess with it.
11836
8040bd49
UW
118372011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11838
11839 * hostio.c (require_data): Free *data, not data.
11840
7e52cbd0
JK
118412011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11842
11843 * hostio.c (require_data): Use free, not xfree.
11844
9130f83e
MS
118452011-02-27 Michael Snyder <msnyder@vmware.com>
11846
4b812f4e
MS
11847 * server.c (handle_query): Discard unused value.
11848
9130f83e
MS
11849 * hostio.c (require_data): Free malloc memory before returning
11850 error.
11851
69d37113
MS
118522011-02-26 Michael Snyder <msnyder@vmware.com>
11853
11854 * linux-low.c (list_threads): Call closedir for dirent.
11855
35f5825a
MS
118562011-02-27 Michael Snyder <msnyder@vmware.com>
11857
2a589cef
MS
11858 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11859 a case statement falls through.
11860
0adea5f7
MS
11861 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11862
35f5825a
MS
11863 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11864 in comparison.
11865
238f1c74
MS
118662011-02-26 Michael Snyder <msnyder@vmware.com>
11867
11868 * utils.c (decimal2str): Eliminate dead code and dead param.
11869 (pulongest): Drop dead param from call to decimal2str.
11870 (plongest): Ditto.
11871
633ff500
JB
118722011-02-24 Joel Brobecker <brobecker@adacore.com>
11873
11874 Revert the following patch (not approved yet):
11875 2011-02-21 Hui Zhu <teawater@gmail.com>
11876 * tracepoint.c (tp_printf): New function.
11877 (eval_agent_expr): Handle gdb_agent_op_printf.
11878
f9c6ff72
HZ
118792011-02-21 Hui Zhu <teawater@gmail.com>
11880
11881 * tracepoint.c (tp_printf): New function.
11882 (eval_agent_expr): Handle gdb_agent_op_printf.
11883
94d5e490
TT
118842011-02-18 Tom Tromey <tromey@redhat.com>
11885
11886 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11887 (tracepoint.o): Likewise.
11888 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11889 (gdb_agent_op_names): Likewise.
11890
c7f96d2b
TT
118912011-02-18 Tom Tromey <tromey@redhat.com>
11892
11893 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11894 gdb_agent_op_rot>: New constants.
11895 (gdb_agent_op_names): Add pick and roll.
11896 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11897 cases.
11898
0feedb2c
JK
118992011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11900
11901 * aclocal.m4: Regenerated with aclocal-1.11.1.
11902
b3b9301e
PA
119032011-02-14 Pedro Alves <pedro@codesourcery.com>
11904
11905 * server.c (handle_qxfer_traceframe_info): New.
11906 (qxfer_packets): Register "traceframe-info".
11907 (handle_query): Report support for qXfer:traceframe-info:read+.
11908 * tracepoint.c (match_blocktype): New.
11909 (traceframe_find_block_type): Rename to ...
11910 (traceframe_walk_blocks): ... this. Add callback filter argument,
11911 and use it.
11912 (traceframe_find_block_type): New, reimplemented on top of
11913 traceframe_walk_blocks.
11914 (build_traceframe_info_xml): New.
11915 (traceframe_read_info): New.
11916 * server.h (traceframe_read_info): Declare.
11917
4f3e6fb7
YQ
119182011-02-11 Yao Qi <yao@codesourcery.com>
11919
11920 * configure.ac: Call AC_PROG_RANLIB.
11921 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11922 * configure: Regenerate.
11923
764880b7
PA
119242011-02-07 Pedro Alves <pedro@codesourcery.com>
11925
11926 * server.c (gdb_read_memory): Change return semantics to allow
11927 partial transfers.
11928 (handle_search_memory_1): Adjust.
11929 (process_serial_event) <'m' packet>: Handle partial transfers.
11930 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11931
1c79eb8a
PA
119322011-01-28 Pedro Alves <pedro@codesourcery.com>
11933
11934 * regcache.c (init_register_cache): Initialize
11935 regcache->register_status.
11936 (free_register_cache): Release regcache->register_status.
11937 (regcache_cpy): Copy register_status.
11938 (registers_to_string): Print 'x's for unavailable registers.
11939 (supply_register): Mark the register's status valid or
11940 unavailable, depending on whether a buffer was passed in or not.
11941 (supply_register_zeroed): New.
11942 (supply_regblock): Mark the registers' status valid or
11943 unavailable, depending on whether a buffer was passed in or not.
11944 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11945 (struct regcache): New `register_status' field.
11946 (supply_register_zeroed): Declare.
11947 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11948 supply_register_zeroed, rather than passing a NULL buffer to
11949 supply_register.
11950 * tracepoint.c (fetch_traceframe_registers): Update comment.
11951
85724a0e
PA
119522011-01-28 Pedro Alves <pedro@codesourcery.com>
11953
11954 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11955 buffer explicit.
11956
d08aafef
PA
119572011-01-25 Pedro Alves <pedro@codesourcery.com>
11958
11959 * server.h (decode_xfer_write): Change prototype.
11960 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11961 and don't extract the annex here.
11962 * server.c (decode_xfer_read): Remove `annex' parameter,
11963 and don't extract the annex here.
11964 (decode_xfer): New.
11965 (struct qxfer): New.
11966 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11967 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11968 (handle_qxfer_statictrace): New functions, abstracted out from
11969 handle_query, and made to use the struct qxfer interface.
11970 (handle_threads_qxfer_proper): Rename to ...
11971 (handle_qxfer_threads_proper): ... this.
11972 (handle_threads_qxfer): Rename to ...
11973 (handle_qxfer_threads): ... this. Adjust.
11974 (qxfer_packets): New array.
11975 (handle_qxfer): New function.
11976 (handle_query): Use handle_qxfer.
11977
493e2a69
MS
119782011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11979
11980 * gdbreplay.c: Shorten lines of >= 80 columns.
11981 * linux-low.c: Ditto.
11982 * linux-ppc-low.c: Ditto.
11983 * linux-s390-low.c: Ditto.
11984 * linux-sparc-low.c: Ditto.
11985 * linux-x86-low.c: Ditto.
11986 * linux-xtensa-low.c: Ditto.
11987 * mem-break.c: Ditto.
11988 * nto-low.c: Ditto.
11989 * regcache.h: Ditto.
11990 * remote-utils.c: Ditto.
11991 * server.c: Ditto.
11992 * server.h: Ditto.
11993 * thread-db.c: Ditto.
11994 * tracepoint.c: Ditto.
11995 * utils.c: Ditto.
11996 * win32-low.h: Ditto.
11997
44944448
JB
119982011-01-05 Joel Brobecker <brobecker@adacore.com>
11999
12000 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12001 update.
12002
71ce852c
JB
120032011-01-01 Joel Brobecker <brobecker@adacore.com>
12004
12005 * server.c (gdbserver_version): Update copyright year in version
12006 output.
12007 * gdbreplay.c (gdbreplay_version): Ditto.
12008
eb826dc6
MF
120092010-12-29 Jie Zhang <jie.zhang@analog.com>
12010
12011 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12012 * linux-bfin-low.c: New file.
12013 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12014 PT_DATA_ADDR for BFIN targets.
12015 * Makefile.in (SFILES): Add linux-bfin-low.c.
12016 (clean): Remove reg-bfin.c.
12017 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12018 * README: Mention supported Blackfin targets.
12019
39ab222a
MF
120202010-12-23 Mike Frysinger <vapier@gentoo.org>
12021
12022 * .gitignore: New file.
12023
a1f2ce7d
MF
120242010-11-16 Mike Frysinger <vapier@gentoo.org>
12025
12026 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12027
f474844c
JZ
120282010-10-22 Jie Zhang <jie@codesourcery.com>
12029
12030 * Makefile.in: Add FLAGS_TO_PASS variable.
12031 (install): Remove dependency of install-only and recursively
12032 invoke make for install-only.
12033
f1048712
DE
120342010-10-04 Doug Evans <dje@google.com>
12035
12036 * Makefile.in (uninstall): Use $(DESTDIR).
12037
b53a1623
PA
120382010-09-24 Pedro Alves <pedro@codesourcery.com>
12039
e6ee044d
PA
12040 PR gdb/11842
12041
b53a1623
PA
12042 * linux-x86-low.c (compat_siginfo_from_siginfo)
12043 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12044 si_code is < 0. Check for si_code == SI_TIMER before checking for
12045 si_code < 0.
12046
fa1bd1e4
JB
120472010-09-13 Joel Brobecker <brobecker@adacore.com>
12048
12049 * lynx-i386-low.c: New file.
12050 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12051
47fac8f8
JB
120522010-09-13 Joel Brobecker <brobecker@adacore.com>
12053
12054 * lynx-low.c (ptrace_request_to_str): Remove handling for
12055 request values that have been removed in LynxOS 5.x.
12056
1adfc54d
JB
120572010-09-13 Joel Brobecker <brobecker@adacore.com>
12058
12059 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12060 <ptrace.h>
12061
c2a66c29
NS
120622010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12063
12064 * configure.ac: Add --enable-inprocess-agent option.
12065 * configure: Rebuilt.
12066
32fcada3
YQ
120672010-09-06 Yao Qi <yao@codesourcery.com>
12068
12069 * linux-low.c (linux_kill): Remove unused variable.
12070 (linux_stabilize_threads): Likewise.
12071 * server.c (start_inferior): Likewise.
12072 (queue_stop_reply_callback): Likewise.
12073 * tracepoint.c (do_action_at_tracepoint): Likewise.
12074
0cccb683
YQ
120752010-09-06 Yao Qi <yao@codesourcery.com>
12076
12077 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12078 on return.
12079
423ec54c
JK
120802010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12081
12082 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12083
12ac6819
PA
120842010-09-06 Pedro Alves <pedro@codesourcery.com>
12085
12086 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12087 "$(IPA_DEPFILES)".
12088
8ed54b31
JB
120892010-09-01 Joel Brobecker <brobecker@adacore.com>
12090
12091 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12092 gdbserver/lynx-ppc-low.c: New files.
12093 * Makefile.in (lynx_low_h): New variable.
12094 (lynx-low.o, lynx-ppc-low.o): New rules.
12095 * configure.ac: On LynxOS, link with -lnetinet.
12096 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12097 * configure: regenerate.
12098
bb0116a4
JB
120992010-09-01 Joel Brobecker <brobecker@adacore.com>
12100
12101 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12102 * configure.ac: Add check for vasprintf and vsnprintf.
12103 * configure, config.in: Regenerate.
12104 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12105
a778ab81 121062010-09-01 Joel Brobecker <brobecker@adacore.com>
12107
12108 * gdbreplay.c: Move include of alloca.h up, next to include of
12109 malloc.h.
12110 * server.h: Add include of malloc.h.
12111 * mem-break.c: Remove include of malloc.h.
12112 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12113
8b034a19 121142010-09-01 Joel Brobecker <brobecker@adacore.com>
12115
12116 * Makefile.in (memmem.o): Build with -Wno-error.
12117
121182010-09-01 Joel Brobecker <brobecker@adacore.com>
12119
12120 * utils.c (xsnprintf): Make non-static.
12121 * server.h: Add xsnprintf declaration.
12122 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12123 replace calls to snprintf by calls to xsnprintf throughout.
12124
121252010-09-01 Joel Brobecker <brobecker@adacore.com>
12126
12127 * configure.ac: Add configure check for alloca.
12128 * configure, config.in: Regenerate.
12129 * server.h: Include alloca.h if it exists.
12130 * gdbreplay.c: Include alloca.h if it exists.
12131
1a981360
PA
121322010-08-28 Pedro Alves <pedro@codesourcery.com>
12133
12134 * linux-low.c (__SIGRTMIN): Define if not already defined.
12135 (linux_create_inferior): Check for __ANDROID__ rather than
12136 __SIGRTMIN.
12137 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12138 are already deferred.
12139 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12140 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12141 stopped and already has a pending signal to report.
12142 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12143 a pending signal to report or is moving out of a jump pad.
12144 (linux_init_signals): Check for __ANDROID__ rather than
12145 __SIGRTMIN.
12146
b4d51a55
PA
121472010-08-28 Pedro Alves <pedro@codesourcery.com>
12148
12149 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12150 debug_threads check. Avoid a linear search when not doing debug
12151 output.
12152
ec48365d
PA
121532010-08-27 Pedro Alves <pedro@codesourcery.com>
12154
12155 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12156 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12157 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12158 (process_event): Change local fd's type to gdb_fildes_t.
12159 (create_file_handler): Adjust prototype.
12160 (delete_file_handler): Adjust prototype.
12161 (handle_file_event): Adjust prototype. Use pfildes.
12162 (create_file_event): Adjsut prototype.
12163 * remote-utils.c (remote_desc, listen_desc): Change type to
12164 gdb_fildes_t.
12165 * server.h: New gdb_fildes_t typedef.
12166 [USE_WIN32API]: Include winsock2.h.
12167 (delete_file_handler, add_file_handler): Adjust prototypes.
12168 (pfildes): Declare.
12169 * utils.c (pfildes): New.
12170
854d88f0
PA
121712010-08-27 Pedro Alves <pedro@codesourcery.com>
12172
12173 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12174 * configure: Regenerate.
12175
0146f85b
PA
121762010-08-27 Pedro Alves <pedro@codesourcery.com>
12177
12178 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12179 (linux_done_accessing_memory): ... this.
12180 (linux_target_ops): Adjust.
12181 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12182 * nto-low.c (nto_target_ops): Adjust comment.
12183 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12184 * spu-low.c (spu_target_ops): Adjust comment.
12185 * target.h (target_ops): Rename unprepare_to_access_memory field
12186 to done_accessing_memory.
12187 (unprepare_to_access_memory): Rename to ...
12188 (done_accessing_memory): ... this.
12189
90d74c30
PA
121902010-08-26 Pedro Alves <pedro@codesourcery.com>
12191
12192 * linux-low.c (linux_prepare_to_access_memory): New.
12193 (linux_unprepare_to_access_memory): New.
12194 (linux_target_ops): Install them.
12195 * server.c (read_memory): Rename to ...
12196 (gdb_read_memory): ... this. Use
12197 prepare_to_access_memory/prepare_to_access_memory.
12198 (write_memory): Rename to ...
12199 (gdb_write_memory): ... this. Use
12200 prepare_to_access_memory/prepare_to_access_memory.
12201 (handle_search_memory_1): Adjust.
12202 (process_serial_event): Adjust.
12203 * target.h (struct target_ops): New fields
12204 prepare_to_access_memory and unprepare_to_access_memory.
12205 (prepare_to_access_memory, unprepare_to_access_memory): New.
12206 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12207 prepare_to_access_memory/prepare_to_access_memory.
12208 * nto-low.c (nto_target_ops): Adjust.
12209 * spu-low.c (spu_target_ops): Adjust.
12210 * win32-low.c (win32_target_ops): Adjust.
12211
fd467969
PA
122122010-08-26 Pedro Alves <pedro@codesourcery.com>
12213
12214 * Makefile.in (WARN_CFLAGS): Get it from configure.
12215 (WERROR_CFLAGS): New.
12216 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12217 * configure.ac: Introduce --enable-werror, which adds -Werror to
12218 the compiler command line. Enabled by default. Disable with
12219 --disable-werror. Add -Wdeclaration-after-statement
12220 Wpointer-arith and -Wformat-nonliteral to warning flags.
12221 * configure: Regenerate.
12222
331e2f5f
PA
122232010-08-26 Pedro Alves <pedro@codesourcery.com>
12224
12225 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12226
e581f2b4
PA
122272010-08-26 Pedro Alves <pedro@codesourcery.com>
12228
12229 * gdbreplay.c (remote_error): New.
12230 (gdbchar): New.
12231 (expect): Use gdbchar. Check for error reading from GDB.
12232 Clarify sync error output.
12233 (play): Check for errors writing to GDB.
12234 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12235 * remote-utils.c (getpkt): Check for errors writing to the remote
12236 descriptor.
12237
3c11dd79
PA
122382010-08-25 Pedro Alves <pedro@codesourcery.com>
12239
12240 * linux-low.c (linux_wait_1): Move non-debugging code out of
12241 `debug_threads' control.
12242
d20a8ad9
PA
122432010-08-25 Pedro Alves <pedro@codesourcery.com>
12244
12245 * linux-low.c (linux_wait_1): Don't set last_status here.
12246 * server.c (push_event, queue_stop_reply_callback): Assert we're
12247 not pushing a TARGET_WAITKIND_IGNORE event.
12248 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12249 (myresume, handle_target_event): Set the thread's last_resume_kind
12250 and last_status from the target returned status.
12251
964e4306
PA
122522010-08-25 Pedro Alves <pedro@codesourcery.com>
12253
12254 PR threads/10729
12255
12256 * linux-x86-low.c (update_debug_registers_callback): New.
12257 (i386_dr_low_set_addr): Use it.
12258 (i386_dr_low_get_addr): New.
12259 (i386_dr_low_set_control): Use update_debug_registers_callback.
12260 (i386_dr_low_get_control): New.
12261 (i386_dr_low_get_status): Adjust.
12262 * linux-low.c (linux_stop_lwp): New.
12263 * linux-low.h (linux_stop_lwp): Declare.
12264
12265 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12266 argument instead of a i386_debug_reg_state.
12267 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12268 a i386_debug_reg_state.
12269 (i386_insert_aligned_watchpoint): Adjust.
12270 (i386_remove_aligned_watchpoint): Adjust.
12271 (i386_low_stopped_data_address): Read the debug registers from the
12272 inferior instead of from the mirrors.
12273 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12274 (i386_dr_low_get_addr): Declare.
12275 (i386_dr_low_get_control): Declare.
12276 (i386_dr_low_get_status): Change prototype.
12277
12278 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12279 (i386_dr_low_get_addr): New.
12280 (i386_dr_low_get_control): New.
12281 (i386_dr_low_get_status): Adjust prototype. Return
12282 dr_status_mirror.
12283 (i386_initial_stuff): Clear dr_status_mirror and
12284 dr_control_mirror.
12285 (i386_get_thread_context): Adjust.
12286 (i386_set_thread_context): Adjust.
12287 (i386_thread_added): Adjust.
12288
5f21a75b
PA
122892010-08-24 Pedro Alves <pedro@codesourcery.com>
12290
12291 * linux-low.h (linux_thread_area): Delete declaration.
12292
3e4c1235
TS
122932010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12294
12295 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12296 after its termination.
12297
1971b033
PA
122982010-08-09 Pedro Alves <pedro@codesourcery.com>
12299
12300 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12301 (gdb_wants_all_stopped): Delete.
12302 (linux_wait_1): Don't call them.
12303 * server.c (handle_v_cont): Tag all threads as want-stopped.
12304 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12305 stopped as "client-wants-stopped".
12306
310444ac
PA
123072010-07-31 Pedro Alves <pedro@codesourcery.com>
12308
12309 * Makefile.in (signals_h): New.
12310 (server_h): Depend on it.
12311 (server.o): Don't depend on $(signals_def).
12312 (signals.o): Depend on $(signals_def).
12313
a19cae16
JK
123142010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12315
12316 * Makefile.in (signals_def): New.
12317 (server_h): Append include/gdb/signals.h and signals_def.
12318 (server.o): Append signals_def.
12319
30d50328
JK
123202010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12321
12322 * server.c (handle_target_event): Use target_signal_to_host for
12323 resume_info.sig initialization.
12324 * target.h (struct thread_resume) <sig>: New comment.
12325
5c3216e2
OS
123262010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12327
c6f46ca0
OS
12328 * server.c (handle_query): strcpy() the returned string from paddress()
12329 instead of sprintf().
5c3216e2
OS
12330 * utils.c (paddress): Return phex_nz().
12331
6bd31874
JB
123322010-07-07 Joel Brobecker <brobecker@adacore.com>
12333
12334 * server.c (handle_v_cont): Call mourn_inferior if process
12335 just exited.
12336 (myresume): Likewise.
12337
0fb4aa4b
PA
123382010-07-01 Pedro Alves <pedro@codesourcery.com>
12339
12340 Static tracepoints, and integration with UST.
12341
12342 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12343 * mem-break.c (uninsert_all_breakpoints)
12344 (reinsert_all_breakpoints): New.
12345 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12346 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12347 (gdb_agent_ust_loaded, helper_thread_id)
12348 (gdb_agent_helper_thread_id): New macros.
12349 (struct ipa_sym_addresses): Add addr_ust_loaded,
12350 addr_helper_thread_id, addr_cmd_buf.
12351 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12352 (in_process_agent_loaded_ust): New.
12353 (write_e_ust_not_loaded): New.
12354 (maybe_write_ipa_ust_not_loaded): New.
12355 (struct collect_static_trace_data_action): New.
12356 (enum tracepoint_type) <static_tracepoint>: New.
12357 (struct tracepoint) <handle>: Mention static tracepoints.
12358 (struct static_tracepoint_ctx): New.
12359 (CMD_BUF_SIZE): New.
12360 (add_tracepoint_action): Handle static tracepoint actions.
12361 (unprobe_marker_at): New.
12362 (clear_installed_tracepoints): Handle static tracepoints.
12363 (cmd_qtdp): Handle static tracepoints.
12364 (probe_marker_at): New.
12365 (cmd_qtstart): Handle static tracepoints.
12366 (response_tracepoint): Handle static tracepoints.
12367 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12368 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12369 (get_context_regcache): Handle static tracepoints.
12370 (do_action_at_tracepoint): Handle static tracepoint actions.
12371 (traceframe_find_block_type): Handle static trace data blocks.
12372 (traceframe_read_sdata): New.
12373 (download_tracepoints): Download static tracepoint actions.
12374 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12375 (GDB_PROBE_NAME): New.
12376 (ust_ops): New.
12377 (GET_UST_SYM): New.
12378 (USTF): New.
12379 (dlsym_ust): New.
12380 (ust_marker_to_static_tracepoint): New.
12381 (gdb_probe): New.
12382 (collect_ust_data_at_tracepoint): New.
12383 (gdb_ust_probe): New.
12384 (UNIX_PATH_MAX, SOCK_DIR): New.
12385 (gdb_ust_connect_sync_socket): New.
12386 (resume_thread, stop_thread): New.
12387 (run_inferior_command): New.
12388 (init_named_socket): New.
12389 (gdb_ust_socket_init): New.
12390 (cstr_to_hexstr): New.
12391 (next_st): New.
12392 (first_marker, next_marker): New.
12393 (response_ust_marker): New.
12394 (cmd_qtfstm, cmd_qtsstm): New.
12395 (unprobe_marker_at, probe_marker_at): New.
12396 (cmd_qtstmat, gdb_ust_thread): New.
12397 (gdb_ust_init): New.
12398 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12399 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12400 (ST_REGENTRY): New.
12401 (x86_64_st_collect_regmap): New.
12402 (X86_64_NUM_ST_COLLECT_GREGS): New.
12403 (AMD64_RIP_REGNUM): New.
12404 (supply_static_tracepoint_registers): New.
12405 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12406 (ST_REGENTRY): New.
12407 (i386_st_collect_regmap): New.
12408 (i386_NUM_ST_COLLECT_GREGS): New.
12409 (supply_static_tracepoint_registers): New.
12410 * server.c (handle_query): Handle qXfer:statictrace:read.
12411 <qSupported>: Report support for StaticTracepoints, and
12412 qXfer:statictrace:read features.
12413 * server.h (traceframe_read_sdata)
12414 (supply_static_tracepoint_registers): Declare.
12415 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12416 (unpack_varlen_hex): Include in IPA build.
12417 * Makefile.in (ustlibs, ustinc): New.
12418 (IPA_OBJS): Add remote-utils-ipa.o.
12419 ($(IPA_LIB)): Link -ldl and -lpthread.
12420 (UST_CFLAGS): New.
12421 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12422 * config.in, configure: Regenerate.
12423
9e4344e5
PA
124242010-06-20 Ian Lance Taylor <iant@google.com>
12425 Pedro Alves <pedro@codesourcery.com>
12426
12427 * linux-x86-low.c (always_true): Delete.
12428 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12429 trying to fool the compiler with always_true.
12430
c6beb2cb
PA
124312010-06-20 Pedro Alves <pedro@codesourcery.com>
12432
12433 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12434 conditions in gdbserver.
12435
d2ed6730
UW
124362010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12437
12438 * spu-low.c (spu_read_memory): Wrap around local store limit.
12439 (spu_write_memory): Likewise.
12440
4e29fb54
PA
124412010-06-15 Pedro Alves <pedro@codesourcery.com>
12442
12443 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12444 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12445 LONGEST uses.
12446 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12447 uses.
12448 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12449 uses with LONGEST uses.
12450
6a271cae
PA
124512010-06-14 Stan Shebs <stan@codesourcery.com>
12452 Pedro Alves <pedro@codesourcery.com>
12453
12454 Bytecode compiler.
12455
12456 * linux-x86-low.c: Include limits.h.
12457 (add_insns): New.
12458 (always_true): New.
12459 (EMIT_ASM): New.
12460 (EMIT_ASM32): New.
12461 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12462 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12463 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12464 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12465 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12466 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12467 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12468 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12469 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12470 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12471 (amd64_emit_void_call_2): New.
12472 (amd64_emit_ops): New.
12473 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12474 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12475 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12476 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12477 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12478 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12479 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12480 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12481 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12482 (i386_emit_stack_adjust, i386_emit_int_call_1)
12483 (i386_emit_void_call_2): New.
12484 (i386_emit_ops): New.
12485 (x86_emit_ops): New.
12486 (the_low_target): Install x86_emit_ops.
12487 * server.h (struct emit_ops): New.
12488 (get_raw_reg_func_addr): Declare.
12489 (current_insn_ptr, emit_error): Declare.
12490 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12491 (set_trace_state_variable_value): New defines.
12492 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12493 addr_get_trace_state_variable_value and
12494 addr_set_trace_state_variable_value.
12495 (symbol_list): New fields for get_raw_reg,
12496 get_trace_state_variable_value and set_trace_state_variable_value.
12497 (condfn): New typedef.
12498 (struct tracepoint): New field `compiled_cond'.
12499 (do_action_at_tracepoint): Clear compiled_cond.
12500 (get_trace_state_variable_value, set_trace_state_variable_value):
12501 Export in the IPA.
12502 (condition_true_at_tracepoint): If there's a compiled condition,
12503 run that.
12504 (current_insn_ptr, emit_error): New globals.
12505 (struct bytecode_address): New.
12506 (get_raw_reg_func_addr): New.
12507 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12508 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12509 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12510 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12511 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12512 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12513 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12514 (compile_tracepoint_condition, compile_bytecodes): New.
12515 * target.h (emit_ops): Forward declare.
12516 (struct target_ops): New field emit_ops.
12517 (target_emit_ops): New.
12518 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12519 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12520 * linux-low.c (linux_emit_ops): New.
12521 (linux_target_ops): Install it.
12522 * linux-low.h (struct linux_target_ops): New field emit_ops.
12523
92b72907
UW
125242010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12525
12526 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12527 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12528
fa593d66
PA
125292010-06-01 Pedro Alves <pedro@codesourcery.com>
12530 Stan Shebs <stan@codesourcery.com>
12531
12532 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12533 (all): Depend on $(extra_libraries).
12534 (install-only): Install the IPA.
12535 (IPA_OBJS, IPA_LIB): New.
12536 (clean): Remove the IPA lib.
12537 (IPAGENT_CFLAGS): New.
12538 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12539 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12540 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12541 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12542 * configure.ac: Check for atomic builtins support in the compiler.
12543 (IPA_DEPFILES, extra_libraries): Define.
12544 * configure.srv (ipa_obj): Add description.
12545 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12546 (i[34567]86-*-linux*): Set ipa_obj.
12547 (x86_64-*-linux*): Set ipa_obj.
12548 * linux-low.c (stabilizing_threads): New.
12549 (supports_fast_tracepoints): New.
12550 (linux_detach): Stabilize threads before detaching.
12551 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12552 the lwp is either not stabilizing, or is moving out of a jump pad.
12553 (linux_fast_tracepoint_collecting): New.
12554 (maybe_move_out_of_jump_pad): New.
12555 (enqueue_one_deferred_signal): New.
12556 (dequeue_one_deferred_signal): New.
12557 (linux_wait_for_event_1): If moving out of a jump pad, defer
12558 pending signals to later.
12559 (linux_stabilize_threads): New.
12560 (linux_wait_1): Check if threads need moving out of jump pads, and
12561 do it if so.
12562 (stuck_in_jump_pad_callback): New.
12563 (move_out_of_jump_pad_callback): New.
12564 (lwp_running): New.
12565 (linux_resume_one_lwp): Handle moving out of jump pads.
12566 (linux_set_resume_request): Dequeue deferred signals.
12567 (need_step_over_p): Also step over fast tracepoint jumps.
12568 (start_step_over): Also uninsert fast tracepoint jumps.
12569 (finish_step_over): Also reinsert fast tracepoint jumps.
12570 (linux_install_fast_tracepoint_jump): New.
12571 (linux_target_ops): Install linux_stabilize_threads and
12572 linux_install_fast_tracepoint_jump_pad.
12573 * linux-low.h (linux_target_ops) <get_thread_area,
12574 install_fast_tracepoint_jump_pad>: New fields.
12575 (struct lwp_info) <collecting_fast_tracepoint,
12576 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12577 (linux_get_thread_area): Declare.
12578 * linux-x86-low.c (jump_insn): New.
12579 (x86_get_thread_area): New.
12580 (append_insns): New.
12581 (push_opcode): New.
12582 (amd64_install_fast_tracepoint_jump_pad): New.
12583 (i386_install_fast_tracepoint_jump_pad): New.
12584 (x86_install_fast_tracepoint_jump_pad): New.
12585 (the_low_target): Install x86_get_thread_area and
12586 x86_install_fast_tracepoint_jump_pad.
12587 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12588 (struct fast_tracepoint_jump): New.
12589 (fast_tracepoint_jump_insn): New.
12590 (fast_tracepoint_jump_shadow): New.
12591 (find_fast_tracepoint_jump_at): New.
12592 (fast_tracepoint_jump_here): New.
12593 (delete_fast_tracepoint_jump): New.
12594 (set_fast_tracepoint_jump): New.
12595 (uninsert_fast_tracepoint_jumps_at): New.
12596 (reinsert_fast_tracepoint_jumps_at): New.
12597 (set_breakpoint_at): Use write_inferior_memory.
12598 (uninsert_raw_breakpoint): Use write_inferior_memory.
12599 (check_mem_read): Mask out fast tracepoint jumps.
12600 (check_mem_write): Mask out fast tracepoint jumps.
12601 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12602 (set_fast_tracepoint_jump): Declare.
12603 (delete_fast_tracepoint_jump)
12604 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12605 (reinsert_fast_tracepoint_jumps_at): Declare.
12606 * regcache.c: Don't compile many functions when building the
12607 in-process agent library.
12608 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12609 the register buffer in the heap.
12610 (free_register_cache): If the register buffer isn't owned by the
12611 regcache, don't free it.
12612 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12613 pre-existing register caches.
12614 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12615 type.
12616 (convert_ascii_to_int): : Constify `from' parameter type.
12617 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12618 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12619 the needed buffer in-place.
12620 (relocate_instruction): New.
12621 * server.c (handle_query) <qSymbols>: If the target supports
12622 tracepoints, give it a chance of looking up symbols. Report
12623 support for fast tracepoints.
12624 (handle_status): Stabilize threads.
12625 (process_serial_event): Adjust.
12626 * server.h (struct fast_tracepoint_jump): Forward declare.
12627 (struct process_info) <fast_tracepoint_jumps>: New field.
12628 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12629 (decode_X_packet, decode_M_packet): Adjust.
12630 (relocate_instruction): Declare.
12631 (in_process_agent_loaded): Declare.
12632 (tracepoint_look_up_symbols): Declare.
12633 (struct fast_tpoint_collect_status): Declare.
12634 (fast_tracepoint_collecting): Declare.
12635 (force_unlock_trace_buffer): Declare.
12636 (handle_tracepoint_bkpts): Declare.
12637 (initialize_low_tracepoint)
12638 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12639 * target.h (struct target_ops) <stabilize_threads,
12640 install_fast_tracepoint_jump_pad>: New fields.
12641 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12642 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12643 [HAVE_STDINT_H]: Include stdint.h.
12644 (trace_debug_1): Rename to ...
12645 (trace_vdebug): ... this.
12646 (trace_debug): Rename to ...
12647 (trace_debug_1): ... this. Add `level' parameter.
12648 (trace_debug): New.
12649 (ATTR_USED, ATTR_NOINLINE): New.
12650 (IP_AGENT_EXPORT): New.
12651 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12652 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12653 (about_to_request_buffer_space, trace_buffer_is_full)
12654 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12655 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12656 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12657 (traceframe_write_count, traceframes_created)
12658 (trace_state_variables)
12659 New renaming defines.
12660 (struct ipa_sym_addresses): New.
12661 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12662 (symbol_list): New.
12663 (ipa_sym_addrs): New.
12664 (all_tracepoint_symbols_looked_up): New.
12665 (in_process_agent_loaded): New.
12666 (write_e_ipa_not_loaded): New.
12667 (maybe_write_ipa_not_loaded): New.
12668 (tracepoint_look_up_symbols): New.
12669 (debug_threads) [IN_PROCESS_AGENT]: New.
12670 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12671 (UNKNOWN_SIDE_EFFECTS): New.
12672 (stop_tracing): New.
12673 (flush_trace_buffer): New.
12674 (stop_tracing_bkpt): New.
12675 (flush_trace_buffer_bkpt): New.
12676 (read_inferior_integer): New.
12677 (read_inferior_uinteger): New.
12678 (read_inferior_data_pointer): New.
12679 (write_inferior_data_pointer): New.
12680 (write_inferior_integer): New.
12681 (write_inferior_uinteger): New.
12682 (struct collect_static_trace_data_action): Delete.
12683 (enum tracepoint_type): New.
12684 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12685 <actions_str, step_actions, step_actions_str>: Only include in
12686 GDBserver.
fa593d66
PA
12687 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12688 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12689 (tracepoints): Use IP_AGENT_EXPORT.
12690 (last_tracepoint): Don't include in the IPA.
12691 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12692 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12693 (alloced_trace_state_variables): New.
12694 (trace_state_variables): Use IP_AGENT_EXPORT.
12695 (traceframe_t): Delete unused variable.
12696 (circular_trace_buffer): Don't include in the IPA.
12697 (trace_buffer_start): Delete.
12698 (struct trace_buffer_control): New.
12699 (trace_buffer_free): Delete.
12700 (struct ipa_trace_buffer_control): New.
12701 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12702 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12703 New.
12704 (trace_buffer_ctrl): New.
12705 (TRACE_BUFFER_CTRL_CURR): New.
12706 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12707 Reimplement as macros.
12708 (trace_buffer_wrap): Delete.
12709 (traceframe_write_count, traceframe_read_count)
12710 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12711 (struct tracepoint_hit_ctx) <type>: New field.
12712 (struct fast_tracepoint_ctx): New.
12713 (memory_barrier): New.
12714 (cmpxchg): New.
12715 (record_tracepoint_error): Update atomically in the IPA.
12716 (clear_inferior_trace_buffer): New.
12717 (about_to_request_buffer_space): New.
12718 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12719 updating the same buffer.
12720 (add_tracepoint): Default the tracepoint's type to trap
12721 tracepoint, and orig_size to -1.
12722 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12723 internal variables.
12724 (create_trace_state_variable): New parameter `gdb'. Handle it.
12725 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12726 (cmd_qtdp): Handle fast tracepoints.
12727 (cmd_qtdv): Adjust.
12728 (max_jump_pad_size): New.
12729 (gdb_jump_pad_head): New.
12730 (get_jump_space_head): New.
12731 (claim_jump_space): New.
12732 (sort_tracepoints): New.
12733 (MAX_JUMP_SIZE): New.
12734 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12735 IPA.
12736 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12737 support. Upload fast traceframes, and delete internal IPA
12738 breakpoints.
12739 (stop_tracing_handler): New.
12740 (flush_trace_buffer_handler): New.
12741 (cmd_qtstop): Upload fast tracepoints.
12742 (response_tracepoint): Handle fast tracepoints.
12743 (tracepoint_finished_step): Upload fast traceframes. Set the
12744 tracepoint hit context's tracepoint type.
12745 (handle_tracepoint_bkpts): New.
12746 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12747 type. Add comment about fast tracepoints.
12748 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12749 non-existing action_str field.
12750 (get_context_regcache): Handle fast tracepoints.
12751 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12752 to the regcache.
12753 (fast_tracepoint_from_jump_pad_address): New.
12754 (fast_tracepoint_from_ipa_tpoint_address): New.
12755 (collecting_t): New.
12756 (force_unlock_trace_buffer): New.
12757 (fast_tracepoint_collecting): New.
12758 (collecting): New.
12759 (gdb_collect): New.
12760 (write_inferior_data_ptr): New.
12761 (target_tp_heap): New.
12762 (target_malloc): New.
12763 (download_agent_expr): New.
12764 (UALIGN): New.
12765 (download_tracepoints): New.
12766 (download_trace_state_variables): New.
12767 (upload_fast_traceframes): New.
12768 (IPA_FIRST_TRACEFRAME): New.
12769 (IPA_NEXT_TRACEFRAME_1): New.
12770 (IPA_NEXT_TRACEFRAME): New.
12771 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12772 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12773 (gdb_jump_pad_buffer_end): New.
12774 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12775 (initialize_tracepoint): Adjust.
12776 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12777 buffer. Initialize the low module.
12778 * utils.c (PREFIX, TOOLNAME): New.
12779 (malloc_failure): Use PREFIX.
12780 (error): In the IPA, an error causes an exit.
12781 (fatal, warning): Use PREFIX.
12782 (internal_error): Use TOOLNAME.
12783 (NUMCELLS): Increase to 10.
12784 * configure, config.in: Regenerate.
12785
d149dd1d
PA
127862010-06-01 Pedro Alves <pedro@codesourcery.com>
12787
12788 * server.c (handle_query) <qSupported>: Do two passes over the
12789 qSupported string to avoid nesting strtok.
12790
f6528abd
JK
127912010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12792
12793 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12794 (CDEPS): New.
12795 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12796 -Wl,--dynamic-list.
12797 * configure: Regenerate.
12798 * proc-service.list: New.
12799
ca2a87a0
JK
128002010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12801
12802 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12803 New comment.
12804
363a6e9f
OS
128052010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12806
12807 * gdbreplay.c (remote_open): Check error return from socket() call by
12808 its equality to -1 not by it being negative.
12809 * remote-utils.c (remote_open): Likewise.
12810
d23b6cb1
PA
128112010-05-23 Pedro Alves <pedro@codesourcery.com>
12812
12813 * config.h: Regenerate.
12814
28d3cf85
MK
128152010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12816
12817 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12818 doesn't provide PTRACE_GET_THREAD_AREA.
12819
fea36a59
MK
128202010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12821
12822 * linux-m68k-low.c: Include <asm/ptrace.h>
12823 (ps_get_thread_area): Implement.
12824
24b066ba
DE
128252010-05-03 Doug Evans <dje@google.com>
12826
12827 * event-loop.c (struct callback_event): New struct.
12828 (callback_list): New global.
12829 (append_callback_event, delete_callback_event): New functions.
12830 (process_callback): New function.
12831 (start_event_loop): Call it.
12832 * remote-utils.c (NOT_SCHEDULED): Define.
12833 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12834 moved out of readchar.
12835 (readchar): Rewrite. Call reschedule before returning.
12836 (reset_readchar): New function.
12837 (remote_close): Call it.
12838 (process_remaining, reschedule): New functions.
12839 * server.h (callback_handler_func): New typedef.
12840 (append_callback_event, delete_callback_event): Declare.
12841
9836d6ea
PA
128422010-05-03 Pedro Alves <pedro@codesourcery.com>
12843
12844 * proc-service.c (ps_pglobal_lookup): Use
12845 thread_db_look_up_one_symbol.
12846 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12847 parameter. Use it instead of all_symbols_looked_up.
12848 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12849 field.
12850 (all_symbols_looked_up): Don't declare.
12851 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12852 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12853 field.
12854 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12855 Set all_symbols_looked_up here.
12856 (thread_db_look_up_one_symbol): New.
12857 (thread_db_get_tls_address): Adjust.
12858 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12859 thread_db object on the heap, and tentatively set it in the
12860 process structure.
12861 (thread_db_init): Don't set all_symbols_looked_up here.
12862 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12863
7984d532
PA
128642010-05-03 Pedro Alves <pedro@codesourcery.com>
12865
12866 * linux-low.c (linux_kill, linux_detach): Adjust.
12867 (status_pending_p_callback): Remove redundant statement. Check
12868 for !TARGET_WAITIKIND_IGNORE, instead of
12869 TARGET_WAITKIND_STOPPED.
12870 (handle_tracepoints): Make sure LWP is locked. Adjust.
12871 (linux_wait_for_event_1): Adjust.
12872 (linux_cancel_breakpoints): New.
12873 (unsuspend_one_lwp): New.
12874 (unsuspend_all_lwps): New.
12875 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12876 (send_sigstop_callback): Change return type to int, add new
12877 `except' parameter and handle it.
12878 (suspend_and_send_sigstop_callback): New.
12879 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12880 pass them down. If SUSPEND, also increment the lwp's suspend
12881 count.
12882 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12883 (need_step_over_p): Don't consider suspended LWPs.
12884 (start_step_over): Adjust.
12885 (proceed_one_lwp): Change return type to int, add new `except'
12886 parameter and handle it.
12887 (unsuspend_and_proceed_one_lwp): New.
12888 (proceed_all_lwps): Use find_inferior instead of
12889 for_each_inferior.
12890 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12891 also decrement the suspend count of LWPs. Pass `except' down,
12892 instead of hacking its suspend count.
12893 (linux_pause_all): Add `freeze' parameter. Adjust.
12894 (linux_unpause_all): New.
12895 (linux_target_ops): Install linux_unpause_all.
12896 * server.c (handle_status): Adjust.
12897 * target.h (struct target_ops): New fields `unpause_all' and
12898 `cancel_breakpoints'. Add new parameter to `pause_all'.
12899 (pause_all): Add new `freeze' parameter.
12900 (unpause_all): New.
12901 (cancel_breakpoints): New.
12902 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12903 cancel breakpoints.
12904 (cmd_qtstart): Pause threads.
12905 (stop_tracing): Pause threads, and cancel breakpoints.
12906 * win32-low.c (win32_target_ops): Adjust.
12907
e471f25b
PA
129082010-05-03 Pedro Alves <pedro@codesourcery.com>
12909
12910 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12911 the inferior right away from here...
12912 (linux_wait_1): ... to here, and adjust to check the thread's
12913 last_resume_kind instead of the lwp's step or stop_expected flags.
12914
1915ef4f
PA
129152010-05-02 Pedro Alves <pedro@codesourcery.com>
12916
12917 * README: Use consistent `GDB' and `GDBserver' spellings.
12918
f9e39928
PA
129192010-05-02 Pedro Alves <pedro@codesourcery.com>
12920
12921 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12922 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12923 (linux_detach_one_lwp): Assume the lwp is stopped.
12924 (any_thread_of): Delete.
12925 (linux_detach): Stop all lwps here. Don't blindly delete all
12926 breakpoints.
12927 (delete_lwp_callback): New.
12928 (linux_mourn): Delete all lwps of the process that is gone.
12929 (linux_wait_1): Don't delete the last lwp of the process here.
12930 * mem-break.h (mark_breakpoints_out): Declare.
12931 * mem-break.c (mark_breakpoints_out): New.
12932 (free_all_breakpoints): Use it.
12933 * server.c (handle_target_event): If the process is gone, mark
12934 breakpoints out.
12935 * thread-db.c (struct thread_db) <create_bp>: New field.
12936 (thread_db_enable_reporting): Fix prototype. Store a thread event
12937 breakpoint reference in the thread_db struct.
12938 (thread_db_load_search): Clear the thread_db object.
12939 (try_thread_db_load_1): Ditto.
12940 (switch_to_process): New.
12941 (disable_thread_event_reporting): Use it.
12942 (remove_thread_event_breakpoints): New.
12943 (thread_db_detach, thread_db_mourn): Use it.
12944
1e7fc18c
PA
129452010-05-01 Pedro Alves <pedro@codesourcery.com>
12946
12947 * linux-low.c (linux_enable_event_reporting): New.
12948 (linux_wait_for_event_1, handle_extended_wait): Use it.
12949
02fc4de7
PA
129502010-04-30 Pedro Alves <pedro@codesourcery.com>
12951
12952 * linux-low.c (linux_kill_one_lwp, linux_kill)
12953 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12954 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12955 SIGSTOP even if the LWP is stopped.
12956 (send_sigstop_callback): New.
12957 (stop_all_lwps): Use send_sigstop_callback instead.
12958 (linux_resume_one_thread): Adjust.
12959 (proceed_one_lwp): Still proceed an LWP that the client has
12960 requested to stop, if we haven't reported it as stopped yet. Make
12961 sure that LWPs the client want stopped, have a pending SIGSTOP.
12962
bc3b5632
DE
129632010-04-26 Doug Evans <dje@google.com>
12964
ae1ada35
DE
12965 * server.c (handle_general_set): Make static.
12966
bc3b5632
DE
12967 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12968 Print received char after testing for error/eof instead of before.
12969 (input_interrupt): Tweak comment.
12970
65730243
DE
129712010-04-23 Doug Evans <dje@google.com>
12972
12973 * server.c (start_inferior): Print inferior argv if --debug.
12974
a8ae7dc0
AR
129752010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12976
12977 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12978 * nto-x86-low.c: Include server.h
12979
1c07cc19
PM
129802010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12981
12982 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12983 be consistent with other sources of this directory.
12984 (init_registers_amd64): Correct name of source file of this function
12985 in the comment.
12986
e0a61e09
PM
129872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12988
12989 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12990 64-bit executables.
12991
54709339
PM
129922010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12993
12994 * win32-i386-low.c: Add 64-bit support.
12995 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12996 (init_registers_amd64): Declare.
12997 (mappings): Add 64-bit version of array.
12998 (init_windows_x86): New function.
12999 (the_low_target): Change init_arch field to init_windows_x86.
13000
e8f0053d
PM
130012010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13002
13003 * win32-low.c: Adapt to support also 64-bit architecture.
13004 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13005 (get_image_name): Use SIZE_T type for local variable `done'.
13006 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13007 (toolhelp_get_dll_name): Idem.
13008 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13009 Use uintptr_t typecast to avoid warning.
13010 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13011 (handle_exception): Use phex_nz to avoid warning.
13012 (win32_wait): Remove unused local variable `process'.
13013
c481e77e
PM
130142010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13015
13016 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13017 `amd64-avx.o'.
13018
12ea4b69
PM
130192010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13020
13021 * configure.ac: Use `ws2_32' library for srv_mingw.
13022 * configure: Regenerate.
13023 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13024 * remote-utils.c: Likewise.
13025
f6d1620c
L
130262010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13027
13028 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13029 if __x86_64__ is defined.
13030
8e642873
PM
130312010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13032
13033 * configure: Regenerate.
13034
711e434b
PM
130352010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13036
13037 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13038 * target.h (target_ops): New get_tib_address field.
13039 * win32-low.h (win32_thread_info): Add thread_local_base field.
13040 * win32-low.c (child_add_thread): Add tlb argument.
13041 Set thread_local_base field to TLB.
13042 (get_child_debug_event): Adapt to child_add_thread change.
13043 (win32_get_tib_address): New function.
13044 (win32_target_ops): Set get_tib_address field to
13045 win32_get_tib_address.
13046 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13047
505106cd
PA
130482010-04-12 Pedro Alves <pedro@codesourcery.com>
13049
505106cd
PA
13050 * linux-low.c (linux_mourn): Also remove the process.
13051 * server.c (handle_target_event): Don't remove the process here.
13052 * nto-low.c (nto_mourn): New.
13053 (nto_target_ops): Install it.
13054 * spu-low.c (spu_mourn): New.
13055 (spu_target_ops): Install it.
13056 * win32-low.c (win32_mourn): New.
13057 (win32_target_ops): Install it.
13058
e8470a06
PA
130592010-04-12 Pedro Alves <pedro@codesourcery.com>
13060
13061 * server.h (buffer_xml_printf): Remove redundant `;'.
13062
45ba0d02
PA
130632010-04-12 Pedro Alves <pedro@codesourcery.com>
13064
13065 * regcache.c (set_register_cache): Invalidate regcaches before
13066 changing the register cache layout.
13067 (regcache_invalidate_one): Allow a NULL regcache.
13068 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13069 regcaches before changing the register cache layout or the target
13070 regsets.
13071
59e04013
L
130722010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13073
13074 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13075 variable warning on Linux/x86-64.
13076
8336d594
PA
130772010-04-11 Pedro Alves <pedro@codesourcery.com>
13078
13079 GDBserver disconnected tracing support.
13080
13081 * linux-low.c (linux_remove_process): Delete.
13082 (add_lwp): Don't set last_resume_kind here.
13083 (linux_kill): Use `mourn'.
13084 (linux_detach): Use `thread_db_detach', and `mourn'.
13085 (linux_mourn): New.
13086 (linux_attach_lwp_1): Adjust comment.
13087 (linux_attach): last_resume_kind moved the thread_info; adjust.
13088 (status_pending_p_callback): Adjust.
13089 (linux_wait_for_event_1): Adjust.
13090 (count_events_callback, select_singlestep_lwp_callback)
13091 (select_event_lwp_callback, cancel_breakpoints_callback)
13092 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13093 (proceed_one_lwp): Adjust.
13094 (linux_async): Add debug output.
13095 (linux_thread_stopped): New.
13096 (linux_pause_all): New.
13097 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13098 linux_pause_all.
13099 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13100 (thread_db_free): Delete declaration.
13101 (thread_db_detach, thread_db_mourn): Declare.
13102 * thread-db.c (thread_db_init): Use thread_db_mourn.
13103 (thread_db_free): Delete, split in two.
13104 (disable_thread_event_reporting): New.
13105 (thread_db_detach): New.
13106 (thread_db_mourn): New.
13107
13108 * server.h (struct thread_info) <last_resume_kind>: New field.
13109 <attached>: Add comment.
13110 <gdb_detached>: New field.
13111 (handler_func): Change return type to int.
13112 (handle_serial_event, handle_target_event): Ditto.
13113 (gdb_connected): Declare.
13114 (tracing): Delete.
13115 (disconnected_tracing): Declare.
13116 (stop_tracing): Declare.
13117
13118 * server.c (handle_query) <qSupported>: Report support for
13119 disconnected tracing.
13120 (queue_stop_reply_callback): Account for running threads.
13121 (gdb_wants_thread_stopped): New.
13122 (gdb_wants_all_threads_stopped): New.
13123 (gdb_reattached_process): New.
13124 (handle_status): Clear the `gdb_detached' flag of all processes.
13125 In all-stop, stop all threads.
13126 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13127 (process_serial_event): If the remote connection breaks, or if an
13128 exit was forced with "monitor exit", force an event loop exit.
13129 Handle disconnected tracing on detach.
13130 (handle_serial_event): Adjust.
13131 (handle_target_event): If GDB isn't connected, forward events back
13132 to the inferior, unless the last process exited, in which case,
13133 exit gdbserver. Adjust interface.
13134
13135 * remote-utils.c (remote_open): Don't block in accept. Instead
13136 register an event loop source on the listen socket file
13137 descriptor. Refactor bits into ...
13138 (listen_desc): ... this new global.
13139 (gdb_connected): ... this new function.
13140 (enable_async_notification): ... this new function.
13141 (handle_accept_event): ... this new function.
13142 (remote_close): Clear remote_desc.
13143
13144 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13145
13146 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13147 New fields.
13148 (mourn_inferior): Define.
13149 (target_process_qsupported): Avoid the dangling else problem.
13150 (thread_stopped): Define.
13151 (pause_all): Define.
13152 (target_waitstatus_to_string): Declare.
13153 * target.c (target_waitstatus_to_string): New.
13154
13155 * tracepoint.c (tracing): Make extern.
13156 (disconnected_tracing): New.
13157 (stop_tracing): Make extern. Handle tracing stops due to GDB
13158 disconnecting.
13159 (cmd_qtdisconnected): New.
13160 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13161 (handle_tracepoint_general_set): Handle QTDisconnected.
13162
13163 * event-loop.c (event_handler_func): Change return type to int.
13164 (process_event): Bail out if the event handler wants the event
13165 loop to stop.
13166 (handle_file_event): Ditto.
13167 (start_event_loop): Bail out if the event handler wants the event
13168 loop to stop.
13169
13170 * nto-low.c (nto_target_ops): Adjust.
13171 * spu-low.c (spu_wait): Don't remove the process here.
13172 (spu_target_ops): Adjust.
13173 * win32-low.c (win32_wait): Don't remove the process here.
13174 (win32_target_ops): Adjust.
13175
5d267c4c
PA
131762010-04-11 Pedro Alves <pedro@codesourcery.com>
13177
13178 * regcache.c (realloc_register_cache): Invalidate inferior's
13179 regcache before recreating it.
13180
623ccd72
PA
131812010-04-09 Pedro Alves <pedro@codesourcery.com>
13182
13183 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13184
219f2f23
PA
131852010-04-09 Stan Shebs <stan@codesourcery.com>
13186 Pedro Alves <pedro@codesourcery.com>
13187
13188 * server.h (LONGEST): New.
13189 (struct thread_info) <while_stepping>: New field.
13190 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13191 Declare.
13192 (initialize_tracepoint, handle_tracepoint_general_set)
13193 (handle_tracepoint_query, tracepoint_finished_step)
13194 (tracepoint_was_hit, release_while_stepping_state_list):
13195 (current_traceframe): Declare.
13196 * server.c (handle_general_set): Handle tracepoint packets.
13197 (read_memory): New.
13198 (write_memory): New.
13199 (handle_search_memory_1): Use read_memory.
13200 (handle_query): Report support for conditional tracepoints, trace
13201 state variables, and tracepoint sources. Handle tracepoint
13202 queries.
13203 (main): Initialize the tracepoints module.
13204 (process_serial_event): Handle traceframe reads/writes.
13205
13206 * linux-low.c (handle_tracepoints): New.
13207 (linux_wait_1): Call it.
13208 (linux_resume_one_lwp): Handle while-stepping.
13209 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13210 (linux_target_ops): Install them.
13211 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13212 New field.
13213 * linux-x86-low.c (x86_supports_tracepoints): New.
13214 (the_low_target). Install it.
13215
13216 * mem-break.h (delete_breakpoint): Declare.
13217 * mem-break.c (delete_breakpoint): Make external.
13218
13219 * target.h (struct target_ops): Add `supports_tracepoints',
13220 `read_pc', and `write_pc' fields.
13221 (target_supports_tracepoints): Define.
13222 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13223 (phex_nz): New.
13224
13225 * regcache.h (struct regcache) <registers_owned>: New field.
13226 (init_register_cache, regcache_cpy): Declare.
13227 (regcache_read_pc, regcache_write_pc): Declare.
13228 (register_cache_size): Declare.
13229 (supply_regblock): Declare.
13230 * regcache.c (init_register_cache): New.
13231 (new_register_cache): Use it.
13232 (regcache_cpy): New.
13233 (register_cache_size): New.
13234 (supply_regblock): New.
13235 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13236
219f2f23
PA
13237 * tracepoint.c: New.
13238
13239 * Makefile.in (OBS): Add tracepoint.o.
13240 (tracepoint.o): New rule.
13241
3a13a53b
L
132422010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13243
13244 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13245 (i386-mmx.o): New.
13246 (i386-mmx.c): Likewise.
13247 (i386-mmx-linux.o): Likewise.
13248 (i386-mmx-linux.c): Likewise.
13249
13250 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13251 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13252 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13253 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13254
13255 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13256 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13257 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13258
1570b33e
L
132592010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13260
13261 * Makefile.in (clean): Updated.
13262 (i386-avx.o): New.
13263 (i386-avx.c): Likewise.
13264 (i386-avx-linux.o): Likewise.
13265 (i386-avx-linux.c): Likewise.
13266 (amd64-avx.o): Likewise.
13267 (amd64-avx.c): Likewise.
13268 (amd64-avx-linux.o): Likewise.
13269 (amd64-avx-linux.c): Likewise.
13270
13271 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13272 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13273 (srv_amd64_regobj): Add amd64-avx.o.
13274 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13275 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13276 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13277 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13278 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13279 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13280 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13281
13282 * i387-fp.c: Include "i386-xstate.h".
13283 (i387_xsave): New.
13284 (i387_cache_to_xsave): Likewise.
13285 (i387_xsave_to_cache): Likewise.
13286 (x86_xcr0): Likewise.
13287
13288 * i387-fp.h (i387_cache_to_xsave): Likewise.
13289 (i387_xsave_to_cache): Likewise.
13290 (x86_xcr0): Likewise.
13291
13292 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13293 * linux-crisv32-low.c (target_regsets): Likewise.
13294 * linux-m68k-low.c (target_regsets): Likewise.
13295 * linux-mips-low.c (target_regsets): Likewise.
13296 * linux-ppc-low.c (target_regsets): Likewise.
13297 * linux-s390-low.c (target_regsets): Likewise.
13298 * linux-sh-low.c (target_regsets): Likewise.
13299 * linux-sparc-low.c (target_regsets): Likewise.
13300 * linux-xtensa-low.c (target_regsets): Likewise.
13301
13302 * linux-low.c: Include <sys/uio.h>.
13303 (regsets_fetch_inferior_registers): Support nt_type.
13304 (regsets_store_inferior_registers): Likewise.
13305 (linux_process_qsupported): New.
13306 (linux_target_ops): Add linux_process_qsupported.
13307
13308 * linux-low.h (regset_info): Add nt_type.
13309 (linux_target_ops): Add process_qsupported.
13310
13311 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13312 and <sys/uio.h>.
13313 (init_registers_i386_avx_linux): New.
13314 (init_registers_amd64_avx_linux): Likewise.
13315 (xmltarget_i386_linux_no_xml): Likewise.
13316 (xmltarget_amd64_linux_no_xml): Likewise.
13317 (PTRACE_GETREGSET): Likewise.
13318 (PTRACE_SETREGSET): Likewise.
13319 (x86_fill_xstateregset): Likewise.
13320 (x86_store_xstateregset): Likewise.
13321 (use_xml): Likewise.
13322 (x86_linux_update_xmltarget): Likewise.
13323 (x86_linux_process_qsupported): Likewise.
13324 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13325 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13326 init_registers_i386_linux here. Call
13327 x86_linux_update_xmltarget.
13328 (the_low_target): Add x86_linux_process_qsupported.
13329
13330 * server.c (handle_query): Call target_process_qsupported.
13331
13332 * target.h (target_ops): Add process_qsupported.
13333 (target_process_qsupported): New.
13334
fc7238bb
PA
133352010-04-03 Pedro Alves <pedro@codesourcery.com>
13336
13337 * inferiors.c (add_thread): Set last_status kind to
13338 TARGET_WAITKIND_IGNORE.
13339 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13340 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13341 (linux_wait_1): Move `thread' local definition to block that uses
13342 it. Don't NULL initialize `event_child'.
13343 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13344 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13345 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13346
bdabb078
PA
133472010-04-01 Pedro Alves <pedro@codesourcery.com>
13348
13349 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13350 an extended waitstatus, or by a watchpoint.
13351 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13352 thread was stepping or has been stopped by a watchpoint.
13353
d3bbe7a0
PA
133542010-04-01 Pedro Alves <pedro@codesourcery.com>
13355
13356 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13357 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13358 of another, then delete the previous, and validate all
13359 breakpoints.
13360 (validate_inserted_breakpoint): New.
13361 (delete_disabled_breakpoints): New.
13362 (validate_breakpoints): New.
13363 (check_mem_read): Validate breakpoints before trusting their
13364 shadow. Delete disabled breakpoints.
13365 (check_mem_write): Validate breakpoints before trusting they
13366 should be inserted. Delete disabled breakpoints.
13367 * mem-break.h (validate_breakpoints):
13368 * server.c (handle_query): Validate breakpoints when we see a
13369 qSymbol query.
13370
8b07ae33
PA
133712010-04-01 Pedro Alves <pedro@codesourcery.com>
13372
13373 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13374 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13375 if we could tell there's a GDB breakpoint at stop_pc.
13376 (need_step_over_p): Don't do a step over if we find a GDB
13377 breakpoint at the resume PC.
13378
13379 * mem-break.c (struct raw_breakpoint): New.
13380 (enum bkpt_type): New type `gdb_breakpoint'.
13381 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13382 fields. New field `raw'.
13383 (find_raw_breakpoint_at): New.
13384 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13385 breakpoint instead.
13386 (set_breakpoint_at): Adjust.
13387 (delete_raw_breakpoint): New.
13388 (release_breakpoint): New.
13389 (delete_breakpoint): Rename to...
13390 (delete_breakpoint_1): ... this. Add proc parameter. Use
13391 release_breakpoint. Return ENOENT.
13392 (delete_breakpoint): Reimplement.
13393 (find_breakpoint_at): Delete.
13394 (find_gdb_breakpoint_at): New.
13395 (delete_breakpoint_at): Delete.
13396 (set_gdb_breakpoint_at): New.
13397 (delete_gdb_breakpoint_at): New.
13398 (gdb_breakpoint_here): New.
13399 (set_reinsert_breakpoint): Use release_breakpoint.
13400 (uninsert_breakpoint): Rename to ...
13401 (uninsert_raw_breakpoint): ... this.
13402 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13403 (reinsert_raw_breakpoint): Change parameter type to
13404 raw_breakpoint.
13405 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13406 instead.
13407 (check_breakpoints): Adjust. Use release_breakpoint.
13408 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13409 (breakpoint_inserted_here): Ditto.
13410 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13411 Don't trust the breakpoint's shadow if it is not inserted.
13412 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13413 (delete_all_breakpoints): Adjust.
13414 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13415 use delete_breakpoint_1.
13416
13417 * mem-break.h (breakpoints_supported): Delete declaration.
13418 (set_gdb_breakpoint_at): Declare.
13419 (gdb_breakpoint_here): Declare.
13420 (delete_breakpoint_at): Delete.
13421 (delete_gdb_breakpoint_at): Declare.
13422
13423 * server.h (struct raw_breakpoint): Forward declare.
13424 (struct process_info): New field `raw_breakpoints'.
13425
13426 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13427 breakpoints.
13428
6bf5e0ba
PA
134292010-03-24 Pedro Alves <pedro@codesourcery.com>
13430
13431 * linux-low.c (status_pending_p_callback): Fix comment.
13432 (linux_wait_for_event_1): Move most of the internal breakpoint
13433 handling from here...
13434 (linux_wait_1): ... to here.
13435 (count_events_callback): New.
13436 (select_singlestep_lwp_callback): New.
13437 (select_event_lwp_callback): New.
13438 (cancel_breakpoints_callback): New.
13439 (select_event_lwp): New.
13440 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13441 priority to all LWPs that have had events that should be reported
13442 to the client. Cancel breakpoints when about to reporting the
13443 event to the client, not while stopping lwps. No longer cancel
13444 finished single-steps here.
13445 (cancel_finished_single_step): Delete.
13446 (cancel_finished_single_steps): Delete.
13447
414a389f
PA
134482010-03-24 Pedro Alves <pedro@codesourcery.com>
13449
13450 * mem-break.c (enum bkpt_type): New.
13451 (struct breakpoint): New field `type'.
13452 (set_breakpoint_at): Change return type to struct breakpoint
13453 pointer. Set type to `other_breakpoint' by default.
13454 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13455 in the breakpoint list.
13456 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13457 (reinsert_breakpoint): Rename to ...
13458 (reinsert_raw_breakpoint): ... this.
13459 (reinsert_breakpoints_at): Adjust.
13460 * mem-break.h (struct breakpoint): Declare.
13461 (set_breakpoint_at): Change return type to struct breakpoint
13462 pointer.
13463
2280c721
PA
134642010-03-24 Pedro Alves <pedro@codesourcery.com>
13465
13466 * server.c (handle_query): Assign, not compare.
13467
d50171e4
PA
134682010-03-24 Pedro Alves <pedro@codesourcery.com>
13469
13470 Teach linux gdbserver to step-over-breakpoints.
13471
13472 * linux-low.c (can_hardware_single_step): New.
13473 (supports_breakpoints): New.
13474 (handle_extended_wait): If stopping threads, read the stop pc of
13475 the new cloned LWP.
13476 (get_pc): New.
13477 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13478 low target doesn't support retrieving the PC.
13479 (add_lwp): Set last_resume_kind to resume_continue.
13480 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13481 (linux_attach): Don't clear stop_expected. Set the lwp's
13482 last_resume_kind to resume_stop.
13483 (linux_detach_one_lwp): Don't check for removed breakpoints.
13484 (check_removed_breakpoint): Delete.
13485 (status_pending_p): Rename to ...
13486 (status_pending_p_callback): ... this. Don't check for removed
13487 breakpoints. Don't consider threads that are stopped from GDB's
13488 perspective.
13489 (linux_wait_for_lwp): Always read the stop_pc here.
13490 (cancel_breakpoint): New.
13491 (step_over_bkpt): New global.
13492 (linux_wait_for_event_1): Implement stepping over breakpoints.
13493 (gdb_wants_lwp_stopped): New.
13494 (gdb_wants_all_stopped): New.
13495 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13496 single-step traps here. Store the thread's last reported target
13497 wait status.
13498 (send_sigstop): Don't clear stop_expected. Always set it,
13499 instead.
13500 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13501 (cancel_finished_single_step): New.
13502 (cancel_finished_single_steps): New.
13503 (wait_for_sigstop): Don't cancel finished single-step traps here.
13504 (linux_resume_one_lwp): Don't check for removed breakpoints.
13505 Don't set `step' on non-hardware step archs.
13506 (linux_set_resume_request): Ignore resume_stop requests if already
13507 stopping or stopped. Set the lwp's last_resume_kind.
13508 (resume_status_pending_p): Don't check for removed breakpoints.
13509 (need_step_over_p): New.
13510 (start_step_over): New.
13511 (finish_step_over): New.
13512 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13513 requests. Clear the thread's last reported target waitstatus.
13514 Don't use the `suspended' flag. Don't consider pending breakpoints.
13515 (linux_resume): Start a step-over if necessary.
13516 (proceed_one_lwp): New.
13517 (proceed_all_lwps): New.
13518 (unstop_all_lwps): New.
13519 * linux-low.h (struct lwp_info): Rewrite comment for the
13520 `suspended' flag. Add the `stop_pc' field. Delete the
13521 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13522 Add `'last_resume_kind' and `need_step_over' fields.
13523 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13524 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13525 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13526 (set_raw_breakpoint_at): New.
13527 (set_breakpoint_at): Rewrite to use it.
13528 (reinsert_breakpoint_handler): Delete.
13529 (set_reinsert_breakpoint): New.
13530 (reinsert_breakpoint_by_bp): Delete.
13531 (delete_reinsert_breakpoints): New.
13532 (uninsert_breakpoint): Rewrite.
13533 (uninsert_breakpoints_at): New.
13534 (reinsert_breakpoint): Rewrite.
13535 (reinsert_breakpoints_at): New.
13536 (check_breakpoints): Rewrite.
13537 (breakpoint_here): New.
13538 (breakpoint_inserted_here): New.
13539 (check_mem_read): Adjust.
13540 * mem-break.h (breakpoints_supported, breakpoint_here)
13541 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13542 (reinsert_breakpoint_by_bp): Delete declaration.
13543 (delete_reinsert_breakpoints): Declare.
13544 (reinsert_breakpoint): Delete declaration.
13545 (reinsert_breakpoints_at): Declare.
13546 (uninsert_breakpoint): Delete declaration.
13547 (uninsert_breakpoints_at): Declare.
13548 (check_breakpoints): Adjust prototype.
13549 * server.h: Adjust include order.
13550 (struct thread_info): Declare here. Add a `last_status' field.
13551
30ba68cb
MS
135522010-03-23 Michael Snyder <msnyder@vmware.com>
13553
13554 * server.c (crc32): New function.
13555 (handle_query): Add handling for 'qCRC:' request.
13556
b9a881c2
PA
135572010-03-23 Pedro Alves <pedro@codesourcery.com>
13558
13559 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13560 lwp had been stopped by a watchpoint.
13561
e92d13d5
PA
135622010-03-16 Pedro Alves <pedro@codesourcery.com>
13563
13564 * server.h (internal_error): Declare.
13565 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13566 * utils.c (internal_error): New function.
13567
64daa791
AS
135682010-03-15 Andreas Schwab <schwab@redhat.com>
13569
13570 * configure.srv: Fix typo setting srv_regobj.
13571
f52cd8cd
PA
135722010-03-15 Pedro Alves <pedro@codesourcery.com>
13573
13574 * linux-low.c (fetch_register): Avoid passing a non string literal
13575 format to `error'.
13576 (usr_store_inferior_registers): Ditto.
13577
93ae6fdc
PA
135782010-03-14 Pedro Alves <pedro@codesourcery.com>
13579
13580 * linux-low.c (linux_write_memory): Bail out early if peeking
13581 memory failed.
13582
c3adc08c
PA
135832010-03-14 Pedro Alves <pedro@codesourcery.com>
13584
13585 * linux-low.h (struct lwp_info): New fields
13586 `stopped_by_watchpoint' and `stopped_data_address'.
13587 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13588 here, and cache them in the lwp object.
13589 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13590 directly.
13591 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13592 field.
13593 (linux_stopped_by_watchpoint): Rewrite.
13594 (linux_stopped_data_address): Rewrite.
13595
bce522a2
PA
135962010-03-06 Simo Melenius <simo.melenius@iki.fi>
13597
13598 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13599 switching the current inferior, not before.
13600
90884b2b
L
136012010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13602
13603 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13604 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13605 i386-linux.c and amd64-linux.c.
13606 (reg-i386.o): Removed.
13607 (reg-i386.c): Likewise.
13608 (reg-i386-linux.o): Likewise.
13609 (reg-i386-linux.c): Likewise.
13610 (reg-x86-64.o): Likewise.
13611 (reg-x86-64.c): Likewise.
13612 (reg-x86-64-linux.o): Likewise.
13613 (reg-x86-64-linux.c): Likewise.
13614 (i386.o): New.
13615 (i386.c): Likewise.
13616 (i386-linux.o): Likewise.
13617 (i386-linux.c): Likewise.
13618 (amd64.o): Likewise.
13619 (amd64.c): Likewise.
13620 (amd64-linux.o): Likewise.
13621 (amd64-linux.c): Likewise.
13622
13623 * configure.srv (srv_i386_regobj): New.
13624 (srv_i386_linux_regobj): Likewise.
13625 (srv_amd64_regobj): Likewise.
13626 (srv_amd64_linux_regobj): Likewise.
13627 (srv_i386_32bit_xmlfiles): Likewise.
13628 (srv_i386_64bit_xmlfiles): Likewise.
13629 (srv_i386_xmlfiles): Likewise.
13630 (srv_amd64_xmlfiles): Likewise.
13631 (srv_i386_linux_xmlfiles): Likewise.
13632 (srv_amd64_linux_xmlfiles): Likewise.
13633 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13634 srv_xmlfiles to $srv_i386_xmlfiles.
13635 (i[34567]86-*-mingw32ce*): Likewise.
13636 (i[34567]86-*-mingw*): Likewise.
13637 (i[34567]86-*-nto*): Likewise.
13638 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13639 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13640 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13641 (x86_64-*-linux*): Likewise.
13642
13643 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13644 (init_registers_amd64_linux): New.
13645 (x86_arch_setup): Replace init_registers_x86_64_linux with
13646 init_registers_amd64_linux.
13647
193f13e6
MK
136482010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13649
13650 * configure.ac: Check for libdl. If it is not available link against
13651 static libthread_db.
13652 * configure: Regenerate.
13653
85d721b8
PA
136542010-02-22 Pedro Alves <pedro@codesourcery.com>
13655
13656 PR9605
13657
13658 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13659 handing a read watchpoint.
13660 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13661
6076632b
DE
136622010-02-12 Doug Evans <dje@google.com>
13663
13664 * linux-low.c (linux_supports_tracefork_flag): Document.
13665 (linux_look_up_symbols): Add comment.
13666
3327ccf7
L
136672010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13668
13669 * regcache.c (supply_register): Clear regcache if buf is NULL.
13670
0718675c 136712010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13672 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13673
13674 * inferiors.c (find_inferior): Add function documentation.
13675 (unloaded_dll): Handle the case where the unloaded dll has not
13676 been previously registered in the dll list.
13677
177321bd
DJ
136782010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13679
13680 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13681 (thumb2_breakpoint): New.
13682 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13683
2b009048
DJ
136842010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13687 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13688 breakpoints.
13689
3be029c7
PA
136902010-01-21 Pedro Alves <pedro@codesourcery.com>
13691
13692 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13693
18f5de3b
JK
136942010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13695
13696 * linux-s390-low.c (s390_collect_ptrace_register)
13697 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13698
3743bb4f
DE
136992010-01-21 Doug Evans <dje@google.com>
13700
14ce3065
DE
13701 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13702 (PTRACE_ARG4_TYPE): New macro.
13703 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13704 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13705 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13706 (usr_store_inferior_registers): Ditto.
13707 (linux_read_memory, linux_write_memory): Ditto.
13708 (linux_test_for_tracefork): Ditto.
13709
3743bb4f
DE
13710 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13711 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13712
8b315be5
PA
137132010-01-21 Pedro Alves <pedro@codesourcery.com>
13714
13715 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13716 target.
13717
85492558
PA
137182010-01-21 Pedro Alves <pedro@codesourcery.com>
13719
13720 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13721 prototype to take a regcache. Adjust.
13722
442ea881
PA
137232010-01-20 Pedro Alves <pedro@codesourcery.com>
13724
13725 * regcache.h (struct thread_info): Forward declare.
13726 (struct regcache): New.
13727 (new_register_cache): Adjust prototype.
13728 (get_thread_regcache): Declare.
13729 (free_register_cache): Adjust prototype.
13730 (registers_to_string, registers_from_string): Ditto.
13731 (supply_register, supply_register_by_name, collect_register)
13732 (collect_register_as_string, collect_register_by_name): Ditto.
13733 * regcache.c (struct inferior_regcache_data): Delete.
13734 (get_regcache): Rename to ...
13735 (get_thread_regcache): ... this. Adjust. Switch inferior before
13736 fetching registers.
13737 (regcache_invalidate_one): Adjust.
13738 (regcache_invalidate): Fix prototype.
13739 (new_register_cache): Return the new register cache.
13740 (free_register_cache): Change prototype.
13741 (realloc_register_cache): Adjust.
13742 (registers_to_string): Change prototype to take a regcache. Adjust.
13743 (registers_from_string): Ditto.
13744 (register_data): Ditto.
13745 (supply_register): Ditto.
13746 (supply_register_by_name): Ditto.
13747 (collect_register): Ditto.
13748 (collect_register_as_string): Ditto.
13749 (collect_register_by_name): Ditto.
13750 * server.c (process_serial_event): Adjust.
13751 * linux-low.h (regset_fill_func, regset_store_func): Change
13752 prototype.
13753 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13754 Change prototype.
13755 * linux-low.c (get_stop_pc): Adjust.
13756 (check_removed_breakpoint): Adjust.
13757 (linux_wait_for_event): Adjust.
13758 (linux_resume_one_lwp): Adjust.
13759 (fetch_register): Add regcache parameter. Adjust.
13760 (usr_store_inferior_registers): Ditto.
13761 (regsets_fetch_inferior_registers): Ditto.
13762 (regsets_store_inferior_registers): Ditto.
13763 (linux_fetch_registers, linux_store_registers): Ditto.
13764 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13765 regcache. Adjust.
43aaf8b6
PA
13766 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13767 Ditto.
442ea881
PA
13768 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13769 prototype to take a regcache.
13770 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13771 * remote-utils.c (convert_ascii_to_int, outreg)
13772 (prepare_resume_reply): Change prototype to take a regcache.
13773 Adjust.
13774 * target.h (struct target_ops) <fetch_registers, store_registers>:
13775 Change prototype to take a regcache.
13776 (fetch_inferior_registers, store_inferior_registers): Change
13777 prototype to take a regcache. Adjust.
13778 * proc-service.c (ps_lgetregs): Adjust.
13779 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13780 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13781 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13782 take a regcache. Adjust.
13783 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13784 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13785 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13786 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13787 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13788 (cris_cannot_fetch_register):
13789 (cris_breakpoint_at): Change prototype to take a regcache.
13790 Adjust.
13791 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13792 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13793 to take a regcache. Adjust.
13794 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13795 Adjust.
13796 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13797 take a regcache. Adjust.
13798 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13799 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13800 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13801 * linux-mips-low.c (mips_get_pc):
13802 (mips_set_pc): Change prototype to take a regcache. Adjust.
13803 (mips_reinsert_addr): Adjust.
13804 (mips_collect_register): Change prototype to take a regcache.
13805 Adjust.
13806 (mips_supply_register):
13807 (mips_collect_register_32bit, mips_supply_register_32bit)
13808 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13809 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13810 * linux-ppc-low.c (ppc_supply_ptrace_register)
13811 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13812 (parse_spufs_run): Adjust.
13813 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13814 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13815 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13816 take a regcache. Adjust.
13817 * linux-s390-low.c (s390_collect_ptrace_register)
13818 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13819 (s390_set_pc): Change prototype to take a regcache. Adjust.
13820 (s390_arch_setup): Adjust.
13821 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13822 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13823 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13824 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13825 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13826 regcache. Adjust.
13827 (sparc_breakpoint_at): Adjust.
13828 * linux-xtensa-low.c (xtensa_fill_gregset):
13829 (xtensa_store_gregset):
13830 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13831 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13832 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13833 prototype to take a regcache. Adjust.
13834 * win32-arm-low.c (arm_fetch_inferior_register)
13835 (arm_store_inferior_register): Change prototype to take a
13836 regcache. Adjust.
13837 * win32-i386-low.c (i386_fetch_inferior_register)
13838 (i386_store_inferior_register): Change prototype to take a
13839 regcache. Adjust.
13840 * win32-low.c (child_fetch_inferior_registers)
13841 (child_store_inferior_registers): Change prototype to take a
13842 regcache. Adjust.
13843 (win32_wait): Adjust.
13844 (win32_fetch_inferior_registers): Change prototype to take a
13845 regcache. Adjust.
13846 (win32_store_inferior_registers): Adjust.
13847 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13848 store_inferior_register>: Change prototype to take a regcache.
13849
60c3d7b0
DE
138502010-01-20 Doug Evans <dje@google.com>
13851
13852 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13853 #ifdef.
13854 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13855 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13856
dc146f7c
VP
138572010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13858
13859 * linux-low.c (linux_core_of_thread): New.
13860 (compare_ints, show_process, list_threads): New.
13861 (linux_qxfer_osdata): Report threads and cores.
13862 (linux_target_op): Register linux_core_of_thread.
13863 * remote-utils.c (prepare_resume_reply): Report the core.
13864 (buffer_xml_printf): Support %d specifier.
13865 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13866 New.
13867 (handle_query): Handle qXfer:threads. Announce availability
13868 thereof.
13869 * target.h (struct target_ops): New field core_of_thread.
13870
7803799a
UW
138712010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13872
13873 * Makefile.in (clean): Remove new generated files.
13874 (reg-s390.o, reg-s390.c): Remove rules.
13875 (reg-s390x.o, reg-s390x.c): Likewise.
13876 (s390-linux32.o, s390-linux32.c): Add rules.
13877 (s390-linux64.o, s390-linux64.c): Likewise.
13878 (s390x-linux64.o, s390x-linux64.c): Likewise.
13879 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13880 * linux-s390-low.c: Include <elf.h>.
13881 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13882 (init_registers_s390): Remove prototype.
13883 (init_registers_s390x): Likewise.
13884 (init_registers_s390_linux32): Add prototype.
13885 (init_registers_s390_linux64): Likewise.
13886 (init_registers_s390x_linux64): Likewise.
13887 (s390_num_regs_3264): New define.
13888 (s390_regmap_3264): New global variable.
13889 (s390_cannot_fetch_register): Remove obsolete check.
13890 (s390_cannot_store_register): Likewise.
13891 (s390_collect_ptrace_register): Handle upper/lower register halves.
13892 (s390_supply_ptrace_register): Likewise.
13893 (s390_fill_gregset): Update to register number changes.
13894 (s390_get_hwcap): New routine.
13895 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13896 Install appropriate regmap and register set.
13897
6e7ffa39
JB
138982010-01-01 Joel Brobecker <brobecker@adacore.com>
13899
13900 * server.c (gdbserver_version): Update copyright year to 2010.
13901 * gdbreplay.c (gdbreplay_version): Likewise.
13902
957f3f49
DE
139032009-12-28 Doug Evans <dje@google.com>
13904
13905 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13906 elf/external.h. Include <elf.h> instead but only if necessary.
13907
ca5c370d
PA
139082009-12-28 Pedro Alves <pedro@codesourcery.com>
13909
13910 * linux-low.c (linux_remove_process): Remove `detaching'
13911 parameter. Don't release/detach from thread_db here.
13912 (linux_kill): Release/detach from thread_db here, ...
13913 (linux_detach): ... and here, before actually detaching.
13914 (linux_wait_1): ... and here, when a process exits.
13915 * thread-db.c (any_thread_of): New.
13916 (thread_db_free): Switch the current inferior to a thread of the
13917 passed in process.
13918
4ee62156
DE
139192009-12-21 Doug Evans <dje@google.com>
13920
d90e6a88
DE
13921 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13922
c5f62d5f
DE
13923 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13924 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13925 warning ifndef __NR_tkill. Move setting of errno there too.
13926 Delete unnecessary resetting of errno after syscall.
13927 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13928
10e86dd7
DE
13929 * configure.ac: Check for dladdr.
13930 * config.in: Regenerate.
13931 * configure: Regenerate.
13932 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13933 (try_thread_db_load): Update.
13934
4ee62156
DE
13935 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13936
00f515da
DE
139372009-12-18 Doug Evans <dje@google.com>
13938
e9464885
DE
13939 * event-loop.c: Include unistd.h if it exists.
13940
07d4f67e
DE
13941 * linux-low.c (my_waitpid): Move definition away from being in
13942 between linux_tracefork_child/linux_test_for_tracefork.
13943
00f515da
DE
13944 * gdb_proc_service.h (psaddr_t): Fix type.
13945 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13946 signature to match glibc.
13947
1de1badb
DE
139482009-12-16 Doug Evans <dje@google.com>
13949
13950 * linux-low.c (linux_read_memory): Fix argument to read.
13951
aeeb81d1
PA
139522009-11-26 Pedro Alves <pedro@codesourcery.com>
13953
13954 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13955 events, don't leave current_inferior pointing at null.
13956
10357975
PA
139572009-11-26 Pedro Alves <pedro@codesourcery.com>
13958
13959 * win32-low.c (LOG): Delete.
13960 (OUTMSG): Output to stderr.
13961 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13962 on compile time LOG macro.
13963 (win32_wait): Fix debug output.
13964
cf6e3471
PA
139652009-11-26 Pedro Alves <pedro@codesourcery.com>
13966
13967 * win32-low.c (win32_add_one_solib): If the dll name is
13968 "ntdll.dll", prepend the system directory to the dll path.
13969
0c85e18e
MK
139702009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13971
13972 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13973
9ac544ce 139742009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13975 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13976
13977 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13978 * configure.ac: Check for __mcoldfire__ and set
13979 gdb_cv_m68k_is_coldfire.
13980 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13981 reg-cf.o and reg-m68k.o.
13982 * configure: Regenerated.
13983
fd7dd3e6
PA
139842009-11-16 Pedro Alves <pedro@codesourcery.com>
13985
13986 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13987 Pass it to thread_db_free.
13988 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13989 proper `detaching' argument to linux_remove_process.
13990 * linux-low.h (thread_db_free): Add `detaching' parameter.
13991 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13992 to thread_db_free.
13993 (thread_db_free): Add `detaching' parameter. Only
13994 call td_ta_clear_event if detaching from process.
13995
75aa492e
MK
139962009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13997
13998 * thread-db.c (thread_db_free): Fix typo.
13999
21e1bee4
PP
140002009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14001
14002 PR gdb/10838
14003 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14004
8838b45e
NS
140052009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14006
14007 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14008 with an i686 compiler.
14009 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14010 needed.
14011 * configure: Rebuilt.
14012
8a35fb51
SL
140132009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14014
14015 PR gdb/10783
14016
14017 * server.c (handle_search_memory_1): Correct read_addr initialization
14018 in loop for searching subsequent chunks.
14019
96f15937
PP
140202009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14021
14022 * configure.ac: New --with-libthread-db option.
14023 * thread-db.c: Allow direct dependence on libthread_db.
14024 (thread_db_free): Adjust.
14025 * config.in: Regenerate.
14026 * configure: Likewise.
889bf7c5 14027
5f7d1694
PP
140282009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14029
14030 PR gdb/10757
14031 * thread-db.c (attach_thread): New function.
14032 (maybe_attach_thread): Return success/failure.
14033 (find_new_threads_callback): Adjust.
889bf7c5
PA
14034 (thread_db_find_new_threads): Loop until no new threads.
14035
88e3b899
PA
140362009-10-13 Pedro Alves <pedro@codesourcery.com>
14037
14038 * proc-service.c (ps_lgetregs): Formatting.
14039
cdbfd419
PP
140402009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14041
14042 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14043 * configure.ac: Adjust.
14044 * linux-low.h (struct process_info_private): Move members to struct
14045 thread_db.
14046 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14047 * linux-low.c (linux_remove_process): Adjust.
14048 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14049 * server.c (handle_query): Move code ...
14050 (handle_monitor_command): ... here. New function.
14051 * target.h (struct target_ops): New member.
14052 * thread-db.c (struct thread_db): New.
14053 (libthread_db_search_path): New variable.
14054 (thread_db_create_event, thread_db_enable_reporting)
14055 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14056 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14057 (try_thread_db_load_1, dladdr_to_soname): New functions.
14058 (try_thread_db_load, thread_db_load_search): New functions.
14059 (thread_db_init): Search for libthread_db.
14060 (thread_db_free): New function.
14061 (thread_db_handle_monitor_command): Likewise.
14062 * config.in: Regenerate.
14063 * configure: Regenerate.
889bf7c5 14064
4168d2d6
UW
140652009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14066
14067 * spu-low.c (spu_kill): Wait for inferior to terminate.
14068 Call clear_inferiors.
14069 (spu_detach): Call clear_inferiors.
14070
81ecdfbb
RW
140712009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14072
14073 * aclocal.m4: Regenerate.
14074 * config.in: Likewise.
14075 * configure: Likewise.
14076
0b9ff2c0
UW
140772009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14078
14079 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14080 (parse_spufs_run): New function.
14081 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14082 (ppc_breakpoint_at): Handle SPU breakpoints.
14083
efcbbd14
UW
140842009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14085
14086 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14087 (SPUFS_MAGIC): Define.
14088 (spu_enumerate_spu_ids): New function.
14089 (linux_qxfer_spu): New function.
14090 (linux_target_ops): Install linux_qxfer_spu.
14091
f4d9bade
UW
140922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14093
14094 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14095 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14096 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14097 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14098 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14099 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14100 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14101 (init_registers_powerpc_cell32l): Add prototype.
14102 (init_registers_powerpc_cell64l): Likewise.
14103 (ppc_arch_setup): Detect Cell/B.E. architecture.
14104
96e946ca
RW
141052009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14106
14107 * Makefile.in (datarootdir): New variable.
14108
58d6951d
DJ
141092009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14110
14111 * linux-low.c (linux_write_memory): Update debugging output.
14112 * Makefile.in (clean): Add new descriptions.
14113 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14114 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14115 * configure.srv: Add new files for arm*-*-linux*.
14116 * linux-arm-low.c: Add new declarations.
14117 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14118 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14119 (HWCAP_VFPv3D16): New.
14120 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14121 instead of __IWMMXT__.
14122 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14123 (arm_arch_setup): New.
14124 (target_regsets): Remove #ifdef. Add VFP regset.
14125 (the_low_target): Use arm_arch_setup.
14126
12b42a12
DJ
141272009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14130 the main thread again.
14131
ac8c974e
AR
141322009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14133
14134 Adding Neutrino gdbserver.
14135 * configure: Regenerated.
14136 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14137 * configure.srv (i[34567]86-*-nto*): New target.
14138 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14139 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14140 (nto_comctrl) [__QNX__]: New function.
14141 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14142
4424e0c3 141432009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14144
14145 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14146 srv_tgtobj.
14147
912cf4ba
PA
141482009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14149 Pedro Alves <pedro@codesourcery.com>
14150
14151 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14152 don't support CONTEXT_EXTENDED_REGISTERS.
14153 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14154 (the_low_target): Install them.
14155 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14156 failing with ERROR_PIPE_NOT_CONNECTED.
14157
aa5ca48f
DE
141582009-06-30 Doug Evans <dje@google.com>
14159 Pierre Muller <muller@ics.u-strasbg.fr>
14160
14161 Add h/w watchpoint support to x86-linux, win32-i386.
14162 * Makefile.in (SFILES): Add i386-low.c
14163 (i386_low_h): Define.
14164 (i386-low.o): Add dependencies.
14165 (linux-x86-low.o): Add i386-low.h dependency.
14166 (win32-i386-low.o): Ditto.
14167 * i386-low.c: New file.
14168 * i386-low.h: New file.
14169 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14170 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14171 * linux-low.c (linux_add_process): Initialize arch_private.
14172 (linux_remove_process): Free arch_private.
14173 (add_lwp): Initialize arch_private.
14174 (delete_lwp): Free arch_private.
14175 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14176 provided.
14177 * linux-low.h (process_info_private): New member arch_private.
14178 (lwp_info): New member arch_private.
14179 (linux_target_ops): New members new_process, new_thread,
14180 prepare_to_resume.
14181 (ptid_of): New macro.
14182 * linux-x86-low.c: Include stddef.h, i386-low.h.
14183 (arch_process_info): New struct.
14184 (arch_lwp_info): New struct.
14185 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14186 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14187 (i386_dr_low_get_status): New function.
14188 (x86_insert_point, x86_remove_point): New functions.
14189 (x86_stopped_by_watchpoint): New function.
14190 (x86_stopped_data_address): New function.
14191 (x86_linux_new_process, x86_linux_new_thread): New functions.
14192 (x86_linux_prepare_to_resume): New function.
14193 (the_low_target): Add entries for insert_point, remove_point,
14194 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14195 prepare_to_resume.
14196 * server.c (debug_hw_points): New global.
14197 (monitor_show_help): Document set debug-hw-points.
14198 (handle_query): Process "set debug-hw-points".
14199 * server.h (debug_hw_points): Declare.
14200 (paddress): Declare.
14201 * utils.c (NUMCELLS, CELLSIZE): New macros.
14202 (get_sell, xsnprintf, paddress): New functions.
14203 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14204 remove_point, stopped_by_watchpoint, stopped_data_address.
14205 * win32-i386-low.c: Include i386-low.h.
14206 (debug_reg_state): Replaces dr.
14207 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14208 (i386_dr_low_get_status): New function.
14209 (i386_insert_point, i386_remove_point): New functions.
14210 (i386_stopped_by_watchpoint): New function.
14211 (i386_stopped_data_address): New function.
14212 (i386_initial_stuff): Update.
14213 (get_thread_context,set_thread_context,i386_thread_added): Update.
14214 (the_low_target): Add entries for insert_point,
14215 remove_point, stopped_by_watchpoint, stopped_data_address.
14216 * win32-low.c (win32_insert_watchpoint): New function.
14217 (win32_remove_watchpoint): New function.
14218 (win32_stopped_by_watchpoint): New function.
14219 (win32_stopped_data_address): New function.
14220 (win32_target_ops): Add entries for insert_watchpoint,
14221 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14222 * win32-low.h (win32_target_ops): New members insert_point,
14223 remove_point, stopped_by_watchpoint, stopped_data_address.
14224
d993e290
PA
142252009-06-25 Pedro Alves <pedro@codesourcery.com>
14226
14227 * server.c (process_serial_event): Re-return unsupported, not
14228 error, if the type isn't recognized. Re-allow supporting only
14229 insert or remove packets. Also call require_running for
14230 breakpoints. Add missing break statement to default case. Tidy.
14231 * target.h (struct target_ops): Rename insert_watchpoint to
14232 insert_point, and remove_watchpoint to remove_point.
14233
14234 * linux-low.h (struct linux_target_ops): Likewise.
14235 * linux-low.c (linux_insert_watchpoint): Rename to ...
14236 (linux_insert_point): ... this. Adjust.
14237 (linux_remove_watchpoint): Rename to ...
14238 (linux_remove_point): ... this. Adjust.
14239 (linux_target_ops): Adjust.
14240 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14241 (cris_insert_point): ... this.
14242 (cris_remove_watchpoint): Rename to ...
14243 (cris_remove_point): ... this.
14244 (the_low_target): Adjust.
14245
0f54c268
PM
142462009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14247
14248 * server.c (handle_v_kill): Pass signal_pid to
14249 kill_inferior if multi_process is zero.
14250
c6314022
AR
142512009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14252
14253 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14254 * target.h (target_ops): Comment for *_watchpoint to make it clear
14255 the functions can get types '0' and '1'.
14256
4463ce24
AR
142572009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14258
14259 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14260 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14261 * regcache.c (get_regcache): Likewise.
14262 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14263 * win32-low.c (child_fetch_inferior_registers): Remove check for
14264 regno 0.
14265
cf8fd78b
PA
142662009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14267 Pedro Alves <pedro@codesourcery.com>
14268
14269 * target.h (struct target_ops) <supports_multi_process>: New
14270 callback.
14271 (target_supports_multi_process): New.
14272 * server.c (handle_query): Even if GDB reports support, only
14273 enable multi-process if the target also supports it. Report
14274 multi-process support only if the target backend supports it.
14275 * linux-low.c (linux_supports_multi_process): New function.
14276 (linux_target_ops): Install it as target_supports_multi_process
14277 callback.
14278
47c0c975
DE
142792009-05-24 Doug Evans <dje@google.com>
14280
e09875d4
DE
14281 Global renaming of find_thread_pid to find_thread_ptid.
14282 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14283 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14284 All callers updated.
14285
e27d73f6
DE
14286 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14287 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14288 directly.
14289
47c0c975
DE
14290 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14291 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14292 (linux_resume_one_lwp): Ditto.
14293
2acc282a
DE
142942009-05-23 Doug Evans <dje@google.com>
14295
14296 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14297 from struct inferior_list_entry * to struct lwp_info *.
14298 All callers updated.
14299
9f1036c1
DE
143002009-05-13 Doug Evans <dje@google.com>
14301
14302 * linux-x86-low.c: Don't include assert.h.
14303 (x86_siginfo_fixup): Use fatal, not assert.
14304 (x86_arch_setup): Fix comment.
14305
d0722149
DE
143062009-05-12 Doug Evans <dje@google.com>
14307
14308 Biarch support for i386/amd64 gdbserver.
14309 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14310 Add linux-x86-low.c.
14311 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14312 (linux-x86-low.o): Add.
14313 * linux-x86-64-low.c: Delete.
14314 * linux-i386-low.c: Delete.
14315 * linux-x86-low.c: New file.
14316 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14317 linux-x86-low.o.
14318 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14319 linux-x86-low.o.
14320 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14321 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14322 (linux_child_pid_to_exec_file): New function.
14323 (elf_64_header_p, elf_64_file_p): New functions.
14324 (siginfo_fixup): New function.
14325 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14326 give target a chance to convert layout.
14327 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14328 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14329
fdeb2a12
DE
143302009-05-07 Doug Evans <dje@google.com>
14331
14332 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14333 (regsets_store_inferior_registers): Ditto.
14334
a6dbe5df
PA
143352009-05-06 Pedro Alves <pedro@codesourcery.com>
14336
14337 PR server/10048
14338
14339 * linux-low.c (must_set_ptrace_flags): Delete.
14340 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14341 of the global.
14342 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14343 `lwp->must_set_ptrace_flags' instead.
ba42693b 14344 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14345 (linux_wait_1): ... not here.
14346
5091eb23
DE
143472009-04-30 Doug Evans <dje@google.com>
14348
9f767825
DE
14349 * inferiors.c (started_inferior_callback): New function.
14350 (attached_inferior_callback): New function.
14351 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14352 * server.c (print_started_pid, print_attached_pid): New functions.
14353 (detach_or_kill_for_exit): New function.
14354 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14355 * server.h (have_started_inferiors_p): Declare.
14356 (have_attached_inferiors_p): Declare.
14357
5091eb23
DE
14358 * inferiors.c (remove_process): Fix memory leak, free process.
14359 * linux-low.c (linux_remove_process): New function.
14360 (linux_kill): Call it instead of remove_process.
14361 (linux_detach, linux_wait_1): Ditto.
14362
155c8968
PA
143632009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14364
14365 * configure.srv: Add x86 Windows CE target.
14366
7fe519cb
UW
143672009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14368
14369 * inferiors.c (get_thread_process): Make global.
14370 * server.h (get_thread_process): Add prototype.
14371 * thread-db.c (find_one_thread): Use get_thread_process
14372 instead of current_process.
14373 (thread_db_get_tls_address): Do not crash if called when
14374 thread layer is not yet initialized.
14375
5472f405
UW
143762009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14377
14378 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14379 * spu-low.c (current_tid): Rename to ...
14380 (current_ptid): ... this.
14381 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14382 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14383 ptid_get_lwp (current_ptid) instead of current_tid.
14384 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14385 instead of current_tid. Use find_process_pid to verify pid
14386 argument is valid. Pass proper argument to remove_process.
14387 (spu_thread_alive): Compare current_ptid instead of current_tid.
14388 (spu_resume): Likewise.
14389
55ac2b99
PA
143902009-04-02 Pedro Alves <pedro@codesourcery.com>
14391
14392 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14393 variable.
14394
95954743
PA
143952009-04-01 Pedro Alves <pedro@codesourcery.com>
14396
14397 Implement the multiprocess extensions, and add linux multiprocess
14398 support.
14399
14400 * server.h (ULONGEST): Declare.
14401 (struct ptid, ptid_t): New.
14402 (minus_one_ptid, null_ptid): Declare.
14403 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14404 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14405 (struct inferior_list_entry): Change `id' type from unsigned from
14406 to ptid_t.
14407 (struct sym_cache, struct breakpoint, struct
14408 process_info_private): Forward declare.
14409 (struct process_info): Declare.
14410 (current_process): Declare.
14411 (all_processes): Declare.
14412 (initialize_inferiors): Declare.
14413 (add_thread): Adjust to use ptid_t.
14414 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14415 (add_process, remove_process, find_thread_pid): Declare.
14416 (find_inferior_id): Adjust to use ptid_t.
14417 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14418 (multi_process): Declare.
14419 (push_event): Adjust to use ptid_t.
14420 (read_ptid, write_ptid): Declare.
14421 (prepare_resume_reply): Adjust to use ptid_t.
14422 (clear_symbol_cache): Declare.
14423 * inferiors.c (all_processes): New.
14424 (null_ptid, minus_one_ptid): New.
14425 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14426 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14427 (add_thread): Change unsigned long to ptid. Remove gdb_id
14428 parameter. Adjust.
14429 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14430 (gdb_id_to_thread): Rename to ...
14431 (find_thread_pid): ... this. Change unsigned long to ptid.
14432 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14433 (loaded_dll, pull_pid_from_list): Adjust.
14434 (add_process, remove_process, find_process_pid)
14435 (get_thread_process, current_process, initialize_inferiors): New.
14436 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14437 (struct target_waitstatus) <related_pid>: Ditto.
14438 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14439 return type to int.
14440 (struct target_ops) <join>: Add `pid' argument.
14441 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14442 (struct target_ops) <wait>: Add `ptid' field. Change return type
14443 to ptid.
14444 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14445 (mywait): Add `ptid' argument. Change return type to ptid_t.
14446 (target_pid_to_str): Declare.
14447 * target.c (set_desired_inferior): Adjust to use ptids.
14448 (mywait): Add new `ptid' argument. Adjust.
14449 (target_pid_to_str): New.
14450 * mem-break.h (free_all_breakpoints): Declare.
14451 * mem-break.c (breakpoints): Delelete.
14452 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14453 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14454 to use per-process breakpoint list.
14455 (free_all_breakpoints): New.
14456 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14457 (symbol_cache, all_symbols_looked_up): Delete.
14458 (hexchars): New.
14459 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14460 read_ptid): New.
14461 (prepare_resume_reply): Change ptid argument's type from unsigned
14462 long to ptid_t. Adjust. Implement W;process and X;process.
14463 (free_sym_cache, clear_symbol_cache): New.
14464 (look_up_one_symbol): Adjust to per-process symbol cache. *
14465 * server.c (cont_thread, general_thread, step_thread): Change type
14466 to ptid_t.
14467 (attached): Delete.
14468 (multi_process): New.
14469 (last_ptid): Change type to ptid_t.
14470 (struct vstop_notif) <ptid>: Change type to ptid_t.
14471 (queue_stop_reply, push_event): Change `ptid' argument's type to
14472 ptid_t.
14473 (discard_queued_stop_replies): Add `pid' argument.
14474 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14475 changes. Don't reference the `attached' global.
14476 (attach_inferior): Adjust to mywait interface changes.
14477 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14478 features. Handle and report "multiprocess+". Handle
14479 "qAttached:PID".
14480 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14481 changes.
14482 (handle_v_kill): New.
14483 (handle_v_stopped): Adjust to use target_pid_to_str.
14484 (handle_v_requests): Allow multiple attaches and runs when
14485 multiprocess extensions are in effect. Handle "vKill".
14486 (myresume): Adjust to use ptids.
14487 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14488 (handle_status): Adjust to discard_queued_stop_replies interface
14489 change.
14490 (first_thread_of, kill_inferior_callback)
14491 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14492 (main): Call initialize_inferiors. Adjust to use ptids, killing
14493 and detaching from all inferiors. Handle multiprocess packet
14494 variants.
14495 * linux-low.h: Include gdb_proc_service.h.
14496 (struct process_info_private): New.
14497 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14498 <lwpid_of>: Use ptid_get_lwp.
14499 (get_lwp_thread): Adjust.
14500 (struct lwp_info): Add `dead' member.
14501 (find_lwp_pid): Declare.
14502 * linux-low.c (thread_db_active): Delete.
14503 (new_inferior): Adjust comment.
14504 (inferior_pid): Delete.
14505 (linux_add_process): New.
14506 (handle_extended_wait): Adjust.
14507 (add_lwp): Change unsigned long to ptid.
14508 (linux_create_inferior): Add process to processes table. Adjust
14509 to use ptids. Don't set new_inferior here.
14510 (linux_attach_lwp): Rename to ...
14511 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14512 it. Adjust to use ptids.
14513 (linux_attach_lwp): New.
14514 (linux_attach): Add process to processes table. Don't set
14515 new_inferior here.
14516 (struct counter): New.
14517 (second_thread_of_pid_p, last_thread_of_process_p): New.
14518 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14519 multiple processes.
14520 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14521 processes. Remove process from process table.
14522 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14523 to multiple processes.
14524 (any_thread_of): New.
14525 (linux_detach): Add `pid' argument, and handle it. Remove process
14526 from processes table.
14527 (linux_join): Add `pid' argument. Handle it.
14528 (linux_thread_alive): Change unsighed long argument to ptid_t.
14529 Consider dead lwps as not being alive.
14530 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14531 threads we're not interested in.
14532 (same_lwp, find_lwp_pid): New.
14533 (linux_wait_for_lwp): Change `pid' argument's type from int to
14534 ptid_t. Adjust.
14535 (linux_wait_for_event): Rename to ...
14536 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14537 from int to ptid_t. Adjust.
14538 (linux_wait_for_event): New.
14539 (linux_wait_1): Add `ptid' argument. Change return type to
14540 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14541 that exit from the process table.
14542 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14543 Adjust.
14544 (mark_lwp_dead): New.
14545 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14546 stopping all threads, mark its main lwp as dead.
14547 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14548 ptids.
14549 (fetch_register, usr_store_inferior_registers)
14550 (regsets_fetch_inferior_registers)
14551 (regsets_store_inferior_registers, linux_read_memory)
14552 (linux_write_memory): Inline `inferior_pid'.
14553 (linux_look_up_symbols): Adjust to use per-process
14554 `thread_db_active'.
14555 (linux_request_interrupt): Adjust to use ptids.
14556 (linux_read_auxv): Inline `inferior_pid'.
14557 (initialize_low): Don't reference thread_db_active.
14558 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14559 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14560 (ps_getpid): Return the pid of the current inferior.
14561 * thread-db.c (proc_handle, thread_agent): Delete.
14562 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14563 per-process data.
14564 (find_one_thread): Change argument type to ptid_t. Adjust to
14565 per-process data.
14566 (maybe_attach_thread): Adjust to per-process data and ptids.
14567 (thread_db_find_new_threads): Ditto.
14568 (thread_db_init): Ditto.
14569 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14570 processes table. Adjust to use ptids.
14571 (spu_kill, spu_detach): Adjust interface. Remove process from
14572 processes table.
14573 (spu_join, spu_thread_alive): Adjust interface.
14574 (spu_wait): Adjust interface. Remove process from processes
14575 table. Adjust to use ptids.
14576 * win32-low.c (current_inferior_tid): Delete.
14577 (current_inferior_ptid): New.
14578 (debug_event_ptid): New.
14579 (thread_rec): Take a ptid. Adjust.
14580 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14581 (child_delete_thread): Ditto.
14582 (do_initial_child_stuff): Add `attached' argument. Add process to
14583 processes table.
14584 (child_fetch_inferior_registers, child_store_inferior_registers):
14585 Adjust.
14586 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14587 (win32_attach): Pass 1 to do_initial_child_stuff.
14588 (win32_kill): Adjust interface. Remove process from processes
14589 table.
14590 (win32_detach): Ditto.
14591 (win32_join): Adjust interface.
14592 (win32_thread_alive): Take a ptid.
14593 (win32_resume): Adjust to use ptids.
14594 (get_child_debug_event): Ditto.
14595 (win32_wait): Adjust interface. Remove exiting process from
14596 processes table.
14597
bd99dc85
PA
145982009-04-01 Pedro Alves <pedro@codesourcery.com>
14599
14600 Non-stop mode support.
14601
14602 * server.h (non_stop): Declare.
14603 (gdb_client_data, handler_func): Declare.
14604 (delete_file_handler, add_file_handler, start_event_loop):
14605 Declare.
14606 (handle_serial_event, handle_target_event, push_event)
14607 (putpkt_notif): Declare.
14608 * target.h (enum resume_kind): New.
14609 (struct thread_resume): Replace `step' field by `kind' field.
14610 (TARGET_WNOHANG): Define.
14611 (struct target_ops) <wait>: Add `options' argument.
14612 <supports_non_stop, async, start_non_stop>: New fields.
14613 (target_supports_non_stop, target_async): New.
14614 (start_non_stop): Declare.
14615 (mywait): Add `options' argument.
14616 * target.c (mywait): Add `options' argument. Print child exit
14617 notifications here.
14618 (start_non_stop): New.
14619 * server.c (non_stop, own_buf, mem_buf): New globals.
14620 (struct vstop_notif): New.
14621 (notif_queue): New global.
14622 (queue_stop_reply, push_event, discard_queued_stop_replies)
14623 (send_next_stop_reply): New.
14624 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14625 interface changes.
14626 (attach_inferior): In non-stop mode, don't wait for the target
14627 here.
14628 (handle_general_set): Handle QNonStop.
14629 (handle_query): When handling qC, return the current general
14630 thread, instead of the first thread of the list.
14631 (handle_query): If the backend supports non-stop mode, include
14632 QNonStop+ in the qSupported query response.
14633 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14634 and non-stop mode.
14635 (handle_v_attach, handle_v_run): Handle non-stop mode.
14636 (handle_v_stopped): New.
14637 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14638 (myresume): Adjust to use resume_kind. Handle non-stop.
14639 (queue_stop_reply_callback): New.
14640 (handle_status): Handle non-stop mode.
14641 (main): Clear non_stop flag on reconnection. Use the event-loop.
14642 Refactor serial protocol handling from here ...
14643 (process_serial_event): ... to this new function. When GDB
14644 selects any thread, select one here. In non-stop mode, wait until
14645 GDB acks all pending events before exiting.
14646 (handle_serial_event, handle_target_event): New.
14647 * remote-utils.c (remote_open): Install remote_desc in the event
14648 loop.
14649 (remote_close): Remove remote_desc from the event loop.
14650 (putpkt_binary): Rename to...
14651 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14652 (putpkt_binary): New as wrapper around putpkt_binary_1.
14653 (putpkt_notif): New.
14654 (prepare_resume_reply): In non-stop mode, don't change the
14655 general_thread.
14656 * event-loop.c: New.
14657 * Makefile.in (OBJ): Add event-loop.o.
14658 (event-loop.o): New rule.
14659
14660 * linux-low.h (pid_of): Moved here.
14661 (lwpid_of): New.
14662 (get_lwp_thread): Use lwpid_of.
14663 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14664 * linux-low.c (pid_of): Delete.
14665 (inferior_pid): Use lwpid_of.
14666 (linux_event_pipe): New.
14667 (target_is_async_p): New.
14668 (delete_lwp): New.
14669 (handle_extended_wait): Use lwpid_of.
14670 (add_lwp): Don't set lwpid field.
14671 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14672 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14673 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14674 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14675 first. Adjust to linux_wait_for_event interface changes. Use
14676 lwpid_of.
14677 (linux_detach): Don't delete the main lwp here.
14678 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14679 (status_pending_p): Don't consider explicitly suspended lwps.
14680 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14681 pointer. Add OPTIONS argument. Change return type to int. Use
14682 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14683 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14684 pointer. Add status pointer argument. Return a pid instead of a
14685 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14686 changes. In non-stop mode, don't switch to a random thread.
14687 (linux_wait): Rename to...
14688 (linux_wait_1): ... this. Add target_options argument, and handle
14689 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14690 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14691 clean exit and signal exit code. Don't stop all threads in
14692 non-stop mode. In all-stop mode, only stop all threads when
14693 reporting a stop to GDB. Handle explicit thread stop requests.
14694 (async_file_flush, async_file_mark): New.
14695 (linux_wait): New.
14696 (send_sigstop): Use lwpid_of.
14697 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14698 interface changes. In non-stop mode, don't switch to a random
14699 thread.
14700 (linux_resume_one_lwp): Use lwpid_of.
14701 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14702 (linux_resume_one_thread): ... this. Handle resume_stop. In
14703 non-stop mode, don't look for pending flag in all threads.
14704 (resume_status_pending_p): Don't consider explicitly suspended
14705 threads.
14706 (my_waitpid): Reimplement. Emulate __WALL.
14707 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14708 Use lwpid_of.
14709 (sigchld_handler, linux_supports_non_stop, linux_async)
14710 (linux_start_non_stop): New.
14711 (linux_target_ops): Register linux_supports_non_stop, linux_async
14712 and linux_start_non_stop.
14713 (initialize_low): Install SIGCHLD handler.
14714 * thread-db.c (thread_db_create_event, find_one_thread)
14715 (thread_db_get_tls_address): Use lwpid_of.
14716 * win32-low.c (win32_detach): Adjust to use resume_kind.
14717 (win32_wait): Add `options' argument.
14718 * spu-low.c (spu_resume): Adjust to use resume_kind.
14719 (spu_wait): Add `options' argument.
14720
5b1c542e
PA
147212009-04-01 Pedro Alves <pedro@codesourcery.com>
14722
14723 Decouple target code from remote protocol.
14724
14725 * target.h (enum target_waitkind): New.
14726 (struct target_waitstatus): New.
14727 (struct target_ops) <wait>: Return an unsigned long. Take a
14728 target_waitstatus pointer instead of a char pointer.
14729 (mywait): Likewise.
14730 * target.c (mywait): Change prototype to return an unsigned long.
14731 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14732 * server.h (thread_from_wait, old_thread_from_wait): Delete
14733 declarations.
14734 (prepare_resume_reply): Change prototype to take a
14735 target_waitstatus.
14736 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14737 (last_status, last_ptid): New.
14738 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14739 pid instead of a signal.
14740 (attach_inferior): Remove "status" and "signal" parameters.
14741 Adjust.
14742 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14743 not as an address.
14744 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14745 (handle_v_requests, myresume): Remove "status" and "signal"
14746 parameters. Adjust.
14747 (handle_status): New.
14748 (main): Delete local `status'. Adjust.
14749 * remote-utils.c: Include target.h.
14750 (prepare_resume_reply): Change prototype to take a
14751 target_waitstatus. Adjust.
14752
14753 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14754 interface.
14755 * spu-low.c (spu_wait): Adjust.
14756 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14757 Delete.
14758 (win32_wait): Adjust.
14759
2bd7c093
PA
147602009-04-01 Pedro Alves <pedro@codesourcery.com>
14761
14762 * target.h (struct thread_resume): Delete leave_stopped member.
14763 (struct target_ops): Add a `n' argument to the `resume' callback.
14764 * server.c (start_inferior): Adjust.
14765 (handle_v_cont, myresume): Adjust.
14766 * linux-low.c (check_removed_breakpoint): Adjust to resume
14767 interface change, and to removed leave_stopped field.
14768 (resume_ptr): Delete.
14769 (struct thread_resume_array): New.
14770 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14771 resume interface change.
14772 (linux_continue_one_thread, linux_queue_one_thread)
14773 (resume_status_pending_p): Check if the resume field is NULL
14774 instead of checking the leave_stopped member.
14775 (linux_resume): Adjust to the target resume interface change.
14776 * spu-low.c (spu_resume): Adjust to the target resume interface
14777 change.
14778 * win32-low.c (win32_detach, win32_resume): Ditto.
14779
c35fafde
PA
147802009-04-01 Pedro Alves <pedro@codesourcery.com>
14781
14782 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14783 flag.
14784 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14785 pending.
14786 (linux_continue_one_thread): Only preserve the stepping flag if
14787 there's a pending breakpoint.
14788
0a59d50b
PA
147892009-03-31 Pedro Alves <pedro@codesourcery.com>
14790
14791 * server.c (main): After the inferior having exited, call
14792 remote_close before exiting gdbserver.
14793
f04c6d38
TJB
147942009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14795
14796 Fix size of FPSCR in Power 7 processors.
14797 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14798 (PPC_FEATURE_HAS_DFP): New #define.
14799 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14800 size of the FPSCR.
14801
78e5cee6
PA
148022009-03-23 Pedro Alves <pedro@codesourcery.com>
14803
14804 * server.c (handle_query) Whitespace and formatting.
14805
1b3f6016
PA
148062009-03-22 Pedro Alves <pedro@codesourcery.com>
14807
14808 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14809 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14810 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14811 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14812 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14813 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14814 Makefile.in, configure.ac: Fix whitespace throughout.
14815 * configure: Regenerate.
14816
a07b2135
PA
148172009-03-22 Pedro Alves <pedro@codesourcery.com>
14818
14819 * inferiors.c (find_inferior): Make it safe for the callback
14820 function to delete the currently iterated inferior.
14821
67cc2626
PA
148222009-03-22 Pedro Alves <pedro@codesourcery.com>
14823
14824 * Makefile.in (linuw_low_h): Move higher.
14825 (thread-db.o): Depend on $(linux_low_h).
14826
54a0b537
PA
148272009-03-17 Pedro Alves <pedro@codesourcery.com>
14828
14829 Rename "process" to "lwp" throughout.
14830
14831 * linux-low.c (all_processes): Rename to...
14832 (all_lwps): ... this.
14833 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14834 (add_process): Rename to ...
14835 (add_lwp): ... this. Adjust.
14836 (linux_create_inferior): Adjust.
14837 (linux_attach_lwp): Adjust.
14838 (linux_attach): Adjust.
14839 (linux_kill_one_process): Rename to ...
14840 (linux_kill_one_lwp): ... this. Adjust.
14841 (linux_kill): Adjust.
14842 (linux_detach_one_process): Rename to ...
14843 (linux_detach_one_lwp): ... this. Adjust.
14844 (linux_detach): Adjust.
14845 (check_removed_breakpoint): Adjust.
14846 (status_pending_p): Adjust.
14847 (linux_wait_for_process): Rename to ...
14848 (linux_wait_for_lwp): ... this. Adjust.
14849 (linux_wait_for_event): Adjust.
14850 (send_sigstop): Adjust.
14851 (wait_for_sigstop): Adjust.
14852 (stop_all_processes): Rename to ...
14853 (stop_all_lwps): ... this.
14854 (linux_resume_one_process): Rename to ...
14855 (linux_resume_one_lwp): ... this. Adjust.
14856 (linux_set_resume_request, linux_continue_one_thread)
14857 (linux_queue_one_thread, resume_status_pending_p)
14858 (usr_store_inferior_registers, regsets_store_inferior_registers)
14859 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14860 Adjust.
14861 * linux-low.h (get_process): Rename to ...
14862 (get_lwp): ... this. Adjust.
14863 (get_thread_process): Rename to ...
14864 (get_thread_lwp): ... this. Adjust.
14865 (get_process_thread): Rename to ...
14866 (get_lwp_thread): ... this. Adjust.
14867 (struct process_info): Rename to ...
14868 (struct lwp_info): ... this.
14869 (all_processes): Rename to ...
14870 (all_lwps): ... this.
14871 * proc-service.c (ps_lgetregs): Adjust.
14872 * thread-db.c (thread_db_create_event, find_one_thread)
14873 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14874
0b16c5cf
PA
148752009-03-14 Pedro Alves <pedro@codesourcery.com>
14876
14877 * server.c (handle_query): Handle "qAttached".
14878
32de4b9d
NS
148792009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14880
14881 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14882 GPLv3, update license URL.
14883
2aecd87f
DE
148842009-03-01 Doug Evans <dje@google.com>
14885
93efd302 14886 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14887 (server_h): Add gdb_signals.h.
14888 (signals.o): Update.
14889 * server.h (target_signal_from_host,target_signal_to_host_p)
14890 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14891
86b1f9c5
PM
148922009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14893
14894 * remote-utils.c (getpkt): Also generate remote-debug
14895 information if noack_mode is set.
14896
4aa995e1
PA
148972009-02-06 Pedro Alves <pedro@codesourcery.com>
14898
14899 * server.c (handle_query): Report qXfer:siginfo:read and
14900 qXfer:siginfo:write as supported and handle them.
14901 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14902 * linux-low.c (linux_xfer_siginfo): New.
14903 (linux_target_ops): Set it.
14904
62709adf
PA
149052009-01-26 Pedro Alves <pedro@codesourcery.com>
14906
14907 * server.c (gdbserver_usage): Mention --remote-debug.
14908 (main): Accept '--remote-debug' switch.
14909
aef93bd7
DE
149102009-01-18 Doug Evans <dje@google.com>
14911
14912 * regcache.c (new_register_cache): No need to check result of xcalloc.
14913 * server.c (handle_search_memory): Back out calls to xmalloc,
14914 result is checked and error is returned to user upon failure.
14915 (handle_query): Ditto. Add more checks for result of malloc.
14916 (handle_v_cont): Check result of malloc, report error back to
14917 user upon failure.
14918 (handle_v_run): Ditto. Call freeargv.
14919 * server.h (freeargv): Declare.
14920 * utils.c (freeargv): New fn.
14921
54363045
DE
149222009-01-15 Doug Evans <dje@google.com>
14923
f626972c
DE
14924 * gdbreplay.c (perror_with_name): Make arg const char *.
14925 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14926 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14927 * utils.c (perror_with_name): Make arg const char *.
54363045 14928
18aae699
PA
149292009-01-14 Pedro Alves <pedro@codesourcery.com>
14930
14931 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14932 when handling a EXIT_PROCESS_DEBUG_EVENT.
14933
ff703abe
JB
149342009-01-06 Joel Brobecker <brobecker@adacore.com>
14935
14936 * gdbreplay.c (gdbreplay_version): Update copyright year.
14937 * server.c (gdbserver_version): Likewise.
14938
f21cc1a2 149392009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14940
14941 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14942 (handle_extended_wait): Improve comment.
0e21c1ec 14943
bca929d3
DE
149442008-12-13 Doug Evans <dje@google.com>
14945
14946 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14947 * server.h (ATTR_MALLOC): New macro.
14948 (xmalloc,xcalloc,xstrdup): Declare.
14949 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14950 * inferiors.c: Ditto.
14951 * linux-low.c: Ditto.
14952 * mem-break.c: Ditto.
14953 * regcache.c: Ditto.
14954 * remote-utils.c: Ditto.
14955 * server.c: Ditto.
14956 * target.c: Ditto.
14957 * win32-low.c: Ditto.
14958
97438e3f
DE
149592008-12-12 Doug Evans <dje@google.com>
14960
896c7fbb
DE
14961 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14962 in debugging printf.
14963
97438e3f
DE
14964 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14965
e3b886f8
DE
149662008-12-09 Doug Evans <dje@google.com>
14967
14968 * linux-low.h (struct process_info): Delete member tid, unused.
14969 * thread-db.c (find_one_thread): Update.
14970 (maybe_attach_thread): Update.
14971
07e059b5
VP
149722008-12-02 Pedro Alves <pedro@codesourcery.com>
14973
889bf7c5
PA
14974 * target.h (struct target_ops): Add qxfer_osdata member.
14975 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14976 and dirent.h.
14977 (linux_qxfer_osdata): New functions.
14978 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14979 callback.
14980 * server.c (handle_query): Handle "qXfer:osdata:read:".
14981 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14982 (buffer_xml_printf): New functions.
14983 * server.h (struct buffer): New.
14984 (buffer_grow_str, buffer_grow_str0): New macros.
14985 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14986 (buffer_xml_printf): Declare.
07e059b5 14987
4cab47ab
DE
149882008-11-24 Doug Evans <dje@google.com>
14989
14990 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14991
f142445f
DJ
149922008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14993
14994 * server.c (handle_v_run): Always use the supplied argument list.
14995
d0107bb6 149962008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14997
d0107bb6
BW
14998 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14999 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 15000
2c4ad781
TJB
150012008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15002
15003 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15004 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15005 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15006 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15007 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15008 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15009 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15010 XML target descriptions.
15011 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15012 when inferior is running on an ISA 2.05 or later processor. Add
15013 special case to return offset for full 64-bit slot of FPSCR when
15014 in 32-bits.
15015
dfb64f85
DJ
150162008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15017
15018 * Makefile.in (SFILES, clean): Added sparc64 files.
15019 (reg-sparc64.o, reg-sparc64.c): New.
15020 * configure.srv (sparc*-*-linux*): New configuration.
15021 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15022 syscall arguments for SPARC.
15023 (regsets_store_inferior_registers): Likewise.
15024 * linux-sparc-low.c: New file.
15025
66b6e1dd
DE
150262008-10-21 Doug Evans <dje@google.com>
15027
15028 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15029 (READLINE_DIR,READLINE_DEP): Delete.
15030 (INTERNAL_CFLAGS): Update.
15031 (LINTFLAGS): Update.
15032
9b710a42
PA
150332008-10-10 Pedro Alves <pedro@codesourcery.com>
15034
15035 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15036 whole argv from the last run, not just argv[0].
15037
5822d809
PA
150382008-09-08 Pedro Alves <pedro@codesourcery.com>
15039
15040 * regcache.c (new_register_cache): Return NULL if the register
15041 cache size isn't known yet.
15042 (free_register_cache): Avoid dereferencing a NULL regcache.
15043
74aac56f
DJ
150442008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * configure.srv: Merge MIPS and MIPS64.
15047
400b20f5
MR
150482008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15049
15050 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15051
677c5bb1
LM
150522008-08-18 Luis Machado <luisgpm@br.ibm.com>
15053
15054 * Makefile.in: Add required vsx dependencies.
15055
15056 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15057 Declare init_registers_powerpc_vsx32l.
15058 Declare init_registers_powerpc_vsx64l.
15059 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15060 (ppc_arch_setup): Check for VSX in hwcap.
15061 (ppc_fill_vsxregset): New function.
15062 (ppc_store_vsxregset): New function.
15063 Add new VSX entry in regset_info target_regsets.
15064
15065 * configure.srv: Add new VSX dependencies.
15066
a6f3e723
SL
150672008-08-12 Pedro Alves <pedro@codesourcery.com>
15068
15069 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15070 (remote_open): Set or clear transport_is_reliable.
15071 (putpkt_binary): Don't expect acks in noack mode.
15072 (getpkt): Don't send ack/nac in noack mode.
15073 * server.c (handle_general_set): Handle QStartNoAckMode.
15074 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15075 qSupported.
15076 (main): Reset noack_mode on every connection.
15077 * server.h (noack_mode): Declare.
15078
a417dc56
RW
150792008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15080
15081 * Makefile.in (GDBREPLAY_OBS): New variable.
15082 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15083
3221518c
UW
150842008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15085 Daniel Jacobowitz <dan@codesourcery.com>
15086
15087 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15088 (usr_store_inferior_registers): Likewise.
15089 (regsets_store_inferior_registers): Likewise.
15090
ec56be1b
PA
150912008-07-31 Rolf Jansen <rj@surtec.com>
15092 Pedro Alves <pedro@codesourcery.com>
15093
15094 * configure.ac: Check for memmem declaration.
15095 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15096 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15097 (disable_packet_qfThreadInfo): Unconditionally compile.
15098 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15099 * configure, config.in: Regenerate.
15100
2fe5e3ff
DE
151012008-07-28 Doug Kwan <dougkwan@google.com>
15102
15103 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15104 (linux_write_memory): Remove declaration of errno.
15105
836acd6d
UW
151062008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15107
15108 * linux-low.c (handle_extended_wait): Do not use "status"
15109 variable uninitialized.
15110
aeba519e
PA
151112008-07-07 Pedro Alves <pedro@codesourcery.com>
15112
15113 * server.c (handle_v_attach): Inhibit reporting dll changes.
15114
db42f210
PA
151152008-06-27 Pedro Alves <pedro@codesourcery.com>
15116
15117 * remote-utils.c (prepare_resume_reply): If requested, don't
15118 output "thread:TID" in the T stop reply.
15119
15120 * server.c (disable_packet_vCont, disable_packet_Tthread)
15121 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15122 (handle_query): If requested, disable support for qC, qfThreadInfo
15123 and qsThreadInfo.
15124 (handle_v_requests): If requested, disable support for vCont.
15125 (gdbserver_show_disableable): New.
15126 (main): Handle --disable-packet and --disable-packet=LIST.
15127
15128 * server.h (disable_packet_vCont, disable_packet_Tthread)
15129 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15130
8e4c5421
CD
151312008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15132
15133 * server.c (gdbserver_usage): Mention --version.
15134
6e23a804
DJ
151352008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * Makefile.in (gdbreplay.o): New rule.
15138
90aa6a40
JM
151392008-06-06 Joseph Myers <joseph@codesourcery.com>
15140
15141 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15142 message, not gdbserver.
15143
c16158bc 151442008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15145 Nathan Sidwell <nathan@codesourcery.com>
15146 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15147
15148 * acinclude.m4: Include ../../config/acx.m4.
15149 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15150 * configure, config.in: Regenerate.
15151 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15152 * server.c (gdbserver_version): Print PKGVERSION.
15153 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15154 (main): Adjust gdbserver_usage calls.
15155 * gdbreplay.c (version, host_name): Add declarations.
15156 (gdbreplay_version, gdbreplay_usage): New.
15157 (main): Accept --version and --help options.
15158
aeb75bf5
DJ
151592008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15160
15161 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15162 (arm_breakpoint_at): Handle Thumb.
15163 (the_low_target): Add comment.
15164
76b233dd
UW
151652008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15166
15167 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15168
08388c79
DE
151692008-05-09 Doug Evans <dje@google.com>
15170
a3c83fae
DE
15171 * server.h (decode_search_memory_packet): Declare.
15172 * remote-utils.c (decode_search_memory_packet): New fn.
15173 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15174 (handle_search_memory): New fn.
15175 (handle_query): Process qSearch:memory packets.
15176
bb9c3d36
UW
151772008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15178
15179 * regcache.c (registers_length): Remove.
15180 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15181 full register packet.
15182 * regcache.h (registers_length): Remove prototype.
15183 * server.h (PBUFSIZ): Define to 16384.
15184
7284e1be
UW
151852008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15186
15187 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15188 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15189 powerpc-64l.o, and powerpc-altivec64l.o.
15190 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15191 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15192 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15193 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15194 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15195 to srv_xmlfiles.
15196
15197 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15198 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15199 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15200 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15201 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15202 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15203 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15204 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15205 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15206 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15207 (clean): Update.
15208
15209 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15210 (init_registers_powerpc_32l): ... this new prototype.
15211 (init_registers_powerpc_32): Remove, replace by ...
15212 (init_registers_powerpc_altivec32l): ... this new prototype.
15213 (init_registers_powerpc_e500): Remove, replace by ...
15214 (init_registers_powerpc_e500l): ... this new prototype.
15215 (init_registers_ppc64): Remove, replace by ...
15216 (init_registers_powerpc_64l): ... this new prototype.
15217 (init_registers_powerpc_64): Remove, replace by ...
15218 (init_registers_powerpc_altivec64l): ... this new prototype.
15219 (ppc_num_regs): Set to 73.
15220 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15221 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15222 (ppc_cannot_store_register): Handle orig_r3 and trap.
15223 (ppc_arch_setup): Update init_registers_... calls.
15224 (ppc_fill_gregset): Handle orig_r3 and trap.
15225
15226 * inferiors.c (clear_inferiors): Reset current_inferior.
15227
fdc59709
PB
152282008-04-23 Paolo Bonzini <bonzini@gnu.org>
15229
889bf7c5
PA
15230 * acinclude.m4: Add override.m4.
15231 * configure: Regenerate.
fdc59709 15232
c9b2f845
UW
152332008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15234
15235 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15236 initial call to init_register_ppc64.
15237
550512b8
UW
152382008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15239
43aaf8b6
PA
15240 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15241 single powerpc*-*-linux* case.
550512b8
UW
15242 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15243
b6430ec3
UW
152442008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15245
15246 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15247 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15248 from reg_xmlfiles.
15249 * linux-ppc-low.c: Include <elf.h>.
15250 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15251 (ppc_hwcap): New global variable.
15252 (ppc_regmap): Remove __SPE__ #ifdef sections.
15253 (ppc_regmap_e500): New global variable.
15254 (ppc_cannot_store_register): Update __SPE__ special case.
15255 (ppc_get_hwcap): New function.
15256 (ppc_arch_setup): Use it to determine whether inferior supports
15257 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15258 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15259 Do not access registers if target does not support AltiVec.
15260 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15261 Do not access registers if target does not support SPE.
15262 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15263
52fa2412
UW
152642008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * linux-low.c (disabled_regsets, num_regsets): New.
15267 (use_regsets_p): Delete.
15268 (linux_wait_for_process): Clear disabled_regsets.
15269 (regsets_fetch_inferior_registers): Check and set it.
15270 (regsets_store_inferior_registers): Likewise.
15271 (linux_fetch_registers, linux_store_registers): Do not use
15272 use_regsets_p.
15273 (initialize_low): Allocate disabled_regsets.
15274
e28b3332
DJ
152752008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15276
15277 * Makefile.in (LIBOBJS): New.
15278 (OBS): Use LIBOBJS.
15279 (memmem.o): New rule.
15280 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15281 * configure: Regenerated.
15282
4536995d
UW
152832008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15284
15285 * server.c (handle_query): Never return "unsupported" for
15286 qXfer:features:read queries.
15287
221c031f
UW
152882008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15289
15290 * server.c (get_features_xml): Fix inverted condition.
15291 (handle_query): Always support qXfer:feature:read.
15292
ccd213ac
DJ
152932008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15294
15295 * server.c (wrapper_argv): New.
15296 (start_inferior): Handle wrapper_argv. If set, expect an extra
15297 trap.
15298 (gdbserver_usage): Document --wrapper.
15299 (main): Parse --wrapper.
15300
6fe305f7
UW
153012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15302
15303 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15304 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15305 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15306 (ppc_set_pc): Likewise.
15307 (ppc_arch_setup): New function.
15308 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15309 of collect_register.
889bf7c5 15310 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15311
5b0a002e
UW
153122008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15313
15314 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15315 instead of linux-ppc64-low.o.
15316 * linux-ppc64-low.c: Remove file.
15317 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15318 (linux-ppc64-low.o): Remove rule.
15319
15320 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15321 (init_registers_powerpc_64): Likewise.
15322 (ppc_regmap): Conditionally define depending on __powerpc64__.
15323 (ppc_cannot_store_register): Do not special-case "fpscr" when
15324 compiled on __powerpc64__.
15325 (ppc_collect_ptrace_register): New function.
15326 (ppc_supply_ptrace_register): New function.
15327 (ppc_breakpoint): Change type to "unsigned int".
15328 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15329 (the_low_target): Conditionally provide initializers for the
889bf7c5 15330 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15331 collect_ptrace_register and supply_ptrace_register members.
15332
9b4b61c8
UW
153332008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15334
15335 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15336 * server.c (gdbserver_xmltarget): Define.
15337 (get_features_xml): Use it to replace "target.xml" and arch_string.
15338
15339 * configure.srv: Remove srv_xmltarget. Add XML files that were
15340 mentioned there to srv_xmlfiles instead. Remove conditional tests
15341 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15342 srv_xmlfiles and srv_regobj to include all possible choices.
15343 * configure.ac (srv_xmltarget): Remove.
15344 (srv_xmlfiles): Do not add "target.xml".
15345 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15346 checks for supplementary target information.
15347 * configure: Regenerate.
15348 * Makefile.in (XML_TARGET): Remove.
15349 (target.xml): Remove rule.
15350 (clean): Do not clean up target.xml.
15351 (.PRECIOUS): Do not mention target.xml.
15352
15353 * target.h (struct target_ops): Remove arch_string member.
15354 * linux-low.c (linux_arch_string): Remove.
15355 (linux_target_ops): Remove arch_string initializer.
15356 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15357 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15358 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15359 * spu-low.c (spu_arch_string): Remove.
15360 (spu_target_ops): Remove arch_string initializer.
15361 * win32-low.c (win32_arch_string): Remove.
15362 (win32_target_ops): Remove arch_string initializer.
15363 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15364 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15365 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15366
ee1a7ae4
UW
153672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15368
15369 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15370 by collect_ptrace_register and supply_ptrace_register hooks.
15371 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15372 instead of checking for the_low_target.left_pad_xfer.
15373 (usr_store_inferior_registers): Use collect_ptrace_register callback
15374 instead of checking for the_low_target.left_pad_xfer.
15375
15376 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15377 (s390_supply_ptrace_register): Likewise.
15378 (s390_fill_gregset): Call s390_collect_ptrace_register.
15379 (the_low_target): Update.
15380
15381 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15382 (ppc_supply_ptrace_register): Likewise.
15383 (the_low_target): Update.
15384
15385 * linux-i386-low.c (the_low_target): Update.
15386 * linux-x86-64-low.c (the_low_target): Update.
15387
d61ddec4
UW
153882008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15389
15390 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15391 reg-s390.o and reg-s390x.o.
15392
15393 * linux-low.c (new_inferior): New global variable.
15394 (linux_create_inferior, linux_attach): Set it.
15395 (linux_wait_for_process): Call the_low_target.arch_setup after the
15396 target has stopped for the first time.
15397 (initialize_low): Do not call the_low_target.arch_setup.
15398
15399 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15400 (s390_set_pc): Likewise.
15401 (s390_arch_setup): New function.
15402 (the_low_target): Use s390_arch_setup as arch_setup routine.
15403
15404 * regcache.c (realloc_register_cache): New function.
15405 (set_register_cache): Call it for each existing regcache.
15406
d05b4ac3
UW
154072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15408
15409 * server.h (init_registers): Remove prototype.
15410
15411 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15412 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15413 instead of init_registers ().
15414 * linux-arm-low.c (init_registers_arm): Add prototype.
15415 (init_registers_arm_with_iwmmxt): Likewise.
15416 (the_low_target): Add initializer for arch_setup field.
15417 * linux-cris-low.c (init_registers_cris): Add prototype.
15418 (the_low_target): Add initializer for arch_setup field.
15419 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15420 (the_low_target): Add initializer for arch_setup field.
15421 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15422 (the_low_target): Add initializer for arch_setup field.
15423 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15424 (the_low_target): Add initializer for arch_setup field.
15425 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15426 (the_low_target): Add initializer for arch_setup field.
15427 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15428 (the_low_target): Add initializer for arch_setup field.
15429 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15430 (init_registers_mips64_linux): Likewise.
15431 (the_low_target): Add initializer for arch_setup field.
15432 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15433 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15434 (the_low_target): Add initializer for arch_setup field.
15435 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15436 (init_registers_powerpc_64): Likewise.
15437 (the_low_target): Add initializer for arch_setup field.
15438 * linux-s390-low.c (init_registers_s390): Add prototype.
15439 (init_registers_s390x): Likewise.
15440 (the_low_target): Add initializer for arch_setup field.
15441 * linux-sh-low.c (init_registers_sh): Add prototype.
15442 (the_low_target): Add initializer for arch_setup field.
15443 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15444 (the_low_target): Add initializer for arch_setup field.
15445 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15446 (the_low_target): Add initializer for arch_setup field.
15447
15448 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15449 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15450 instead of init_registers ().
15451 * win32-arm-low.c (init_registers_arm): Add prototype.
15452 (the_low_target): Add initializer for arch_setup field.
15453 * win32-i386-low.c (init_registers_i386): Add prototype.
15454 (the_low_target): Add initializer for arch_setup field.
15455
15456 * spu-low.c (init_registers_spu): Add prototype.
15457 (initialize_low): Call initialie_registers_spu () instead of
15458 initialize_registers ().
15459
fd96d250
PA
154602008-02-19 Pedro Alves <pedro@codesourcery.com>
15461
15462 * server.c (handle_v_requests): When handling the vRun and vAttach
15463 packets, if already debugging a process, don't kill it. Return an
15464 error instead.
15465
d41b6bb4
DJ
154662008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15467
15468 * server.c (handle_query): Correct length check.
15469
5ac588cf
PA
154702008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15471
15472 * win32-low.c (do_initial_child_stuff): Add process handle
15473 parameter. Set current_process_handle and current_process_id from the
15474 parameters. Clear globals.
15475 (win32_create_inferior): Don't set current_process_handle and
15476 current_process_id here. Instead pass them on the call to
15477 do_initial_child_stuff.
15478 (win32_attach): Likewise.
15479 (win32_clear_inferiors): New.
15480 (win32_kill): Don't close the current process handle or the
15481 current thread handle here. Instead call win32_clear_inferiors.
15482 (win32_detach): Don't open a new handle to the process. Call
15483 win32_clear_inferiors.
15484 (win32_join): Don't rely on current_process_handle; open a new
15485 handle using the process id.
15486 (win32_wait): Call win32_clear_inferiors when the inferior process
15487 has exited.
15488
ecd7ecbc
DJ
154892008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15490
15491 * server.c (monitor_show_help): Add "exit".
15492
1525d545
MG
154932008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15494
ecd7ecbc 15495 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15496 (clean): Add reg-xtensa.c.
15497 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15498 * configure.srv (xtensa*-*-linux*) New target.
15499 * linux-xtensa-low.c: New.
15500 * xtensa-xtregs.c: New.
1525d545 15501
59a016f0
PA
155022008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15503
15504 * hostio.c: Don't include errno.h.
15505 (errno_to_fileio_errno): Move to hostio-errno.
15506 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15507 error number outputting to the target->hostio_last_error callback.
15508 (hostio_packet_error): Use FILEIO_EINVAL directly.
15509 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15510 calls to hostio_error.
15511 * hostio-errno.c: New.
15512 * server.h (hostio_last_error_from_errno): Declare.
15513 * target.h (target_ops): Add hostio_last_error member.
15514 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15515 as hostio_last_error handler.
889bf7c5 15516 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15517 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15518 (wince_hostio_last_error): New functions.
15519 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15520 as hostio_last_error handler.
15521 (win32_target_ops) [!_WIN32_WCE]: Register
15522 hostio_last_error_from_errno as hostio_last_error handler.
15523 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15524 (hostio-errno.o): New rule.
15525 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15526 * configure.srv (srv_hostio_err_objs): New variable. Default to
15527 hostio-errno.o.
15528 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15529 * configure: Regenerate.
15530
2d717e4f
DJ
155312008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15532
15533 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15534 (linux_kill, linux_detach): Clean up the process list.
15535 * remote-utils.c (remote_open): Improve port number parsing.
15536 (putpkt_binary, input_interrupt): Only send interrupts if the target
15537 is running.
15538 * server.c (extended_protocol): Make static.
15539 (attached): Define earlier.
15540 (exit_requested, response_needed, program_argv): New variables.
15541 (target_running): New.
15542 (start_inferior): Clear attached here.
15543 (attach_inferior): Set attached here.
15544 (require_running): Define.
15545 (handle_query): Use require_running and target_running. Implement
15546 "monitor exit".
15547 (handle_v_attach, handle_v_run): New.
15548 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15549 (gdbserver_usage): Update.
15550 (main): Redo argument parsing. Handle --debug and --multi. Handle
15551 --attach along with other options or after the port. Save
15552 program_argv. Support no initial program. Resynchronize
15553 communication with GDB after an error. Handle "monitor exit".
15554 Use require_running and target_running. Always allow the extended
15555 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15556 restart in extended mode.
15557 * README: Refer to the GDB manual. Update --attach usage.
15558
7407e2de
AS
155592007-12-20 Andreas Schwab <schwab@suse.de>
15560
15561 * linux-low.c (STACK_SIZE): Define.
15562 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15563 (linux_test_for_tracefork): Likewise.
15564
b65d95c5
DJ
155652007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15566
15567 * linux-low.c (linux_wait_for_event): Update messages. Do not
15568 reinsert auto-delete breakpoints.
15569 * mem-break.c (struct breakpoint): Change return type of handler to
15570 int.
15571 (set_breakpoint_at): Update handler type.
15572 (reinsert_breakpoint_handler): Return 1 instead of calling
15573 delete_breakpoint.
15574 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15575 setting a new one.
15576 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15577 * mem-break.h (set_breakpoint_at): Update handler type.
15578 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15579 * win32-low.c (auto_delete_breakpoint): New.
15580 (get_child_debug_event): Use it.
15581
4e799345
DJ
155822007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15583
15584 * configure.ac: Check for pread and pwrite.
15585 * hostio.c (handle_pread): Fall back to lseek and read.
15586 (handle_pwrite): Fall back to lseek and write.
15587 * config.in, configure: Regenerated.
15588
27524b67
DJ
155892007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15590
15591 * server.c (myresume): Add own_buf argument.
15592 (main): Update calls.
15593
a20d5e98
DJ
155942007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15595
15596 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15597 * remote-utils.c (remote_open): Do not call disable_async_io.
15598 (block_async_io): Delete.
15599 (unblock_async_io): Make static.
15600 (initialize_async_io): New.
15601 * server.c (handle_v_cont): Handle async I/O here.
15602 (myresume): Likewise. Move other common resume tasks here...
15603 (main): ... from here. Call initialize_async_io. Disable async
15604 I/O before the main loop.
15605 * server.h (initialize_async_io): Declare.
15606 (block_async_io, unblock_async_io): Delete prototypes.
15607 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15608
b79d787e
DJ
156092007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15610
15611 * remote-utils.c (readchar): Allow binary data in received messages.
15612
d97903b2
PA
156132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15614
15615 * win32-low.c (attaching): New global.
15616 (win32_create_inferior): Clear the `attaching' global.
15617 (win32_attach): Set the `attaching' global.
15618 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15619 attaching. Only set a breakpoint at the entry point if not
15620 attaching.
15621
311de423
PA
156222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15623
15624 * server.c (main): Don't report dll events on the initial
15625 connection on attaches.
15626
6c2d16d2
PA
156272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15628
15629 * server.c (main): Relax numerical bases supported for the pid of
15630 the --attach command line argument.
15631
5ca906e6
PA
156322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15633
15634 * win32-low.c (win32_attach): Call OpenProcess before
15635 DebugActiveProcess, not after. Add last error output to error
15636 call.
15637
9c6c8194
PA
156382007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15639
15640 * win32-low.c (win32_get_thread_context)
15641 (win32_set_thread_context): New functions.
15642 (thread_rec): Use win32_get_thread_context.
15643 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15644 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15645 field.
15646
4d5d1aaa
PA
156472007-12-03 Leo Zayas
15648 Pedro Alves <pedro_alves@portugalmail.pt>
15649
15650 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15651 global variables.
15652 (child_add_thread): Minor cleanup.
15653 (child_continue): Resume artificially suspended threads before
15654 calling ContinueDebugEvent.
15655 (suspend_one_thread): New.
15656 (fake_breakpoint_event): New.
15657 (get_child_debug_event): Change return type to int. Check here if
15658 gdb sent an interrupt request. If a soft interrupt was requested,
15659 fake a breakpoint event. Return 0 if there is no event to handle,
15660 and 1 otherwise.
15661 (win32_wait): Don't check here if gdb sent an interrupt request.
15662 Ensure there is a valid event to handle.
15663 (win32_request_interrupt): Add soft interruption method as last
15664 resort.
15665
c436e841
PA
156662007-12-03 Leo Zayas
15667 Pedro Alves <pedro_alves@portugalmail.pt>
15668
15669 * win32-low.h (win32_thread_info): Add descriptions to the
15670 structure members. Replace `suspend_count' counter by a
15671 `suspended' flag.
15672 * win32-low.c (thread_rec): Update condition of when to get the
15673 context from the inferior. Rely on ContextFlags being set if it
15674 has already been retrieved. Only suspend the inferior thread if
15675 we haven't already. Warn if that fails.
15676 (continue_one_thread): s/suspend_count/suspended/. Only call
15677 ResumeThread once. Warn if that fails.
15678
e7b5fa67
PA
156792007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15680
15681 * win32-low.c (win32_wait): Don't read from the inferior when it
15682 has already exited.
15683
a385171d
PA
156842007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15685
15686 * Makefile.in (win32_low_h): New variable.
15687 (win32-low.o): Add dependency on $(win32_low_h).
15688 (win32-arm-low.o, win32-i386-low.o): New rules.
15689
f80c84b3
DJ
156902007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15691
15692 * hostio.c: Correct copyright year.
15693
a6b151f1
DJ
156942007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15695
15696 * Makefile.in (OBS): Add hostio.o.
15697 (hostio.o): New rule.
15698 * server.h (handle_vFile): Declare.
15699 * hostio.c: New file.
15700 * server.c (handle_v_requests): Take packet_len and new_packet_len
15701 for binary packets. Call handle_vFile.
15702 (main): Update call to handle_v_requests.
15703
f9387fc3
DJ
157042007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15705
15706 * linux-low.c: Include <sched.h>.
15707
51c2684e
DJ
157082007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15709
15710 * linux-low.c (linux_tracefork_grandchild): New.
15711 (linux_tracefork_child): Use clone.
15712 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15713
75f83163
JB
157142007-10-31 Joel Brobecker <brobecker@adacore.com>
15715
15716 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15717
da5898ce
DJ
157182007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15719
15720 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15721
24a09b5f
DJ
157222007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15723
15724 * inferiors.c (change_inferior_id): Delete.
15725 (add_pid_to_list, pull_pid_from_list): New.
15726 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15727 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15728 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15729 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15730 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15731 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15732 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15733 (using_threads): Always set to 1.
15734 (handle_extended_wait): New.
15735 (add_process): Do not set TID.
15736 (linux_create_inferior): Set must_set_ptrace_flags.
15737 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15738 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15739 (linux_thread_alive): Rename TID argument to LWPID.
15740 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15741 (linux_wait_for_event): Do not use TID or check using_threads. Update
15742 call to dead_thread_notify. Call handle_extended_wait.
15743 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15744 (send_sigstop): Delete sigstop_sent.
15745 (wait_for_sigstop): Avoid TID.
15746 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15747 (linux_test_for_tracefork): New.
15748 (linux_lookup_signals): Use thread_db_active and
15749 linux_supports_tracefork_flag.
15750 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15751 * linux-low.h (get_process_thread): Avoid TID.
15752 (struct process_ifo): Move thread_known and tid to the end. Remove
15753 sigstop_sent.
15754 (linux_attach_lwp, thread_db_init): Update prototypes.
15755 * server.h (change_inferior_id): Delete prototype.
15756 (add_pid_to_list, pull_pid_from_list): New prototypes.
15757 * thread-db.c (thread_db_use_events): New.
15758 (find_first_thread): Rename to...
15759 (find_one_thread): ...this. Update callers and messages. Do not
15760 call fatal. Check thread_db_use_events. Do not call
15761 change_inferior_id or new_thread_notify.
15762 (maybe_attach_thread): Update. Do not call new_thread_notify.
15763 (thread_db_init): Set thread_db_use_events. Check use_events.
15764 * utils.c (fatal, warning): Correct message prefix.
15765
30ed0a8f
DJ
157662007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15767
15768 * Makefile.in (clean): Remove new files.
15769 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15770 (powerpc-64.o, powerpc-64.c): New rules.
15771 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15772 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15773 with SPE.
15774 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15775 SPE targets.
15776 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15777 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15778 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15779 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15780 (target_regsets): Add AltiVec and SPE register sets.
15781 * configure.ac: Check for AltiVec and SPE.
15782 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15783 (ppc_fill_vrregset, ppc_store_vrregset): New.
15784 (target_regsets): Add AltiVec register set.
15785 * configure: Regenerated.
15786
fd462a61
DJ
157872007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15788
15789 * linux-low.c (O_LARGEFILE): Define.
15790 (linux_read_memory): Use /proc/PID/mem.
15791 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15792 * configure, config.in: Regenerated.
15793
69f223ed
DJ
157942007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15795
15796 * linux-low.c (linux_wait_for_event): Do not pass signals while
15797 single-stepping.
15798
aec18585
PA
157992007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15800
15801 * win32-low.c (create_process): New.
15802 (win32_create_inferior): Use create_process instead of
15803 CreateProcess. If create_process failed retry appending an ".exe"
15804 suffix. Store the GetLastError result immediatelly after
15805 create_process calls and use it on the call to error.
15806
34d86ddd
PA
158072007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15808
15809 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15810
5a0e3bd0
JB
158112007-08-23 Joel Brobecker <brobecker@adacore.com>
15812
15813 * configure.ac: Switch license to GPLv3.
15814
f88c79e6
MS
158152007-08-01 Michael Snyder <msnyder@access-company.com>
15816
15817 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15818
6b3d9b83
PA
158192007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15822 typedef.
15823 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15824 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15825 CloseToolhelp32Snapshot.
15826 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15827 CloseToolhelp32Snapshot.
15828
c588c53c
MS
158292007-07-27 Michael Snyder <michael.snyder@access-company.com>
15830
15831 * server.c (main): Check for inferior exit before main loop.
15832
aa0403d9
PA
158332007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15834
15835 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15836 instead of on tmp_desc.
15837
255e7678
DJ
158382007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15839 Daniel Jacobowitz <dan@codesourcery.com>
15840
15841 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15842 (add_thread): Minor cleanups.
15843 (clear_inferiors): Move lower in the file. Clear the DLL
15844 list.
15845 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15846 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15847 (xml_escape_text): New.
15848 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15849 for qSupported.
15850 (handle_v_cont): Report errors.
15851 (gdbserver_version): Update.
15852 (main): Correct size of own_buf. Do not report initial DLL events.
15853 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15854 (unloaded_dll, xml_escape_text): New.
15855 * win32-low.c (enum target_waitkind): Update comments.
15856 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15857 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15858 (win32_EnumProcessModules, win32_GetModuleInformation)
15859 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15860 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15861 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15862 (win32_Module32First, win32_Module32Next, load_toolhelp)
15863 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15864 (get_child_debug_event): Handle DLL events.
15865 (win32_wait): Likewise.
15866
0d37add9
DJ
158672007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15868
15869 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15870 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15871
45e2715e
PA
158722007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15873
15874 * win32-low.c (handle_output_debug_string): Ignore event if not
15875 waiting.
15876
c5674cf1
PA
158772007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15878
15879 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15880
2bbe3cc1
DJ
158812007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15882
15883 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15884
ae13219e
DJ
158852007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15886
15887 * inferiors.c (change_inferior_id): Add comment.
15888 * linux-low.c (check_removed_breakpoint): Add an early
15889 prototype. Improve debug output.
15890 (linux_attach): Doc update.
15891 (linux_detach_one_process, linux_detach): Clean up before releasing
15892 each process.
15893 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15894 * linux-low.h (struct process_info): Doc improvement.
15895 * mem-break.c (delete_all_breakpoints): New.
15896 * mem-break.h (delete_all_breakpoints): New prototype.
15897 * thread-db.c (find_first_thread): New.
15898 (thread_db_create_event): Call it instead of
15899 thread_db_find_new_threads. Clean up unused variables.
15900 (maybe_attach_thread): Remove first thread handling.
15901 (thread_db_find_new_threads): Use find_first_thread.
15902 (thread_db_get_tls_address): Likewise.
15903
4105de34
DJ
159042007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15905
15906 * thread-db.c (thread_db_find_new_threads): Add prototype.
15907 (thread_db_create_event): Check for the main thread before adding
15908 a new thread.
15909 (maybe_attach_thread): Only enable event reporting if TID == 0.
15910 (thread_db_get_tls_address): Check for new threads.
15911
2b876972
DJ
159122007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15913
15914 * linux-low.c (linux_create_inferior): Try execv before execvp.
15915 * spu-low.c (spu_create_inferior): Likewise.
15916
7a245884
DJ
159172007-06-13 Mike Frysinger <vapier@gentoo.org>
15918
15919 * linux-low.c (linux_create_inferior): Change execv to execvp.
15920 * spu-low.c (spu_create_inferior): Likewies.
15921
117ce543
DJ
159222007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15923
15924 * Makefile.in (clean): Clean new files instead of deleted ones.
15925 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15926 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15927 rules.
15928 * configure.srv: Specify XML files and new regformats for MIPS and
15929 MIPS64 GNU/Linux.
15930 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15931 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15932 an entry for the restart register.
15933 (mips_cannot_fetch_register, mips_cannot_store_register)
15934 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15935 register names to match the XML descriptions.
15936 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15937 restart register instead of $0.
15938
0e7f50da
UW
159392007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15940 Markus Deuling <deuling@de.ibm.com>
15941
15942 * remote-utils.c (decode_xfer_write): New function.
15943 * server.h (decode_xfer_write): Add prototype.
15944 * server.c (handle_query): Add PACKET_LEN argument. Support
15945 qXfer:spu:read and qXfer:spu:write packets.
15946 (main): Pass packet_len to handle_query.
15947 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15948 * target.h (target_ops): Add qxfer_spu.
15949
374c1d38
UW
159502007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15951
15952 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15953 accessing non-seekable spufs files.
15954
bb63802a
UW
159552007-05-16 Markus Deuling <deuling@de.ibm.com>
15956
889bf7c5 15957 * server.c (handle_query): Add reply for qC packet.
bb63802a 15958
7390519e
PA
159592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15960 Leo Zayas <lerele@champenstudios@com>
15961
15962 * server.h (check_remote_input_interrupt_request): New function.
15963 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15964 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15965 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15966 (check_remote_input_interrupt_request): New function.
15967 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15968 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15969 winapi_GenerateConsoleCtrlEvent): New typedefs.
15970 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15971 to 250 ms.
15972 (win32_wait): Check for remote interrupt request
15973 with check_remote_input_interrupt_request.
15974 (win32_request_interrupt): New function.
15975 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15976
34b34921
PA
159772007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15978
15979 * win32-low.c (debug_registers_changed,
15980 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15981 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15982 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15983 (thread_rec): Get context using the low target.
15984 (child_add_thread): Call thread_added on the low target,
15985 which does the same thing.
15986 (regptr): Delete.
15987 (do_initial_child_stuff): Remove debug registers references.
15988 Set context using the low target. Resume threads after
15989 setting the contexts.
15990 (child_continue): Remove dead variable. Remove debug
15991 registers references.
15992 (child_fetch_inferior_registers): Go through the low target.
15993 (do_child_store_inferior_registers): Remove.
15994 (child_store_inferior_registers): Go through the low target.
15995 (win32_resume): Remove debug registers references.
15996 Set context using the low target.
15997 (handle_exception): Change return type to void. Don't record
15998 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15999 first chance exception.
889bf7c5 16000 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
16001 goto loop. Always return after waiting for debug event.
16002 (win32_wait): Convert to switch statement. Handle spurious
16003 events.
16004
16005 * win32-i386-low.c (debug_registers_changed,
16006 debug_registers_used): New.
16007 (initial_stuff): Rename to ...
16008 (i386_initial_stuff): ... this. Clear debug registers
16009 state variables.
16010 (store_debug_registers): Delete.
16011 (i386_get_thread_context): New.
16012 (load_debug_registers): Delete.
16013 (i386_set_thread_context): New.
16014 (i386_thread_added): New.
16015 (single_step): Rename to ...
16016 (i386_single_step): ... this.
16017 (do_fetch_inferior_registers): Rename to ...
16018 (i386_fetch_inferior_register): ... this.
16019 (i386_store_inferior_register): New.
16020 (the_low_target): Adapt to new interface.
16021
16022 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16023 (arm_get_thread_context): New.
16024 (arm_set_thread_context): New.
16025 (regptr): New.
16026 (do_fetch_inferior_registers): Rename to ...
16027 (arm_fetch_inferior_register): ... this.
16028 (arm_store_inferior_register): New.
16029 (arm_wince_breakpoint): Reimplement as unsigned long.
16030 (arm_wince_breakpoint_len): Define.
16031 (the_low_target): Adapt to new interface.
16032
16033 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16034 load_debug_registers. Add get_thread_context, set_thread_context,
16035 thread_added and store_inferior_register. Rename
16036 fetch_inferior_registers to fetch_inferior_register.
16037 (regptr): Remove declaration.
16038
dd6953e1
PA
160392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16040
16041 * linux-low.c (linux_detach): Change return type to int. Return 0.
16042 * spu-low.c (spu_detach): Likewise.
16043
444d6139
PA
160442007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16045
16046 * target.h (target_ops): Change return type of detach to int.
16047 Add join.
16048 (join_inferior): New.
16049 * server.c (main): Don't skip detach support on mingw32.
16050 If the inferior doesn't support detaching return error.
16051 Call join_inferior instead of using waitpid.
16052 * linux-low.c (linux_join): New.
16053 (linux_target_op): Add linux_join.
16054 * spu-low.c (spu_join): New.
16055 (spu_target_ops): Add spu_join.
16056 * win32-low.c (win32_detach): Adapt to new interface.
16057 Reopen current_process_handle before detaching. Issue a child
16058 resume before detaching.
16059 (win32_join): New.
16060 (win32_target_op): Add win32_join.
16061
1d5315fe
PA
160622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16063
16064 * win32-low.c (win32-attach): Fix return value.
16065 * target.h (target_ops): Describe ATTACH return values.
16066
bf914831
PA
160672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16068
16069 * win32-low.c (GETPROCADDRESS): Define.
16070 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16071 (winapi_DebugSetProcessKillOnExit): Likewise.
16072 (win32_create_inferior): Force usage of ansi CreateProcessA.
16073 (win32_attach): Use GETPROCADDRESS.
16074 (win32_detach): Likewise.
16075
f72f3e60
PA
160762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16077
16078 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16079
ed50f18f
PA
160802007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16081
16082 * win32-low.c: Commit leftover changes from 2007-03-29.
16083
0c2ead7e
DJ
160842007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16085
16086 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16087 fields short instead of int. Add explicit padding.
16088 (i387_cache_to_fsave): Remove unnecessary casts.
16089 (i387_fsave_to_cache): Doc fix.
16090 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16091
73725ff3
DJ
160922007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16093
16094 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16095 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16096
d99f33d8
PA
160972007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16098
16099 * configure.srv (arm*-*-mingw32ce*): Move near the other
16100 arm targets.
16101
68070c10
PA
161022007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16103
2482afc6 16104 * configure.ac: Add errno checking.
68070c10
PA
16105 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16106 sys/file.h and malloc.h.
16107 (AC_CHECK_DECLS): Add perror.
16108 (srv_mingwce): Handle.
2482afc6 16109 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16110 win32-i386-low.o to srv_tgtobj.
16111 (i[34567]86-*-mingw*): Likewise.
16112 (arm*-*-mingw32ce*): Add case.
16113 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16114 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16115 [__MINGW32CE__] (strerror): New function.
16116 [__MINGW32CE__] (errno): Define to GetLastError.
16117 [__MINGW32CE__] (COUNTOF): New macro.
16118 (remote_open): Remove extra close call.
16119 * mem-break.c (delete_breakpoint_at): New function.
16120 * mem-break.h (delete_breakpoint_at): Declare.
16121 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16122 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16123 [USE_WIN32API] (read, write): Add char* casts.
16124 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16125 * server.h: Include wincecompat.h on Windows CE.
16126 [HAVE_ERRNO_H]: Check.
16127 (perror): Declare if not declared.
16128 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16129 (perror_with_name): Remove errno declaration.
16130 * wincecompat.h: New.
16131 * wincecompat.c: New.
16132 * win32-low.h: New.
16133 * win32-arm-low.c: New.
16134 * win32-i386-low.c: New.
16135 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16136 (OUTMSG2): Make it safe.
16137 (_T): New macro.
16138 (COUNTOF): New macro.
16139 (NUM_REGS): Get it from the low target.
16140 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16141 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16142 (thread_rec): Let low target handle debug registers.
16143 (child_add_thread): Likewise.
16144 (child_init_thread_list): Likewise.
16145 (continue_one_thread): Likewise.
16146 (regptr): New.
16147 (do_child_fetch_inferior_registers): Move to ...
16148 * win32-i386-low.c: ... here, and rename to ...
16149 (do_fetch_inferior_registers): ... this.
889bf7c5 16150 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16151 Go through the low target.
16152 (do_child_store_inferior_registers): Use regptr.
16153 (strwinerror): New function.
16154 (win32_create_inferior): Handle Windows CE.
16155 Use strwinerror instead of strerror on Windows error
16156 codes. Add program to the error output.
16157 Don't close the main thread handle on Windows CE.
16158 (win32_attach): Use coredll.dll on Windows CE.
16159 (win32_kill): Close current process and current
16160 thread handles.
16161 (win32_detach): Use coredll.dll on Windows CE.
16162 (win32_resume): Let low target handle debug registers, and
16163 step request.
16164 (handle_exception): Add/Remove initial breakpoint. Avoid
16165 non-existant WSTOPSIG on Windows CE.
16166 (win32_read_inferior_memory): Cast to remove warning.
16167 (win32_arch_string): Go through the low target.
16168 (initialize_low): Call set_breakpoint_data with the low
16169 target's breakpoint.
16170 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16171 FOP_REGNUM, mappings): Move to ...
16172 * win32-i386-low.c: ... here.
16173 * win32-low.c (win32_thread_info): Move to ...
16174 * win32-low.h: ... here.
16175 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16176 win32-arm-low.c and wincecompat.c.
16177 (all:): Add $EXEEXT.
16178 (install-only:): Likewise.
16179 (gdbserver:): Likewise.
16180 (gdbreplay:): Likewise.
16181 * config.in: Regenerate.
16182 * configure: Regenerate.
16183
41093d81
PA
161842007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16185
16186 * win32-low.c: Rename typedef thread_info to
16187 win32_thread_info throughout.
16188
544afa54
PA
161892007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16190
16191 * win32-i386-low.c: Rename to ...
16192 * win32-low.c: ... this.
16193 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16194 * Makefile.in: Likewise.
16195
bce7165d
PA
161962007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16197
16198 * remote-utils.c (monitor_output): Constify msg parameter.
16199 * server.h (monitor_output): Likewise.
16200 * win32-i386-low.c (handle_output_debug_string): New.
16201 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16202 handle_output_debug_string.
16203 (get_child_debug_event): Likewise.
16204
506c7aa0
DJ
162052007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16206
16207 * server.c (main): Correct strtoul check.
16208
42c81e2a
DJ
162092007-03-27 Jon Ringle <jon@ringle.org>
16210
16211 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16212
9453113a
DJ
162132007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16214
16215 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16216
64a69107
DJ
162172007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16218
16219 * terminal.h: Check HAVE_SGTTY_H.
16220
162212007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16222
16223 * remote-utils.c (remote_open): Print out the assigned port number.
16224
c74d0ad8
DJ
162252007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16226
16227 * remote-utils.c (monitor_output): New function.
16228 * server.c (debug_threads): Define here.
16229 (monitor_show_help): New function.
16230 (handle_query): Handle qRcmd.
16231 (main): Do not handle 'd' packet.
16232 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16233 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16234 of debug_threads.
16235
de7c3b4a
PA
162362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16237
16238 * Makefile.in (EXEEXT): New.
16239 (clean): Use $(EXEEXT).
16240
ef57601b
PA
162412007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16242
16243 * target.h (target_ops): Rename send_signal to request_interrupt,
16244 and remove enum target_signal parameter.
16245 * linux-low.c (linux_request_interrupt): Rename from
16246 linux_send_signal, and always send SIGINT.
16247 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16248 and always send SIGINT.
16249 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16250 of send_signal.
16251 (input_interrupt): Likewise.
16252
820f2bda
PA
162532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16254
16255 * server.c (get_features_xml): Check if target implemented
16256 arch_string.
16257 * win32-i386-low.c (win32_arch_string): New.
16258 (win32_target_ops): Add win32_arch_string as arch_string member.
16259
ab39bf24
UW
162602007-02-22 Markus Deuling <deuling@de.ibm.com>
16261
16262 * spu-low.c (spu_arch_string): New.
16263 (spu_target_ops): Add spu_arch_string.
16264
61ff6e04
DJ
162652007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16266
16267 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16268 * configure.ac: Do not check for terminal.h.
16269 * configure, config.in: Regenerated.
16270
fb1e4ffc
DJ
162712007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16272
16273 * Makefile.in (OBS): Add $(XML_BUILTIN).
16274 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16275 (clean): Update.
16276 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16277 (arm-with-iwmmxt.c): New.
16278 * config.in, configure: Regenerate.
16279 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16280 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16281 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16282 (arm*-*-linux*): Add iWMMXt and regset support.
16283 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16284 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16285 (arm_store_wmmxregset, target_regsets): New.
16286 * server.c (get_features_xml): Take annex argument. Check builtin
16287 XML documents.
16288 (handle_query): Handle multiple annexes.
16289
0f48aa01
DJ
162902007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16291
16292 * remote-utils.c [USE_WIN32API] (read, write): Define.
16293 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16294 write.
16295
23181151
DJ
162962007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16297
16298 * linux-i386-low.c (the_low_target): Set arch_string.
16299 * linux-x86-64-low.c (the_low_target): Likewise.
16300 * linux-low.c (linux_arch_string): New.
16301 (linux_target_ops): Add it.
16302 * linux-low.h (struct linux_target_ops): Add arch_string.
16303 * server.c (write_qxfer_response): Use const void * for DATA.
16304 (get_features_xml): New.
16305 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16306 * target.h (struct target_ops): Add arch_string method.
16307
9d606399
DJ
163082007-01-03 Denis Pilat <denis.pilat@st.com>
16309 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * linux-low.c (linux_kill): Handle being called with no threads.
16312 * win32-i386-low.c (win32_kill): Likewise.
16313 (get_child_debug_event): Clear current_process_handle.
16314
163152006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16316 Daniel Jacobowitz <dan@codesourcery.com>
16317
16318 * remote-utils.c (remote_open): Check the type of specified
16319 serial port devices before opening them.
16320 * server.c (main): Kill the inferior if an error occurs during
16321 the first remote_open.
16322
a5e13d24
DJ
163232006-12-05 Markus Deuling <deuling@de.ibm.com>
16324
16325 * README: Update supported targets.
16326
186947f7
DJ
163272006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16328
16329 * Makefile.in (clean): Remove reg-mips64.c.
16330 (reg-mips64.c, reg-mips64.o): New rules.
16331 * configure.srv: Handle mips64. Include regset support for mips.
16332 * linux-mips-low.c (union mips_register): New.
16333 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16334 (mips_breakpoint, mips_breakpoint_at): Use int.
16335 (mips_collect_register, mips_supply_register)
16336 (mips_collect_register_32bit, mips_supply_register_32bit)
16337 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16338 (mips_store_fpregset, target_regsets): New.
16339 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16340
a13e2c95
UW
163412006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16342
16343 * configure.srv: Add target "spu*-*-*".
16344 * Makefile.in (clean): Remove reg-spu.c.
16345 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16346 * spu-low.c: New file.
16347
cb7283db
DJ
163482006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16349
16350 * configure.ac: Correct td_thr_tls_get_addr test.
16351 * configure: Regenerated.
16352
89be2091
DJ
163532006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16354
16355 * linux-low.c (linux_wait_for_event): Reformat. Use the
16356 pass_signals array.
16357 * remote-utils.c (decode_address_to_semicolon): New.
16358 * server.c (pass_signals, handle_general_set): New.
16359 (handle_query): Mention QPassSignals for qSupported.
16360 (main): Call handle_general_set.
16361 * server.h (pass_signals, decode_address_to_semicolon): New.
16362
000ef4f0
DJ
163632006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16364
16365 * server.c (handle_query): Correct error handling for read_auxv.
16366
b7149293
UW
163672005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16368
16369 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16370 and srv_linux_thread_db to yes.
16371 * linux-s390-low.c (s390_fill_gregset): New function.
16372 (target_regsets): Define data structure.
16373
dae5f5cf
DJ
163742006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16375
16376 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16377 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16378 * config.in, configure: Regenerated.
16379 * inferiors.c (gdb_id_to_thread): New function.
16380 (gdb_id_to_thread_id): Use it.
16381 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16382 * linux-low.h (struct process_info): Add th member.
16383 (thread_db_get_tls_address): New prototype.
16384 * remote-utils.c (decode_address): Make non-static.
16385 * server.c (handle_query): Handle qGetTLSAddr.
16386 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16387 * target.h (struct target_ops): Add get_tls_address.
16388 * thread-db.c (maybe_attach_thread): Save the thread handle.
16389 (thread_db_get_tls_address): New.
16390
32ca6d61
DJ
163912006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16392
16393 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16394 (linux_resume_one_process): Take a siginfo_t *. Update all
16395 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16396 (struct pending_signals): Add a siginfo_t.
16397 (linux_wait_for_process): Always set last_status.
16398 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16399 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16400 * linux-low.h (struct process_info): Add last_status.
16401
5ffff7c1
DJ
164022006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16403
16404 * remote-utils.c (try_rle): New function.
16405 (putpkt_binary): Use it.
16406
8695c747
DJ
164072006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16408
16409 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16410 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16411 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16412 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16413 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16414 point registers.
16415
290fadea
RS
164162006-08-08 Richard Sandiford <richard@codesourcery.com>
16417
16418 * server.c (terminal_fd): New variable.
16419 (old_foreground_pgrp): Likewise.
16420 (restore_old_foreground_pgrp): New function.
16421 (start_inferior): Record the terminal file descriptor in terminal_fd
16422 and its original foreground group in old_foreground_pgrp. Register
16423 restore_old_foreground_pgrp with atexit().
16424
9f2e1e63
DJ
164252006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16426
16427 * server.c (handle_query): Correct qPart to qXfer.
16428
b80864fb
DJ
164292006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16430
16431 * configure.ac: Check for more headers which are missing on
16432 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16433 * configure.srv: Add Cygwin and mingw32.
16434 * remote-utils.c: Don't include headers unconditionally which
16435 are missing on mingw32. Include <winsock.h> for mingw32.
16436 (remote_open): Adjust for mingw32 support. Flush
16437 standard error after writing to it.
16438 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16439 (unblock_async_io, enable_async_io, disable_async_io)
16440 (readchar, getpkt): Update for Winsock support.
16441 (prepare_resume_reply): Expect a protocol signal number.
16442 * server.c: Disable <sys/wait.h> on mingw32.
16443 (start_inferior): Adjust for mingw32 support. Flush
16444 standard error after writing to it.
16445 (attach_inferior): Likewise. Use protocol signal
16446 numbers.
16447 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16448 and names.
16449 * win32-i386-low.c: New file.
16450 * Makefile.in (XM_CLIBS): Set.
16451 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16452 (win32-i386-low.o): New dependency rule.
16453 * linux-low.c (linux_wait): Use target signal numbers.
16454 * target.h (struct target_ops): Doc fix.
16455 * server.h (target_signal_to_name): New prototype.
16456 * gdbreplay.c: Don't include headers unconditionally which
16457 are missing on mingw32. Include <winsock.h> for mingw32.
16458 (remote_close, remote_open): Adjust for Winsock support.
16459 * configure, config.in: Regenerated.
16460
0876f84a
DJ
164612006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16462
16463 * server.c (decode_xfer_read, write_qxfer_response): New.
16464 (handle_query): Take a packet length argument. Handle
16465 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16466 the qSupported response.
16467 (main): Update call to handle_query.
16468
01f9e8fa
DJ
164692006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16470
16471 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16472 (putpkt_binary): Renamed from putpkt and adjusted for binary
16473 data.
16474 (putpkt): New wrapper for putpkt_binary.
16475 (readchar): Don't mask off the high bit.
16476 (decode_X_packet): New function.
16477 * server.c (main): Call putpkt_binary if a handler sets the packet
16478 length. Save the length of the incoming packet. Handle 'X'.
16479 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16480
be2a5f71
DJ
164812006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16482
16483 * server.c (handle_query): Handle qSupported.
16484
ea025f5f
DJ
164852006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16486
16487 * remote-utils.c (all_symbols_looked_up): New variable.
16488 (look_up_one_symbol): Check it.
16489 * server.h (look_up_one_symbol): New declaration.
16490 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16491
9308fc88
DJ
164922006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16493
16494 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16495 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16496 (PTRACE_GET_THREAD_AREA): Define.
16497 (ps_get_thread_area): New function.
16498
52fb6437
NS
164992006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16500
16501 * configure.srv (m68k*-*-uclinux*): New target.
16502 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16503 (linux_resume_one_process): Remove extraneous cast.
16504 (linux_read_offsets): New.
16505 (linux_target_op): Add linux_read_offsets on mmuless systems.
16506 * server.c (handle_query): Add qOffsets logic.
16507 * target.h (struct target_ops): Add read_offsets.
16508
21b0f40c
DJ
165092006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16512 (PTRACE_GET_THREAD_AREA): Define.
16513 (ps_get_thread_area): New function.
16514 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16515 (linux-x86-64-low.o): Update.
16516
0050a760
DJ
165172006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16518
16519 * configure.ac: Remove checks for prfpregset_t.
16520 * gdb_proc_service.h: New file.
16521 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16522 new "gdb_proc_service.h".
16523 * proc-service.c: Likewise.
16524 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16525 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16526 * Makefile.in (gdb_proc_service_h): Updated.
16527 * configure, config.in: Regenerated.
16528
b92a518e
DJ
165292006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16530
16531 * remote-utils.c (prepare_resume_reply): Move declaration
16532 of gdb_id_from_wait to the top of the block.
16533
545587ee
DJ
165342006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16535
16536 * linux-low.c (regsets_store_inferior_registers): Read the regset
16537 from the target before filling it.
16538
9db87ebd
DJ
165392006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16540
16541 * server.c (attach_inferior): Return SIGTRAP for a successful
16542 attach.
16543
dd24457d
DJ
165442006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16545
16546 * Makefile.in (OBS): Add version.o.
16547 (STAGESTUFF): Delete.
16548 (version.o): Add dependencies.
16549 (version.c): Replace rule.
16550 (clean): Remove version.c.
16551 * server.c (gdbserver_version): New.
16552 (gdbserver_usage): Use printf.
16553 (main): Handle --version and --help.
16554 * server.h (version, host_name): Add declarations.
16555
6f0f660e
EZ
165562005-12-23 Eli Zaretskii <eliz@gnu.org>
16557
889bf7c5
PA
16558 * linux-arm-low.c:
16559 * linux-arm-low.c:
16560 * inferiors.c:
16561 * i387-fp.h:
16562 * i387-fp.c:
16563 * gdbreplay.c:
16564 * regcache.c:
16565 * proc-service.c:
16566 * mem-break.h:
16567 * mem-break.c:
16568 * linux-x86-64-low.c:
16569 * linux-sh-low.c:
16570 * linux-s390-low.c:
16571 * linux-ppc64-low.c:
16572 * linux-ppc-low.c:
16573 * linux-mips-low.c:
16574 * linux-m68k-low.c:
16575 * linux-m32r-low.c:
16576 * linux-low.h:
16577 * linux-low.c:
16578 * linux-ia64-low.c:
16579 * linux-i386-low.c:
16580 * linux-crisv32-low.c:
16581 * thread-db.c:
16582 * terminal.h:
16583 * target.h:
16584 * target.c:
16585 * server.h:
16586 * server.c:
16587 * remote-utils.c:
16588 * regcache.h:
16589 * utils.c:
16590 * Makefile.in:
16591 * configure.ac:
6f0f660e
EZ
16592 * gdbserver.1: Add (C) after Copyright. Update the FSF
16593 address.
16594
9d1fb177
DJ
165952005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16596
16597 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16598 (arm_breakpoint_at): Recognize both breakpoints.
16599 (the_low_target): Use the correct breakpoint instruction.
16600
011a70c2
DJ
166012005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16602
16603 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16604 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16605 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16606 (the_low_target): Update.
16607
7fb85e41
AS
166082005-10-25 Andreas Schwab <schwab@suse.de>
16609
16610 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16611
16612 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16613 (ia64_num_regs): Reduce to 462.
16614
3db0444b
DJ
166152005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16616
16617 * acinclude.m4: Correct quoting.
16618 * aclocal.m4: Regenerated.
16619
16620 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16621 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16622 (thread_db_init): Call thread_db_err_str.
16623 * configure.ac: Check for TD_VERSION.
16624 * config.in, configure: Regenerated.
16625
bee0189a
DJ
166262005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16627
16628 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16629
e9d25b98
DJ
166302005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16631
16632 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16633 is not available. Define HAVE_PTRACE_GETREGS if it is.
16634 * config.in, configure: Regenerated.
16635 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16636 * linux-i386-low.c, linux-m68k-low.c: Update to use
16637 HAVE_PTRACE_GETREGS.
16638 * linux-low.c (regsets_fetch_inferior_registers)
16639 (regsets_store_inferior_registers): Only return 0 if we processed
16640 GENERAL_REGS.
16641 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16642 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16643
a06660f7
DJ
166442005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16645
16646 * inferiors.c (struct thread_info): Add gdb_id.
16647 (add_thread): Add gdb_id argument.
16648 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16649 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16650 calls to add_thread.
16651 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16652 * server.c (handle_query): Use thread_to_gdb_id.
16653 (handle_v_cont, main): Use gdb_id_to_thread_id.
16654 * server.h (add_thread): Update prototype.
16655 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16656 prototypes.
16657
5a1f5858
DJ
166582005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16659
16660 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16661 left-padded registers.
16662 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16663 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16664
e122f1f5
SE
166652005-07-01 Steve Ellcey <sje@cup.hp.com>
16666
16667 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16668 * configure: Regenerate.
16669 * config.in: Regenerate.
16670 * server.h (NEED_DECLARATION_STRERROR):
16671 Replace with !HAVE_DECL_STRERROR.
16672
d592fa2f
DJ
166732005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16674
16675 * linux-low.c (linux_wait, linux_send_signal): Don't test
16676 an unsigned long variable for > 0 if it could be MAX_ULONG.
16677 * server.c (myresume): Likewise.
16678 * target.c (set_desired_inferior): Likewise.
16679
ccbd4912
MK
166802005-06-13 Mark Kettenis <kettenis@gnu.org>
16681
16682 * configure.ac: Simplify and improve check for socklen_t.
16683 * configure, config.in: Regenerate.
16684
f450004a
DJ
166852005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16686
16687 * acconfig.h: Remove.
16688 * configure.ac: Add a test for socklen_t. Use three-argument
16689 AC_DEFINE throughout.
16690 * config.in: Regenerated using autoheader 2.59.
16691 * configure: Regenerated.
16692
16693 * gdbreplay.c (socklen_t): Provide a default.
16694 (remote_open): Use socklen_t.
16695 * remote-utils.c (socklen_t): Provide a default.
16696 (remote_open): Use socklen_t.
16697 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16698 unsigned char.
16699
16700 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16701 char for buffers.
16702 * linux-low.c (linux_read_memory, linux_write_memory)
16703 (linux_read_auxv): Likewise.
16704 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16705 (check_mem_write): Likewise.
16706 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16707 Likewise.
16708 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16709 (registers_from_string, register_data): Likewise.
16710 * server.c (handle_query, main): Likewise.
16711 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16712 (decode_M_packet): Likewise.
16713 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16714 * target.h (struct target_ops): Update read_memory, write_memory,
16715 and read_auxv.
16716 (read_inferior_memory, write_inferior_memory): Update.
16717 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16718 to unsigned char *.
16719 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16720 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16721 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16722 linux-s390-low.c, linux-sh-low.c: Update for changes in
16723 read_inferior_memory and the_low_target->breakpoint.
16724
eee84df1
DJ
167252005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16726
16727 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16728 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16729 * configure.srv: Add powerpc64-*-linux*.
16730 * linux-ppc64-low.c: New file.
16731
45b134e5
OF
167322005-05-23 Orjan Friberg <orjanf@axis.com>
16733
16734 * linux-cris-low.c: New file with support for CRIS.
16735 * linux-crisv32-low.c: Ditto for CRISv32.
16736 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16737 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16738 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16739 reg-crisv32.o, and reg-crisv32.c to make rules.
16740 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16741 recognized targets.
16742
48d93c75
UW
167432005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16744
16745 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16746 of sizeof (PTRACE_XFER_TYPE).
16747 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16748
e013ee27
OF
167492005-05-12 Orjan Friberg <orjanf@axis.com>
16750
889bf7c5 16751 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16752 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16753 pointers for hardware watchpoint support.
16754 * linux-low.h (struct linux_target_ops): Ditto.
16755 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16756 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16757 to linux_target_ops.
16758 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16759 reply packet.
16760 * server.c (main): Recognize 'Z' and 'z' packets.
16761
b0ded00b
UW
167622005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16763
16764 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16765 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16766 (the_low_target): Add new members.
16767
8643e2ad
DJ
167682005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16769
16770 * proc-service.c (ps_lgetregs): Search all_processes instead of
16771 all_threads.
16772
fc620387
DJ
167732005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16774
16775 * server.c (start_inferior): Change return type to int.
16776 (attach_inferior): Change sigptr to int *.
16777 (handle_v_cont, handle_v_requests): Change signal to int *.
16778 (main): Change signal to int.
16779
167802005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16781
16782 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16783 * configure.srv: Add m32r*-*-linux*.
16784 * linux-m32r-low.c: New file.
16785
e0e76420
DJ
167862005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16787
16788 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16789
a1928bad
DJ
167902005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16791
16792 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16793 Take unsigned long arguments for PIDs.
16794 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16795 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16796 (wait_for_sigstop, linux_resume_one_process)
16797 (regsets_fetch_inferior_registers, linux_send_signal)
16798 (linux_read_auxv): Likewise. Update the types of variables holding
16799 PIDs. Update format string specifiers.
16800 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16801 * remote-utils.c (prepare_resume_reply): Likewise.
16802 * server.c (cont_thread, general_thread, step_thread)
16803 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16804 unsigned long.
16805 (handle_query): Update format specifiers.
16806 (handle_v_cont, main): Use strtoul for thread IDs.
16807 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16808 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16809 (general_thread, step_thread, thread_from_wait)
16810 (old_thread_from_wait): Update.
16811 * target.h (struct thread_resume): Use unsigned long for THREAD.
16812 (struct target_ops): Use unsigned long for arguments to attach and
16813 thread_alive.
16814
dcdb98d2
DJ
168152005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16816
16817 * acinclude.m4: Include bfd/bfd.m4 directly.
16818 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16819 <agriffis@toolchain.org>.
16820 * aclocal.m4, configure: Regenerated.
16821
bec39cab
AC
168222005-01-07 Andrew Cagney <cagney@gnu.org>
16823
16824 * configure.ac: Rename configure.in, require autoconf 2.59.
16825 * configure: Re-generate.
16826
434c4c77
DJ
168272004-12-08 Daniel Jacobowitz <dan@debian.org>
16828
16829 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16830 LIBS when finished.
16831 * aclocal.m4: Regenerated.
16832 * configure: Regenerated.
16833
db1d3e1b
AS
168342004-11-21 Andreas Schwab <schwab@suse.de>
16835
16836 * linux-m68k-low.c (m68k_num_gregs): Define.
16837 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16838 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16839 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16840 (m68k_breakpoint_at): New. Add to the_low_target.
16841
16842 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16843 srv_linux_thread_db to yes.
16844
43360365
JB
168452004-10-20 Joel Brobecker <brobecker@gnat.com>
16846
16847 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16848 (ARCH_SET_FS): Likewise.
16849 (ARCH_GET_FS): Likewise.
16850 (ARCH_GET_GS): Likewise.
16851
fd500816
DJ
168522004-10-16 Daniel Jacobowitz <dan@debian.org>
16853
16854 * linux-i386-low.c (ps_get_thread_area): New.
16855 * linux-x86-64-low.c (ps_get_thread_area): New.
16856 * linux-low.c: Include <sys/syscall.h>.
16857 (linux_kill_one_process): Don't kill the first thread here.
16858 (linux_kill): Kill the first thread here.
16859 (kill_lwp): New function.
16860 (send_sigstop, linux_send_signal): Use it.
16861 * proc-service.c: Clean up #ifdefs.
16862 (fpregset_info): Delete.
16863 (ps_lgetregs): Update and enable implementation.
16864 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16865 implementations.
16866 * remote-utils.c (struct sym_cache, symbol_cache): New.
16867 (input_interrupt): Print a clearer message.
16868 (async_io_enabled): New variable.
16869 (enable_async_io, disable_async_io): Use it. Update comments.
16870 (look_up_one_symbol): Use the symbol cache.
16871 * thread-db.c (thread_db_look_up_symbols): New function.
16872 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16873
f6de3c42
DJ
168742004-10-16 Daniel Jacobowitz <dan@debian.org>
16875
16876 * configure.in: Test for -rdynamic.
16877 * configure: Regenerated.
16878 * Makefile (INTERNAL_LDFLAGS): New.
16879 (gdbserver, gdbreplay): Use it.
16880
2c0fc042
AC
168812004-09-02 Andrew Cagney <cagney@gnu.org>
16882
16883 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16884
075b3282
DJ
168852004-03-23 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * linux-low.c (linux_wait): Clear all_processes list also.
16888
fa6a77dc
DJ
168892004-03-12 Daniel Jacobowitz <drow@mvista.com>
16890
16891 * linux-low.c: Include <errno.h>. Remove extern declaration of
16892 errno.
16893
6d782a97
DJ
168942004-03-12 Daniel Jacobowitz <drow@mvista.com>
16895
16896 * gdbreplay.c, server.h, utils.c: Update copyright years.
16897
3a7fb99b
DJ
168982004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16899
16900 * server.c (main): Print child status or termination signal from
16901 variable 'signal', not 'sig'.
16902
c3e735a6
DJ
169032004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16904
16905 * linux-low.c (linux_read_memory): Change return type to
16906 int. Check for and return error from ptrace().
16907 * target.c (read_inferior_memory): Change return type to int. Pass
16908 back return status from the_target->read_memory().
16909 * target.h (struct target_ops): Adapt *read_memory() prototype.
16910 Update comment.
16911 (read_inferior_memory): Adapt prototype.
16912 * server.c (main): Return an error packet if
16913 read_inferior_memory() returns an error.
16914
a59d1c82
DJ
169152004-03-04 Daniel Jacobowitz <drow@mvista.com>
16916
16917 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16918 Unify with other clean targets.
16919
dc3f8883
DJ
169202004-02-29 Daniel Jacobowitz <drow@mvista.com>
16921
16922 * server.c (handle_v_cont): Call set_desired_inferior.
16923
89a208da
DJ
169242004-02-29 Daniel Jacobowitz <drow@mvista.com>
16925
16926 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16927
62ea82f5
DJ
169282004-02-29 Daniel Jacobowitz <drow@mvista.com>
16929
16930 * linux-low.c (linux_wait): Unblock async I/O.
16931 (linux_resume): Block and enable async I/O.
16932 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16933 * server.h (block_async_io, unblock_async_io): Add prototypes.
16934
6910d122
DJ
169352004-02-29 Daniel Jacobowitz <drow@mvista.com>
16936
16937 * remote-utils.c (remote_open): Print a status notice after
16938 opening a TCP port.
16939 * server.c (attach_inferior): Print a status notice after
16940 attaching.
16941
169422004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16943
16944 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16945
c89dc5d4
DJ
169462004-02-26 Daniel Jacobowitz <drow@mvista.com>
16947
16948 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16949 error packet.
16950 * server.c, target.h: Update copyright years.
16951
4b8dad4a
RM
169522004-02-25 Roland McGrath <roland@redhat.com>
16953
16954 * target.h (struct target_ops): New member `read_auxv'.
16955 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16956 * linux-low.c (linux_read_auxv): New function.
16957 (linux_target_ops): Initialize `read_auxv' member to that.
16958
d7446758
JB
169592004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16960
16961 Committed by Jim Blandy <jimb@redhat.com>.
16962
16963 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16964 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16965 instead of GPR_SIZE to distiguish s390 and s390x targets.
16966
5544ad89
DJ
169672004-01-31 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * linux-low.c: Update copyright year.
16970 (check_removed_breakpoint): Clear pending_is_breakpoint.
16971 (linux_set_resume_request, linux_queue_one_thread)
16972 (resume_status_pending_p): New functions.
16973 (linux_continue_one_thread): Use process->resume.
16974 (linux_resume): Only resume threads if there are no pending events.
16975 * linux-low.h (struct process_info): Add resume request
16976 pointer.
16977
2a68b70e
DJ
169782004-01-30 Daniel Jacobowitz <drow@mvista.com>
16979
16980 * regcache.c (new_register_cache): Clear the allocated register
16981 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16982
64386c31
DJ
169832003-10-13 Daniel Jacobowitz <drow@mvista.com>
16984
16985 * linux-low.c (linux_resume): Take a struct thread_resume *
16986 argument.
16987 (linux_wait): Update call.
16988 (resume_ptr): New static variable.
16989 (linux_continue_one_thread): Renamed from
16990 linux_continue_one_process. Use resume_ptr.
16991 (linux_resume): Use linux_continue_one_thread.
16992 * server.c (handle_v_cont, handle_v_requests): New functions.
16993 (myresume): New function.
16994 (main): Handle 'v' case.
16995 * target.h (struct thread_resume): New type.
16996 (struct target_ops): Change argument of "resume" to struct
16997 thread_resume *.
16998 (myresume): Delete macro.
16999
c938e9b0
L
170002003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17001
17002 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17003 (uninstall): Support DESTDIR.
17004
7f313d07
BC
17005Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17006
17007 * configure.srv: Add xscale*linux copy of arm*linux entry.
17008
3b2fc2ea
DJ
170092003-07-24 Daniel Jacobowitz <drow@mvista.com>
17010
17011 * linux-arm-low.c (arm_reinsert_addr): New function.
17012 (the_low_target): Add arm_reinsert_addr.
17013
1c0a559e
MK
170142003-07-08 Mark Kettenis <kettenis@gnu.org>
17015
17016 * mem-break.c: Remove whitespace at end of file.
17017
43d5792c
DJ
170182003-06-28 Daniel Jacobowitz <drow@mvista.com>
17019
17020 * configure.in: Check whether we need to prototype strerror.
17021 * server.h: Optionally prototype strerror.
17022 * gdbreplay.c (perror_with_name): Use strerror.
17023 * linux-low.c (linux_attach_lwp): Use strerror.
17024 * utils.c (perror_with_name): Use strerror.
17025 * config.in, configure: Regenerated.
17026
c8a86edf
DJ
170272003-06-28 Daniel Jacobowitz <drow@mvista.com>
17028
17029 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17030 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17031
73d37363
DJ
170322003-06-20 Daniel Jacobowitz <drow@mvista.com>
17033
17034 * Makefile.in (SFILES): Update.
17035 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17036 low-sun3.c: Remove files.
17037
6ad8ae5c
DJ
170382003-06-17 Daniel Jacobowitz <drow@mvista.com>
17039
17040 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17041 (linux_detach_one_process, linux_detach): New functions.
17042 (linux_target_ops): Add linux_detach.
17043 * server.c (main): Handle 'D' packet.
17044 * target.h (struct target_ops): Add "detach" member.
17045 (detach_inferior): Define.
17046
1581182a
MK
170472003-06-13 Mark Kettenis <kettenis@gnu.org>
17048
17049 From Kelley Cook <kelleycook@wideopenwest.com>:
17050 * configure.srv: Accept i[34567]86 variants.
17051
e5379b03
DJ
170522003-06-05 Daniel Jacobowitz <drow@mvista.com>
17053
17054 * linux-low.c (linux_wait_for_event): Correct comment typos.
17055 (linux_resume_one_process): Call check_removed_breakpoint.
17056 (linux_send_signal): New function.
17057 (linux_target_ops): Add linux_send_signal.
17058 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17059 of kill.
17060 * target.h (struct target_ops): Add send_signal.
17061
2ff29de4
JB
170622003-05-29 Jim Blandy <jimb@redhat.com>
17063
17064 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17065 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17066 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17067 away part of the register's value.
17068
254787d4
DJ
170692003-03-26 Daniel Jacobowitz <drow@mvista.com>
17070
17071 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17072 (linux_wait_for_event, linux_init_signals): Likewise.
17073
94e10508
DJ
170742003-03-17 Daniel Jacobowitz <drow@mvista.com>
17075
17076 * configure.in: Check for stdlib.h.
17077 * configure: Regenerated.
17078 * config.in: Regenerated.
17079
4c0711e0
DJ
170802003-01-04 Andreas Schwab <schwab@suse.de>
17081
17082 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17083
ef66e766
AC
170842003-01-02 Andrew Cagney <ac131313@redhat.com>
17085
17086 * Makefile.in: Remove obsolete code.
17087
a1358604
DJ
170882002-11-20 Daniel Jacobowitz <drow@mvista.com>
17089
17090 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17091 defined(PT_FPR0_HI).
17092
23ce3b1c
DJ
170932002-11-17 Stuart Hughes <seh@zee2.com>
17094
17095 * linux-arm-low.c (arm_num_regs): Increase.
17096 (arm_regmap): Include status register.
17097
170982002-11-17 Daniel Jacobowitz <drow@mvista.com>
17099
17100 * linux-low.c (register_addr): Remove incorrect -1 check.
17101
a9fa9f7d
DJ
171022002-08-29 Daniel Jacobowitz <drow@mvista.com>
17103
17104 * linux-low.c (linux_create_inferior): Call setpgid. Return
17105 the new PID.
17106 (unstopped_p, linux_signal_pid): Remove.
17107 (linux_target_ops): Remove linux_signal_pid.
17108 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17109 global instead of target method.
17110 * target.h (struct target_ops): Remove signal_pid. Update comment
17111 for create_inferior.
17112 * server.c (signal_pid): New variable.
17113 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17114 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17115 (attach_inferior): Set signal_pid.
17116
17574093
DJ
171172002-08-23 Daniel Jacobowitz <drow@mvista.com>
17118
17119 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17120
171212002-08-20 Jim Blandy <jimb@redhat.com>
17122
17123 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17124 default for this.
17125
171262002-08-01 Andrew Cagney <cagney@redhat.com>
17127
17128 * Makefile.in: Make chill references obsolete.
17129
171302002-07-24 Kevin Buettner <kevinb@redhat.com>
17131
17132 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17133 * configure: Regenerate.
17134 * config.in: Regenerate.
17135
171362002-07-09 David O'Brien <obrien@FreeBSD.org>
17137
17138 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17139 (perror_with_name, remote_close, remote_open, expect, play): Static.
17140
171412002-07-04 Michal Ludvig <mludvig@suse.cz>
17142
4b8dad4a 17143 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17144 byte offsets instead of an array of indexes.
17145 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17146
171472002-06-13 Daniel Jacobowitz <drow@mvista.com>
17148
17149 * regcache.c: Add comment.
17150
171512002-06-11 Daniel Jacobowitz <drow@mvista.com>
17152
17153 * thread-db.c: New file.
17154 * proc-service.c: New file.
17155 * acinclude.m4: New file.
17156 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17157 proc-service.o, and thread-db.o.
17158 (linux-low.o): Add USE_THREAD_DB.
17159 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17160 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17161 * aclocal.m4: Regenerated.
17162 * config.in: Regenerated.
17163 * configure: Regenerated.
17164 * configure.in: Check for proc_service.h, sys/procfs.h,
17165 thread_db.h, and linux/elf.h headrs.
17166 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17167 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17168 Check for -lthread_db and thread support.
17169 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17170 PowerPC, and SuperH.
17171 * i387-fp.c: Constify arguments.
17172 * i387-fp.h: Likewise.
17173 * inferiors.c: (struct thread_info): Renamed from
17174 `struct inferior_info'. Remove PID member. Use generic inferior
17175 list header. All uses updated.
17176 (inferiors, signal_pid): Removed.
17177 (all_threads): New variable.
17178 (get_thread): Define.
17179 (add_inferior_to_list): New function.
17180 (for_each_inferior): New function.
17181 (change_inferior_id): New function.
17182 (add_inferior): Removed.
17183 (remove_inferior): New function.
17184 (add_thread): New function.
17185 (free_one_thread): New function.
17186 (remove_thread): New function.
17187 (clear_inferiors): Use for_each_inferior and free_one_thread.
17188 (find_inferior): New function.
17189 (find_inferior_id): New function.
17190 (inferior_target_data): Update argument type.
17191 (set_inferior_target_data): Likewise.
17192 (inferior_regcache_data): Likewise.
17193 (set_inferior_regcache_data): Likewise.
17194 * linux-low.c (linux_bp_reinsert): Remove.
17195 (all_processes, stopping_threads, using_thrads)
17196 (struct pending_signals, debug_threads, pid_of): New.
17197 (inferior_pid): Replace with macro.
17198 (struct inferior_linux_data): Remove.
17199 (get_stop_pc, add_process): New functions.
17200 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17201 Use add_process and add_thread.
17202 (linux_attach_lwp): New function, based on old linux_attach. Use
17203 add_process and add_thread. Set stop_expected for new threads.
17204 (linux_attach): New function.
17205 (linux_kill_one_process): New function.
17206 (linux_kill): Kill all LWPs.
17207 (linux_thread_alive): Use find_inferior_id.
17208 (check_removed_breakpoints, status_pending_p): New functions.
17209 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17210 Update. Use WNOHANG. Wait for cloned processes also. Update process
17211 struct for the found process.
17212 (linux_wait_for_event): New function.
17213 (linux_wait): Use it. Support LWPs.
17214 (send_sigstop, wait_for_sigstop, stop_all_processes)
17215 (linux_resume_one_process, linux_continue_one_process): New functions.
17216 (linux_resume): Support LWPs.
17217 (REGISTER_RAW_SIZE): Remove.
17218 (fetch_register): Use register_size instead. Call supply_register.
17219 (usr_store_inferior_registers): Likewise. Call collect_register.
17220 Fix recursive case.
17221 (regsets_fetch_inferior_registers): Improve error message.
17222 (regsets_store_inferior_registers): Add debugging.
17223 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17224 (unstopped_p, linux_signal_pid): New functions.
17225 (linux_target_ops): Add linux_signal_pid.
17226 (linux_init_signals): New function.
17227 (initialize_low): Call it. Initialize using_threads.
17228 * regcache.c (inferior_regcache_data): Add valid
17229 flag.
17230 (get_regcache): Fetch registers lazily. Add fetch argument
17231 and update all callers.
17232 (regcache_invalidate_one, regcache_invalidate): New
17233 functions.
17234 (new_register_cache): Renamed from create_register_cache.
17235 Return the new regcache.
17236 (free_register_cache): Change argument to a void *.
17237 (registers_to_string, registers_from_string): Call get_regcache
17238 with fetch flag set.
17239 (register_data): Make static. Pass fetch flag to get_regcache.
17240 (supply_register): Call get_regcache with fetch flag clear.
17241 (collect_register): Call get_regcache with fetch flag set.
17242 (collect_register_as_string): New function.
17243 * regcache.h: Update.
17244 * remote-utils.c (putpkt): Flush after debug output and use
17245 stderr.
17246 Handle input interrupts while waiting for an ACK.
17247 (input_interrupt): Use signal_pid method.
17248 (getpkt): Flush after debug output and use stderr.
17249 (outreg): Use collect_register_as_string.
17250 (new_thread_notify, dead_thread_notify): New functions.
17251 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17252 and general_thread.
17253 (look_up_one_symbol): Flush after debug output.
17254 * server.c (step_thread, server_waiting): New variables.
17255 (start_inferior): Don't use signal_pid. Update call to mywait.
17256 (attach_inferior): Update call to mywait.
17257 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17258 (main): Don't fetch/store registers explicitly. Use
17259 set_desired_inferior. Support proposed ``Hs'' packet. Update
17260 calls to mywait.
17261 * server.h: Update.
17262 (struct inferior_list, struct_inferior_list_entry): New.
17263 * target.c (set_desired_inferior): New.
17264 (write_inferior_memory): Constify.
17265 (mywait): New function.
17266 * target.h: Update.
17267 (struct target_ops): New signal_pid method.
17268 (mywait): Removed macro, added prototype.
17269
17270 * linux-low.h (regset_func): Removed.
17271 (regset_fill_func, regset_store_func): New.
17272 (enum regset_type): New.
17273 (struct regset_info): Add type field. Use new operation types.
17274 (struct linux_target_ops): stop_pc renamed to get_pc.
17275 Add decr_pc_after_break and breakpoint_at.
17276 (get_process, get_thread_proess, get_process_thread)
17277 (strut process_info, all_processes, linux_attach_lwp)
17278 (thread_db_init): New.
17279
17280 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17281 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17282 (the_low_target): Add new members.
17283 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17284 (i386_store_fpxregset): Constify.
17285 (target_regsets): Add new kind identifier.
17286 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17287 (i386_set_pc): Add debugging.
17288 (i386_breakpoint_at): New function.
17289 (the_low_target): Add new members.
17290 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17291 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17292 (mips_breakpoint_at): New.
17293 (the_low_target): Add new members.
17294 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17295 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17296 (the_low_target): Add new members.
17297 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17298 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17299 (the_low_target): Add new members.
17300 * linux-x86-64-low.c (target_regsets): Add new kind
17301 identifier.
17302
173032002-05-15 Daniel Jacobowitz <drow@mvista.com>
17304
17305 From Martin Pool <mbp@samba.org>:
17306 * server.c (gdbserver_usage): New function.
17307 (main): Call it.
17308
173092002-05-14 Daniel Jacobowitz <drow@mvista.com>
17310
17311 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17312 stop_at -> stop_pc.
17313
173142002-05-04 Andrew Cagney <ac131313@redhat.com>
17315
17316 * Makefile.in: Remove obsolete code.
17317
173182002-04-24 Michal Ludvig <mludvig@suse.cz>
17319
17320 * linux-low.c (regsets_fetch_inferior_registers),
17321 (regsets_store_inferior_registers): Removed cast to int from
17322 ptrace() calls.
17323 * regcache.h: Added declaration of struct inferior_info.
17324
173252002-04-20 Daniel Jacobowitz <drow@mvista.com>
17326
17327 * inferiors.c (struct inferior_info): Add regcache_data.
17328 (add_inferior): Call create_register_cache.
17329 (clear_inferiors): Call free_register_cache.
17330 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17331 * regcache.c (struct inferior_regcache_data): New.
17332 (registers): Remove.
17333 (get_regcache): New function.
17334 (create_register_cache, free_register_cache): New functions.
17335 (set_register_cache): Don't initialize the register cache here.
17336 (registers_to_string, registers_from_string, register_data): Call
17337 get_regcache.
17338 * regcache.h: Add prototypes.
17339 * server.h: Likewise.
17340
173412002-04-20 Daniel Jacobowitz <drow@mvista.com>
17342
17343 * mem-break.c: New file.
17344 * mem-break.h: New file.
17345 * Makefile.in: Add mem-break.o rule; update server.h
17346 dependencies.
17347 * inferiors.c (struct inferior_info): Add target_data
17348 member.
17349 (clear_inferiors): Free target_data member if set.
17350 (inferior_target_data, set_inferior_target_data): New functions.
17351 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17352 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17353 * linux-low.c (linux_bp_reinsert): New variable.
17354 (struct inferior_linux_data): New.
17355 (linux_create_inferior): Use set_inferior_target_data.
17356 (linux_attach): Likewise. Call add_inferior.
17357 (linux_wait_for_one_inferior): New function.
17358 (linux_wait): Call it.
17359 (linux_write_memory): Add const.
17360 (initialize_low): Call set_breakpoint_data.
17361 * linux-low.h (struct linux_target_ops): Add breakpoint
17362 handling members.
17363 * server.c (attach_inferior): Remove extra add_inferior
17364 call.
17365 * server.h: Include mem-break.h. Update inferior.c
17366 prototypes.
17367 * target.c (read_inferior_memory)
17368 (write_inferior_memory): New functions.
17369 * target.h (read_inferior_memory)
17370 (write_inferior_memory): Change macros to prototypes.
17371 (struct target_ops): Update comments. Add const to write_memory
17372 definition.
17373
173742002-04-11 Daniel Jacobowitz <drow@mvista.com>
17375
17376 * linux-low.c (usr_store_inferior_registers): Support
17377 registers which are allowed to fail to store.
17378 * linux-low.h (linux_target_ops): Likewise.
17379 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17380 (ppc_cannot_store_register): FPSCR may not be storable.
17381
173822002-04-09 Daniel Jacobowitz <drow@mvista.com>
17383
17384 * server.h: Include <string.h> if HAVE_STRING_H.
17385 * ChangeLog: Correct paths in last ChangeLog entry.
17386
173872002-04-09 Daniel Jacobowitz <drow@mvista.com>
17388
17389 * linux-low.h: Remove obsolete prototypes.
17390 (struct linux_target_ops): New.
17391 (extern the_low_target): New.
17392 * linux-low.c (num_regs, regmap): Remove declarations.
17393 (register_addr): Use the_low_target explicitly.
17394 (fetch_register): Likewise.
17395 (usr_fetch_inferior_registers): Likewise.
17396 (usr_store_inferior_registers): Likewise.
17397 * linux-arm-low.c (num_regs): Remove.
17398 (arm_num_regs): Define.
17399 (arm_regmap): Renamed from regmap, made static.
17400 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17401 made static.
17402 (arm_cannot_store_register): Renamed from cannot_store_register,
17403 made static.
17404 (the_low_target): New.
17405 * linux-i386-low.c (num_regs): Remove.
17406 (i386_num_regs): Define.
17407 (i386_regmap): Renamed from regmap, made static.
17408 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17409 made static.
17410 (i386_cannot_store_register): Renamed from cannot_store_register,
17411 made static.
17412 (the_low_target): New.
17413 * linux-ia64-low.c (num_regs): Remove.
17414 (ia64_num_regs): Define.
17415 (ia64_regmap): Renamed from regmap, made static.
17416 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17417 made static.
17418 (ia64_cannot_store_register): Renamed from cannot_store_register,
17419 made static.
17420 (the_low_target): New.
17421 * linux-m68k-low.c (num_regs): Remove.
17422 (m68k_num_regs): Define.
17423 (m68k_regmap): Renamed from regmap, made static.
17424 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17425 made static.
17426 (m68k_cannot_store_register): Renamed from cannot_store_register,
17427 made static.
17428 (the_low_target): New.
17429 * linux-mips-low.c (num_regs): Remove.
17430 (mips_num_regs): Define.
17431 (mips_regmap): Renamed from regmap, made static.
17432 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17433 made static.
17434 (mips_cannot_store_register): Renamed from cannot_store_register,
17435 made static.
17436 (the_low_target): New.
17437 * linux-ppc-low.c (num_regs): Remove.
17438 (ppc_num_regs): Define.
17439 (ppc_regmap): Renamed from regmap, made static.
17440 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17441 made static.
17442 (ppc_cannot_store_register): Renamed from cannot_store_register,
17443 made static.
17444 (the_low_target): New.
17445 * linux-s390-low.c (num_regs): Remove.
17446 (s390_num_regs): Define.
17447 (s390_regmap): Renamed from regmap, made static.
17448 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17449 made static.
17450 (s390_cannot_store_register): Renamed from cannot_store_register,
17451 made static.
17452 (the_low_target): New.
17453 * linux-sh-low.c (num_regs): Remove.
17454 (sh_num_regs): Define.
17455 (sh_regmap): Renamed from regmap, made static.
17456 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17457 made static.
17458 (sh_cannot_store_register): Renamed from cannot_store_register,
17459 made static.
17460 (the_low_target): New.
17461 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17462 (the_low_target): New.
17463
174642002-04-09 Daniel Jacobowitz <drow@mvista.com>
17465
17466 * Makefile.in: Add stamp-h target.
17467 * configure.in: Create stamp-h.
17468 * configure: Regenerated.
17469
174702002-04-09 Daniel Jacobowitz <drow@mvista.com>
17471
17472 * inferiors.c: New file.
17473 * target.c: New file.
17474 * target.h: New file.
17475 * Makefile.in: Add target.o and inferiors.o. Update
17476 dependencies.
17477 * linux-low.c (inferior_pid): New static variable,
17478 moved from server.c.
17479 (linux_create_inferior): Renamed from create_inferior.
17480 Call add_inferior. Return 0 on success instead of a PID.
17481 (linux_attach): Renamed from myattach.
17482 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17483 (linux_thread_alive): Renamed from mythread_alive.
17484 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17485 child dies.
17486 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17487 (regsets_store_inferior_registers): Correct error message.
17488 Add missing ``return 0''.
17489 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17490 (linux_store_registers): Renamed from store_inferior_registers.
17491 (linux_read_memory): Renamed from read_inferior_memory.
17492 (linux_write_memory): Renamed from write_inferior_memory.
17493 (linux_target_ops): New structure.
17494 (initialize_low): Call set_target_ops ().
17495 * remote-utils.c (unhexify): New function.
17496 (hexify): New function.
17497 (input_interrupt): Send signals to ``signal_pid''.
17498 * server.c (inferior_pid): Remove.
17499 (start_inferior): Update create_inferior call.
17500 (attach_inferior): Call add_inferior.
17501 (handle_query): New function.
17502 (main): Call handle_query for `q' packets.
17503 * server.h: Include "target.h". Remove obsolete prototypes.
17504 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17505
175062002-04-09 Daniel Jacobowitz <drow@mvista.com>
17507
17508 * Makefile.in: Add WARN_CFLAGS. Update configury
17509 dependencies.
17510 * configure.in: Check for <string.h>
17511 * configure: Regenerate.
17512 * config.in: Regenerate.
17513 * gdbreplay.c: Include needed system headers.
17514 (remote_open): Remove strchr prototype.
17515 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17516 * regcache.c (supply_register): Change buf argument to const void *.
17517 (supply_register_by_name): Likewise.
17518 (collect_register): Change buf argument to void *.
17519 (collect_register_by_name): Likewise.
17520 * regcache.h: Add missing prototypes.
17521 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17522 * server.c (handle_query): New function.
17523 (attached): New static variable, moved out of main.
17524 (main): Quiet longjmp clobber warnings.
17525 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17526 * utils.c (error): Remove NORETURN.
17527 (fatal): Likewise.