]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add more styling to "disassemble"
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4c5aa8e0
AH
12019-07-19 Alan Hayward <alan.hayward@arm.com>
2
3 * configure.srv: Remove Arm xml files.
4
7cc17433
AH
52019-07-19 Alan Hayward <alan.hayward@arm.com>
6
7 * configure.srv: Add new files. Remove xml generated files.
8 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
9 registers.
10 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
11 * linux-aarch32-tdesc.c: New file.
12 * linux-aarch32-tdesc.h: New file.
13 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
14 * linux-arm-low.c (init_registers_arm, tdesc_arm)
15 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
16 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
17 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
18 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
19 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
20 (arm_read_description): Call arm_linux_read_description.
21 (initialize_low_arch): Don't init registers.
22 * linux-arm-tdesc.c: New file.
23 * linux-arm-tdesc.h: New file.
24
166a82be
AH
252019-07-10 Alan Hayward <alan.hayward@arm.com>
26
27 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
28 Move counter inside for.
29 (arm_read_description): Check ptrace earlier.
30 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
31
268a13a5
TT
322019-07-09 Tom Tromey <tom@tromey.com>
33
34 * configure: Rebuild.
35 * configure.ac: Change common to gdbsupport.
36 * acinclude.m4: Change common to gdbsupport.
37 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
38 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
39 common to gdbsupport.
40 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
41 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
42 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
43 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
44 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
45 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
46 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
47 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
48 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
49 common to gdbsupport.
50
350fab54
AH
512019-07-04 Alan Hayward <alan.hayward@arm.com>
52
53 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
54 defines.
55 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
56
2b40fda7
AH
572019-07-04 Alan Hayward <alan.hayward@arm.com>
58
59 * configure.srv: Remove legacy xml.
60 * linux-aarch64-low.c (initialize_low_arch): Remove
61 initialize_low_tdesc call.
62 * linux-aarch64-tdesc-selftest.c: Remove file.
63 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
64 * linux-x86-low.c (initialize_low_arch): Remove
65 initialize_low_tdesc call.
66 * linux-x86-tdesc-selftest.c: Remove file.
67 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
68
7d10623d
TV
692019-06-20 Tom de Vries <tdevries@suse.de>
70
71 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
72 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
73
8d6a48df
TV
742019-06-19 Tom de Vries <tdevries@suse.de>
75
76 * debug.h (debug_write): Change return type to ssize_t.
77 * debug.c (debug_write): Same.
78
73cc7272
TT
792019-06-14 Tom Tromey <tom@tromey.com>
80
81 * configure.ac: Use new path to gnulib.
82 * configure: Rebuild.
83 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
84 to gnulib.
85
08f10e02
TT
862019-06-11 Tom Tromey <tom@tromey.com>
87
88 * Makefile.in (SFILES): Add alloc.c.
89 (OBS): Add alloc.o.
90 (IPA_OBJS): Add alloc-ipa.o.
91 (alloc-ipa.o): New target.
92 (%.o: ../%.c): New pattern rule.
93
422186a9
TT
942019-06-10 Tom Tromey <tromey@adacore.com>
95
96 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
97 end warning with a newline.
98 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
99 newline.
100 * thread-db.c (attach_thread): Don't end warning with a newline.
101 (thread_db_notice_clone): Likewise.
102 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
103 newline.
104 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
105 end warning with a newline.
106
b02f78f9
PA
1072019-06-04 Pedro Alves <palves@redhat.com>
108
109 * server.c (captured_main): Use make_unique_xstrdup.
110
88ed7edb
TT
1112019-06-02 Tom Tromey <tom@tromey.com>
112
113 * gdbreplay.c (fromhex): Remove.
114 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
115
33a6bc35
TT
1162019-05-29 Tom Tromey <tromey@adacore.com>
117
118 * configure: Rebuild.
119
e90a813d
KB
1202019-05-06 Kevin Buettner <kevinb@redhat.com>
121
122 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
123 sign extension code on 32-bit builds.
124
353ea2d1
EZ
1252019-05-03 Eli Zaretskii <eliz@gnu.org>
126
127 * remote-utils.c:
128 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
129
b494cdff
TT
1302019-04-19 Tom Tromey <tom@tromey.com>
131
132 * server.c (struct vstop_notif): Derive from notif_event.
133 <base>: Remove.
134 (queue_stop_reply): Update.
135 (remove_all_on_match_ptid): Change type. Rewrite.
136 (discard_queued_stop_replies): Rewrite.
137 (in_queued_stop_replies_ptid): Change type.
138 (in_queued_stop_replies): Rewrite.
139 (notif_stop): Update.
140 (queue_stop_reply_callback): Update.
141 (captured_main): Don't call initialize_notif.
142 (push_stop_notification): Update.
143 * notif.c (notif_write_event, handle_notif_ack)
144 (notif_event_enque, notif_push): Update.
145 (notif_event_xfree, initialize_notif): Remove.
146 * notif.h (struct notif_event): Include <list>, not
147 "common/queue.h".
148 (struct notif_server) <queue>: Now a std::list.
149 (notif_event_p): Remove typedef.
150 (initialize_notif): Don't declare.
151 (struct notif_event): Add virtual destructor.
152
a7e559cc
AH
1532019-04-17 Alan Hayward <alan.hayward@arm.com>
154
155 * ax.c (ax_vdebug): Call debug_printf.
156 * debug.c (debug_write): New function.
157 * debug.h (debug_write): New declaration.
158 * linux-low.c (sigchld_handler): Call debug_write.
159
aeb2e706
AH
1602019-04-17 Alan Hayward <alan.hayward@arm.com>
161
162 * debug.c (debug_set_output): New function.
163 (debug_vprintf): Send output to debug_file.
164 (debug_flush): Likewise.
165 * debug.h (debug_set_output): New declaration.
166 * server.c (handle_monitor_command): Add debug-file option.
167 (captured_main): Likewise.
168
c1bc0935
AH
1692019-04-17 Alan Hayward <alan.hayward@arm.com>
170
171 * debug.c (remote_debug): Add definition.
172 * debug.h (remote_debug): Add declaration.
173 * hostio.c (remote_debug): Remove declaration.
174 * remote-utils.c (struct ui_file): Likewise.
175 (remote_debug): Likewise.
176 * remote-utils.h (remote_debug): Likewise,
177 * server.c (remote_debug): Remove definition.
178
3f52fdbc
KB
1792019-04-10 Kevin Buettner <kevinb@redhat.com>
180
181 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
182 when using a 64-bit gdbserver.
183
b0319eaa
TT
1842019-04-09 Tom Tromey <tromey@adacore.com>
185
186 * linux-low.c (select_event_lwp): Use find_thread_in_random.
187
eedc3f4f
TT
1882019-04-08 Tom Tromey <tom@tromey.com>
189
190 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
191 throw.
192 (linux_resume_one_lwp): Likewise.
193
230d2906
TT
1942019-04-08 Tom Tromey <tom@tromey.com>
195
196 * gdbreplay.c: Update.
197 * linux-low.c: Update.
198 * server.c: Update.
199
a70b8144
TT
2002019-04-08 Tom Tromey <tom@tromey.com>
201
202 * server.c: Use C++ exception handling.
203 * linux-low.c: Use C++ exception handling.
204 * gdbreplay.c: Use C++ exception handling.
205
3d6e9d23
TT
2062019-04-08 Tom Tromey <tom@tromey.com>
207
208 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
209 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
210 (captured_main, main): Update.
211 * gdbreplay.c (main): Update.
212
0570503d
PFC
2132019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
214
215 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
216 value in argument pointer, return 1 if the entry is found and 0
217 otherwise. Move comment.
218 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
219 * linux-low.h (linux_get_auxv): Declare.
220 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
221
227a9e65
TT
2222019-04-05 Tom Tromey <tromey@adacore.com>
223
224 * server.c (gdbserver_usage): Use upper-case for metasyntactic
225 variables.
226
69f4c9cc
AH
2272019-03-28 Alan Hayward <alan.hayward@arm.com>
228
229 * linux-low.c (AT_HWCAP2): Add define if not already included.
230
974c89e0
AH
2312019-03-26 Alan Hayward <alan.hayward@arm.com>
232
233 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
234 (aarch64_arch_setup): Call linux_get_hwcap.
235 * linux-arm-low.c (arm_get_hwcap): Remove function.
236 (arm_read_description): Call linux_get_hwcap.
237 * linux-low.c (linux_get_auxv): New function.
238 (linux_get_hwcap): Likewise.
239 (linux_get_hwcap2): Likewise.
240 * linux-low.h (linux_get_hwcap): New declaration.
241 (linux_get_hwcap2): Likewise.
242 * linux-ppc-low.c (ppc_get_auxv): Remove function.
243 (ppc_arch_setup): Call linux_get_hwcap.
244 * linux-s390-low.c (s390_get_hwcap): Remove function.
245 (s390_arch_setup): Call linux_get_hwcap.
246
1ef53e6b
AH
2472019-03-22 Alan Hayward <alan.hayward@arm.com>
248 Jiong Wang <jiong.wang@arm.com>
249
250 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
251 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
252 to fail.
253 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
254
ee4fbcfa
AH
2552019-03-22 Alan Hayward <alan.hayward@arm.com>
256 Jiong Wang <jiong.wang@arm.com>
257
258 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
259 (aarch64_get_hwcap): New function.
260 (aarch64_arch_setup): Read APIA hwcap.
261
6dc0ebde
AH
2622019-03-22 Alan Hayward <alan.hayward@arm.com>
263 Jiong Wang <jiong.wang@arm.com>
264
265 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
266 (initialize_low_tracepoint): Likewise.
267 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
268 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
269 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
270 (aarch64_linux_read_description): Likewise.
271 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
272
1163a4b7
JB
2732019-03-12 John Baldwin <jhb@FreeBSD.org>
274
275 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
276 i386_create_target_description for 'segments' parameter.
277 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
278 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
279 * win32-i386-low.c (i386_arch_setup): Likewise.
280
d3a70e03
TT
2812019-03-12 Tom Tromey <tromey@adacore.com>
282
283 * linux-low.c (iterate_over_lwps): Update.
284
37991b4f
TT
2852019-03-06 Tom Tromey <tom@tromey.com>
286
287 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
288 (captured_main): Use SCOPE_EXIT.
289
45950eb6
SDJ
2902019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
291
292 * configure.srv: Use '$enable_unittest' instead of '$development'
293 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
294 case.
295
43ac54fc
TT
2962019-02-27 Tom Tromey <tromey@adacore.com>
297
298 * gdbreplay.c (logchar): Handle \r\n.
299
df0da8a2
AH
3002019-02-07 Alan Hayward <alan.hayward@arm.com>
301
302 * linux-low.c (linux_attach): Add process before lwp.
303 * server.c (attach_inferior): Check if already attached.
304
1a5c2598
TT
3052019-02-07 Tom Tromey <tom@tromey.com>
306
307 * x86-tdesc.h: Rename include guard.
308 * x86-low.h: Add include guard.
309 * wincecompat.h: Rename include guard.
310 * win32-low.h: Add include guard.
311 * utils.h: Rename include guard.
312 * tracepoint.h: Rename include guard.
313 * tdesc.h: Rename include guard.
314 * target.h: Rename include guard.
315 * server.h: Rename include guard.
316 * remote-utils.h: Rename include guard.
317 * regcache.h: Rename include guard.
318 * nto-low.h: Rename include guard.
319 * notif.h: Add include guard.
320 * mem-break.h: Rename include guard.
321 * lynx-low.h: Add include guard.
322 * linux-x86-tdesc.h: Add include guard.
323 * linux-s390-tdesc.h: Add include guard.
324 * linux-ppc-tdesc-init.h: Add include guard.
325 * linux-low.h: Add include guard.
326 * linux-aarch64-tdesc.h: Add include guard.
327 * linux-aarch32-low.h: Add include guard.
328 * inferiors.h: Rename include guard.
329 * i387-fp.h: Rename include guard.
330 * hostio.h: Rename include guard.
331 * gdbthread.h: Rename include guard.
332 * gdb_proc_service.h: Rename include guard.
333 * event-loop.h: Rename include guard.
334 * dll.h: Rename include guard.
335 * debug.h: Rename include guard.
336 * ax.h: Rename include guard.
337
956cc47c
SN
3382018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
339
340 PR gdb/23985
341 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
342 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
343
a0707f3c
TT
3442019-01-25 Tom Tromey <tom@tromey.com>
345
346 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
347
0747795c
TT
3482019-01-25 Tom Tromey <tom@tromey.com>
349
350 * win32-low.c: Fix common/ includes.
351 * win32-i386-low.c: Fix common/ includes.
352 * tracepoint.c: Fix common/ includes.
353 * thread-db.c: Fix common/ includes.
354 * target.h: Fix common/ includes.
355 * symbol.c: Fix common/ includes.
356 * spu-low.c: Fix common/ includes.
357 * server.h: Fix common/ includes.
358 * server.c: Fix common/ includes.
359 * remote-utils.c: Fix common/ includes.
360 * regcache.h: Fix common/ includes.
361 * regcache.c: Fix common/ includes.
362 * nto-x86-low.c: Fix common/ includes.
363 * notif.h: Fix common/ includes.
364 * mem-break.h: Fix common/ includes.
365 * lynx-low.c: Fix common/ includes.
366 * lynx-i386-low.c: Fix common/ includes.
367 * linux-x86-tdesc-selftest.c: Fix common/ includes.
368 * linux-x86-low.c: Fix common/ includes.
369 * linux-low.c: Fix common/ includes.
370 * inferiors.h: Fix common/ includes.
371 * i387-fp.c: Fix common/ includes.
372 * hostio.c: Fix common/ includes.
373 * hostio-errno.c: Fix common/ includes.
374 * gdbthread.h: Fix common/ includes.
375 * gdbreplay.c: Fix common/ includes.
376 * fork-child.c: Fix common/ includes.
377 * event-loop.c: Fix common/ includes.
378 * ax.c:
379 (enum gdb_agent_op): Fix common/ includes.
380
be6d4f74
TT
3812019-01-21 Tom Tromey <tom@tromey.com>
382
383 * tracepoint.c: Fix includes.
384 * remote-utils.c: Fix includes.
385 * linux-x86-low.c: Fix includes.
386
66d91b39
JB
3872019-01-01 Joel Brobecker <brobecker@adacore.com>
388
389 * gdbreplay.c (gdbreplay_version): Update copyright year in
390 version message.
391 * server.c (gdbserver_version): Likewise.
392
754e3168
AH
3932018-12-05 Alan Hayward <alan.hayward@arm.com>
394
395 * linux-low.c (add_lwp): Switch ordering.
396
d105de22
TT
3972018-11-29 Tom Tromey <tom@tromey.com>
398
399 * win32-low.c (win32_join): Take pid, not process.
400 * target.h (struct target_ops) <join>: Change argument type.
401 (join_inferior): Change argument name.
402 * spu-low.c (spu_join): Take pid, not process.
403 * server.c (handle_detach): Preserve pid before destroying
404 process.
405 * lynx-low.c (lynx_join): Take pid, not process.
406 * linux-low.c (linux_join): Take pid, not process.
407
50138245
AH
4082018-11-23 Alan Hayward <alan.hayward@arm.com>
409
410 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
411 (aarch64_cannot_fetch_register): Likewise.
412 (struct linux_target_ops): Update references.
413
64f57f3d
PFC
4142018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
415
416 * linux-ppc-low.c: Include nat/linux-ptrace.h.
417
8d619c01
EBM
4182018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
419
420 * configure.srv (ipa_ppc_linux_regobj): Add
421 powerpc-isa207-htm-vsx32l-ipa.o and
422 powerpc-isa207-htm-vsx64l-ipa.o.
423 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
424 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
425 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
426 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
427 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
428 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
429 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
430 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
431 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
432 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
433 (init_registers_powerpc_isa207_htm_vsx32l)
434 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
435 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
436 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
437 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
438 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
439 (ppc_store_tm_ctarregset): New functions.
440 (ppc_regsets): Add entries for HTM regsets.
441 (ppc_arch_setup): Set htm in features struct when needed. Set
442 sizes for the HTM regsets.
443 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
444 (initialize_low_arch): Call
445 init_registers_powerpc_isa207_htm_vsx32l and
446 init_registers_powerpc_isa207_htm_vsx64l.
447 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
448 PPC_TDESC_ISA207_HTM_VSX.
449 (initialize_low_tracepoint): Call
450 init_registers_powerpc_isa207_htm_vsx32l and
451 init_registers_powerpc_isa207_htm_vsx64l.
452
232bfb86
EBM
4532018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
454
455 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
456 rs6000/power-linux-pmu.xml to srv_xmlfiles.
457 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
458 (ppc_store_pmuregset): New functions.
459 (ppc_regsets): Add entries for ebb and pmu regsets.
460 (ppc_arch_setup): Set isa207 in features struct if the ebb and
461 pmu regsets are available. Set sizes for these regsets.
462
f2cf6173
EBM
4632018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
464
465 * configure.srv (ipa_ppc_linux_regobj): Add
466 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
467 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
468 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
469 rs6000/powerpc-isa207-vsx32l.xml, and
470 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
471 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
472 <PPC_TDESC_ISA207_VSX>: New enum value.
473 (init_registers_powerpc_isa207_vsx32l): Declare.
474 (init_registers_powerpc_isa207_vsx64l): Declare.
475 * linux-ppc-low.c (ppc_fill_tarregset): New function.
476 (ppc_store_tarregset): New function.
477 (ppc_regsets): Add entry for the TAR regset.
478 (ppc_arch_setup): Set isa207 in features struct when needed. Set
479 size for the TAR regsets.
480 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
481 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
482 and init_registers_powerpc_isa207_vsx64l.
483 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
484 (initialize_low_tracepoint): Call
485 init_registers_powerpc_isa207_vsx32l and
486 init_registers_powerpc_isa207_vsx64l.
487
7ca18ed6
EBM
4882018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
489 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
490
491 * configure.srv (ipa_ppc_linux_regobj): Add
492 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
493 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
494 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
495 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
496 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
497 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
498 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
499 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
500 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
501 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
502 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
503 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
504 (ppc_hwcap): Add comment.
505 (ppc_hwcap2): New global.
506 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
507 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
508 (ppc_regsets): Add entries for the DSCR and PPR regsets.
509 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
510 when needed. Set sizes for the the DSCR and PPR regsets.
511 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
512 (initialize_low_arch): Call
513 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
514 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
515 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
516 PPC_TDESC_ISA205_PPR_DSCR_VSX.
517 (initialize_low_tracepoint): Call
518 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
519 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
520
5c849b22
PFC
5212018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
522
523 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
524
8ecfd7bd
SDJ
5252018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
526 Simon Marchi <simark@simark.ca>
527
528 * acinclude.m4: Include "../selftest.m4".
529 * configure: Regenerate.
530 * configure.ac: Use "GDB_AC_SELFTEST".
531 * configure.srv: Use "$enable_unittests" instead of
532 "$development" when checking whether unit tests have been
533 enabled.
534 * server.c (captured_main): Update message informing that
535 selftests have been disabled.
536
96643e35
TT
5372018-10-04 Tom Tromey <tom@tromey.com>
538
539 * configure: Rebuild.
540
da4ae14a
TT
5412018-10-04 Tom Tromey <tom@tromey.com>
542
543 * server.c (handle_status): Rename inner "thread".
544 (process_serial_event): Declare "res" in 'm' case.
545 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
546 (iterate_over_lwps): Rename inner "thread".
547 (linux_qxfer_libraries_svr4): Rename inner "len".
548 * gdbthread.h (find_thread_in_random): Rename inner "thread".
549
7c619dbd
GB
5502018-10-01 Gary Benson <gbenson@redhat.com>
551
552 * gdb_proc_service.h: Moved common code to
553 common/gdb_proc_service.h.
554
3795e814
GB
5552018-10-01 Gary Benson <gbenson@redhat.com>
556
557 * gdb_proc_service.h: Synchronize comments and whitespace with
558 GDB's version of this file.
559
49b036f1
TT
5602018-09-25 Tom Tromey <tom@tromey.com>
561
562 * configure: Rebuild.
563 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
564
8ff03f0b
SM
5652018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
566
567 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
568 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
569 ($(IPA_LIB)): Sort IPA_OBJS.
570
a1cd91dc
SM
5712018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
572
573 * Makefile.in: Remove references to $(ADD_DEPS).
574
752312ba
TT
5752018-09-16 Tom Tromey <tom@tromey.com>
576
577 * remote-utils.c (remote_open): Use GNU style for metasyntactic
578 variables.
579 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
580 variables.
581
f1628857
TT
5822018-09-05 Tom Tromey <tom@tromey.com>
583
584 * configure: Rebuild.
585
ad202fcc
SM
5862018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
587
588 PR build/23399
589 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
590
d3d8724a
TT
5912018-08-27 Tom Tromey <tom@tromey.com>
592
593 PR build/23087:
594 * configure: Rebuild.
595
b4f183d2
TT
5962018-08-27 Tom Tromey <tom@tromey.com>
597
598 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
599 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
600 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
601 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
602 (s390x_emit_stack_adjust): Add casts to unsigned char.
603
4e2aa472
SM
6042018-08-22 Simon Marchi <simon.marchi@ericsson.com>
605
606 PR gdb/23374
607 PR gdb/23375
608 * server.h (struct client_state) <disable_randomization>:
609 Initialize to 1.
610
cf4088a9
SM
6112018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
612
613 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
614 variable.
615 (mips_supply_ptrace_register): Likewise.
616
a0de763e
TT
6172018-07-22 Tom Tromey <tom@tromey.com>
618
619 * configure: Rebuild.
620
b0a7723d
TT
6212018-07-22 Tom Tromey <tom@tromey.com>
622
623 * win32-low.c (win32_create_inferior): Remove unused variables.
624 * gdbreplay.c (remote_open): Remove unused variable.
625 * remote-utils.c (remote_prepare): Remove unused variable.
626 * x86-tdesc.h (X86_TDESC_H): Define.
627 (amd64_expedite_regs): Define conditionally.
628 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
629 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
630 * remote-utils.c (readchar): Remove unused variable.
631
a780ef4f
PA
6322018-07-13 Pedro Alves <palves@redhat.com>
633
634 * linux-low.c (linux_kill): Change parameter to process_info
635 pointer instead of pid. Adjust.
636 * lynx-low.c (lynx_kill): Likewise.
637 * nto-low.c (nto_kill): Likewise.
638 * spu-low.c (spu_kill): Likewise.
639 * win32-low.c (win32_kill): Likewise.
640 * server.c (handle_v_kill, kill_inferior_callback)
641 (detach_or_kill_for_exit): Adjust.
642 * target.c (kill_inferior): Change parameter to process_info
643 pointer instead of pid. Adjust.
644 * target.h (struct target_ops) <kill>: Change parameter to
645 process_info pointer instead of pid. Adjust all implementations
646 and callers.
647 (kill_inferior): Likewise.
648
ef2ddb33
PA
6492018-07-13 Pedro Alves <palves@redhat.com>
650
651 * linux-low.c (linux_detach, linux_join): Change parameter to
652 process_info pointer instead of pid. Adjust.
653 * lynx-low.c (lynx_detach, lynx_join): Likewise.
654 * nto-low.c (nto_detach): Likewise.
655 * spu-low.c (spu_detach, spu_join): Likewise.
656 * win32-low.c (win32_detach, win32_join): Likewise.
657 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
658 * target.h (struct target_ops) <detach, join>: Change parameter to
659 process_info pointer instead of pid. Adjust all implementations
660 and callers.
661 (detach_inferior, join_inferior): Rename 'pid' parameter to
662 'proc'.
663
c7ab0aef
SDJ
6642018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
665 Jan Kratochvil <jan.kratochvil@redhat.com>
666 Paul Fertser <fercerpav@gmail.com>
667 Tsutomu Seki <sekiriki@gmail.com>
668
669 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
670 (OBS): Add 'common/netstuff.o'.
671 (GDBREPLAY_OBS): Likewise.
672 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
673 (remote_open): Implement support for IPv6
674 connections.
675 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
676 and 'wspiapi.h'.
677 (handle_accept_event): Accept connections from IPv6 sources.
678 (remote_prepare): Handle IPv6-style hostnames; implement
679 support for IPv6 connections.
680 (remote_open): Implement support for printing connections from
681 IPv6 sources.
682
31445d10
PA
6832018-07-11 Pedro Alves <palves@redhat.com>
684
685 PR gdb/23377
686 * mem-break.c (any_persistent_commands): Add process_info
687 parameter and use it instead of relying on the current process.
688 Change return type to bool.
689 * mem-break.h (any_persistent_commands): Add process_info
690 parameter and change return type to bool.
691 * server.c (handle_detach): Remove require_running_or_return call.
692 Look up the process_info for the process we're about to detach.
693 If not found, return back error to GDB. Adjust
694 any_persistent_commands call to pass down a process pointer.
695
cb197132
PA
6962018-07-11 Pedro Alves <palves@redhat.com>
697
698 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
699 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
700 instead of collect_register_by_name.
701 * regcache.c (regcache_raw_get_unsigned_by_name): New.
702 * regcache.h (regcache_raw_get_unsigned_by_name): New.
703
1b919490
VB
7042018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
705 Pedro Alves <palves@redhat.com>
706
707 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
708
d7e15655
TT
7092018-07-03 Tom Tromey <tom@tromey.com>
710
711 * linux-low.c: Update.
712 * lynx-low.c: Update.
713 * mem-break.c: Update.
714 * nto-low.c: Update.
715 * remote-utils.c: Update.
716 * server.c: Update.
717 * spu-low.c: Update.
718 * target.c: Update.
719 * win32-low.c: Update.
720
26a57c92
TT
7212018-07-03 Tom Tromey <tom@tromey.com>
722
723 * server.c: Update.
724
0e998d96
TT
7252018-07-03 Tom Tromey <tom@tromey.com>
726
727 * linux-low.c: Update.
728
cc6bcb54
TT
7292018-07-03 Tom Tromey <tom@tromey.com>
730
731 * target.c: Update.
732
e38504b3
TT
7332018-07-03 Tom Tromey <tom@tromey.com>
734
735 * linux-low.c: Update.
736 * linux-mips-low.c: Update.
737 * lynx-low.c: Update.
738 * nto-low.c: Update.
739 * remote-utils.c: Update.
740 * server.c: Update.
741 * spu-low.c: Update.
742 * target.c: Update.
743 * thread-db.c: Update.
744
e99b03dc
TT
7452018-07-03 Tom Tromey <tom@tromey.com>
746
747 * linux-low.c: Update.
748 * linux-mips-low.c: Update.
749 * lynx-low.c: Update.
750 * mem-break.c: Update.
751 * nto-low.c: Update.
752 * remote-utils.c: Update.
753 * server.c: Update.
754 * spu-low.c: Update.
755 * target.c: Update.
756 * tracepoint.c: Update.
757
f2907e49
TT
7582018-07-03 Tom Tromey <tom@tromey.com>
759
760 * linux-low.c: Update.
761 * linux-ppc-low.c: Update.
762 * linux-x86-low.c: Update.
763 * proc-service.c: Update.
764 * server.c: Update.
765 * spu-low.c: Update.
766 * thread-db.c: Update.
767 * win32-low.c: Update.
768
fd79271b
TT
7692018-07-03 Tom Tromey <tom@tromey.com>
770
771 * linux-low.c: Update.
772 * lynx-low.c: Update.
773 * nto-low.c: Update.
774 * remote-utils.c: Update.
775 * spu-low.c: Update.
776 * thread-db.c: Update.
777 * win32-low.c: Update.
778
c0867626
SDJ
7792018-06-29 Joel Brobecker <brobecker@adacore.com>
780
781 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
782 parameter in call to 'amd64_create_target_description'.
783
2512d7ef
JK
7842018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
785
786 * x86-tdesc.h: Remove executable permission flag.
787
d0ac1c44
SM
7882018-06-19 Simon Marchi <simon.marchi@ericsson.com>
789
790 * configure.ac: Remove AC_PREREQ, add missing quoting.
791 * configure: Re-generate.
792 * config.in: Re-generate.
793 * aclocal.m4: Re-generate.
794
c4eb05ff
SM
7952018-06-18 Simon Marchi <simon.marchi@ericsson.com>
796
797 * tracepoint.h (current_traceframe): Remove declaration.
798
02895270
AH
7992018-06-18 Alan Hayward <alan.hayward@arm.com>
800
801 * linux-aarch64-low.c (is_sve_tdesc): New function.
802 (aarch64_sve_regs_copy_to_regcache): Likewise.
803 (aarch64_sve_regs_copy_from_regcache): Likewise.
804 (aarch64_regs_info): Add SVE checks.
805 (initialize_low_arch): Initialize SVE.
806
e9902bfc
AH
8072018-06-18 Alan Hayward <alan.hayward@arm.com>
808
809 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
810
fefa175e
AH
8112018-06-11 Alan Hayward <alan.hayward@arm.com>
812
813 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
814 (initialize_low_tracepoint): Likewise
815 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
816 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
817 param.
818 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
819 checks.
820 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
821
b91ad3ff
AH
8222018-06-11 Alan Hayward <alan.hayward@arm.com>
823
824 * server.h (PBUFSIZ): Increase size
825
f868386e
AH
8262018-06-11 Alan Hayward <alan.hayward@arm.com>
827
828 * regcache.c (regcache::raw_compare): New function.
829 * regcache.h (regcache::raw_compare): New declaration.
830
9c861883
AH
8312018-06-11 Alan Hayward <alan.hayward@arm.com>
832
833 * regcache.c (new_register_cache): Use new.
834 (free_register_cache): Use delete.
835 (register_data): Use const.
836 (supply_register): Move body inside regcache.
837 (regcache::raw_supply): New override function.
838 (collect_register): Move body inside regcache.
839 (regcache::raw_collect): New override function.
840 (regcache::get_register_status): New override function.
841 * regcache.h (struct regcache): Inherit from reg_buffer_common.
842
40591844
TT
8432018-06-09 Tom Tromey <tom@tromey.com>
844
845 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
846 declare queue.
847 (event_queue): Use std::queue.
848 (gdb_event_xfree): Remove.
849 (initialize_event_loop, process_event, wait_for_event): Update.
850
6341380d
SC
8512018-06-08 Stan Cox <scox@redhat.com>
852
853 * win32-low.c (win32_create_inferior): last_ptid and last_status
854 moved to client_state.
855
03349c93
PA
8562018-06-08 Pedro Alves <palves@redhat.com>
857
858 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
859 common/common-exceptions.o, common/common-utils.o,
860 common/errors.o, common/print-utils.o and utils.o.
861 * gdbreplay.c: Include "common-defs.h" instead of the two
862 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
863 string.h or alloca.h.
864 (perror_with_name): Delete.
865 (remote_open): Use xstrdup instead of strdup.
866 (main): Rename to ...
867 (captured_main): ... this.
868 (main): New.
869
8dcc53b3
TT
8702018-06-08 Tom Tromey <tom@tromey.com>
871
872 * linux-low.c (linux_low_read_btrace): Update.
873
c12a5089
SC
8742018-06-04 Stan Cox <scox@redhat.com>
875
876 * server.h (struct client_state): New.
877 * server.c (cont_thread, general_thread, multi_process)
878 (report_fork_events, report_vfork_events, report_exec_events)
879 (report_thread_events, swbreak_feature, hwbreak_feature)
880 (vCont_supported, disable_randomization, pass_signals)
881 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
882 Moved to client_state.
883 * remote-utils.c (remote_debug, noack_mode)
884 (transport_is_reliable): Moved to client_state.
885 * tracepoint.c (current_traceframe): Moved to client_state.
886
887 Update all callers.
888 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
889 linux-low.c, remote-utils.h, target.c: Use client_state.
890
122394f1
AH
8912018-05-31 Alan Hayward <alan.hayward@arm.com>
892
893 * configure.srv: Add new c/h file.
894
95228a0d
AH
8952018-05-31 Alan Hayward <alan.hayward@arm.com>
896
897 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
898 null VQ.
899
d8dab6c3
MR
9002018-05-25 Maciej W. Rozycki <macro@mips.com>
901
902 * gdb.arch/mips-fpregset-core.exp: New test.
903 * gdb.arch/mips-fpregset-core.c: New test source.
904
81e25b7c
EK
9052018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
906
907 PR server/23198
908 * hostio.c (require_int): Do not report overflow for integers
909 between 0xfffffff and 0x7fffffff.
910
7e947ad3
MR
9112018-05-22 Maciej W. Rozycki <macro@mips.com>
912
913 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
914 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
915 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
916 functions.
917 (the_low_target): Wire them.
918
1d75a658
PFC
9192018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
920
921 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
922 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
923 mode. Call collect_register_by_name with vscr using
924 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
925 (ppc_store_vrregset): Add and set vscr_offset variable as in
926 ppc_fill_vrregset. Call supply_register_by_name with vscr using
927 vscr_offset.
928
d078308a
PFC
9292018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
930
931 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
932 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
933 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
934
7273b5fc
PFC
9352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
936
937 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
938 (ppc_store_vsxregset): Likewise.
939 (ppc_fill_vrregset): Likewise.
940 (ppc_store_vrregset): Likewise.
941 (ppc_fill_evrregset): Likewise.
942 (ppc_store_evrregset): Likewise.
943 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
944 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
945 needed.
946
2e077f5e
PFC
9472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
948
949 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
950 wordsize of the inferior. Call ppc_linux_target_wordsize.
951
bd64614e
PFC
9522018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
953
954 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
955 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
956 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
957 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
958 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
959 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
960 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
961 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
962 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
963 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
964 (tdesc_powerpc_e500l): Remove.
965 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
966 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
967 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
968 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
969 linux-ppc-tdesc.h.
970 (ppc_arch_setup): Remove target description matching code. Fill a
971 ppc_linux_features struct and call ppc_linux_match_description
972 with it.
973
75d74cca
MR
9742018-05-22 Maciej W. Rozycki <macro@mips.com>
975
976 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
977 width of the requested register exceeds the width of the
978 `ptrace' data type.
979 (mips_cannot_store_register): Likewise.
980
e4439e43
MR
9812018-05-21 Maciej W. Rozycki <macro@mips.com>
982
983 * linux-mips-low.c (mips_fetch_register): New function. Update
984 preceding comment.
985 (mips_store_gregset): Supply 0 rather than $restart for $zero.
986 (the_low_target): Wire `mips_fetch_register'.
987
55271bf9
JB
9882018-05-10 Joel Brobecker <brobecker@adacore.com>
989
990 * lynx-i386-low.c (LYNXOS_178): New macro.
991 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
992 the layout on LynxOS-178.
993 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
994 handle floating point registers that are not supported by
995 LynxOS-178.
996
1a34f210
TT
9972018-05-10 Tom Tromey <tom@tromey.com>
998
999 * configure: Rebuild.
1000
190852c8
JB
10012018-05-10 Joel Brobecker <brobecker@adacore.com>
1002
1003 PR server/23158:
1004 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1005 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1006 Use it to set the expedite_regs field in the given tdesc.
1007 * x86-tdesc.h: New file.
1008 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1009 Adjust following the addition of the new expedite_regs parameter
1010 to init_target_desc.
1011 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1012 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1013 (i386_linux_read_description, amd64_linux_read_description):
1014 Adjust following the addition of the new expedite_regs parameter
1015 to init_target_desc.
1016 * lynx-i386-low.c: #include "x86-tdesc.h".
1017 (lynx_i386_arch_setup): Adjust following the addition of the new
1018 expedite_regs parameter to init_target_desc.
1019 * nto-x86-low.c: #include "x86-tdesc.h".
1020 (nto_x86_arch_setup): Adjust following the addition of the new
1021 expedite_regs parameter to init_target_desc.
1022 * win32-i386-low.c: #include "x86-tdesc.h".
1023 (i386_arch_setup): Adjust following the addition of the new
1024 expedite_regs parameter to init_target_desc.
1025
7dbac825
JB
10262018-05-10 Joel Brobecker <brobecker@adacore.com>
1027
1028 PR server/23158:
1029 * win32-low.c (win32_create_inferior): Add call to my_wait
1030 setting last_status global.
1031
906994d9
JB
10322018-05-10 Joel Brobecker <brobecker@adacore.com>
1033
1034 PR server/23158:
1035 * win32-low.c (create_process): Only call gdb_tilde_expand if
1036 inferior_cwd is not NULL.
1037
8ee22052
AB
10382018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1039
1040 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1041 registers to the cache if their values have changed.
1042 (i387_xsave_to_cache): Provide default values for x87 control
1043 registers when these features are available, but disabled.
1044 * regcache.c (supply_register_by_name_zeroed): New function.
1045 * regcache.h (supply_register_by_name_zeroed): Declare new
1046 function.
1047
aff689d3
TT
10482018-05-07 Tom Tromey <tom@tromey.com>
1049
1050 * configure: Rebuild.
1051
85e26832
TT
10522018-05-04 Tom Tromey <tom@tromey.com>
1053
1054 * configure: Rebuild.
1055
a3b60e45
JK
10562018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1057 Pedro Alves <palves@redhat.com>
1058
1059 * linux-aarch64-low.c (aarch64_stopped_data_address):
1060 Likewise.
1061
632e107b
TT
10622018-04-27 Tom Tromey <tom@tromey.com>
1063
1064 * configure: Rebuild.
1065
458412c3
TT
10662018-04-23 Tom Tromey <tom@tromey.com>
1067
1068 * configure: Rebuild.
1069
f31c089e
SM
10702018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1071
1072 * Makefile.in (depcomp): Add "..".
1073 (all_deps_files): New and use it.
1074
b319b098
AH
10752018-04-18 Alan Hayward <alan.hayward@arm.com>
1076
1077 * configure.srv (aarch64*-*-linux*): Don't include xml.
1078 (i[34567]86-*-cygwin*): Likewise.
1079 (i[34567]86-*-linux*): Likewise.
1080 (i[34567]86-*-lynxos*): Likewise.
1081 (i[34567]86-*-mingw32ce*): Likewise.
1082 (i[34567]86-*-mingw*): Likewise.
1083 (i[34567]86-*-nto*): Likewise.
1084 (tic6x-*-uclinux): Likewise.
1085 (x86_64-*-linux*): Likewise.
1086 (x86_64-*-mingw*): Likewise.
1087 (x86_64-*-cygwin*): Likewise.
1088
3b74854b
AH
10892018-04-18 Alan Hayward <alan.hayward@arm.com>
1090
1091 * tdesc.c: Remove xml parameter.
1092
e98577a9
AH
10932018-04-18 Alan Hayward <alan.hayward@arm.com>
1094
1095 * server.c (get_features_xml): Remove cast.
1096 * tdesc.c (void target_desc::accept): Fill in function.
1097 (tdesc_get_features_xml): Remove old xml creation.
1098 (print_xml_feature::visit_pre): Add xml vistor.
1099 * tdesc.h (struct target_desc): Make xmltarget mutable.
1100 (tdesc_get_features_xml): Remove declaration.
1101
d278f585
AH
11022018-04-18 Alan Hayward <alan.hayward@arm.com>
1103
1104 * tdesc.c (tdesc_architecture_name): Add new function.
1105 (tdesc_osabi_name): Likewise.
1106 (tdesc_get_features_xml): Use new functions.
1107
eee8a18d
AH
11082018-04-18 Alan Hayward <alan.hayward@arm.com>
1109
1110 * tdesc.c (tdesc_create_flags): Remove.
1111 (tdesc_add_flag): Likewise.
1112 (tdesc_named_type): Likewise.
1113 (tdesc_create_union): Likewise.
1114 (tdesc_create_struct): Likewise.
1115 (tdesc_create_vector): Likewise.
1116 (tdesc_add_bitfield): Likewise.
1117 (tdesc_add_field): Likewise.
1118 (tdesc_set_struct_size): Likewise.
1119
82ec9bc7
AH
11202018-04-18 Alan Hayward <alan.hayward@arm.com>
1121
1122 * tdesc.c (~target_desc): Remove implictly deleted items.
1123 (init_target_desc): Iterate all features.
1124 (tdesc_get_features_xml): Use vector.
1125 (tdesc_create_feature): Create feature.
1126 * tdesc.h (tdesc_feature) Remove
1127 (target_desc): Add features.
1128
ea3e7d71
AH
11292018-04-18 Alan Hayward <alan.hayward@arm.com>
1130
1131 * Makefile.in: Add common/tdesc.c
1132 * tdesc.c (init_target_desc): init all reg_defs from register
1133 vector.
1134 (tdesc_create_reg): Create tdesc_reg.
1135 * tdesc.h (tdesc_feature): Add register vector.
1136
17d08cd4
SM
11372018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * tdesc.h (struct target_desc) <features>: Change type to
1140 std::vector<std::string>.
1141 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1142 changes.
1143 (tdesc_get_features_xml): Likewise.
1144 (tdesc_create_feature): Likewise.
1145
5cd3e386
AH
11462018-03-26 Alan Hayward <alan.hayward@arm.com>
1147
1148 * regcache.c (find_register_by_number): Return a ref.
1149 (find_regno): Use references.
1150 (register_size): Likewise.
1151 (register_data): Likewise.
1152 * tdesc.c (target_desc::~target_desc): Remove free calls.
1153 (target_desc::operator==): Use std::vector compare.
1154 (init_target_desc): Use reference.
1155 (tdesc_create_reg): Use reg constructors.
1156 * tdesc.h (struct target_desc): Replace pointer with object.
1157
dff7492c
AH
11582018-03-23 Alan Hayward <alan.hayward@arm.com>
1159
1160 * regcache.c (find_register_by_number): Make static.
1161 (find_regno): Use find_register_by_number
1162 * regcache.h (struct reg): Remove declaration.
1163
d80e5242
AH
11642018-03-23 Alan Hayward <alan.hayward@arm.com>
1165
1166 * tdesc.c (target_desc::~target_desc): Move to here.
1167 (target_desc::operator==): Likewise.
1168 * tdesc.h (target_desc::~target_desc): Move from here.
1169 (target_desc::operator==): Likewise.
1170
f69c5afb
AA
11712018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1172
1173 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1174
ce29f843
AA
11752018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1176
1177 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1178 S390_TDESC_GS.
1179 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1180 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1181 and init_registers_s390_gs_linux64.
1182
c49bd90b
AA
11832018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1184
1185 * linux-s390-low.c (s390_fill_gs): Remove function.
1186 (s390_fill_gsbc): Remove function.
1187 (s390_regsets): Set fill functions for the guarded storage regsets
1188 to NULL.
1189
7edb9bd3
AA
11902018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1191
1192 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1193 the word size. Add comment.
1194 (s390_get_wordsize): New function.
1195 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1196 pswm with it. Instead, use s390_get_wordsize to determine the
1197 word size first and derive the correct tdesc from that directly.
1198
39be3c7e
SM
11992018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1200
1201 * Makefile.in: Include silent-rules.mk.
1202 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1203 (COMPILE): Add ECHO_CXX.
1204 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1205 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1206 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1207 (version-generated.c): Add ECHO_GEN.
1208 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1209 (IPAGENT_COMPILE): Add ECHO_CXX.
1210 (%-generated.c): Add ECHO_REGDAT.
1211
3ae9ce5d
TT
12122018-03-14 Tom Tromey <tom@tromey.com>
1213
1214 PR cli/14977:
1215 * ax.c (ax_printf): Special case for NULL.
1216
e6a58aa8
SM
12172018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * linux-low.c (linux_qxfer_libraries_svr4): Use
1220 xml_escape_text_append.
1221
f6e8a41e
SM
12222018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1223
1224 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1225
b9671caf
SM
12262018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1227
1228 * server.c (handle_general_set): Remove unnecessary xstrdup.
1229
e80aaf61
SM
12302018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1231
1232 * server.c (parse_debug_format_options): Adjust to
1233 delim_string_to_char_ptr_vec changes.
1234 * thread-db.c (thread_db_load_search): Adjust to
1235 dirnames_to_char_ptr_vec changes.
1236
b1223e78
MM
12372018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1238
1239 * target.h (target_enable_btrace, target_disable_btrace)
1240 (target_read_btrace, target_read_btrace_conf): Turn macro into
1241 inline function. Throw error if target method is not defined.
1242 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1243 check for btrace target method. Be prepared to handle exceptions
1244 from btrace target methods.
1245
81561546
SDJ
12462018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1247
1248 * server.c (captured_main): Change order of error message printed
1249 when the current working directory cannot be found.
1250
25e3c82c
SDJ
12512018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1252
1253 * server.c: Include "filenames.h" and "pathstuff.h".
1254 (program_name): Delete variable.
1255 (program_path): New anonymous class.
1256 (get_exec_wrapper): Use "program_path" instead of
1257 "program_name".
1258 (handle_v_run): Likewise.
1259 (captured_main): Likewise.
1260 (process_serial_event): Likewise.
1261
b4987c95
SDJ
12622018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1263
1264 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1265 (OBJS): Add "pathstuff.o".
1266 * server.c (current_directory): New global variable.
1267 (captured_main): Initialize "current_directory".
1268
f46cd62a
AH
12692018-02-26 Alan Hayward <alan.hayward@arm.com>
1270
1271 * tdesc.c: Use common/tdesc.h.
1272 * tdesc.h: Likewise.
1273
a543c5ca
AH
12742018-02-20 Alan Hayward <alan.hayward@arm.com>
1275 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * Makefile.in: Switch order of make rules.
1278
b5884fa7
AH
12792018-02-19 Alan Hayward <alan.hayward@arm.com>
1280
1281 * Makefile.in: Add common directory in build.
1282 * configure.ac: Add common reference.
1283 * configure: Regenerate.
1284
de6242d3
MM
12852018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1286
1287 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1288 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1289 * spu-low.c (spu_target_ops): Likewise.
1290 * win32-low.c (win32_target_ops): Likewise.
1291 * server.c (supported_btrace_packets): Report packets unconditionally.
1292 * target.h (target_ops) <supports_btrace>: Remove.
1293 (target_supports_btrace): Remove.
1294
9ee23a85
MM
12952018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1296
1297 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1298 (handle_btrace_disable): Change return type to void. Use exceptions
1299 to report errors.
1300 (handle_btrace_general_set): Catch exception and copy message to
1301 return message.
1302
8ce47547
TT
13032018-02-08 Tom Tromey <tom@tromey.com>
1304
1305 * linux-low.c (install_software_single_step_breakpoints): Use
1306 make_scoped_restore.
1307 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1308 (do_restore_current_thread_cleanup): Remove.
1309 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1310 declare.
1311
45dd3607
TT
13122018-02-08 Tom Tromey <tom@tromey.com>
1313
1314 * mem-break.c (set_raw_breakpoint_at): Use
1315 gdb::unique_xmalloc_ptr.
1316
e671cd59
PA
13172018-01-30 Pedro Alves <palves@redhat.com>
1318
1319 PR gdb/13211
1320 * target.c (target_terminal::terminal_state): Rename to ...
1321 (target_terminal::m_terminal_state): ... this.
1322
a0aad537
JC
13232018-01-19 James Clarke <jrtc27@jrtc27.com>
1324
1325 * linux-low.c (handle_extended_wait): Surround call to
1326 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1327
4d9b86e1
SM
13282018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1331 linux_ptrace_attach_fail_reason_string now returning an
1332 std::string.
1333 (linux_attach): Likewise.
1334 * thread-db.c (attach_thread): Likewise.
1335
f517c180
EA
13362018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1337
1338 PR gdb/21559
1339 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1340 checking for fs_base/gs_base fields in struct user_regs_struct.
1341 * configure: Regenerate.
1342
9a70f35c
YQ
13432018-01-16 Yao Qi <yao.qi@linaro.org>
1344
1345 PR gdb/18749
1346 * linux-low.c (fetch_register): Call supply_register instead of
1347 error.
1348
605fd3c6
YQ
13492018-01-08 Yao Qi <yao.qi@linaro.org>
1350 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * Makefile.in (OBS): Remove selftest.o.
1353 * configure.ac: Set srv_selftest_objs if $development is true.
1354 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1355 * configure: Re-generated.
1356 * server.c (captured_main): Wrap variable selftest_filter with
1357 GDB_SELF_TEST.
1358
2cc05030
SM
13592018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1360
1361 * server.c (parse_debug_format_options): Return std::string.
1362 (handle_monitor_command, captured_main): Adjust.
1363
e379cee6
PA
13642018-01-05 Pedro Alves <palves@redhat.com>
1365
1366 PR gdb/18653
1367 * server.c (captured_main): Pass quiet=false to
1368 save_original_signals_state.
1369
82e1e79a
JB
13702018-01-01 Joel Brobecker <brobecker@adacore.com>
1371
1372 * gdbreplay.c (gdbreplay_version): Update copyright year in
1373 version message.
1374 * server.c (gdbserver_version): Likewise.
1375
8e481c3b
TT
13762017-12-08 Tom Tromey <tom@tromey.com>
1377
1378 * ax.c (ax_printf): Update.
1379
a8806230
YQ
13802017-12-07 Yao Qi <yao.qi@linaro.org>
1381
1382 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1383 aarch64_linux_read_description.
1384 * linux-amd64-ipa.c (idx2mask): New array.
1385 (get_ipa_tdesc): Move idx2mask out.
1386 (initialize_low_tracepoint): Initialize target descriptions.
1387 * linux-i386-ipa.c (idx2mask): New array.
1388 (get_ipa_tdesc): Move idx2mask out.
1389 (initialize_low_tracepoint): Initialize target descriptions.
1390
d4a0e8b5
SM
13912017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1392
1393 * tdesc.c (struct tdesc_type): Change return type.
1394 (tdesc_add_flag): Change parameter type.
1395 (tdesc_add_bitfield): Likewise.
1396 (tdesc_add_field): Likewise.
1397 (tdesc_set_struct_size): Likewise.
1398
798a7429
SM
13992017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1400
1401 * regcache.c (registers_to_string): Remove unused variable.
1402
c0e15c9b
SM
14032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1404
1405 * inferiors.c (for_each_inferior_with_data): Remove.
1406 * inferiors.h (for_each_inferior_with_data): Remove.
1407 * server.c (handle_qxfer_threads_worker): Change parameter type.
1408 (handle_qxfer_threads_proper): Use for_each_thread.
1409
f0045347
SM
14102017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1411
1412 * inferiors.c (for_each_inferior): Remove.
1413 (clear_inferiors): Use for_each_thread.
1414 * inferiors.h (for_each_inferior): Remove.
1415 * linux-low.c (linux_wait_for_event_filtered): Use
1416 for_each_thread.
1417 (linux_stabilize_threads): Likewise.
1418 * regcache.c (regcache_release): Likewise.
1419 * server.c (gdb_wants_all_threads_stopped): Likewise.
1420 (clear_pending_status_callback): Remove.
1421 (handle_status): Use for_each_thread.
1422 (captured_main): Likewise.
1423 * win32-low.c (child_init_thread_list): Likewise.
1424 (win32_clear_inferiors): Likewise.
1425 (fake_breakpoint_event): Likewise.
1426
9521758b
SM
14272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1428
1429 * inferiors.h (find_inferior): Remove.
1430 * inferiors.c (find_inferior): Remove.
1431
8f86d7aa
SM
14322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1433
1434 * linux-low.c (resume_status_pending_p): Update comment.
1435 (need_step_over_p): Update comment.
1436
e2b44075
SM
14372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1438
1439 * linux-low.c (proceed_one_lwp): Return void, change parameter
1440 type.
1441 (unsuspend_and_proceed_one_lwp): Likewise.
1442 (proceed_all_lwps): Use for_each_thread.
1443 (unstop_all_lwps): Likewise.
1444
c80825ff
SM
14452017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1446
1447 * linux-low.c (linux_resume_one_thread): Return void, take
1448 parameter directly.
1449 (linux_resume): Use for_each_thread.
1450
df3e4dbe
SM
14512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1452
1453 * linux-low.c (send_sigstop_callback): Return void, change
1454 parameter type. Rename to...
1455 (send_sigstop): ... this.
1456 (suspend_and_send_sigstop_callback): Return void, change parameter
1457 type. Rename to...
1458 (suspend_and_send_sigstop): ... this.
1459 (stop_all_lwps): Use for_each_thread.
1460
5a6b0a41
SM
14612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * linux-low.c (lwp_running): Return bool, remove unused
1464 argument.
1465 (linux_stabilize_threads): Use find_thread.
1466
39a64da5
SM
14672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1468
1469 * linux-low.c (select_singlestep_lwp_callback): Remove.
1470 (count_events_callback): Remove.
1471 (select_event_lwp_callback): Remove.
1472 (select_event_lwp): Use find_thread/for_each_thread.
1473
a1385b7b
SM
14742017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1475
1476 * linux-low.c (not_stopped_callback): Return bool, take filter
1477 argument directly.
1478 (linux_wait_for_event_filtered): Use find_thread.
1479 (linux_wait_1): Likewise.
1480
454296a2
SM
14812017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1482
1483 * linux-low.c (same_lwp): Remove.
1484 (find_lwp_pid): Use find_thread.
1485
6b2a85da
SM
14862017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1487
1488 * linux-low.c (delete_lwp_callback): Remove.
1489 (linux_mourn): Use for_each_thread.
1490
798a38e8
SM
14912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1492
1493 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1494 args parameter, don't check for pid.
1495 (linux_detach): Use for_each_thread.
1496
e4eb0dec
SM
14972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1498
1499 * linux-low.c (struct counter): Remove.
1500 (second_thread_of_pid_p): Remove.
1501 (last_thread_of_process_p): Use find_thread.
1502
83e1b6c1
SM
15032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1504
1505 * inferiors.c (find_inferior_in_random): Remove.
1506 * inferiors.h (find_inferior_in_random): Remove.
1507 * linux-low.c (status_pending_p_callback): Return bool, accept
1508 parameter ptid directly.
1509 (linux_wait_for_event_filtered): Use find_thread_in_random.
1510 (linux_wait_1): Likewise.
1511
8dc7b443
SM
15122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1513
1514 * inferiors.c (find_inferior_id): Remove.
1515 (find_thread_ptid): Move implemention from find_inferior_id to
1516 here.
1517 * inferiors.h (find_inferior_id): Remove.
1518 * server.c (handle_status): Use find_thread_ptid.
1519 (process_serial_event): Likewise.
1520 * thread-db.c (find_one_thread): Likewise.
1521 (thread_db_thread_handle): Likewise.
1522 * win32-low.c (thread_rec): Likewise.
1523 (child_delete_thread): Likewise.
1524 (win32_thread_alive): Likewise.
1525 (get_child_debug_event): Likewise.
1526
da25033c
SM
15272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * linux-mips-low.c (update_watch_registers_callback): Return
1530 void, remove pid_p parameter, don't check for pid.
1531 (mips_insert_point, mips_remove_point): Use for_each_thread.
1532
c91bb56b
SM
15332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1534
1535 * lynx.low (lynx_delete_thread_callback): Remove.
1536 (lynx_mourn): Use for_each_thread.
1537
634a3254
SM
15382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1539
1540 * regcache.c (regcache_invalidate_one): Remove.
1541 (regcache_invalidate_pid): use for_each_thread.
1542
41272101
TT
15432017-11-26 Tom Tromey <tom@tromey.com>
1544
1545 * linux-low.c (linux_create_inferior): Update.
1546
f5291a6f
UW
15472017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1548
1549 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1550
6654d750
AH
15512017-11-24 Alan Hayward <alan.hayward@arm.com>
1552
1553 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1554 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1555 * linux-aarch64-tdesc-selftest.c: New file.
1556 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1557
15582017-11-24 Alan Hayward <alan.hayward@arm.com>
1559
1560 * configure.srv: Add new file.
1561 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1562 * linux-aarch64-tdesc-selftest.c: New file.
1563 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1564
49bdb7ee
AH
15652017-11-24 Alan Hayward <alan.hayward@arm.com>
1566
1567 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1568 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1569 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1570
d6d7ce56
AH
15712017-11-24 Alan Hayward <alan.hayward@arm.com>
1572
1573 * configure.srv: Add new files.
1574 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1575 aarch64_linux_read_description.
1576 * linux-aarch64-low.c (aarch64_linux_read_description):
1577 Merge with aarch64_arch_setup.
1578 (aarch64_arch_setup): Call aarch64_linux_read_description.
1579 * linux-aarch64-tdesc.c: New file.
1580 * linux-aarch64-tdesc.h: New file.
1581
506fe5f4
YQ
15822017-11-24 Yao Qi <yao.qi@linaro.org>
1583
1584 * configure.srv: Set $srv_regobj for tic6x-linux.
1585 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1586 (tic6x_read_description): Move some code to tic6x_arch_setup.
1587 (tic6x_tdesc_test): New function.
1588 (initialize_low_arch): Call selftests::register_test.
1589
29f9a567
YQ
15902017-11-22 Yao Qi <yao.qi@linaro.org>
1591
1592 * remote-utils.c (prepare_resume_reply): Use memcpy.
1593
578290ec
SM
15942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1595
1596 * linux-low.c (kill_one_lwp_callback): Return void, take
1597 argument directly, don't filter on pid.
1598 (linux_kill): Use for_each_thread.
1599
eca55aec
SM
16002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1601
1602 * linux-low.c (need_step_over_p): Return bool, remove dummy
1603 argument.
1604 (linux_resume, proceed_all_lwps): Use find_thread.
1605
25c28b4d
SM
16062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1607
1608 * linux-low.c (resume_status_pending_p): Return bool, remove
1609 flag_p argument.
1610 (linux_resume): Use find_thread.
1611
5fdda392
SM
16122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1613
1614 * linux-low.c (struct thread_resume_array): Remove.
1615 (linux_set_resume_request): Return void, take arguments
1616 directly.
1617 (linux_resume): Use for_each_thread.
1618
fcb056a5
SM
16192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1620
1621 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1622 return bool, remove data argument.
1623 (linux_stabilize_threads): Use find_thread.
1624
139720c5
SM
16252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * linux-low.c (unsuspend_one_lwp): Remove.
1628 (unsuspend_all_lwps): Use for_each_thread, inline code from
1629 unsuspend_one_lwp.
1630
6d1e5673
SM
16312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1632
1633 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1634 * linux-low.c (struct iterate_over_lwps_args): Remove.
1635 (iterate_over_lwps_filter): Remove.
1636 (iterate_over_lwps): Use find_thread.
1637
bbf550d5
SM
16382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1639
1640 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1641 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1642 code from reset_lwp_ptrace_options_callback.
1643
00192f77
SM
16442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1645
1646 * linux-arm-low.c (struct update_registers_data): Remove.
1647 (update_registers_callback): Return void, take arguments
1648 directly, don't check thread's pid.
1649 (arm_insert_point, arm_remove_point): Use for_each_thread.
1650
2bee2b6c
SM
16512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1652
1653 * win32-low.c (continue_one_thread): Return void, take argument
1654 directly.
1655 (child_continue): Use for_each_thread.
1656
0b360f19
SM
16572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1658
1659 * win32-i386-low.c (update_debug_registers_callback): Rename
1660 to ...
1661 (update_debug_registers): ... this, return void, remove pid_p arg.
1662 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1663
f27866ba
SM
16642017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1665
1666 * inferiors.h (struct process_info): Add constructor, initialize
1667 fields..
1668 <syscalls_to_catch>: Change type to std::vector<int>.
1669 * inferiors.c (add_process): Allocate process_info with new.
1670 (remove_process): Free process_info with delete.
1671 * linux-low.c (handle_extended_wait): Adjust.
1672 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1673 * server.c (handle_general_set): Adjust.
1674
e849ea89
PA
16752017-11-16 Pedro Alves <palves@redhat.com>
1676
1677 * remote-utils.c (remote_close): Block SIGIO signals instead of
1678 uninstalling the SIGIO handler.
1679
1d0aa65c
AH
16802017-11-16 Alan Hayward <alan.hayward@arm.com>
1681
1682 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1683
3491a34c
YQ
16842017-11-16 Yao Qi <yao.qi@linaro.org>
1685
1686 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1687 (tic6x_store_gregset): Likewise.
1688 (tic6x_usrregs_info): Move it up.
1689
a602f924
AH
16902017-11-15 Alan Hayward <alan.hayward@arm.com>
1691
1692 * Makefile.in: Update arch rules.
1693 * configure.srv: Explicitly mark arch/ files.
1694
5616b6c3
AS
16952017-11-13 Andreas Schwab <schwab@suse.de>
1696
1697 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1698 function.
1699 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1700
d1928160
PA
17012017-11-06 Pedro Alves <palves@redhat.com>
1702
1703 * config.in, configure: Regenerate.
1704
bac608e7
SM
17052017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1706
1707 * target.c (struct thread_search): Remove.
1708 (thread_search_callback): Remove.
1709 (prepare_to_access_memory): Use for_each_thread instead of
1710 find_inferior. Inline code from thread_search_callback.
1711
eaddb425
SM
17122017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1713
1714 * server.c (struct visit_actioned_threads_data): Remove.
1715 (visit_actioned_threads): Change prototype to take arguments
1716 directly.
1717 (resume): Use find_thread instead of find_inferior.
1718
99078d34
SM
17192017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1720
1721 * server.c (queue_stop_reply_callback): Change prototype, return
1722 void.
1723 (find_status_pending_thread_callback): Remove.
1724 (handle_status): Replace find_inferior with find_thread and
1725 for_each_thread.
1726
cc628f3d
AH
17272017-10-25 Alan Hayward <alan.hayward@arm.com>
1728
1729 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1730 with REGNO.
1731 (aarch64_store_gregset): Likewise.
1732 (aarch64_fill_fpregset): Likewise.
1733 (aarch64_store_fpregset): Likewise.
1734
4d3bb80e
SM
17352017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1736
1737 * gdbthread.h (find_thread, for_each_thread): New functions.
1738 * inferiors.c (thread_of_pid): Remove.
1739 (find_any_thread_of_pid): Use find_thread.
1740 * linux-low.c (num_lwps): Use for_each_thread.
1741
7a7cdfa0
YQ
17422017-10-17 Yao Qi <yao.qi@linaro.org>
1743
1744 * Makefile.in: Remove one rule.
1745 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1746
e675d170
YQ
17472017-10-17 Yao Qi <yao.qi@linaro.org>
1748
1749 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1750 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1751
7eb4e0f9
YQ
17522017-10-17 Yao Qi <yao.qi@linaro.org>
1753
1754 * configure.srv: Rename arm.o with arch/arm.o.
1755
60d6cfc9
YQ
17562017-10-17 Yao Qi <yao.qi@linaro.org>
1757
1758 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1759 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1760 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1761 (arch-i386.o, arch-amd64.o): Remove rules.
1762 (arch/%.o): New rule.
1763 Update POSTCOMPILE and COMPILE.pre.
1764 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1765 * configure: Re-generated.
1766 * configure.srv: Replace arch-i386.o with arch/i386.o.
1767 Replace arch-amd64.o with arch/amd64.o.
1768
5bfda255
YQ
17692017-10-16 Yao Qi <yao.qi@linaro.org>
1770
1771 * configure: Regenerated.
1772
9c80ecd6
SM
17732017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1774
1775 * inferiors.h: (struct inferior_list): Remove.
1776 (struct inferior_list_entry); Remove.
1777 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1778 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1779 get_first_inferior): Remove.
1780 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1781 find_inferior_id, find_inferior_in_random): Change signature.
1782 * inferiors.c (all_threads): Change type to
1783 std::list<thread_info *>.
1784 (get_thread): Remove macro.
1785 (find_inferior, find_inferior_id): Change signature, implement
1786 using find_thread.
1787 (find_inferior_in_random): Change signature, implement using
1788 find_thread_in_random.
1789 (for_each_inferior, for_each_inferior_with_data): Change
1790 signature, implement using for_each_thread.
1791 (add_inferior_to_list, remove_inferior): Remove.
1792 (add_thread, get_first_thread, thread_of_pid,
1793 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1794 (get_first_inferior, one_inferior_p, clear_inferior_list):
1795 Remove.
1796 (clear_inferiors, get_thread_process): Update.
1797 * gdbthread.h: Include <list>.
1798 (struct thread_info) <entry>: Remove field.
1799 <id>: New field.
1800 (all_threads): Change type to std::list<thread_info *>.
1801 (get_first_inferior): Add doc.
1802 (find_thread, for_each_thread, find_thread_in_random): New
1803 functions.
1804 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1805 * linux-arm-low.c (update_registers_callback): Update.
1806 * linux-low.c (second_thread_of_pid_p): Update.
1807 (kill_one_lwp_callback, linux_detach_lwp_callback,
1808 delete_lwp_callback, status_pending_p_callback, same_lwp,
1809 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1810 iterate_over_lwps, not_stopped_callback,
1811 resume_stopped_resumed_lwps, count_events_callback,
1812 select_singlestep_lwp_callback, select_event_lwp_callback,
1813 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1814 suspend_and_send_sigstop_callback, wait_for_sigstop,
1815 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1816 lwp_running, linux_set_resume_request, resume_status_pending_p,
1817 need_step_over_p, start_step_over, linux_resume_one_thread,
1818 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1819 reset_lwp_ptrace_options_callback): Update.
1820 * linux-mips-low.c (update_watch_registers_callback): Update.
1821 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1822 Update.
1823 (free_register_cache_thread_one): Remove.
1824 (regcache_release): Update.
1825 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1826 handle_qxfer_threads_worker): Update.
1827 (handle_query): Update, use list iterator.
1828 (visit_actioned_threads, handle_pending_status,
1829 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1830 clear_pending_status_callback, set_pending_status_callback,
1831 find_status_pending_thread_callback, handle_status,
1832 process_serial_event): Update.
1833 * target.c (thread_search_callback): Update.
1834 * thread-db.c (thread_db_get_tls_address): Update.
1835 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1836 Update.
1837 * win32-i386-low.c (update_debug_registers_callback): Update.
1838 * win32-low.c (delete_thread_info, child_delete_thread,
1839 continue_one_thread, suspend_one_thread,
1840 get_child_debug_event): Adjust.
1841
9179355e
SM
18422017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1843
1844 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1845 * inferiors.h: Include <list>.
1846 (struct process_info) <entry>: Remove field.
1847 <pid>: New field.
1848 (pid_of): Change macro to function.
1849 (ptid_of, lwpid_of): Remove macro.
1850 (all_processes): Change type to std::list<process_info *>.
1851 (ALL_PROCESSES): Remove macro.
1852 (for_each_process, find_process): New function.
1853 * inferiors.c (all_processes): Change type to
1854 std::list<process_info *>.
1855 (find_thread_process): Adjust.
1856 (add_process): Likewise.
1857 (remove_process): Likewise.
1858 (find_process_pid): Likewise.
1859 (get_first_process): Likewise.
1860 (started_inferior_callback): Remove.
1861 (have_started_inferiors_p): Adjust.
1862 (attached_inferior_callback): Remove.
1863 (have_attached_inferiors_p): Adjust.
1864 * linux-low.c (check_zombie_leaders): Likewise.
1865 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1866 (x86_linux_update_xmltarget): Adjust.
1867 * server.c (handle_query): Likewise.
1868 (gdb_reattached_process): Remove.
1869 (handle_status): Adjust.
1870 (kill_inferior_callback): Likewise.
1871 (detach_or_kill_inferior): Remove.
1872 (print_started_pid): Likewise.
1873 (print_attached_pid): Likewise.
1874 (detach_or_kill_for_exit): Update.
1875 (process_serial_event): Likewise.
1876 * linux-arm-low.c (arm_new_fork): Likewise.
1877
c9cb8905
SM
18782017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1879
1880 * dll.h: Include <list>.
1881 (struct dll_info): Add constructor.
1882 <entry>: Remove field.
1883 (all_dlls): Change type to std::list<dll_info>.
1884 * dll.c: Include <algorithm>.
1885 (get_dll): Remove macro.
1886 (all_dlls): Change type to std::list<dll_info *>.
1887 (free_one_dll): Remove.
1888 (match_dll): Likewise.
1889 (loaded_dll): Adjust.
1890 (unloaded_dll): Adjust to all_dlls type change, use
1891 std::find_if. Inline code from match_dll.
1892 (clear_dlls): Adjust to all_dlls type change.
1893 * server.c (emit_dll_description): Remove.
1894 (handle_qxfer_libraries): Adjust to all_dlls type change,
1895 integrate emit_dll_description's functionality.
1896
04ec7890
SM
18972017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * linux-low.h (struct linux_target_ops) <delete_process>: New
1900 field.
1901 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1902 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1903 (struct linux_target_ops): Add delete_process callback.
1904 * linux-arm-low.c (arm_delete_process): New.
1905 (struct linux_target_ops): Add delete_process callback.
1906 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1907 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1908 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1909 * linux-mips-low.c (mips_linux_delete_process): New.
1910 (struct linux_target_ops): Add delete_process callback.
1911 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1912 * linux-s390-low.c (struct linux_target_ops): Likewise.
1913 * linux-sh-low.c (struct linux_target_ops): Likewise.
1914 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1915 * linux-tile-low.c (struct linux_target_ops): Likewise.
1916 * linux-x86-low.c (x86_linux_delete_process): New.
1917 (struct linux_target_ops): Add delete_process callback.
1918 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1919
466eecee
SM
19202017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1921
1922 * linux-aarch64-low.c (the_low_target): Add thread delete
1923 callback.
1924 * linux-arm-low.c (arm_delete_thread): New function.
1925 (the_low_target): Add thread delete callback.
1926 * linux-bfin-low.c (the_low_target): Likewise.
1927 * linux-crisv32-low.c (the_low_target): Likewise.
1928 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1929 set.
1930 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1931 field.
1932 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1933 * linux-mips-low.c (mips_linux_delete_thread): New function.
1934 (the_low_target): Add thread delete callback.
1935 * linux-ppc-low.c (the_low_target): Likewise.
1936 * linux-s390-low.c (the_low_target): Likewise.
1937 * linux-sh-low.c (the_low_target): Likewise.
1938 * linux-tic6x-low.c (the_low_target): Likewise.
1939 * linux-tile-low.c (the_low_target): Likewise.
1940 * linux-x86-low.c (the_low_target): Likewise.
1941 * linux-xtensa-low.c (the_low_target): Likewise.
1942
b79f7801
YZ
19432017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1944
1945 * win32-low.c: Include "common-inferior.h".
1946
bc3b087d
SDJ
19472017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1948
1949 * inferiors.c (set_inferior_cwd): New function.
1950 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1951 (handle_query): Inform that QSetWorkingDir is supported.
1952 * win32-low.c (create_process): Pass the inferior's cwd to
1953 CreateProcess.
1954
d092c5a2
SDJ
19552017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1956
1957 * inferiors.c (current_inferior_cwd): New global variable.
1958 (get_inferior_cwd): New function.
1959 * inferiors.h (struct process_info) <cwd>: New field.
1960
7da0a886
SDJ
19612017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1962
1963 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1964 (OBS): Add gdb_tilde_expand.o.
1965
289a6840
SM
19662017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1967
1968 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1969 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1970
256642e8
PA
19712017-09-29 Pedro Alves <palves@redhat.com>
1972
1973 * ax.c (gdb_parse_agent_expr): Constify.
1974 * ax.h (gdb_parse_agent_expr): Constify.
1975 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1976 Constify.
1977 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1978 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1979 * remote-utils.h (read_ptid): Constify.
1980 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1981 (process_point_options, process_serial_event): Constify.
1982 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1983 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1984 (cmd_qtbuffer): Constify.
1985
5b9ca4d4
PA
19862017-09-29 Pedro Alves <palves@redhat.com>
1987
1988 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1989 fails.
1990
94c207e0
PA
19912017-09-29 Pedro Alves <palves@redhat.com>
1992
1993 * linux-low.c (handle_extended_wait): Pass parent thread instead
1994 of process to thread_db_notice_clone.
1995 * linux-low.h (thread_db_notice_clone): Replace parent process
1996 parameter with parent thread parameter.
1997 * thread-db.c (find_one_thread): Add comment.
1998 (thread_db_notice_clone): Replace parent process parameter with
1999 parent thread parameter. Temporarily switch to the parent thread.
2000
75352e28
SDJ
20012017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2002
2003 * gdbthread.h: Include "common-gdbthread.h".
2004 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2005 "if" when validating the ptid.
2006 * remote-utils.c: Include "gdbthread.h".
2007 (prepare_resume_reply): Use "switch_to_thread".
2008 * target.c (done_accessing_memory): Likewise.
2009
ad339634
AA
20102017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2011
2012 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2013 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2014 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2015 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2016 s390x-gs-linux64-ipa.o to ipa_obj.
2017 * linux-s390-low.c (HWCAP_S390_GS): New define.
2018 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2019 New functions.
2020 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2021 (s390_arch_setup): Check for guarded-storage support and choose
2022 appropriate tdesc.
2023 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2024 init_registers_s390x_gs_linux64.
2025 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2026 enum value.
2027 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2028 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2029
cc4d742f
SM
20302017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2031
2032 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2033
f6327dcb
KB
20342017-09-21 Kevin Buettner <kevinb@redhat.com>
2035
2036 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2037 (thread_db_thread_handle): Declare.
2038 * linux-low.c (linux_target_ops): Initialize thread_handle.
2039 * server.c (handle_qxfer_threads_worker): Add support for
2040 "handle" attribute.
2041 * target.h (struct target_ops): Add new function pointer,
2042 thread_handle.
2043 (target_thread_handle): Define.
2044 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2045 field in lwp.
2046 (thread_db_thread_handle): New function.
2047
86299109
KB
20482017-09-21 Kevin Buettner <kevinb@redhat.com>
2049
2050 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2051 * linux-low.h (thread_db_notice_clone): Declare.
2052 * thread-db.c (thread_db_notice_clone): New function.
2053
f557a88a
PA
20542017-09-21 Pedro Alves <palves@redhat.com>
2055
2056 * server.c (gdb_read_memory, handle_status, process_serial_event)
2057 (handle_serial_event, handle_target_event): Adjust to
2058 set_desired_thread prototype change.
2059 * target.c (set_desired_thread): Remove 'use_general' parameter
2060 and adjust.
2061 * target.h (set_desired_thread): Remove 'use_general' parameter.
2062
223ffa71
TT
20632017-09-20 Tom Tromey <tom@tromey.com>
2064
2065 * target.c (target_terminal::terminal_state): Define.
2066 (target_terminal::init): Rename from target_terminal_init.
2067 (target_terminal::inferior): Rename from
2068 target_terminal_inferior.
2069 (target_terminal::ours): Rename from target_terminal_ours.
2070 (target_terminal::ours_for_output, target_terminal::info): New.
2071
04fd3ba9
SM
20722017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2073
2074 * server.c (accumulate_file_name_length): Remove.
2075 (emit_dll_description): Adjust to std::string change.
2076 (handle_qxfer_libraries): Use std::string to hold document.
2077
5e187554
SM
20782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2079
2080 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2081 return type of xml_escape_text.
2082 * server.c (emit_dll_description): Likewise.
2083
1526853e
SM
20842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2085
2086 * server.c (captured_main): Accept argument for --selftest.
2087 Update run_tests call.
2088 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2089 when registering selftests.
2090
c4dfafab
SDJ
20912017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2092
2093 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2094 instead of "VEC" for "target_desc.reg_defs".
2095 (regcache_cpy): Likewise.
2096 (registers_to_string): Likewise.
2097 (registers_from_string): Likewise.
2098 (find_regno): Likewise.
2099 (supply_regblock): Likewise.
2100 (regcache_raw_read_unsigned): Likewise.
2101 * tdesc.c (init_target_desc): Likewise.
2102 (tdesc_create_reg): Likewise.
2103 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2104 (struct target_desc) <reg_defs>: Convert to "std::vector".
2105 (target_desc): Do not initialize "reg_defs".
2106 (~target_desc): Update code to use "std::vector" instead of "VEC"
2107 for "target_desc.reg_defs".
2108 (operator==): Likewise.
2109
124aceb4
SM
21102017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2111
2112 * inferiors.h (thread_to_gdb_id): Remove.
2113 * inferiors.c (thread_to_gdb_id): Remove.
2114 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2115 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2116 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2117 Likewise.
2118 * nto-low.c (nto_fetch_registers, nto_store_registers,
2119 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2120
96cde54f
SM
21212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2122
2123 * inferiors.h (gdb_id_to_thread_id): Remove.
2124 * inferiors.c (gdb_id_to_thread_id): Remove.
2125 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2126 removal. Move pid declaration closer to where it's used.
2127
e8ca139e
SM
21282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2129
2130 * server.c (handle_detach): New function.
2131 (process_serial_event): Move code out, call handle_detach.
2132
f8a4e119
SM
21332017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2134
2135 * server.c (require_running): Rename to ...
2136 (require_running_or_return): ... this ...
2137 (require_running_or_break): ... and this.
2138 (handle_query, process_serial_event): Adjust.
2139
0eb0a407
SM
21402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2141
2142 * linux-low.c (linux_set_resume_request): Remove unused
2143 variables.
2144
785922a5
SM
21452017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2146
2147 * server.c (first_thread_of): Remove.
2148 (process_serial_event): Replace usage of first_thread_of with
2149 find_any_thread_of_pid.
2150 * tracepoint.c (same_process_p): Remove.
2151 (gdb_agent_about_to_close): Replace usage of same_process_p with
2152 find_any_thread_of_pid.
2153 * linux-x86-low.c (same_process_callback): Remove.
2154 (x86_arch_setup_process_callback): Replace usage of
2155 same_process_callback with find_any_thread_of_pid.
2156 * thread-db.c (any_thread_of): Remove.
2157 (switch_to_process): Replace usage of any_thread_of with
2158 find_any_thread_of_pid.
2159 * inferiors.c (thread_pid_matches_callback): Remove.
2160 (find_thread_process): Adjust to use find_any_thread_of_pid.
2161
a059f00c
SDJ
21622017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2163
2164 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 2165 with "!VEC_empty".
a059f00c 2166
cc397f3a
SDJ
21672017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2168
2169 * linux-low.c (handle_extended_wait): Use
2170 "allocate_target_description" instead of "XNEW".
2171 * linux-x86-low.c (initialize_low_arch): Likewise.
2172
22916b07
YQ
21732017-09-05 Yao Qi <yao.qi@linaro.org>
2174
2175 * configure.srv (srv_i386_regobj): Remove.
2176 (srv_amd64_regobj): Remove.
2177 (srv_regobj): Set it to "" for x86 non-linux targets.
2178 * linux-x86-tdesc.c (i386_linux_read_description):
2179 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2180 (init_registers_i386): Remove the declaration.
2181 (tdesc_i386): Remove the declaration.
2182 (lynx_i386_arch_setup): Call i386_create_target_description.
2183 * nto-x86-low.c: Likewise.
2184 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2185 [!__x86_64__]: include arch/i386.h.
2186 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2187
38602d55
YQ
21882017-09-05 Yao Qi <yao.qi@linaro.org>
2189
2190 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2191 i386/amd64-XXX-linux from it.
2192
44b886ff
YQ
21932017-09-05 Yao Qi <yao.qi@linaro.org>
2194
2195 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2196 false.
2197 (ipa_amd64_linux_regobj): Remove.
2198 (ipa_x32_linux_regobj): Remove.
2199
b4570e4b
YQ
22002017-09-05 Yao Qi <yao.qi@linaro.org>
2201
2202 * Makefile.in (arch-amd64.o): New rule.
2203 * configure.srv: Append arch-amd64.o.
2204 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2205 (get_ipa_tdesc): Call amd64_linux_read_description.
2206 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2207 and init_registers_amd64_XXX.
2208 * linux-x86-low.c (x86_linux_read_description): Call
2209 amd64_linux_read_description.
2210 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2211 (initialize_low_arch): Don't call init_registers_x32_XXX and
2212 init_registers_amd64_XXX.
2213 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2214 and tdesc_amd64_XXX.
2215 [__x86_64__] (amd64_tdesc_test): New function.
2216 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2217 and init_registers_amd64_XXX.
2218 * linux-x86-tdesc.c: Include arch/amd64.h.
2219 (xcr0_to_tdesc_idx): New function.
2220 (i386_linux_read_description): New function.
2221 (amd64_get_ipa_tdesc_idx): New function.
2222 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2223 (amd64_get_ipa_tdesc): Declare.
2224
d1f28ea2
YQ
22252017-09-05 Yao Qi <yao.qi@linaro.org>
2226
2227 * configure.srv (srv_i386_linux_xmlfiles): Remove
2228 i386/i386-XXX-linux.xml from it.
2229
25a93583
YQ
22302017-09-05 Yao Qi <yao.qi@linaro.org>
2231
2232 * configure.srv: Set srv_i386_linux_regobj empty if $development
2233 is false.
2234 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2235 initialize_low_tdesc.
2236 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2237 with #if initialize_low_tdesc.
2238 * linux-x86-tdesc-selftest.c: New file.
2239 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2240
5f035c07
YQ
22412017-09-05 Yao Qi <yao.qi@linaro.org>
2242
2243 * Makefile.in (arch-i386.o): New rule.
2244 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2245 (x86_64-*-linux*): Likewise.
2246 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2247 include arch/i386.h.
2248 (i386_linux_read_description): Remove code and call
2249 i386_create_target_description.
2250 * tdesc.c (allocate_target_description): New function.
2251 * tdesc.h (set_tdesc_architecture): Remove declaration.
2252 (set_tdesc_osabi): Likewise.
2253
0abe8a89
YQ
22542017-09-05 Yao Qi <yao.qi@linaro.org>
2255
2256 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2257 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2258 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2259 .xmltarget.
2260 * server.c (get_features_xml): Call tdesc_get_features_xml.
2261 * tdesc.c (set_tdesc_architecture): New function.
2262 (set_tdesc_osabi): New function.
2263 (tdesc_get_features_xml): New function.
2264 (tdesc_create_feature): Add an argument.
2265 * tdesc.h (struct target_desc) <features>: New field.
2266 <arch, osabi>: New field.
2267 (~target_desc): xfree features, arch, and osabi.
2268 (target_desc::oerator==): Don't compare .xmltarget.
2269 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2270 (set_tdesc_osabi): Likewise.
2271 (tdesc_get_features_xml): Likewise.
2272
0a188386
YQ
22732017-09-05 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-x86-tdesc.c: Include selftest.h.
2276 (i386_tdesc_test): New function.
2277 (initialize_low_tdesc): Call selftests::register_test.
2278 * tdesc.h: Include regdef.h.
2279 (target_desc): Override operator == and !=.
2280
f49ff000
YQ
22812017-09-05 Yao Qi <yao.qi@linaro.org>
2282
2283 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2284 (ipa_obj): Likewise.
2285 * linux-i386-ipa.c: Include common/x86-xstate.h
2286 (get_ipa_tdesc): Call i386_linux_read_description.
2287 (initialize_low_tracepoint): Don't call init_registers_XXX
2288 functions, call initialize_low_tdesc instead.
2289 * linux-x86-low.c (x86_linux_read_description): Call
2290 i386_linux_read_description.
2291 (initialize_low_arch): Don't call init_registers_i386_XXX
2292 functions, call initialize_low_tdesc.
2293 * linux-x86-tdesc.c: New file.
2294 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2295 (i386_get_ipa_tdesc_idx): Declare.
2296 (i386_get_ipa_tdesc): Declare.
2297 (initialize_low_tdesc): Declare.
2298
2b68ef2f
YQ
22992017-09-05 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2302 instead of 0.
2303
f7000548
YQ
23042017-09-05 Yao Qi <yao.qi@linaro.org>
2305
2306 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2307 * regcache.c (get_thread_regcache): Use VEC_length.
2308 (init_register_cache): Likewise.
2309 (regcache_cpy): Likewise.
2310 (registers_to_string): Iterate reg_defs via VEC_iterate.
2311 (find_regno): Likewise.
2312 (find_register_by_number): Use VEC_index.
2313 (register_size): Call find_register_by_number.
2314 (register_data): Call find_register_by_number.
2315 (supply_regblock): Use VEC_length.
2316 (regcache_raw_read_unsigned): Likewise.
2317 * tdesc.c (init_target_desc): Iterate reg_defs via
2318 VEC_iterate.
2319 (default_description): Update initializer.
2320 (copy_target_description): Don't update field num_registers.
2321 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2322 <num_registers>: Remove.
2323
50a421ac
SM
23242017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2325
2326 * Makefile.in (.SECONDARY): Define target.
2327
23fdd69e
SM
23282017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2329
2330 * linux-low.c (linux_wait_1): Adjust.
2331 * server.c (queue_stop_reply_callback): Adjust.
2332
0a2dde4a
SDJ
23332017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2334
2335 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2336 QEnvironmentUnset and QEnvironmentReset packets.
2337 (handle_query): Inform remote that QEnvironmentHexEncoded,
2338 QEnvironmentUnset and QEnvironmentReset are supported.
2339
6afd337d
SM
23402017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2341
2342 * inferiors.h (inferior_target_data): Rename to ...
2343 (thread_target_data): ... this.
2344 (inferior_regcache_data): Rename to ...
2345 (thread_regcache_data): ... this.
2346 (set_inferior_regcache_data): Rename to ...
2347 (set_thread_regcache_data): ... this.
2348 * inferiors.c (inferior_target_data): Rename to ...
2349 (thread_target_data): ... this.
2350 (inferior_regcache_data): Rename to ...
2351 (thread_regcache_data): ... this.
2352 (set_inferior_regcache_data): Rename to ...
2353 (set_thread_regcache_data): ... this.
2354 (free_one_thread): Update.
2355 * linux-low.h (get_thread_lwp): Update.
2356 * regcache.c (get_thread_regcache): Update.
2357 (regcache_invalidate_thread): Update.
2358 (free_register_cache_thread): Update.
2359 * win32-i386-low.c (update_debug_registers_callback): Update.
2360 (win32_get_current_dr): Update.
2361 * win32-low.c (thread_rec): Update.
2362 (delete_thread_info): Update.
2363 (continue_one_thread): Update.
2364 (suspend_one_thread): Update.
2365
a160cc46
SM
23662017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2367
2368 * inferiors.c (set_inferior_target_data): Remove.
2369 * inferiors.h (set_inferior_target_data): Remove.
2370
6d580b63
YQ
23712017-08-18 Yao Qi <yao.qi@linaro.org>
2372
2373 * Makefile.in (OBS): Add selftest.o.
2374 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2375 * configure, config.in: Re-generated.
2376 * server.c: Include common/sefltest.h.
2377 (captured_main): Handle option --selftest.
2378
f5a29eb0
YQ
23792017-08-09 Yao Qi <yao.qi@linaro.org>
2380
2381 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2382 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2383 i386-avx-mpx.o and i386-mmx.o.
2384 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2385 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2386 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2387 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2388 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2389 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2390 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2391 i386/amd64-avx-mpx.xml.
2392
57757c2f
YQ
23932017-08-09 Yao Qi <yao.qi@linaro.org>
2394
2395 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2396 and x32-avx-avx512.o.
2397 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2398 i386/x32-avx-avx512.xml.
2399
229d26fc
SM
24002017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2401
2402 * tracepoint.h (enum class fast_tpoint_collect_result): New
2403 enumeration.
2404 (fast_tracepoint_collecting): Change return type to
2405 fast_tpoint_collect_result.
2406 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2407 * linux-low.h: Include tracepoint.h.
2408 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2409 fast_tpoint_collect_result.
2410 * linux-low.c (handle_tracepoints): Adjust.
2411 (linux_fast_tracepoint_collecting): Change return type to
2412 fast_tpoint_collect_result.
2413 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2414 linux_wait_1, stuck_in_jump_pad_callback,
2415 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2416 proceed_one_lwp): Adjust to type change.
2417
2e1e43e1
YQ
24182017-07-10 Yao Qi <yao.qi@linaro.org>
2419
2420 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2421
adc764e7
YQ
24222017-06-29 Yao Qi <yao.qi@linaro.org>
2423
2424 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2425 Remove.
2426 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2427
a206891a
SM
24282017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2429
2430 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2431
9a6c7d9c
SDJ
24322017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2433
2434 * linux-low.c (linux_create_inferior): Adjust code to access the
2435 environment information via 'gdb_environ' class.
2436 * lynx-low.c (lynx_create_inferior): Likewise.
2437 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2438 (get_environ): Return a pointer to 'our_environ'.
2439 (captured_main): Initialize 'our_environ'.
2440 * server.h (get_environ): Adjust prototype.
2441 * spu-low.c (spu_create_inferior): Adjust code to access the
2442 environment information via 'gdb_environ' class.
2443
ae3e2ccf
SM
24442017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2445
2446 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2447 usage of "register" keyword.
2448
3e019bdc
SM
24492017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2450
2451 * configure: Re-generate.
2452
8465943a
SM
24532017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2454
2455 * configure: Re-generate.
2456
cf0dd6f0
SM
24572017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2458
2459 * Makefile.in (COMPILE.pre): Add "-x c++".
2460
9845682b
SDJ
24612017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2462
2463 * fork-child.c: Conditionally include <signal.h>.
2464
aefd8b33
SDJ
24652017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2466
2467 * server.c (handle_general_set): Handle new packet
2468 "QStartupWithShell".
2469 (handle_query): Add "QStartupWithShell" to the list of supported
2470 packets.
2471 (gdbserver_usage): Add help text explaining the
2472 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2473 options.
2474 (captured_main): Recognize and act upon the presence of the new
2475 CLI options.
2476
2090129c
SDJ
24772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2478 Pedro Alves <palves@redhat.com>
2479
2480 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2481 * configure: Regenerate.
2482 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2483 "fork-inferior.o".
2484 (i[34567]86-*-lynxos*): Likewise.
2485 (spu*-*-*): Likewise.
2486 * fork-child.c: New file.
2487 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2488 and "environ.h".
2489 (linux_ptrace_fun): New function.
2490 (linux_create_inferior): Adjust function prototype to reflect
2491 change on "target.h". Adjust function code to use
2492 "fork_inferior".
2493 (linux_request_interrupt): Delete "signal_pid".
2494 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2495 (lynx_ptrace_fun): New function.
2496 (lynx_create_inferior): Adjust function prototype to reflect
2497 change on "target.h". Adjust function code to use
2498 "fork_inferior".
2499 * nto-low.c (nto_create_inferior): Adjust function prototype and
2500 code to reflect change on "target.h". Update comments.
2501 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2502 "common-terminal.h" and "environ.h".
2503 (terminal_fd): Moved to fork-child.c.
2504 (old_foreground_pgrp): Likewise.
2505 (restore_old_foreground_pgrp): Likewise.
2506 (last_status): Make it global.
2507 (last_ptid): Likewise.
2508 (our_environ): New variable.
2509 (startup_with_shell): Likewise.
2510 (program_name): Likewise.
2511 (program_argv): Rename to...
2512 (program_args): ...this.
2513 (wrapper_argv): New variable.
2514 (start_inferior): Delete function.
2515 (get_exec_wrapper): New function.
2516 (get_exec_file): Likewise.
2517 (get_environ): Likewise.
2518 (prefork_hook): Likewise.
2519 (post_fork_inferior): Likewise.
2520 (postfork_hook): Likewise.
2521 (postfork_child_hook): Likewise.
2522 (handle_v_run): Update code to deal with arguments coming from the
2523 remote host. Update calls from "start_inferior" to
2524 "create_inferior".
2525 (captured_main): Likewise. Initialize environment variable. Call
2526 "have_job_control".
2527 * server.h (post_fork_inferior): New prototype.
2528 (get_environ): Likewise.
2529 (last_status): Declare.
2530 (last_ptid): Likewise.
2531 (signal_pid): Likewise.
2532 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2533 (spu_ptrace_fun): New function.
2534 (spu_create_inferior): Adjust function prototype to reflect change
2535 on "target.h". Adjust function code to use "fork_inferior".
2536 * target.c (target_terminal_init): New function.
2537 (target_terminal_inferior): Likewise.
2538 (target_terminal_ours): Likewise.
2539 * target.h: Include <vector>.
2540 (struct target_ops) <create_inferior>: Update prototype.
2541 (create_inferior): Update macro.
2542 * utils.c (gdb_flush_out_err): New function.
2543 * win32-low.c (win32_create_inferior): Adjust function prototype
2544 and code to reflect change on "target.h".
2545
043a4934
SDJ
25462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2547
2548 * inferiors.c (switch_to_thread): New function.
2549
15652511
SDJ
25502017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2551
2552 * Makefile.in (SFILE): Add "common/job-control.c".
2553 (OBS): Add "job-control.o".
2554
21ea5acd
SDJ
25552017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2556
2557 * Makefile: Remove "@host_makefile_frag@".
2558
e13cb306
PA
25592017-05-05 Pedro Alves <palves@redhat.com>
2560
2561 * configure: Regenerate.
2562
c94fee56
SDJ
25632017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2564
2565 * configure: Regenerate.
2566
a0ff9e1a
SM
25672017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2568
2569 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2570 software_single_step change of return type to
2571 std::vector<CORE_ADDR>.
2572 * linux-low.c (install_software_single_step_breakpoints):
2573 Likewise.
2574 * linux-low.h (install_software_single_step_breakpoints):
2575 Likewise.
2576
be628ab8
SDJ
25772017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2578
2579 * remote-utils.c: Include "gdb_termios.h" instead of
2580 "terminal.h".
2581 * terminal.h: Delete file.
2582
7c5ded6a
SDJ
25832017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2584
2585 * server.c: Include <vector>.
2586 <program_argv, wrapper_argv>: Convert to std::vector.
2587 (start_inferior): Rewrite function to use C++.
2588 (handle_v_run): Likewise. Update code that calculates the argv
2589 based on the vRun packet; use C++.
2590 (captured_main): Likewise.
2591
436252de
SM
25922017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2593
2594 * server.c (handle_v_cont): Initialize thread_resume::thread
2595 with null_ptid.
2596
9bf2a700
PA
25972017-04-05 Pedro Alves <palves@redhat.com>
2598
2599 * configure: Regenerate.
2600
a121b7c1
PA
26012017-04-05 Pedro Alves <palves@redhat.com>
2602
2603 * gdbreplay.c (sync_error): Constify.
2604 * linux-x86-low.c (push_opcode): Constify.
2605
21c8a587
PA
26062017-04-05 Pedro Alves <palves@redhat.com>
2607
2608 * win32-low.c (get_child_debug_event)
2609 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2610 Report TARGET_WAITKIND_SPURIOUS instead.
2611
fb32b4f7
PA
26122017-04-05 Pedro Alves <palves@redhat.com>
2613
e79be6e5
SM
2614 * remote-utils.c (remote_prepare, remote_open): Constify.
2615 * remote-utils.h (remote_prepare, remote_open): Constify.
2616 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 2617
65dd1e59
SM
26182017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2619
2620 * Makefile.in (clean): Clear .deps.
2621
8fa5b777
SM
26222017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2623
2624 * .gitignore: Remove generated files, replace with wildcard.
2625 * (clean): Replace removal of generated files with wildcard.
2626 (version.c): Replace with...
2627 (version-generated.c): ...this.
2628 (xml-builtin.c): Replace with...
2629 (xml-builtin-generated.c): ...this.
2630 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2631 (%.c: *regformats*): Replace with...
2632 (%-generated.c: *regformats*): ...this.
2633
a12e714b
MF
26342017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2635
2636 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2637 (xtensa_fill_gregset): Call collect_register_by_name for
2638 threadptr register.
2639 (xtensa_store_gregset): Call supply_register_by_name for
2640 threadptr register.
2641
1a09b50a
MF
26422017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2643
2644 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2645 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2646 (xtensa_store_gregset): Call supply_register for all registers in
2647 a0_regnum..a0_regnum + C0_NREGS range.
2648
1a01e7c6
SM
26492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2650
2651 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2652 (ax-ipa.o: ax.c): Remove.
2653 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2654 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2655 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2656 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2657 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2658
36bc18a8
SM
26592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2660
2661 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2662 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2663 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2664 (errors-ipa.o: ../common/errors.c): Remove.
2665 (format-ipa.o: ../common/format.c): Remove.
2666 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2667
a8ebe3d5
SM
26682017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2669
2670 * Makefile.in (%-ipa.o: %.c): New rule.
2671 (tracepoint-ipa.o: tracepoint.c): Remove.
2672 (utils-ipa.o: utils.c): Remove.
2673 (remote-utils-ipa.o: remote-utils.c): Remove.
2674 (regcache-ipa.o: regcache.c): Remove.
2675 (i386-linux-ipa.o: i386-linux.c): Remove.
2676 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2677 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2678 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2679 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2680 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2681 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2682 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2683 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2684 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2685 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2686 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2687 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2688 (aarch64-ipa.o: aarch64.c): Remove.
2689 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2690 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2691 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2692 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2693 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2694 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2695 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2696 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2697 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2698 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2699 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2700 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2701 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2702 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2703 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2704 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2705 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2706 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2707 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2708 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2709 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2710 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2711 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2712 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2713 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2714 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2715 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2716 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2717 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2718 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2719 (tdesc-ipa.o: tdesc.c): Remove.
2720 (x32-linux-ipa.o: x32-linux.c): Remove.
2721 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2722 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2723
50cfacb7
SM
27242017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2725
2726 * Makefile.in (%.o: ../arch/%.c): New rule.
2727 (arm.o: ../arch/arm.c): Remove.
2728 (arm-linux.o: ../arch/arm-linux.c): Remove.
2729 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2730 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2731
c5a22423
SM
27322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2733
2734 * Makefile.in (%.o: ../nat/%.c): New rule.
2735 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2736 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2737 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2738 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2739 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2740 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2741 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2742 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2743 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2744 (linux-personality.o: ../nat/linux-personality.c): Remove.
2745 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2746 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2747 (x86-linux.o: ../nat/x86-linux.c): Remove.
2748 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2749 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2750
6bda016b
SM
27512017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2752
2753 * Makefile.in (%.o: ../common/%.c): New rule.
2754 (signals.o: ../common/signals.c): Remove.
2755 (print-utils.o: ../common/print-utils.c): Remove.
2756 (rsp-low.o: ../common/rsp-low.c): Remove.
2757 (common-utils.o: ../common/common-utils.c): Remove.
2758 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2759 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2760 (vec.o: ../common/vec.c): Remove.
2761 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2762 (xml-utils.o: ../common/xml-utils.c): Remove.
2763 (ptid.o: ../common/ptid.c): Remove.
2764 (buffer.o: ../common/buffer.c): Remove.
2765 (format.o: ../common/format.c): Remove.
2766 (filestuff.o: ../common/filestuff.c): Remove.
2767 (agent.o: ../common/agent.c): Remove.
2768 (errors.o: ../common/errors.c): Remove.
2769 (environ.o: ../common/environ.c): Remove.
2770 (common-debug.o: ../common/common-debug.c): Remove.
2771 (cleanups.o: ../common/cleanups.c): Remove.
2772 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2773 (fileio.o: ../common/fileio.c): Remove.
2774 (common-regcache.o: ../common/common-regcache.c): Remove.
2775 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2776 (new-op.o: ../common/new-op.c): Remove.
2777 (btrace-common.o: ../common/btrace-common.c): Remove.
2778
21122961
SM
27792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2780
2781 * Makefile.in (%.o: ../target/%.c): New rule.
2782 (waitstatus.o: ../target/waitstatus.c): Remove.
2783
c362e621
SM
27842017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2785
2786 * Makefile.in
2787 (%.c: ../regformats/%.dat,
2788 (%.c: ../regformats/arm/%.dat,
2789 (%.c: ../regformats/i386/%.dat,
2790 (%.c: ../regformats/rs6000/%.dat): New rules.
2791 (aarch64.c): Remove.
2792 (reg-arm.c): Remove.
2793 (arm-with-iwmmxt.c): Remove.
2794 (arm-with-vfpv2.c): Remove.
2795 (arm-with-vfpv3.c): Remove.
2796 (arm-with-neon.c): Remove.
2797 (reg-bfin.c): Remove.
2798 (reg-cris.c): Remove.
2799 (reg-crisv32.c): Remove.
2800 (i386.c): Remove.
2801 (i386-linux.c): Remove.
2802 (i386-avx.c): Remove.
2803 (i386-avx-linux.c): Remove.
2804 (i386-avx-avx512.c): Remove.
2805 (i386-avx-avx512-linux.c): Remove.
2806 (i386-mpx.c): Remove.
2807 (i386-mpx-linux.c): Remove.
2808 (i386-avx-mpx-avx512-pku.c): Remove.
2809 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2810 (i386-avx-mpx.c): Remove.
2811 (i386-avx-mpx-linux.c): Remove.
2812 (i386-mmx.c): Remove.
2813 (i386-mmx-linux.c): Remove.
2814 (reg-ia64.c): Remove.
2815 (reg-m32r.c): Remove.
2816 (reg-m68k.c): Remove.
2817 (reg-cf.c): Remove.
2818 (mips-linux.c): Remove.
2819 (mips-dsp-linux.c): Remove.
2820 (mips64-linux.c): Remove.
2821 (mips64-dsp-linux.c): Remove.
2822 (nios2-linux.c): Remove.
2823 (powerpc-32.c): Remove.
2824 (powerpc-32l.c): Remove.
2825 (powerpc-altivec32l.c): Remove.
2826 (powerpc-cell32l.c): Remove.
2827 (powerpc-vsx32l.c): Remove.
2828 (powerpc-isa205-32l.c): Remove.
2829 (powerpc-isa205-altivec32l.c): Remove.
2830 (powerpc-isa205-vsx32l.c): Remove.
2831 (powerpc-e500l.c): Remove.
2832 (powerpc-64l.c): Remove.
2833 (powerpc-altivec64l.c): Remove.
2834 (powerpc-cell64l.c): Remove.
2835 (powerpc-vsx64l.c): Remove.
2836 (powerpc-isa205-64l.c): Remove.
2837 (powerpc-isa205-altivec64l.c): Remove.
2838 (powerpc-isa205-vsx64l.c): Remove.
2839 (s390-linux32.c): Remove.
2840 (s390-linux32v1.c): Remove.
2841 (s390-linux32v2.c): Remove.
2842 (s390-linux64.c): Remove.
2843 (s390-linux64v1.c): Remove.
2844 (s390-linux64v2.c): Remove.
2845 (s390-te-linux64.c): Remove.
2846 (s390-vx-linux64.c): Remove.
2847 (s390-tevx-linux64.c): Remove.
2848 (s390x-linux64.c): Remove.
2849 (s390x-linux64v1.c): Remove.
2850 (s390x-linux64v2.c): Remove.
2851 (s390x-te-linux64.c): Remove.
2852 (s390x-vx-linux64.c): Remove.
2853 (s390x-tevx-linux64.c): Remove.
2854 (tic6x-c64xp-linux.c): Remove.
2855 (tic6x-c64x-linux.c): Remove.
2856 (tic6x-c62x-linux.c): Remove.
2857 (reg-sh.c): Remove.
2858 (reg-sparc64.c): Remove.
2859 (reg-spu.c): Remove.
2860 (amd64.c): Remove.
2861 (amd64-linux.c): Remove.
2862 (amd64-avx.c): Remove.
2863 (amd64-avx-linux.c): Remove.
2864 (amd64-avx-avx512.c): Remove.
2865 (amd64-avx-avx512-linux.c): Remove.
2866 (amd64-mpx.c): Remove.
2867 (amd64-mpx-linux.c): Remove.
2868 (amd64-avx-mpx-avx512-pku.c): Remove.
2869 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2870 (amd64-avx-mpx.c): Remove.
2871 (amd64-avx-mpx-linux.c): Remove.
2872 (x32.c): Remove.
2873 (x32-linux.c): Remove.
2874 (x32-avx.c): Remove.
2875 (x32-avx-linux.c): Remove.
2876 (x32-avx-avx512.c): Remove.
2877 (x32-avx-avx512-linux.c): Remove.
2878 (reg-xtensa.c): Remove.
2879 (reg-tilegx.c): Remove.
2880 (reg-tilegx32.c): Remove.
2881
1672e0d9
SDJ
28822017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2883
2884 * Makefile.in (SFILES): Add "common/environ.c".
2885 (OBJS): Add "common/environ.h".
2886
239b6d10
WT
28872017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2888
2889 * configure.ac: Check if the fs_base and gs_base members of
2890 `struct user_regs_struct' exist.
2891 * config.in: Regenerated.
2892 * configure: Likewise.
2893
694b382c
AT
28942017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2895
2896 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2897 target_read_memory.
2898 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2899 (get_next_pcs_syscall_next_pc): Likewise.
2900
7dc53023
LM
29012016-12-23 Luis Machado <lgustavo@codesourcery.com>
2902
2903 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2904 * nto-x86-low.c: Likewise.
2905
ad02e4fe
SM
29062016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2907
2908 * Makefile.in: Include disable-implicit-rules.mk.
2909
dcb07cfa
PA
29102016-11-23 Pedro Alves <palves@redhat.com>
2911
2912 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2913 (debug_vprintf): Use std::chrono::steady_clock instead of
2914 gettimeofday. Use '.' instead of ':'.
2915 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2916 (get_timestamp): Use std::chrono::steady_clock instead of
2917 gettimeofday.
2918
8629c02c
SM
29192016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2920
2921 * Makefile.in: Fix whitespace formatting.
2922
b593ecca
SM
29232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2924
2925 * Makefile.in (SFILES, OBS): Flatten list and order
2926 alphabetically.
2927
9986ba08
PA
29282016-11-23 Pedro Alves <palves@redhat.com>
2929
2930 * event-loop.c (handle_file_event): Use warning.
2931 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2932 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2933 Use warning.
2934
4eefa7bc
PA
29352016-11-23 Pedro Alves <palves@redhat.com>
2936
2937 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2938 output.
2939 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2940 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2941 debug_printf and debug_flush for debug output.
2942 * server.c (handle_general_set): Likewise.
2943 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2944 output.
2945
5443506e
SM
29462016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2947
2948 * Makefile.in (.c.o): Replace rule with ...
2949 (%.o: %.c): ... this one.
2950
3b165252
SM
29512016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2952
2953 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2954 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2955 make.
2956 * configure.ac: Remove checks for the make program.
2957 * configure: Re-generate.
2958
0bcda685
PA
29592016-10-28 Pedro Alves <palves@redhat.com>
2960
2961 * Makefile.in (CXX_DIALECT): Get from configure.
2962 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2963 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2964 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2965 * config.in: Regenerate.
2966 * configure: Regenerate.
2967
c3805894
YQ
29682016-10-27 Yao Qi <yao.qi@linaro.org>
2969
2970 * linux-low.c (linux_supports_range_stepping): Return true if
2971 can_software_single_step return true.
2972
89342618
YQ
29732016-10-27 Yao Qi <yao.qi@linaro.org>
2974
2975 * inferiors.c (find_inferior_in_random): New function.
2976 * inferiors.h (find_inferior_in_random): Declare.
2977 * linux-low.c (linux_wait_for_event_filtered): Call
2978 find_inferior_in_random instead of find_inferior.
2979
e3652c84
YQ
29802016-10-27 Yao Qi <yao.qi@linaro.org>
2981
2982 * linux-low.c (linux_wait_1): If single-step breakpoints are
2983 inserted, remove them.
2984
5a04c4cf
PA
29852016-10-26 Pedro Alves <palves@redhat.com>
2986
2987 * linux-low.c (handle_extended_wait): Link parent/child fork
2988 threads.
2989 (linux_wait_1): Unlink them.
2990 (linux_set_resume_request): Ignore resume requests for
2991 already-resumed and unhandled fork child threads.
2992 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2993 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2994 New functions.
2995 (handle_v_requests) <vCont>: Don't call require_running.
2996 * server.h (in_queued_stop_replies): New declaration.
2997
cb93dc7f
YQ
29982016-10-24 Yao Qi <yao.qi@linaro.org>
2999
3000 PR server/20733
3001 * linux-aarch64-low.c (append_insns): Cast the return value to
3002 'uint32_t *'.
3003
a1078bea
YQ
30042016-10-10 Yao Qi <yao.qi@linaro.org>
3005
3006 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3007
1fb77080
SDJ
30082016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3009
3010 * target.c (target_supports_multi_process): New function, moved
3011 from...
3012 * target.h (target_supports_multi_process): ... here. Remove
3013 macro.
3014
39b5a3b9
TT
30152016-10-05 Tom Tromey <tom@tromey.com>
3016
3017 PR remote/20655:
3018 * tracepoint.c (handle_tracepoint_bkpts): Check
3019 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3020
c1d0b70a
YQ
30212016-10-05 Yao Qi <yao.qi@linaro.org>
3022
3023 * configure.srv: Update the path of arm-*.xml files.
3024
0a69eedb
YQ
30252016-10-05 Terry Guo <terry.guo@arm.com>
3026 Yao Qi <yao.qi@linaro.org>
3027
3028 * Makefile.in: Adjust the path of rules.
3029 * configure.srv: Update the path of xml files.
3030 * regformats/arm-with-iwmmxt.dat: Regenerated.
3031 * regformats/arm-with-neon.dat: Likewise.
3032 * regformats/arm-with-vfpv2.dat: Likewise.
3033 * regformats/arm-with-vfpv3.dat Likewise.
3034
17e16485
YQ
30352016-09-30 Yao Qi <yao.qi@linaro.org>
3036
3037 PR gdbserver/20627
3038 * target.c (target_stop_and_wait): Don't call
3039 target_continue_no_signal, use resume_stop instead.
3040
edeeb602
YQ
30412016-09-26 Yao Qi <yao.qi@linaro.org>
3042
3043 * linux-low.c (linux_wait_1): Call debug_exit.
3044
503b1c39
PA
30452016-09-23 Pedro Alves <palves@redhat.com>
3046
3047 * Makefile.in (SFILES): Add common/new-op.c.
3048 (OBS): Add common/new-op.o.
3049 (new-op.o): New rule.
3050
74172ecf
SM
30512016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3052
3053 * .gitinore: Ignore more files.
3054
fc6cda2e
YQ
30552016-09-21 Yao Qi <yao.qi@linaro.org>
3056
3057 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3058 23.
3059
bc1e6c81
SDJ
30602016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3061
3062 * server.c (start_inferior): Call target_mourn_inferior instead of
3063 mourn_inferior; pass ptid_t argument to it.
3064 (resume): Likewise.
3065 (handle_target_event): Likewise.
3066 * target.c (target_mourn_inferior): New function.
3067 * target.h (mourn_inferior): Delete macro.
3068
0e00e962
AA
30692016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3070
3071 * linux-low.c (lwp_is_stepping): New function.
3072
1d8cb77d
CL
30732016-09-06 Carl Love <cel@us.ibm.com>
3074
3075 * server.c (start_inferior): Fixed comment, requested comment change
3076 didn't get updated correctly. Removed reference to ptrace () call as
3077 it is only true on Linux systems.
3078
7313bced
CL
30792016-09-06 Carl Love <cel@us.ibm.com>
3080
3081 * server.c (start_inferior): Do not call
3082 function target_post_create_inferior () if the
3083 inferior process has already exited.
3084
cf6de44d
PA
30852016-09-05 Pedro Alves <palves@redhat.com>
3086
3087 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3088 (COMPILE.pre, CC_LD): Use CXX directly.
3089 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3090 * acinclude.m4: Don't include build-with-cxx.m4.
3091 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3092 * configure: Regenerate.
3093
c1da6748
AT
30942016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3095
3096 PR gdb/19495
3097 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3098 call writing data to own_buf.
3099
f2b9e3df
SDJ
31002016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3101
3102 * target.c (mywait): Call target_wait instead of
3103 the_target->wait.
3104 (target_wait): New function.
3105
049a8570
SDJ
31062016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3107
3108 * server.c (start_inferior): New variable 'ptid'. Replace calls
3109 to the_target->resume by target_continue{,_no_signal}, depending
3110 on the case.
3111 * target.c (target_stop_and_wait): Call target_continue_no_signal
3112 instead of the_target->resume.
3113 (target_continue): New function.
3114
3aa5cfa0
AT
31152016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3116
3117 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3118
754653a7
AZ
31192016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3120
3121 PR server/20491
3122 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3123 ps_prochandle.
3124 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3125 * linux-arm-low.c (ps_get_thread_area): Likewise.
3126 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3127 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3128 * linux-mips-low.c (ps_get_thread_area): Likewise.
3129 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3130 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3131 * linux-x86-low.c (ps_get_thread_area): Likewise.
3132 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3133
ed036b40
PA
31342016-08-19 Pedro Alves <palves@redhat.com>
3135
3136 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3137
c8ef42ee
PA
31382016-08-19 Pedro Alves <palves@redhat.com>
3139
3140 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3141 comment. Use memcpy instead of casting through unsigned long.
3142
9c235a72
PA
31432016-08-19 Pedro Alves <palves@redhat.com>
3144
3145 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3146 allocating around 0x80000000.
3147
201506da
PA
31482016-08-19 Pedro Alves <palves@redhat.com>
3149
3150 PR gdb/20415
3151 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3152 (x32-avx512-linux-ipa.o): New rules.
3153 * configure.ac (x86_64-*-linux*): New x32 check.
3154 * configure.srv (ipa_x32_linux_regobj): New.
3155 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3156 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3157 descriptions.
3158 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3159 descriptions.
3160 * configure: Regenerate.
3161
f348d89a
PA
31622016-08-09 Pedro Alves <palves@redhat.com>
3163
3164 PR gdb/18653
3165 * Makefile.in (OBS): Add signals-state-save-restore.o.
3166 (signals-state-save-restore.o): New rule.
3167 * config.in: Regenerate.
3168 * configure: Regenerate.
3169 * linux-low.c: Include "signals-state-save-restore.h".
3170 (linux_create_inferior): Call
3171 restore_original_signals_state.
3172 * server.c: Include "dispositions-save-restore.h".
3173 (captured_main): Call save_original_signals_state.
3174
1baf5149
PA
31752016-08-05 Pedro Alves <palves@redhat.com>
3176
3177 * configure: Regenerate.
3178
fcd4a73d
YQ
31792016-08-04 Yao Qi <yao.qi@linaro.org>
3180
3181 * linux-low.c (regsets_fetch_inferior_registers): Check
3182 errno is ESRCH or not.
3183
979659d0
YQ
31842016-08-02 Yao Qi <yao.qi@linaro.org>
3185
3186 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3187 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3188 (thread_db_load_search): Update.
3189 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3190 td_ta_set_event and td_ta_event_getmsg.
3191
6598661d
PA
31922016-07-26 Pedro Alves <palves@redhat.com>
3193
3194 PR server/20414
3195 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3196 of unsigned long for 64-bit registers and use uint32_t instead of
3197 unsigned int for 32-bit registers.
3198
9cf12d57
PA
31992016-07-26 Pedro Alves <palves@redhat.com>
3200
3201 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3202 to 'ptrace'.
3203
305450ed
TT
32042016-07-21 Tom Tromey <tom@tromey.com>
3205
3206 * configure: Rebuild.
3207
2583da7c
YQ
32082016-07-21 Yao Qi <yao.qi@linaro.org>
3209
3210 * mem-break.c (find_gdb_breakpoint): Cast bp to
3211 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3212
21536b36
YQ
32132016-07-21 Yao Qi <yao.qi@linaro.org>
3214
3215 * server.c (handle_v_requests): Support s and S actions
3216 if target_supports_software_single_step return true.
3217
8901d193
YQ
32182016-07-21 Yao Qi <yao.qi@linaro.org>
3219
3220 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3221 is resume_step, call maybe_hw_step.
3222 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3223 and unstop them.
3224 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3225 breakpoints or not.
3226 (proceed_one_lwp): If resume request is resume_step, install
3227 reinsert breakpoints and call maybe_hw_step.
3228
0e9a339e
YQ
32292016-07-21 Yao Qi <yao.qi@linaro.org>
3230
3231 * linux-low.c (proceed_one_lwp): Declare.
3232 (linux_resume_one_thread): Remove local variable 'step'.
3233 Lift code enqueue signal. Call proceed_one_lwp instead of
3234 linux_resume_one_lwp.
3235
4281b351
YQ
32362016-07-21 Yao Qi <yao.qi@linaro.org>
3237
3238 * linux-low.c (linux_resume_one_thread): Call
3239 enqueue_pending_signal.
3240
984a2c04
YQ
32412016-07-21 Yao Qi <yao.qi@linaro.org>
3242
3243 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3244 * inferiors.c (do_restore_current_thread_cleanup): New function.
3245 (make_cleanup_restore_current_thread): Likewise.
3246 * linux-low.c (install_software_single_step_breakpoints): Call
3247 make_cleanup_restore_current_thread. Switch current_thread to
3248 thread.
3249
bec903c9
YQ
32502016-07-21 Yao Qi <yao.qi@linaro.org>
3251
3252 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3253 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3254 (clone_one_breakpoint): Likewise.
3255 (delete_reinsert_breakpoints): Change parameter to thread.
3256 Callers updated.
3257 (has_reinsert_breakpoints): Likewise.
3258 (uninsert_reinsert_breakpoints): Likewise.
3259 (reinsert_reinsert_breakpoints): Likewise.
3260 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3261 (delete_reinsert_breakpoints): Likewise.
3262 (reinsert_reinsert_breakpoints): Likewise.
3263 (uninsert_reinsert_breakpoints): Likewise.
3264 (has_reinsert_breakpoints): Likewise.
3265
63c40ec7
YQ
32662016-07-21 Yao Qi <yao.qi@linaro.org>
3267
3268 * inferiors.c (get_thread_process): Make parameter const.
3269 * inferiors.h (get_thread_process): Update declaration.
3270 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3271 Add new parameters child_thread and parent_thread. Callers
3272 updated.
3273 * mem-break.h (clone_all_breakpoints): Update declaration.
3274
9aa76cd0
YQ
32752016-07-21 Yao Qi <yao.qi@linaro.org>
3276
3277 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3278 <command_list, handler>: Remove.
3279 (struct gdb_breakpoint): New.
3280 (struct other_breakpoint): New.
3281 (struct reinsert_breakpoint): New.
3282 (is_gdb_breakpoint): New function.
3283 (any_persistent_commands): Update command_list if
3284 is_gdb_breakpoint returns true.
3285 (set_breakpoint): Create breakpoints according to their types.
3286 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3287 (set_gdb_breakpoint_1): Likewise.
3288 (set_gdb_breakpoint): Likewise.
3289 (clear_breakpoint_conditions): Change parameter type to
3290 'struct gdb_breakpoint *'.
3291 (clear_breakpoint_commands): Likewise.
3292 (clear_breakpoint_conditions_and_commands): Likewise.
3293 (add_condition_to_breakpoint): Likewise.
3294 (add_breakpoint_condition): Likewise.
3295 (add_commands_to_breakpoint): Likewise.
3296 (check_breakpoints): Check other_breakpoint.
3297 (clone_one_breakpoint): Clone breakpopint according to its type.
3298 * mem-break.h (struct gdb_breakpoint): Declare.
3299 (set_gdb_breakpoint): Update declaration.
3300 (clear_breakpoint_conditions_and_commands): Likewise.
3301 (add_breakpoint_condition): Likewise.
3302 (add_breakpoint_commands): Likewise.
3303 * server.c (process_point_options): Change parameter type to
3304 'struct gdb_breakpoint *'.
3305
811f8301
YQ
33062016-07-21 Yao Qi <yao.qi@linaro.org>
3307
3308 * mem-break.c (set_breakpoint_at): Rename it to ...
3309 (set_breakpoint_type_at): ... it.
3310 (set_breakpoint_at): Call set_breakpoint_type_at.
3311 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3312 * mem-break.h (set_breakpoint_at): Update comments.
3313
b1c51e36
CLT
33142016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3315
3316 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3317 to buf parameter.
3318 (nios2_store_gregset): Likewise.
3319
ced2dffb
PA
33202016-07-01 Pedro Alves <palves@redhat.com>
3321 Antoine Tremblay <antoine.tremblay@ericsson.com>
3322
3323 * linux-low.c: Change interface to take the target lwp_info
3324 pointer directly and return void. Handle detaching from a zombie
3325 thread.
3326 (linux_detach_lwp_callback): New function.
3327 (linux_detach): Detach from the leader thread after detaching from
3328 the clone threads.
3329
2ac09a5b
YQ
33302016-06-28 Yao Qi <yao.qi@linaro.org>
3331
3332 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3333 for variable new_offset.
3334 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3335 (aarch64_ftrace_insn_reloc_cb): Likewise.
3336 (aarch64_ftrace_insn_reloc_tb): Likewise.
3337 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3338 PRIx64 instead of PRIx32.
3339
79e7fd4f
YQ
33402016-06-28 Yao Qi <yao.qi@linaro.org>
3341
3342 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3343 (the_low_target): Install arm_get_syscall_trapinfo.
3344
061fc021
YQ
33452016-06-28 Yao Qi <yao.qi@linaro.org>
3346
3347 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3348 function.
3349 (the_low_target): Install aarch64_get_syscall_trapinfo.
3350
4cc32bec
YQ
33512016-06-28 Yao Qi <yao.qi@linaro.org>
3352
3353 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3354 Callers updated.
3355 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3356 Remove parameter sysno.
3357 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3358 sysret.
3359
782c1122
AA
33602016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3361
3362 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3363 (s390_emit_ne_goto): Likewise.
3364 (s390_emit_lt_goto): Likewise.
3365 (s390_emit_le_goto): Likewise.
3366 (s390_emit_gt_goto): Likewise.
3367 (s390_emit_ge_goto): Likewise.
3368 (s390x_emit_eq_goto): Likewise.
3369 (s390x_emit_ne_goto): Likewise.
3370 (s390x_emit_lt_goto): Likewise.
3371 (s390x_emit_le_goto): Likewise.
3372 (s390x_emit_gt_goto): Likewise.
3373 (s390x_emit_ge_goto): Likewise.
3374 (s390_emit_ops_impl): Mark variable static.
3375 (s390x_emit_ops): Likewise.
3376
2e7b624b
YQ
33772016-06-17 Yao Qi <yao.qi@linaro.org>
3378
3379 * linux-low.c (handle_extended_wait): Call
3380 uninsert_reinsert_breakpoints for the parent process. Remove
3381 reinsert breakpoints from the child process. Reinsert them to
3382 the parent process when vfork is done.
3383 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3384 (reinsert_reinsert_breakpoints): New function.
3385 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3386 (reinsert_reinsert_breakpoints): Declare.
3387
8a81c5d7
YQ
33882016-06-17 Yao Qi <yao.qi@linaro.org>
3389
3390 * linux-low.c (handle_extended_wait): If the parent is doing
3391 step-over, remove the reinsert breakpoints from the forked child.
3392
f50bf8e5
YQ
33932016-06-17 Yao Qi <yao.qi@linaro.org>
3394
3395 * linux-low.c (unsuspend_all_lwps): Declare.
3396 (linux_low_filter_event): If thread exited, call finish_step_over.
3397 If step-over is finished, unsuspend other threads.
3398
8376a3cb
YQ
33992016-06-17 Yao Qi <yao.qi@linaro.org>
3400
3401 * linux-low.c (linux_resume_one_lwp_throw): Assert
3402 has_reinsert_breakpoints returns false.
3403 * mem-break.c (delete_disabled_breakpoints): Assert
3404 bp type isn't reinsert_breakpoint.
3405
f79b145d
YQ
34062016-06-17 Yao Qi <yao.qi@linaro.org>
3407
3408 * linux-low.c (maybe_hw_step): New function.
3409 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3410 (finish_step_over): Switch current_thread to lwp temporarily,
3411 and assert has_reinsert_breakpoints returns true.
3412 (proceed_one_lwp): Call maybe_hw_step.
3413 * mem-break.c (has_reinsert_breakpoints): New function.
3414 * mem-break.h (has_reinsert_breakpoints): Declare.
3415
0ae534d2
JT
34162016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3417
3418 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3419
fcdad592
YQ
34202016-05-17 Yao Qi <yao.qi@linaro.org>
3421
3422 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3423 instead of find_inferior.
3424
9e784964
YQ
34252016-05-05 Yao Qi <yao.qi@linaro.org>
3426
3427 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3428 Initialize res to zero.
3429
cf2ebb6e
YQ
34302016-05-05 Yao Qi <yao.qi@linaro.org>
3431
3432 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3433 to uint32_t.
3434
c1aebf87
UW
34352016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3436
3437 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3438 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3439 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3440
35fd2deb 34412016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 3442 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
3443
3444 * tracepoint.c (write_inferior_int8): New function.
3445 (cmd_qtenable_disable): Write enable flag using
3446 write_inferior_int8.
3447
484b3c32
YQ
34482016-04-25 Yao Qi <yao.qi@linaro.org>
3449
3450 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3451 (need_step_over_p): Return zero if the LWP has pending signals
3452 can be delivered on software single step target.
3453
85ba7d86
YQ
34542016-04-25 Yao Qi <yao.qi@linaro.org>
3455
3456 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3457 return instead of error.
3458
3539aa13
YQ
34592016-04-22 Yao Qi <yao.qi@linaro.org>
3460
3461 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3462 to 23.
3463
5b061e98
YQ
34642016-04-22 Yao Qi <yao.qi@linaro.org>
3465
3466 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3467 signal when stepping over breakpoint with software single
3468 step.
3469
3451269c
PA
34702016-04-21 Pedro Alves <palves@redhat.com>
3471
3472 * linux-s390-low.c (s390_collect_ptrace_register)
3473 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3474 add casts.
3475 (s390_check_regset): Use void * instead of gdb_byte *.
3476
a2358508
PA
34772016-04-20 Pedro Alves <palves@redhat.com>
3478
3479 * configure: Renegerate.
3480
6885166d
YQ
34812016-04-20 Yao Qi <yao.qi@linaro.org>
3482
3483 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3484 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3485 number 16.
3486 (arm_store_gregset): Likewise.
3487
2b863f51
WT
34882016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3489
3490 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3491 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3492 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3493 (amd64-avx-mpx-linux.c): New rules.
3494 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3495 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3496 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3497 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3498 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3499 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3500 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3501 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3502 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3503 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3504 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3505 * linux-x86-low.c (x86_linux_read_description): Add case for
3506 X86_XSTATE_AVX_MPX_MASK.
3507 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3508 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3509 init_registers_i386_avx_mpx_linux.
3510 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3511 (initialize_low_tracepoint): Call
3512 init_registers_i386_avx_mpx_linux.
3513 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3514 (initialize_low_tracepoint): Call
3515 init_registers_amd64_avx_mpx_linux.
3516 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3517 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3518 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3519 declarations.
3520
9b30624b
PA
35212016-04-18 Pedro Alves <palves@redhat.com>
3522
3523 * configure: Regenerate.
3524
45e3745e
AT
35252016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3526
3527 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3528 (aarch64_emit_sub): Likewise.
3529
2afc13ff
PA
35302016-04-12 Pedro Alves <palves@redhat.com>
3531
3532 * utils.c (prepare_to_throw_exception): Delete.
3533
6e774b13
SM
35342016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3535
3536 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3537
4dca19f8
MK
35382016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3539
3540 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3541
d0a9981f
MK
35422016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3543
3544 * linux-aarch64-ipa.c: Add <elf.h> include.
3545 * linux-ppc-ipa.c: Add <elf.h> include.
3546 * linux-s390-ipa.c: Add <elf.h> include.
3547
252db07e
MK
35482016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3549
3550 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3551 (get_raw_reg_ptr): Likewise.
3552 (get_trace_state_variable_value_ptr): Likewise.
3553 (set_trace_state_variable_value_ptr): Likewise.
3554 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3555 char *.
3556
14e2b6d9
MK
35572016-03-31 Wei-cheng Wang <cole945@gmail.com>
3558 Marcin Kościelnicki <koriakin@0x04.net>
3559
3560 PR/17221
3561 * linux-ppc-low.c (emit_insns): New function.
3562 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3563 (ppc_emit_prologue): New function.
3564 (ppc_emit_epilogue): New function.
3565 (ppc_emit_add): New function.
3566 (ppc_emit_sub): New function.
3567 (ppc_emit_mul): New function.
3568 (ppc_emit_lsh): New function.
3569 (ppc_emit_rsh_signed): New function.
3570 (ppc_emit_rsh_unsigned): New function.
3571 (ppc_emit_ext): New function.
3572 (ppc_emit_zero_ext): New function.
3573 (ppc_emit_log_not): New function.
3574 (ppc_emit_bit_and): New function.
3575 (ppc_emit_bit_or): New function.
3576 (ppc_emit_bit_xor): New function.
3577 (ppc_emit_bit_not): New function.
3578 (ppc_emit_equal): New function.
3579 (ppc_emit_less_signed): New function.
3580 (ppc_emit_less_unsigned): New function.
3581 (ppc_emit_ref): New function.
3582 (ppc_emit_const): New function.
3583 (ppc_emit_reg): New function.
3584 (ppc_emit_pop): New function.
3585 (ppc_emit_stack_flush): New function.
3586 (ppc_emit_swap): New function.
3587 (ppc_emit_stack_adjust): New function.
3588 (ppc_emit_call): New function.
3589 (ppc_emit_int_call_1): New function.
3590 (ppc_emit_void_call_2): New function.
3591 (ppc_emit_if_goto): New function.
3592 (ppc_emit_goto): New function.
3593 (ppc_emit_eq_goto): New function.
3594 (ppc_emit_ne_goto): New function.
3595 (ppc_emit_lt_goto): New function.
3596 (ppc_emit_le_goto): New function.
3597 (ppc_emit_gt_goto): New function.
3598 (ppc_emit_ge_goto): New function.
3599 (ppc_write_goto_address): New function.
3600 (ppc_emit_ops_impl): New static variable.
3601 (ppc64v1_emit_prologue): New function.
3602 (ppc64v2_emit_prologue): New function.
3603 (ppc64_emit_epilogue): New function.
3604 (ppc64_emit_add): New function.
3605 (ppc64_emit_sub): New function.
3606 (ppc64_emit_mul): New function.
3607 (ppc64_emit_lsh): New function.
3608 (ppc64_emit_rsh_signed): New function.
3609 (ppc64_emit_rsh_unsigned): New function.
3610 (ppc64_emit_ext): New function.
3611 (ppc64_emit_zero_ext): New function.
3612 (ppc64_emit_log_not): New function.
3613 (ppc64_emit_bit_and): New function.
3614 (ppc64_emit_bit_or): New function.
3615 (ppc64_emit_bit_xor): New function.
3616 (ppc64_emit_bit_not): New function.
3617 (ppc64_emit_equal): New function.
3618 (ppc64_emit_less_signed): New function.
3619 (ppc64_emit_less_unsigned): New function.
3620 (ppc64_emit_ref): New function.
3621 (ppc64_emit_const): New function.
3622 (ppc64v1_emit_reg): New function.
3623 (ppc64v2_emit_reg): New function.
3624 (ppc64_emit_pop): New function.
3625 (ppc64_emit_stack_flush): New function.
3626 (ppc64_emit_swap): New function.
3627 (ppc64v1_emit_call): New function.
3628 (ppc64v2_emit_call): New function.
3629 (ppc64v1_emit_int_call_1): New function.
3630 (ppc64v2_emit_int_call_1): New function.
3631 (ppc64v1_emit_void_call_2): New function.
3632 (ppc64v2_emit_void_call_2): New function.
3633 (ppc64_emit_if_goto): New function.
3634 (ppc64_emit_eq_goto): New function.
3635 (ppc64_emit_ne_goto): New function.
3636 (ppc64_emit_lt_goto): New function.
3637 (ppc64_emit_le_goto): New function.
3638 (ppc64_emit_gt_goto): New function.
3639 (ppc64_emit_ge_goto): New function.
3640 (ppc64v1_emit_ops_impl): New static variable.
3641 (ppc64v2_emit_ops_impl): New static variable.
3642 (ppc_emit_ops): New function.
3643 (linux_low_target): Wire in ppc_emit_ops.
3644
a2174ba4
MK
36452016-03-31 Wei-cheng Wang <cole945@gmail.com>
3646 Marcin Kościelnicki <koriakin@0x04.net>
3647
3648 PR/17221
3649 * Makefile.in: Add powerpc-*-ipa.o
3650 * configure.srv: Add ipa_obj for powerpc*-linux.
3651 * linux-ppc-ipa.c: New file.
3652 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3653 includes.
3654 (PPC_FIELD): New macro.
3655 (PPC_SEXT): New macro.
3656 (PPC_OP6): New macro.
3657 (PPC_BO): New macro.
3658 (PPC_LI): New macro.
3659 (PPC_BD): New macro.
3660 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3661 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3662 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3663 (ppc_get_thread_area): New function.
3664 (is_elfv2_inferior): New function.
3665 (gen_ds_form): New function.
3666 (GEN_STD): New macro.
3667 (GEN_STDU): New macro.
3668 (GEN_LD): New macro.
3669 (GEN_LDU): New macro.
3670 (gen_d_form): New function.
3671 (GEN_ADDI): New macro.
3672 (GEN_ADDIS): New macro.
3673 (GEN_LI): New macro.
3674 (GEN_LIS): New macro.
3675 (GEN_ORI): New macro.
3676 (GEN_ORIS): New macro.
3677 (GEN_LWZ): New macro.
3678 (GEN_STW): New macro.
3679 (GEN_STWU): New macro.
3680 (gen_xfx_form): New function.
3681 (GEN_MFSPR): New macro.
3682 (GEN_MTSPR): New macro.
3683 (GEN_MFCR): New macro.
3684 (GEN_MTCR): New macro.
3685 (GEN_SYNC): New macro.
3686 (GEN_LWSYNC): New macro.
3687 (gen_x_form): New function.
3688 (GEN_OR): New macro.
3689 (GEN_MR): New macro.
3690 (GEN_LWARX): New macro.
3691 (GEN_STWCX): New macro.
3692 (GEN_CMPW): New macro.
3693 (gen_md_form): New function.
3694 (GEN_RLDICL): New macro.
3695 (GEN_RLDICR): New macro.
3696 (gen_i_form): New function.
3697 (GEN_B): New macro.
3698 (GEN_BL): New macro.
3699 (gen_b_form): New function.
3700 (GEN_BNE): New macro.
3701 (GEN_LOAD): New macro.
3702 (GEN_STORE): New macro.
3703 (gen_limm): New function.
3704 (gen_atomic_xchg): New function.
3705 (gen_call): New function.
3706 (ppc_relocate_instruction): New function.
3707 (ppc_install_fast_tracepoint_jump_pad): New function.
3708 (ppc_get_min_fast_tracepoint_insn_len): New function.
3709 (ppc_get_ipa_tdesc_idx): New function.
3710 (the_low_target): Wire in the new functions.
3711 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3712 tdescs.
3713 * linux-ppc-tdesc.h: New file.
3714
a13c4696
MK
37152016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3716
3717 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3718 (alloc_jump_pad_buffer): New function.
3719 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3720 (alloc_jump_pad_buffer): New function.
3721 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3722 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3723 (alloc_jump_pad_buffer): New function.
3724 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3725 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3726 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3727 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3728
1cda1512
MK
37292016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3730
3731 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3732 * linux-amd64-ipa.c: Likewise.
3733 * linux-i386-ipa.c: Likewise.
3734 * linux-s390-ipa.c: Likewise.
3735 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3736 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3737 set_trace_state_variable_value_ptr.
3738 (struct ipa_sym_addresses): Likewise.
3739 (symbol_list): Likewise.
3740 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3741 accessing gdb_collect directly.
3742 (gdb_collect_ptr_type): New typedef.
3743 (get_raw_reg_ptr_type): New typedef.
3744 (get_trace_state_variable_value_ptr_type): New typedef.
3745 (set_trace_state_variable_value_ptr_type): New typedef.
3746 (gdb_collect_ptr): New global.
3747 (get_raw_reg_ptr): New global.
3748 (get_trace_state_variable_value_ptr): New global.
3749 (set_trace_state_variable_value_ptr): New global.
3750 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3751 accessing get_raw_reg directly.
3752 (get_get_tsv_func_addr): Likewise for
3753 get_trace_state_variable_value_ptr.
3754 (get_set_tsv_func_addr): Likewise for
3755 set_trace_state_variable_value_ptr.
3756 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3757
72fb5488
SM
37582016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3759
3760 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3761
28170b88
MK
37622016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3763
3764 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3765 packets.
3766 (relocate_instruction): Remove own_buf.
3767 * server.c (own_buf): Make global.
3768 (handle_v_requests): Make global.
3769 * server.h (own_buf): New declaration.
3770 (handle_v_requests): New prototype.
3771
f39e8743
MK
37722016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3773
3774 PR 18377
3775 * linux-s390-low.c (add_insns): New function.
3776 (s390_emit_prologue): New function.
3777 (s390_emit_epilogue): New function.
3778 (s390_emit_add): New function.
3779 (s390_emit_sub): New function.
3780 (s390_emit_mul): New function.
3781 (s390_emit_lsh): New function.
3782 (s390_emit_rsh_signed): New function.
3783 (s390_emit_rsh_unsigned): New function.
3784 (s390_emit_ext): New function.
3785 (s390_emit_log_not): New function.
3786 (s390_emit_bit_and): New function.
3787 (s390_emit_bit_or): New function.
3788 (s390_emit_bit_xor): New function.
3789 (s390_emit_bit_not): New function.
3790 (s390_emit_equal): New function.
3791 (s390_emit_less_signed): New function.
3792 (s390_emit_less_unsigned): New function.
3793 (s390_emit_ref): New function.
3794 (s390_emit_if_goto): New function.
3795 (s390_emit_goto): New function.
3796 (s390_write_goto_address): New function.
3797 (s390_emit_litpool): New function.
3798 (s390_emit_const): New function.
3799 (s390_emit_call): New function.
3800 (s390_emit_reg): New function.
3801 (s390_emit_pop): New function.
3802 (s390_emit_stack_flush): New function.
3803 (s390_emit_zero_ext): New function.
3804 (s390_emit_swap): New function.
3805 (s390_emit_stack_adjust): New function.
3806 (s390_emit_set_r2): New function.
3807 (s390_emit_int_call_1): New function.
3808 (s390_emit_void_call_2): New function.
3809 (s390_emit_eq_goto): New function.
3810 (s390_emit_ne_goto): New function.
3811 (s390_emit_lt_goto): New function.
3812 (s390_emit_le_goto): New function.
3813 (s390_emit_gt_goto): New function.
3814 (s390_emit_ge_goto): New function.
3815 (s390x_emit_prologue): New function.
3816 (s390x_emit_epilogue): New function.
3817 (s390x_emit_add): New function.
3818 (s390x_emit_sub): New function.
3819 (s390x_emit_mul): New function.
3820 (s390x_emit_lsh): New function.
3821 (s390x_emit_rsh_signed): New function.
3822 (s390x_emit_rsh_unsigned): New function.
3823 (s390x_emit_ext): New function.
3824 (s390x_emit_log_not): New function.
3825 (s390x_emit_bit_and): New function.
3826 (s390x_emit_bit_or): New function.
3827 (s390x_emit_bit_xor): New function.
3828 (s390x_emit_bit_not): New function.
3829 (s390x_emit_equal): New function.
3830 (s390x_emit_less_signed): New function.
3831 (s390x_emit_less_unsigned): New function.
3832 (s390x_emit_ref): New function.
3833 (s390x_emit_if_goto): New function.
3834 (s390x_emit_const): New function.
3835 (s390x_emit_call): New function.
3836 (s390x_emit_reg): New function.
3837 (s390x_emit_pop): New function.
3838 (s390x_emit_stack_flush): New function.
3839 (s390x_emit_zero_ext): New function.
3840 (s390x_emit_swap): New function.
3841 (s390x_emit_stack_adjust): New function.
3842 (s390x_emit_int_call_1): New function.
3843 (s390x_emit_void_call_2): New function.
3844 (s390x_emit_eq_goto): New function.
3845 (s390x_emit_ne_goto): New function.
3846 (s390x_emit_lt_goto): New function.
3847 (s390x_emit_le_goto): New function.
3848 (s390x_emit_gt_goto): New function.
3849 (s390x_emit_ge_goto): New function.
3850 (s390_emit_ops): New function.
3851 (struct linux_target_ops): Fill in emit_ops hook.
3852
abd9baf9
MK
38532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3854
3855 PR 18377
3856 * Makefile.in: Add s390 IPA files.
3857 * configure.srv: Build IPA for s390.
3858 * linux-s390-ipa.c: New file.
3859 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3860 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3861 (tdesc_s390_linux32): Likewise.
3862 (init_registers_s390_linux32v1): Likewise.
3863 (tdesc_s390_linux32v1): Likewise.
3864 (init_registers_s390_linux32v2): Likewise.
3865 (tdesc_s390_linux32v2): Likewise.
3866 (init_registers_s390_linux64): Likewise.
3867 (tdesc_s390_linux64): Likewise.
3868 (init_registers_s390_linux64v1): Likewise.
3869 (tdesc_s390_linux64v1): Likewise.
3870 (init_registers_s390_linux64v2): Likewise.
3871 (tdesc_s390_linux64v2): Likewise.
3872 (init_registers_s390_te_linux64): Likewise.
3873 (tdesc_s390_te_linux64): Likewise.
3874 (init_registers_s390_vx_linux64): Likewise.
3875 (tdesc_s390_vx_linux64): Likewise.
3876 (init_registers_s390_tevx_linux64): Likewise.
3877 (tdesc_s390_tevx_linux64): Likewise.
3878 (init_registers_s390x_linux64): Likewise.
3879 (tdesc_s390x_linux64): Likewise.
3880 (init_registers_s390x_linux64v1): Likewise.
3881 (tdesc_s390x_linux64v1): Likewise.
3882 (init_registers_s390x_linux64v2): Likewise.
3883 (tdesc_s390x_linux64v2): Likewise.
3884 (init_registers_s390x_te_linux64): Likewise.
3885 (tdesc_s390x_te_linux64): Likewise.
3886 (init_registers_s390x_vx_linux64): Likewise.
3887 (tdesc_s390x_vx_linux64): Likewise.
3888 (init_registers_s390x_tevx_linux64): Likewise.
3889 (tdesc_s390x_tevx_linux64): Likewise.
3890 (have_hwcap_s390_vx): New static variable.
3891 (s390_arch_setup): Fill have_hwcap_s390_vx.
3892 (s390_get_thread_area): New function.
3893 (s390_ft_entry_gpr_esa): New const.
3894 (s390_ft_entry_gpr_zarch): New const.
3895 (s390_ft_entry_misc): New const.
3896 (s390_ft_entry_fr): New const.
3897 (s390_ft_entry_vr): New const.
3898 (s390_ft_main_31): New const.
3899 (s390_ft_main_64): New const.
3900 (s390_ft_exit_fr): New const.
3901 (s390_ft_exit_vr): New const.
3902 (s390_ft_exit_misc): New const.
3903 (s390_ft_exit_gpr_esa): New const.
3904 (s390_ft_exit_gpr_zarch): New const.
3905 (append_insns): New function.
3906 (s390_relocate_instruction): New function.
3907 (s390_install_fast_tracepoint_jump_pad): New function.
3908 (s390_get_min_fast_tracepoint_insn_len): New function.
3909 (s390_get_ipa_tdesc_idx): New function.
3910 (struct linux_target_ops): Wire in the above functions.
3911 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3912 * linux-s390-tdesc.h: New file.
3913
a4105d04
MK
39142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3915
3916 * linux-s390-low.c (s390_supports_tracepoints): New function.
3917 (struct linux_target_ops): Fill supports_tracepoints hook.
3918
35ac8b3e
YQ
39192016-03-18 Yao Qi <yao.qi@linaro.org>
3920
3921 * linux-low.c (lwp_signal_can_be_delivered): New function.
3922 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3923
94610ec4
YQ
39242016-03-18 Yao Qi <yao.qi@linaro.org>
3925
3926 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3927 0 if signal is enqueued. Remove 'signal' from one debugging
3928 message. Move one debugging message to some lines below.
3929 Remove code setting 'signal' to 0.
3930
80aea927
YQ
39312016-03-18 Yao Qi <yao.qi@linaro.org>
3932
3933 * linux-low.c (linux_low_filter_event): Remove redundant
3934 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3935
b04fd3be
MK
39362016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3937
3938 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3939 (struct linux_target_ops): Wire in the above.
3940
c40c8d4b
YQ
39412016-03-03 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-low.c: Update comments to start_step_over.
3944
0f8288ae
YQ
39452016-03-03 Yao Qi <yao.qi@linaro.org>
3946
3947 PR server/19736
3948 * linux-low.c (handle_extended_wait): Set child suspended
3949 if event_lwp->bp_reinsert isn't zero.
3950
fdbd04a8
YQ
39512016-03-02 Yao Qi <yao.qi@linaro.org>
3952
3953 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3954 enqueue_pending_signal.
3955
6896a8fa
MK
39562016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3957
3958 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3959 is actually loaded.
3960
ab503087
MK
39612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3962
3963 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3964 (s390_regmap_3264) [!__s390x__]: New global.
3965 (s390_collect_ptrace_register): Skip map entries containing -1.
3966 (s390_supply_ptrace_register): Ditto.
3967 (s390_fill_gprs_high): New function.
3968 (s390_store_gprs_high): New function.
3969 (s390_regsets): Add NT_S390_HIGH_GPRS.
3970 (s390_get_hwcap): Enable on 31-bit.
3971 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3972 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3973 Detect NT_S390_HIGH_GPRS.
3974 (s390_usrregs_info_3264): Enable on 31-bit.
3975 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3976 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3977
ae91f625
MK
39782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3979
3980 PR gdb/13808
3981 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3982 * configure.srv: Ditto.
3983 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3984 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3985 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3986 (init_registers_amd64_linux): Remove prototype.
3987 (tdesc_amd64_linux): Remove declaration.
3988 (get_ipa_tdesc): New function.
3989 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3990 initialize remaining tdescs.
3991 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3992 (init_registers_i386_linux): Remove prototype.
3993 (tdesc_i386_linux): Remove declaration.
3994 (get_ipa_tdesc): New function.
3995 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3996 initialize remaining tdescs.
3997 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3998 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3999 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4000 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4001 (x86_get_ipa_tdesc_idx): New function.
4002 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4003 * linux-x86-tdesc.h: New file.
4004 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4005 (target_get_ipa_tdesc_idx): New macro.
4006 * tracepoint.c (ipa_tdesc_idx): New macro.
4007 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4008 (symbol_list): Add ipa_tdesc_idx.
4009 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4010 (ipa_tdesc): Remove.
4011 (ipa_tdesc_idx): New variable.
4012 (get_context_regcache): Use get_ipa_tdesc.
4013 (gdb_collect): Ditto.
4014 (gdb_probe): Ditto.
4015 * tracepoint.h (get_ipa_tdesc): New prototype.
4016 (ipa_tdesc): Remove.
4017
e7ad2f14
PA
40182016-02-24 Pedro Alves <palves@redhat.com>
4019
4020 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4021 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4022 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4023 Factor out common code between the USE_SIGTRAP_SIGINFO and
4024 !USE_SIGTRAP_SIGINFO blocks.
4025 (linux_low_filter_event): Call save_stop_reason instead of
4026 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4027 Update comments.
4028 (linux_wait_1): Update comments.
4029
657f9cde
WW
40302016-02-24 Wei-cheng Wang <cole945@gmail.com>
4031
4032 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4033 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4034 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4035 ppc_insert_point, ppc_remove_point.
4036
b00b61e1
MK
40372016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4038
4039 * linux-s390-low.c (s390_supports_z_point_type): New function.
4040 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4041
553cb527
YQ
40422016-02-16 Yao Qi <yao.qi@linaro.org>
4043
4044 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4045 PC. Get pc from regcache_read_pc.
4046
a5652c21
YQ
40472016-02-12 Yao Qi <yao.qi@linaro.org>
4048
4049 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4050 or linux_get_pc_32bit.
4051 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4052
ed443b61
YQ
40532016-02-12 Yao Qi <yao.qi@linaro.org>
4054
4055 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4056 arm_linux_get_next_pcs_fixup.
4057
020ecd38
MK
40582016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4059
4060 * tracepoint.c (x_tracepoint_action_download): Change
4061 write_inferior_data_ptr to write_inferior_data_pointer.
4062 (cmd_qtstart): Likewise.
4063 (write_inferior_data_ptr): Remove.
4064 (download_agent_expr): Change write_inferior_data_ptr to
4065 write_inferior_data_pointer.
4066 (download_tracepoint_1): Likewise.
4067 (download_tracepoint): Likewise.
4068 (download_trace_state_variables): Likewise.
4069
7cae9051
WW
40702016-02-11 Wei-cheng Wang <cole945@gmail.com>
4071 Marcin Kościelnicki <koriakin@0x04.net>
4072
4073 * tracepoint.c (struct tracepoint_action_ops): Remove.
4074 (struct tracepoint_action): Remove ops.
4075 (m_tracepoint_action_download, r_tracepoint_action_download)
4076 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4077 size and offset accordingly.
4078 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4079 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4080 (tracepoint_action_send, tracepoint_action_download): New functions.
4081 Helpers for trace action handlers.
4082 (add_tracepoint_action): Remove setup actions ops.
4083 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4084
9f6a71b4
YQ
40852016-02-10 Yao Qi <yao.qi@linaro.org>
4086
4087 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4088
1e94266c
SM
40892016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4090
4091 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4092 to AC_OUTPUT.
4093 * configure: Regenerate.
4094
8adce034
SM
40952016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4096
4097 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4098 void * to gdb_byte *.
4099 * linux-low.c (siginfo_fixup): Likewise.
4100 (linux_xfer_siginfo): Likewise.
4101 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4102 Likewise.
4103 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4104
93813b37
WT
41052016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4106
4107 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4108 to srv_tgtobj.
4109 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4110 to srv_tgtobj.
4111 * linux-x86-low.c [__x86_64__]: Include
4112 "nat/amd64-linux-siginfo.h".
4113 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4114 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4115 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4116 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4117 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4118 (cpt_si_fd, si_timerid, si_overrun): Move from
4119 nat/amd64-linux-siginfo.c.
4120 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4121
8424cc97
SM
41222016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4123
4124 * server.c (skip_to_semicolon): Remove.
4125 (process_point_options): Use strchrnul instead of
4126 skip_to_semicolon.
4127
4d18591b
YQ
41282016-01-26 Yao Qi <yao.qi@linaro.org>
4129
4130 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4131 * linux-low.c (install_software_single_step_breakpoints): Don't
4132 call regcache_read_pc.
4133 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4134 argument pc.
4135
d8020970
YQ
41362016-01-26 Yao Qi <yao.qi@linaro.org>
4137
4138 * linux-low.c (install_software_single_step_breakpoints): Call
4139 regcache_read_pc instead of get_pc.
4140
8b207339
YQ
41412016-01-26 Yao Qi <yao.qi@linaro.org>
4142
4143 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4144 (unblock_async_io): Rename to ...
4145 (block_unblock_async_io): ... it. New function.
4146 (enable_async_io): Don't install SIGIO handler. Unblock it
4147 instead.
4148 (disable_async_io): Don't ignore SIGIO. Block it instead.
4149 (initialize_async_io): Install SIGIO handler. Don't call
4150 unblock_async_io.
4151
18879fef
YQ
41522016-01-26 Yao Qi <yao.qi@linaro.org>
4153
4154 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4155 first character is '\003', call *the_target->request_interrupt.
4156
a0f8e08a
YQ
41572016-01-25 Yao Qi <yao.qi@linaro.org>
4158
4159 * remote-utils.c (new_thread_notify): Remove.
4160 (dead_thread_notify): Likewise.
4161 * remote-utils.h (new_thread_notify): Remove declaration.
4162 (dead_thread_notify): Likewise.
4163
cc5fd9ab
MK
41642016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4165
4166 * gdb.trace/pending.exp: Fix expected message on continue.
4167
99e8eb11
MK
41682016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4169
4170 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4171 it works properly on big-endian machines where sizeof (CORE_ADDR)
4172 != sizeof (void *).
4173
a994041d
PA
41742016-01-21 Pedro Alves <palves@redhat.com>
4175
4176 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4177 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4178 * configure: Regenerate.
4179
f7a6a40d
YQ
41802016-01-21 Yao Qi <yao.qi@linaro.org>
4181
4182 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4183 is_thumb and set it according to CPSR saved on the stack.
4184 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4185 arm_sigreturn_next_pc.
4186
6f69e520
YQ
41872016-01-18 Yao Qi <yao.qi@linaro.org>
4188
4189 * linux-low.c (linux_set_pc_64bit): New function.
4190 (linux_get_pc_64bit): New function.
4191 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4192 Declare.
4193 * linux-sparc-low.c (debug_threads): Remove declaration.
4194 (sparc_get_pc): Remove.
4195 (the_low_target): Use linux_get_pc_64bit instead of
4196 sparc_get_pc.
4197 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4198 (the_low_target): Use linux_get_pc_64bit and
4199 linux_set_pc_64bit.
4200
276d4552
YQ
42012016-01-18 Yao Qi <yao.qi@linaro.org>
4202
4203 * linux-arm-low.c (debug_threads): Remove declaration.
4204 (arm_get_pc, arm_set_pc): Remove.
4205 (the_low_target): Use linux_get_pc_32bit and
4206 linux_set_pc_32bit.
4207 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4208 (the_low_target): Use linux_get_pc_32bit and
4209 linux_set_pc_32bit.
4210 * linux-cris-low.c (debug_threads): Remove declaration.
4211 (cris_get_pc, cris_set_pc,): Remove.
4212 (the_low_target): Use linux_get_pc_32bit and
4213 linux_set_pc_32bit.
4214 * linux-crisv32-low.c (debug_threads): Remove declaration.
4215 (cris_get_pc, cris_set_pc): Remove.
4216 (the_low_target): Use linux_get_pc_32bit and
4217 linux_set_pc_32bit.
4218 * linux-low.c: Include inttypes.h.
4219 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4220 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4221 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4222 (the_low_target): Use linux_get_pc_32bit and
4223 linux_set_pc_32bit.
4224 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4225 (the_low_target): Use linux_get_pc_32bit and
4226 linux_set_pc_32bit.
4227 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4228 (the_low_target): Use linux_get_pc_32bit and
4229 linux_set_pc_32bit.
4230 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4231 (the_low_target): Use linux_get_pc_32bit and
4232 linux_set_pc_32bit.
4233 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4234 (the_low_target): Use linux_get_pc_32bit and
4235 linux_set_pc_32bit.
4236
eb0edac8
GB
42372016-01-18 Gary Benson <gbenson@redhat.com>
4238
4239 * configure.ac (AC_FUNC_FORK): New check.
4240 * config.in: Regenerate.
4241 * configure: Likewise.
4242
1b451dda
YQ
42432016-01-14 Yao Qi <yao.qi@linaro.org>
4244
4245 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4246 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4247 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4248 arm_get_next_pcs_ctor.
4249
82075af2
JS
42502016-01-12 Josh Stone <jistone@redhat.com>
4251 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4252
4253 * inferiors.h: Include "gdb_vecs.h".
4254 (struct process_info): Add syscalls_to_catch.
4255 * inferiors.c (remove_process): Free syscalls_to_catch.
4256 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4257 syscall_return stops.
4258 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4259 * server.c (handle_general_set): Handle QCatchSyscalls.
4260 (handle_query): Report support for QCatchSyscalls.
4261 * target.h (struct target_ops): Add supports_catch_syscall.
4262 (target_supports_catch_syscall): New macro.
4263 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4264 (struct lwp_info): Add syscall_state.
4265 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4266 Maintain syscall_state and syscalls_to_catch across exec.
4267 (get_syscall_trapinfo): New function, proxy to the_low_target.
4268 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4269 (linux_low_filter_event): Toggle syscall_state entry/return for
4270 syscall traps, and set it ignored for all others.
4271 (gdb_catching_syscalls_p): New function.
4272 (gdb_catch_this_syscall_p): New function.
4273 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4274 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4275 (linux_supports_catch_syscall): New function.
4276 (linux_target_ops): Install it.
4277 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4278 (the_low_target): Install it.
4279
8f13a3ce
MF
42802016-01-12 Mike Frysinger <vapier@gentoo.org>
4281
4282 * acinclude.m4: Include new ../warning.m4 file.
4283 * configure: Regenerated.
4284 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4285
5b3da067
MF
42862016-01-12 Mike Frysinger <vapier@gentoo.org>
4287
4288 * ax.c (is_goto_target): Mark static.
4289 * linux-low.c (register_addr): Likewise.
4290 (linux_fetch_registers, linux_store_registers): Likewise.
4291 * mem-break.c (any_persistent_commands): Fix old prototype.
4292 (add_commands_to_breakpoint): Mark static.
4293 * regcache.c (find_register_by_name): Delete unused func.
4294 * remote-utils.c (hex_or_minus_one): Mark static.
4295 * server.c (monitor_show_help): Mark static.
4296 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4297 handle_v_requests): Likewise.
4298
bc504a31
PA
42992016-01-12 Pedro Alves <palves@redhat.com>
4300
4301 Remove use of the registered trademark symbol throughout.
4302
5a0dd67a
YQ
43032016-01-08 Yao Qi <yao.qi@linaro.org>
4304
4305 * remote-utils.c (getpkt): If c is '\003', call target hook
4306 request_interrupt.
4307
b2ca446f
YQ
43082016-01-06 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4311 linux-aarch32-low.c.
4312 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4313 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4314 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4315 (thumb2_breakpoint): Declare.
4316 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4317 linux-aarch32-low.h.
4318 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4319 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4320 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4321
edd88788
JB
43222016-01-01 Joel Brobecker <brobecker@adacore.com>
4323
4324 * gdbreplay.c (gdbreplay_version): Change copyright year in
4325 version message.
4326 * server.c (gdbserver_version): Likewise.
4327
65da7f14
PP
43282015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4329
4330 * server.c (crc32_table): Delete.
4331 (crc32): Use libiberty's xcrc32 function.
4332
4abd5ed2
JB
43332015-12-22 Joel Brobecker <brobecker@adacore.com>
4334
4335 * lynx-low.c (lynx_delete_thread_callback): New function.
4336 (lynx_mourn): Properly delete our process and all of its
4337 threads. Remove call to clear_inferiors.
4338
0e50fe5c
JB
43392015-12-22 Joel Brobecker <brobecker@adacore.com>
4340
4341 * target.c (thread_search_callback): Add check that
4342 the thread_stopped target callback is not NULL before
4343 calling it.
4344
35adc03f
YQ
43452015-12-21 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4348 arm breakpoint.
4349
bd2b2909
AT
43502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4351
4352 * server.c (handle_query): Call target_supports_software_single_step.
4353
7fe5e27e
AT
43542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4355
4356 * linux-low.c (single_step): New function.
4357 (linux_resume_one_lwp_throw): Call single_step.
4358 (start_step_over): Likewise.
4359
d9311bfa
AT
43602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4361
4362 * Makefile.in (SFILES): Append arch/arm-linux.c,
4363 arch/arm-get-next-pcs.c.
4364 (arm-linux.o): New rule.
4365 (arm-get-next-pcs.o): New rule.
4366 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4367 arm-linux.o.
4368 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4369 to linux-aarch32-low.c.
4370 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4371 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4372 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4373 (thumb2_breakpoint_len): Likewise.
4374 (arm_is_thumb_mode): Make non-static.
4375 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4376 from linux-aarch32-low.c.
4377 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4378 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4379 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4380 (thumb2_breakpoint_len): Likewise.
4381 (arm_is_thumb_mode): New declaration.
4382 * linux-arm-low.c: Include arch/arm-linux.h
4383 aarch/arm-get-next-pcs.h, sys/syscall.h.
4384 (get_next_pcs_ops): New struct.
4385 (get_next_pcs_addr_bits_remove): New function.
4386 (get_next_pcs_is_thumb): New function.
4387 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4388 (arm_sigreturn_next_pc): Likewise.
4389 (get_next_pcs_syscall_next_pc): Likewise.
4390 (arm_gdbserver_get_next_pcs): Likewise.
4391 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4392 Initialize.
4393 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4394 * server.h: Include gdb_vecs.h.
4395
68ce2059
AT
43962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4397
4398 * Makefile.in (SFILES): Append common/common-regcache.c.
4399 (OBS): Append common-regcache.o.
4400 (common-regcache.o): New rule.
4401 * regcache.c (init_register_cache): Initialize cache to
4402 REG_UNAVAILABLE.
4403 (regcache_raw_read_unsigned): New function.
4404 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4405 register_status enum.
4406
fa5308bd
AT
44072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4408
4409 * linux-aarch64-low.c (the_low_targets): Rename
4410 breakpoint_reinsert_addr to get_next_pcs.
4411 * linux-arm-low.c (the_low_targets): Likewise.
4412 * linux-bfin-low.c (the_low_targets): Likewise.
4413 * linux-cris-low.c (the_low_targets): Likewise.
4414 * linux-crisv32-low.c (the_low_targets): Likewise.
4415 * linux-low.c (can_software_single_step): Likewise.
4416 (install_software_single_step_breakpoints): New function.
4417 (start_step_over): Use install_software_single_step_breakpoints.
4418 * linux-low.h: New CORE_ADDR vector.
4419 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4420 get_next_pcs.
4421 * linux-mips-low.c (the_low_targets): Likewise.
4422 * linux-nios2-low.c (the_low_targets): Likewise.
4423 * linux-sparc-low.c (the_low_targets): Likewise.
4424
4a6ed09b
PA
44252015-12-17 Pedro Alves <palves@redhat.com>
4426
4427 * linux-low.c (linux_kill_one_lwp): Remove references to
4428 LinuxThreads.
4429 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4430 to 'kill'.
4431 (linux_init_signals): Delete.
4432 (initialize_low): Adjust.
4433 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4434
7544db95
PA
44352015-12-16 Pedro Alves <palves@redhat.com>
4436
4437 * configure.ac (compiler warning flags): When testing a
4438 -Wno-foo option, check whether -Wfoo works instead.
4439 * configure: Regenerate.
4440
8020350c
DB
44412015-12-11 Don Breazeal <donb@codesourcery.com>
4442
4443 * server.c (process_serial_event): Don't exit from gdbserver
4444 in remote mode if there are still active inferiors.
4445
db91f502
YQ
44462015-12-11 Yao Qi <yao.qi@linaro.org>
4447
4448 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4449 arm_breakpoint_at if the process is 32-bit.
4450
b37a6290
YQ
44512015-12-11 Yao Qi <yao.qi@linaro.org>
4452
4453 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4454 arm breakpoint.
4455
17b1509a
YQ
44562015-12-07 Yao Qi <yao.qi@linaro.org>
4457
4458 * configure.srv: Append arm.o to srv_tgtobj for
4459 aarch64*-*-linux* target.
4460 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4461 from linux-arm-low.c.
4462 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4463 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4464 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4465 (thumb2_breakpoint_len): Likewise.
4466 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4467 (arm_breakpoint_kinds): Likewise.
4468 (arm_breakpoint_kind_from_pc): Likewise.
4469 (arm_sw_breakpoint_from_kind): Likewise.
4470 (arm_breakpoint_kind_from_current_state): Likewise.
4471 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4472 (arm_sw_breakpoint_from_kind): Declare.
4473 (arm_breakpoint_kind_from_current_state): Declare.
4474 (arm_breakpoint_at): Declare.
4475 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4476 arm_sw_breakpoint_from_kind if process is 32-bit.
4477 (aarch64_breakpoint_kind_from_pc): New function.
4478 (aarch64_breakpoint_kind_from_current_state): New function.
4479 (the_low_target): Initialize fields breakpoint_kind_from_pc
4480 and breakpoint_kind_from_current_state.
4481 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4482 linux-aarch32-low.c.
4483 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4484 (arm_breakpoint, arm_breakpoint_len): Likewise.
4485 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4486 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4487 (arm_is_thumb_mode): Likewise.
4488 (arm_breakpoint_at): Likewise.
4489 (arm_breakpoint_kind_from_pc): Likewise.
4490 (arm_sw_breakpoint_from_kind): Likewise.
4491 (arm_breakpoint_kind_from_current_state): Likewise.
4492
4493 Revert:
4494 2015-08-04 Yao Qi <yao.qi@linaro.org>
4495
4496 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4497 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4498 * server.c (extended_protocol): Remove "static".
4499 * server.h (extended_protocol): Declare it.
4500
ece66d65
JS
45012015-12-04 Josh Stone <jistone@redhat.com>
4502
4503 * target.h (struct target_ops) <arch_setup>: Rename to ...
4504 (struct target_ops) <post_create_inferior>: ... this.
4505 (target_arch_setup): Rename to ...
4506 (target_post_create_inferior): ... this, calling post_create_inferior.
4507 * server.c (start_inferior): Update target_arch_setup calls to
4508 target_post_create_inferior.
4509 * linux-low.c (linux_low_ptrace_options): Forward declare.
4510 (linux_arch_setup): Update its comment for general use.
4511 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4512 (struct linux_target_ops): Use linux_post_create_inferior.
4513 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4514 to post_create_inferior.
4515 * nto-low.c (struct nto_target_ops): Likewise.
4516 * spu-low.c (struct spu_target_ops): Likewise.
4517 * win32-low.c (struct win32_target_ops): Likewise.
4518
e58c48b4
AT
45192015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4520
4521 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4522
fbec8956
AT
45232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4524
4525 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4526 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4527 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4528 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4529 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4530 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4531 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4532 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4533 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4534 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4535 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4536 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4537
9b4c5f87
AT
45382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4539
4540 * linux-low.c (linux_look_up_symbols): Don't call
4541 linux_supports_traceclone.
4542 * linux-low.h (thread_db_init): Remove use_events argument.
4543 * thread-db.c (thread_db_use_event): Remove global variable.
4544 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4545 (struct thread_db) <td_create_bp>: Remove field.
4546 (thread_db_create_event): Remove function.
4547 (thread_db_enable_reporting): Likewise.
4548 (find_one_thread): Don't check for thread_db_use_events.
4549 (attach_thread): Likewise.
4550 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4551 (try_thread_db_load_1): Don't check for thread_db_use_events.
4552 (thread_db_init): Remove use_events argument and thread events
4553 handling.
4554 (remove_thread_event_breakpoints): Remove function.
4555 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4556
7d00775e
AT
45572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4558
4559 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4560 New function.
4561 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4562 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4563 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4564 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4565 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4566 Initialize.
4567 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4568 New function.
4569 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4570 * linux-low.c (can_hardware_single_step): Use
4571 supports_hardware_single_step.
4572 (can_software_single_step): New function.
4573 (start_step_over): Call can_software_single_step.
4574 (linux_supports_hardware_single_step): New function.
4575 (struct target_ops) <supports_software_single_step>: Initialize.
4576 * linux-low.h (struct linux_target_ops)
4577 <supports_hardware_single_step>: Initialize.
4578 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4579 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4580 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4581 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4582 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4583 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4584 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4585 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4586 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4587 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4588 Initialize.
4589 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4590 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4591 Initialize.
4592 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4594 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4595 New function.
4596 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4597 * target.h (struct target_ops): <supports_software_single_step>:
4598 New field.
4599 (target_supports_software_single_step): New macro.
4600
2d97cd35
AT
46012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4602
4603 * linux-low.c (linux_wait_1): Fix pc advance condition.
4604 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4605 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4606
769ef81f
AT
46072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4608
4609 * linux-arm-low.c (arm_is_thumb_mode): New function.
4610 (arm_breakpoint_at): Use arm_is_thumb_mode.
4611 (arm_breakpoint_kind_from_current_state): New function.
4612 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4613 Initialize.
4614 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4615 (linux_breakpoint_kind_from_current_state): New function.
4616 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4617 * linux-low.h (struct linux_target_ops)
4618 <breakpoint_kind_from_current_state>: New field.
4619 * target.h (struct target_ops): Likewise.
4620 (target_breakpoint_kind_from_current_state): New macro.
4621
1bebeeca
PA
46222015-11-30 Pedro Alves <palves@redhat.com>
4623
4624 * linux-low.c (linux_resume): Wake up the event loop before
4625 returning.
4626
a67a9fae
PA
46272015-11-30 Pedro Alves <palves@redhat.com>
4628
4629 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4630 check.
4631 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4632 to -1.
4633 * target.c (struct thread_search): New structure.
4634 (thread_search_callback): New function.
4635 (prev_general_thread): New global.
4636 (prepare_to_access_memory, done_accessing_memory): New functions.
4637 * target.h (prepare_to_access_memory, done_accessing_memory):
4638 Replace macros with function declarations.
4639
f2faf941
PA
46402015-11-30 Pedro Alves <palves@redhat.com>
4641
4642 PR 14618
4643 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4644 report TARGET_WAITKIND_NO_RESUMED.
4645 * remote-utils.c (prepare_resume_reply): Handle
4646 TARGET_WAITKIND_NO_RESUMED.
4647 * server.c (report_no_resumed): New global.
4648 (handle_query) <qSupported>: Handle "no-resumed+". Report
4649 "no-resumed+" support.
4650 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4651 return error if the client doesn't support no-resumed events.
4652 (push_stop_notification): New function.
4653 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4654 events if the client supports them.
4655
a681f9c9
PA
46562015-11-30 Pedro Alves <palves@redhat.com>
4657
4658 * linux-low.c (thread_still_has_status_pending_p): Don't check
4659 vCont;t here.
4660 (lwp_resumed): New function.
4661 (status_pending_p_callback): Return early if the LWP is not
4662 supposed to be resumed.
4663
65706a29
PA
46642015-11-30 Pedro Alves <palves@redhat.com>
4665
4666 * linux-low.c (handle_extended_wait): Assert that the LWP's
4667 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4668 thread create events, leave the new child's status pending.
4669 (linux_low_filter_event): If GDB wants to hear about thread exit
4670 events, leave the LWP marked dead and don't delete it.
4671 (linux_wait_for_event_filtered): Don't check for thread exit.
4672 (filter_exit_event): New function.
4673 (linux_wait_1): Use it, when returning an exit event.
4674 (linux_resume_one_lwp_throw): Assert that the LWP's
4675 waitstatus is TARGET_WAITKIND_IGNORE.
4676 * remote-utils.c (prepare_resume_reply): Handle
4677 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4678 * server.c (report_thread_events): New global.
4679 (handle_general_set): Handle QThreadEvents.
4680 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4681 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4682 TARGET_WAITKIND_THREAD_EXITED.
4683 * server.h (report_thread_events): Declare.
4684
56cf4bed
PA
46852015-11-30 Pedro Alves <palves@redhat.com>
4686
4687 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4688 the thread's last_resume_kind was resume_stop.
4689
500c1d85
PA
46902015-11-30 Pedro Alves <palves@redhat.com>
4691
4692 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4693 before returning.
4694
de979965
PA
46952015-11-30 Pedro Alves <palves@redhat.com>
4696
4697 * server.c (handle_v_requests): Handle vCtrlC.
4698
34c65914
PA
46992015-11-30 Pedro Alves <palves@redhat.com>
4700
4701 * gdbthread.h (find_any_thread_of_pid): Declare.
4702 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4703 functions.
4704 * server.c (handle_query): If current_thread is NULL, look for
4705 another thread of the selected process.
4706
79efa585 47072015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 4708 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
4709
4710 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4711 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4712 name in reply.
4713 * target.h (struct target_ops) <thread_name>: New field.
4714 (target_thread_name): New macro.
4715
80d82c19
JB
47162015-11-23 Joel Brobecker <brobecker@adacore.com>
4717
4718 * regcache.h (regcache_invalidate_pid): Add declaration.
4719 * regcache.c (regcache_invalidate_pid): New function, extracted
4720 from regcache_invalidate.
4721 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4722 Add trivial documentation comment.
4723 * lynx-low.c: Use regcache_invalidate_pid instead of
4724 regcache_invalidate.
4725
64da5dd5
JB
47262015-11-23 Joel Brobecker <brobecker@adacore.com>
4727
4728 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4729 and Elf64_auxv_t if the target is Android.
4730
37ce4055
DE
47312015-11-22 Doug Evans <xdje42@gmail.com>
4732
4733 * target.h: #include <sys/types.h>.
4734
06e03fff
PA
47352015-11-19 Pedro Alves <palves@redhat.com>
4736
4737 * linux-low.c (linux_process_qsupported): Change prototype.
4738 Adjust.
4739 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4740 Change prototype.
4741 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4742 and adjust to loop over all features.
4743 * server.c (handle_query) <qSupported>: Adjust to call
4744 target_process_qsupported once, passing it a vector of unprocessed
4745 features.
4746 * target.h (struct target_ops) <process_qsupported>: Change
4747 prototype.
4748 (target_process_qsupported): Adjust.
4749
9a084706
PA
47502015-11-19 Pedro Alves <palves@redhat.com>
4751
4752 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4753 mode.
4754 * configure: Regenerate.
4755
dad44a1f
PA
47562015-11-19 Pedro Alves <palves@redhat.com>
4757
4758 * configure: Regenerate.
4759
231c0592
YQ
47602015-11-19 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4763 type to uint32_t.
4764
6c1c9a8b
YQ
47652015-11-19 Yao Qi <yao.qi@linaro.org>
4766
4767 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4768 (struct aarch64_operand): Move enum out.
4769
9caa3311
YQ
47702015-11-19 Yao Qi <yao.qi@linaro.org>
4771
4772 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4773 struct user_fpsimd_state *.
4774 (aarch64_store_fpregset): Likewise.
4775
6a69a054
YQ
47762015-11-19 Yao Qi <yao.qi@linaro.org>
4777
4778 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4779 struct user_pt_regs *.
4780 (aarch64_store_gregset): Likewise.
4781
1798301e
PA
47822015-11-18 Pedro Alves <palves@redhat.com>
4783
4784 * Makefile.in (all_object_files): Add $IPA_OBJS.
4785
ce7715e2
PA
47862015-11-17 Pedro Alves <palves@redhat.com>
4787
4788 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4789 GDB_SIGNAL_0 and gdb_signal_to_string.
4790
c0879059
PA
47912015-11-17 Pedro Alves <palves@redhat.com>
4792
4793 * win32-low.c (handle_output_debug_string): Remove parameter.
4794 (win32_kill): Remove our_status local and adjust call to
4795 handle_output_debug_string.
4796 (get_child_debug_event): Adjust call to
4797 handle_output_debug_string.
4798
1996e237
SM
47992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4800
4801 * linux-mips-low.c (mips_fill_gregset): Add cast.
4802 (mips_store_gregset): Likewise.
4803 (mips_fill_fpregset): Likewise.
4804 (mips_store_fpregset): Likewise.
4805
cbec665b
SM
48062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4807
4808 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4809 priv.
4810
eb3e3c67
SM
48112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4812
4813 * linux-mips-low.c (mips_linux_new_thread): Change type of
4814 watch_type to enum target_hw_bp_type.
4815
171de4b8
SM
48162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4817
4818 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4819 Change return type to arm_hwbp_type.
4820
04248ead
SM
48212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4822
4823 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4824 (arm_store_gregset): Likewise.
4825 * linux-arm-low.c (arm_get_hwcap): Likewise.
4826 (arm_read_description): Likewise.
4827
04b3479c
SM
48282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4831
2bc84e8a
SM
48322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4833
4834 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4835 (ppc_fill_vsxregset): Likewise.
4836 (ppc_store_vsxregset): Likewise.
4837 (ppc_fill_vrregset): Likewise.
4838 (ppc_store_vrregset): Likewise.
4839 (ppc_fill_evrregset): Likewise.
4840 (ppc_store_evrregset): Likewise.
4841
e6c5bb05
SM
48422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4843
4844 * linux-ppc-low.c (ppc_usrregs_info): Remove
4845 forward-declaration.
4846 (ppc_arch_setup): Move lower in file.
4847
7ea45d72
SM
48482015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4849
4850 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4851 (ps_pdwrite): Likewise.
4852
69291610
HW
48532015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4854
4855 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4856 to after assert checks.
4857
b42945fd
SM
48582015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4859
4860 * proc-service.c (ps_pdread): Add/adjust casts.
4861 (ps_pdwrite): Add/adjust casts.
4862
d6f85c84
SM
48632015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4864
4865 * server.c (handle_search_memory_1): Cast return value of
4866 memmem.
4867
f98cd059
SM
48682015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4869
4870 * server.c (write_qxfer_response): Change type of data to
4871 gdb_byte *.
4872
d2412fa5
PA
48732015-10-29 Pedro Alves <palves@redhat.com>
4874
4875 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4876
c17414a2
PA
48772015-10-29 Pedro Alves <palves@redhat.com>
4878
4879 * tracepoint.c (clear_installed_tracepoints): Add casts.
4880
e053fbc4
PA
48812015-10-29 Pedro Alves <palves@redhat.com>
4882
4883 * server.c (handle_v_cont, process_serial_event): Add enum
4884 gdb_signal casts to signal parsing code.
4885
add67df8
PA
48862015-10-29 Pedro Alves <palves@redhat.com>
4887
4888 * linux-low.h (NULL_REGSET): Define.
4889 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4890 * linux-arm-low.c (arm_regsets): Likewise.
4891 * linux-crisv32-low.c (cris_regsets): Likewise.
4892 * linux-m68k-low.c (m68k_regsets): Likewise.
4893 * linux-mips-low.c (mips_regsets): Likewise.
4894 * linux-nios2-low.c (nios2_regsets): Likewise.
4895 * linux-ppc-low.c (ppc_regsets): Likewise.
4896 * linux-s390-low.c (s390_regsets): Likewise.
4897 * linux-sh-low.c (sh_regsets): Likewise.
4898 * linux-sparc-low.c (sparc_regsets): Likewise.
4899 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4900 * linux-tile-low.c (tile_regsets): Likewise.
4901 * linux-x86-low.c (x86_regsets): Likewise.
4902 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4903
50bc912a
PA
49042015-10-29 Pedro Alves <palves@redhat.com>
4905
4906 * linux-low.h (NULL_REGSET): Define.
4907 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4908 * linux-arm-low.c (arm_regsets): Likewise.
4909 * linux-crisv32-low.c (cris_regsets): Likewise.
4910 * linux-m68k-low.c (m68k_regsets): Likewise.
4911 * linux-mips-low.c (mips_regsets): Likewise.
4912 * linux-nios2-low.c (nios2_regsets): Likewise.
4913 * linux-ppc-low.c (ppc_regsets): Likewise.
4914 * linux-s390-low.c (s390_regsets): Likewise.
4915 * linux-sh-low.c (sh_regsets): Likewise.
4916 * linux-sparc-low.c (sparc_regsets): Likewise.
4917 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4918 * linux-tile-low.c (tile_regsets): Likewise.
4919 * linux-x86-low.c (x86_regsets): Likewise.
4920 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4921
682b2546
DE
49222015-10-26 Doug Evans <dje@google.com>
4923
4924 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4925
963843d4
DE
49262015-10-26 Doug Evans <dje@google.com>
4927
4928 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4929
d41401ac
DE
49302015-10-26 Doug Evans <dje@google.com>
4931
4932 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4933 for debug_printf.
4934 (attach_thread, find_new_threads_callback): Ditto.
4935
3db28855
AT
49362015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4937
4938 * mem-break.h (set_breakpoint_data): Remove.
4939
fb78e89c
AT
49402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4941
4942 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4943 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4944 (initialize_low): Remove set_breakpoint_data call.
4945 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4946 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4947 (initialize_low): Remove set_breakpoint_data call.
4948 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4949 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4950 (initialize_low): Remove set_breakpoint_data call.
4951
2e6ee069
AT
49522015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4953
4954 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4955 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4956 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4957 * target.h (target_breakpoint_kind_from_pc): New macro.
4958
1652a986
AT
49592015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4960
4961 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4962 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4963 the default breakpoint kind.
4964
abeead09
AT
49652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4966
4967 * linux-arm-low.c (arm_supports_z_point_type): Add software
4968 breakpoint support.
4969
b0b4b501
AT
49702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4971
4972 * linux-arm-low.c: Refactor breakpoint definitions.
4973 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4974 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4975
8689682c
AT
49762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4977
4978 * Makefile.in: Add arm.c/o.
4979 * configure.srv: Likewise.
4980 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4981 (arm_breakpoint_kind_from_pc): New function.
4982 (arm_sw_breakpoint_from_kind): Return proper kind.
4983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4984
27165294
AT
49852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4986
4987 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4988 removal.
4989 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4990 (struct raw_breakpoint) <size>: Remove.
4991 (struct raw_breakpoint) <kind>: Add.
4992 (bp_size): New function.
4993 (bp_opcode): Likewise.
4994 (find_raw_breakpoint_at): Adjust for kind.
4995 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4996 (remove_memory_breakpoint): Adjust for kind call bp_size.
4997 (set_raw_breakpoint_at): Adjust for kind.
4998 (set_breakpoint): Likewise.
4999 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5000 (delete_raw_breakpoint): Adjust for kind.
5001 (delete_breakpoint): Likewise.
5002 (find_gdb_breakpoint): Likewise.
5003 (set_gdb_breakpoint_1): Likewise.
5004 (set_gdb_breakpoint): Likewise.
5005 (delete_gdb_breakpoint_1): Likewise.
5006 (delete_gdb_breakpoint): Likewise.
5007 (uninsert_raw_breakpoint): Likewise.
5008 (reinsert_raw_breakpoint): Likewise.
5009 (set_breakpoint_data): Remove.
5010 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5011 (check_mem_read): Adjust for kind call bp_size.
5012 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5013 (clone_one_breakpoint): Adjust for kind.
5014 * mem-break.h (set_gdb_breakpoint): Likewise.
5015 (delete_gdb_breakpoint): Likewise.
5016 * server.c (process_serial_event): Likewise.
5017
dd373349
AT
50182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5019
5020 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5021 (struct linux_target_ops) <breakpoint>: Remove.
5022 (struct linux_target_ops) <breakpoint_len>: Remove.
5023 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5024 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5025 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5026 (arm_sw_breakpoint_from_kind): New function.
5027 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5028 (struct linux_target_ops) <breakpoint>: Remove.
5029 (struct linux_target_ops) <breakpoint_len>: Remove.
5030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5032 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5033 (struct linux_target_ops) <breakpoint>: Remove.
5034 (struct linux_target_ops) <breakpoint_len>: Remove.
5035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5037 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5038 (struct linux_target_ops) <breakpoint>: Remove.
5039 (struct linux_target_ops) <breakpoint_len>: Remove.
5040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5042 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5043 and sw_breakpoint_from_kind to increment the pc.
5044 (linux_breakpoint_kind_from_pc): New function.
5045 (linux_sw_breakpoint_from_kind): New function.
5046 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5047 (initialize_low): Call breakpoint_kind_from_pc and
5048 sw_breakpoint_from_kind to replace breakpoint_data/len.
5049 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5050 New field.
5051 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5052 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5053 (struct linux_target_ops) <breakpoint>: Remove.
5054 (struct linux_target_ops) <breakpoint_len>: Remove.
5055 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5056 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5057 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5058 (struct linux_target_ops) <breakpoint>: Remove.
5059 (struct linux_target_ops) <breakpoint_len>: Remove.
5060 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5061 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5062 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5063 (struct linux_target_ops) <breakpoint>: Remove.
5064 (struct linux_target_ops) <breakpoint_len>: Remove.
5065 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5066 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5067 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5068 (struct linux_target_ops) <breakpoint>: Remove.
5069 (struct linux_target_ops) <breakpoint_len>: Remove.
5070 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5071 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5072 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5073 (struct linux_target_ops) <breakpoint>: Remove.
5074 (struct linux_target_ops) <breakpoint_len>: Remove.
5075 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5076 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5077 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5078 (struct linux_target_ops) <breakpoint>: Remove.
5079 (struct linux_target_ops) <breakpoint_len>: Remove.
5080 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5081 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5082 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5083 (struct linux_target_ops) <breakpoint>: Remove.
5084 (struct linux_target_ops) <breakpoint_len>: Remove.
5085 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5086 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5087 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5088 (struct linux_target_ops) <breakpoint>: Remove.
5089 (struct linux_target_ops) <breakpoint_len>: Remove.
5090 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5091 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5092 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5093 (struct linux_target_ops) <breakpoint>: Remove.
5094 (struct linux_target_ops) <breakpoint_len>: Remove.
5095 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5096 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5097 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5098 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
4cd98a19
AT
51092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5110
5111 * linux-cris-low.c (cris_get_pc): Remove void arg.
5112
774ee6d2
AR
51132015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5114
5115 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5116 variable name.
5117
833dcd29
AR
51182015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5119
5120 * inferiors.c (thread_pid_matches_callback): New function.
5121 (find_thread_process): New function.
5122 (remove_thread): Reset current_thread.
5123 (remove_process): Assert threads have been removed first.
5124
8d689ee5
YQ
51252015-10-15 Yao Qi <yao.qi@linaro.org>
5126
5127 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5128 if it is 3.
5129 (aarch64_remove_point): Likewise.
5130 * regcache.c (regcache_register_size): New function.
5131
1c2e1515
YQ
51322015-10-12 Yao Qi <yao.qi@linaro.org>
5133
5134 * linux-aarch64-low.c: Update all callers as emit_load_store
5135 is renamed to aarch64_emit_load_store.
5136
e1c587c3
YQ
51372015-10-12 Yao Qi <yao.qi@linaro.org>
5138
5139 * linux-aarch64-low.c: Update all callers of function renaming
5140 from emit_insn to aarch64_emit_insn.
5141
b6542f81
YQ
51422015-10-12 Yao Qi <yao.qi@linaro.org>
5143
5144 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5145 arch/aarch64-insn.h.
5146 (struct aarch64_memory_operand): Likewise.
5147 (ENCODE): Likewise.
5148 (emit_insn): Move to arch/aarch64-insn.c.
5149 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5150 (emit_load_store): Move to arch/aarch64-insn.c.
5151 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5152 (can_encode_int32): Remove.
5153
246994ce
YQ
51542015-10-12 Yao Qi <yao.qi@linaro.org>
5155
5156 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5157 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5158 (aarch64_relocate_instruction): Likewise.
5159 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5160 (struct aarch64_insn_visitor): Likewise.
5161
0badd99f
YQ
51622015-10-12 Yao Qi <yao.qi@linaro.org>
5163
5164 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5165 (struct aarch64_insn_visitor): New.
5166 (struct aarch64_insn_relocation_data): New.
5167 (aarch64_ftrace_insn_reloc_b): New function.
5168 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5169 (aarch64_ftrace_insn_reloc_cb): Likewise.
5170 (aarch64_ftrace_insn_reloc_tb): Likewise.
5171 (aarch64_ftrace_insn_reloc_adr): Likewise.
5172 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5173 (aarch64_ftrace_insn_reloc_others): Likewise.
5174 (visitor): New.
5175 (aarch64_relocate_instruction): Use visitor.
5176
dfaffe9d
YQ
51772015-10-12 Yao Qi <yao.qi@linaro.org>
5178
5179 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5180 int. Add argument buf.
5181 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5182 aarch64_relocate_instruction.
5183
70b439f0
YQ
51842015-10-12 Yao Qi <yao.qi@linaro.org>
5185
5186 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5187 argument insn. Remove local variable insn. Don't call
5188 target_read_uint32.
5189 (aarch64_install_fast_tracepoint_jump_pad): Call
5190 target_read_uint32.
5191
7781c06f
YQ
51922015-09-30 Yao Qi <yao.qi@linaro.org>
5193
5194 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5195 (emit_load_store_pair): Likewise.
5196
9a3c8263
SM
51972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5198
5199 * dll.c (match_dll): Add cast(s).
5200 (unloaded_dll): Likewise.
5201 * linux-low.c (second_thread_of_pid_p): Likewise.
5202 (delete_lwp_callback): Likewise.
5203 (count_events_callback): Likewise.
5204 (select_event_lwp_callback): Likewise.
5205 (linux_set_resume_request): Likewise.
5206 * server.c (accumulate_file_name_length): Likewise.
5207 (emit_dll_description): Likewise.
5208 (handle_qxfer_threads_worker): Likewise.
5209 (visit_actioned_threads): Likewise.
5210 * thread-db.c (any_thread_of): Likewise.
5211 * tracepoint.c (same_process_p): Likewise.
5212 (match_blocktype): Likewise.
5213 (build_traceframe_info_xml): Likewise.
5214
224c3ddb
SM
52152015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5216
5217 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5218 assignment.
5219 (gdb_unparse_agent_expr): Likewise.
5220 * hostio.c (require_data): Likewise.
5221 (handle_pread): Likewise.
5222 * linux-low.c (disable_regset): Likewise.
5223 (fetch_register): Likewise.
5224 (store_register): Likewise.
5225 (get_dynamic): Likewise.
5226 (linux_qxfer_libraries_svr4): Likewise.
5227 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5228 (set_fast_tracepoint_jump): Likewise.
5229 (uninsert_fast_tracepoint_jumps_at): Likewise.
5230 (reinsert_fast_tracepoint_jumps_at): Likewise.
5231 (validate_inserted_breakpoint): Likewise.
5232 (clone_agent_expr): Likewise.
5233 * regcache.c (init_register_cache): Likewise.
5234 * remote-utils.c (putpkt_binary_1): Likewise.
5235 (decode_M_packet): Likewise.
5236 (decode_X_packet): Likewise.
5237 (look_up_one_symbol): Likewise.
5238 (relocate_instruction): Likewise.
5239 (monitor_output): Likewise.
5240 * server.c (handle_search_memory): Likewise.
5241 (handle_qxfer_exec_file): Likewise.
5242 (handle_qxfer_libraries): Likewise.
5243 (handle_qxfer): Likewise.
5244 (handle_query): Likewise.
5245 (handle_v_cont): Likewise.
5246 (handle_v_run): Likewise.
5247 (captured_main): Likewise.
5248 * target.c (write_inferior_memory): Likewise.
5249 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5250 * tracepoint.c (init_trace_buffer): Likewise.
5251 (add_tracepoint_action): Likewise.
5252 (add_traceframe): Likewise.
5253 (add_traceframe_block): Likewise.
5254 (cmd_qtdpsrc): Likewise.
5255 (cmd_qtdv): Likewise.
5256 (cmd_qtstatus): Likewise.
5257 (response_source): Likewise.
5258 (response_tsv): Likewise.
5259 (cmd_qtnotes): Likewise.
5260 (gdb_collect): Likewise.
5261 (initialize_tracepoint): Likewise.
5262
afbe19f8
PL
52632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5264
5265 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5266 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5267 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5268 <NOP>: New.
5269 (enum aarch64_condition_codes): New enum.
5270 (w0): New static global.
5271 (fp): Likewise.
5272 (lr): Likewise.
5273 (struct aarch64_memory_operand) <type>: New
5274 MEMORY_OPERAND_POSTINDEX type.
5275 (postindex_memory_operand): New helper function.
5276 (emit_ret): New function.
5277 (emit_load_store_pair): New function, factored out of emit_stp
5278 with support for MEMORY_OPERAND_POSTINDEX.
5279 (emit_stp): Rewrite using emit_load_store_pair.
5280 (emit_ldp): New function.
5281 (emit_load_store): Likewise.
5282 (emit_ldr): Mention post-index instruction in comment.
5283 (emit_ldrh): New function.
5284 (emit_ldrb): New function.
5285 (emit_ldrsw): Mention post-index instruction in comment.
5286 (emit_str): Likewise.
5287 (emit_subs): New function.
5288 (emit_cmp): Likewise.
5289 (emit_and): Likewise.
5290 (emit_orr): Likewise.
5291 (emit_orn): Likewise.
5292 (emit_eor): Likewise.
5293 (emit_mvn): Likewise.
5294 (emit_lslv): Likewise.
5295 (emit_lsrv): Likewise.
5296 (emit_asrv): Likewise.
5297 (emit_mul): Likewise.
5298 (emit_sbfm): Likewise.
5299 (emit_sbfx): Likewise.
5300 (emit_ubfm): Likewise.
5301 (emit_ubfx): Likewise.
5302 (emit_csinc): Likewise.
5303 (emit_cset): Likewise.
5304 (emit_nop): Likewise.
5305 (emit_ops_insns): New helper function.
5306 (emit_pop): Likewise.
5307 (emit_push): Likewise.
5308 (aarch64_emit_prologue): New function.
5309 (aarch64_emit_epilogue): Likewise.
5310 (aarch64_emit_add): Likewise.
5311 (aarch64_emit_sub): Likewise.
5312 (aarch64_emit_mul): Likewise.
5313 (aarch64_emit_lsh): Likewise.
5314 (aarch64_emit_rsh_signed): Likewise.
5315 (aarch64_emit_rsh_unsigned): Likewise.
5316 (aarch64_emit_ext): Likewise.
5317 (aarch64_emit_log_not): Likewise.
5318 (aarch64_emit_bit_and): Likewise.
5319 (aarch64_emit_bit_or): Likewise.
5320 (aarch64_emit_bit_xor): Likewise.
5321 (aarch64_emit_bit_not): Likewise.
5322 (aarch64_emit_equal): Likewise.
5323 (aarch64_emit_less_signed): Likewise.
5324 (aarch64_emit_less_unsigned): Likewise.
5325 (aarch64_emit_ref): Likewise.
5326 (aarch64_emit_if_goto): Likewise.
5327 (aarch64_emit_goto): Likewise.
5328 (aarch64_write_goto_address): Likewise.
5329 (aarch64_emit_const): Likewise.
5330 (aarch64_emit_call): Likewise.
5331 (aarch64_emit_reg): Likewise.
5332 (aarch64_emit_pop): Likewise.
5333 (aarch64_emit_stack_flush): Likewise.
5334 (aarch64_emit_zero_ext): Likewise.
5335 (aarch64_emit_swap): Likewise.
5336 (aarch64_emit_stack_adjust): Likewise.
5337 (aarch64_emit_int_call_1): Likewise.
5338 (aarch64_emit_void_call_2): Likewise.
5339 (aarch64_emit_eq_goto): Likewise.
5340 (aarch64_emit_ne_goto): Likewise.
5341 (aarch64_emit_lt_goto): Likewise.
5342 (aarch64_emit_le_goto): Likewise.
5343 (aarch64_emit_gt_goto): Likewise.
5344 (aarch64_emit_ge_got): Likewise.
5345 (aarch64_emit_ops_impl): New static global variable.
5346 (aarch64_emit_ops): New target function, return
5347 &aarch64_emit_ops_impl.
5348 (struct linux_target_ops): Install it.
5349
bb903df0
PL
53502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5351
5352 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5353 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5354 aarch64-ipa.o.
5355 * linux-aarch64-ipa.c: New file.
5356 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5357 and endian.h.
5358 (aarch64_get_thread_area): New target method.
5359 (extract_signed_bitfield): New helper function.
5360 (aarch64_decode_ldr_literal): New function.
5361 (enum aarch64_opcodes): New enum.
5362 (struct aarch64_register): New struct.
5363 (struct aarch64_operand): New struct.
5364 (x0): New static global.
5365 (x1): Likewise.
5366 (x2): Likewise.
5367 (x3): Likewise.
5368 (x4): Likewise.
5369 (w2): Likewise.
5370 (ip0): Likewise.
5371 (sp): Likewise.
5372 (xzr): Likewise.
5373 (aarch64_register): New helper function.
5374 (register_operand): Likewise.
5375 (immediate_operand): Likewise.
5376 (struct aarch64_memory_operand): New struct.
5377 (offset_memory_operand): New helper function.
5378 (preindex_memory_operand): Likewise.
5379 (enum aarch64_system_control_registers): New enum.
5380 (ENCODE): New macro.
5381 (emit_insn): New helper function.
5382 (emit_b): New function.
5383 (emit_bcond): Likewise.
5384 (emit_cb): Likewise.
5385 (emit_tb): Likewise.
5386 (emit_blr): Likewise.
5387 (emit_stp): Likewise.
5388 (emit_ldp_q_offset): Likewise.
5389 (emit_stp_q_offset): Likewise.
5390 (emit_load_store): Likewise.
5391 (emit_ldr): Likewise.
5392 (emit_ldrsw): Likewise.
5393 (emit_str): Likewise.
5394 (emit_ldaxr): Likewise.
5395 (emit_stxr): Likewise.
5396 (emit_stlr): Likewise.
5397 (emit_data_processing_reg): Likewise.
5398 (emit_data_processing): Likewise.
5399 (emit_add): Likewise.
5400 (emit_sub): Likewise.
5401 (emit_mov): Likewise.
5402 (emit_movk): Likewise.
5403 (emit_mov_addr): Likewise.
5404 (emit_mrs): Likewise.
5405 (emit_msr): Likewise.
5406 (emit_sevl): Likewise.
5407 (emit_wfe): Likewise.
5408 (append_insns): Likewise.
5409 (can_encode_int32_in): New helper function.
5410 (aarch64_relocate_instruction): New function.
5411 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5412 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5413 (struct linux_target_ops): Install aarch64_get_thread_area,
5414 aarch64_install_fast_tracepoint_jump_pad and
5415 aarch64_get_min_fast_tracepoint_insn_len.
5416
787749ea
PL
54172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5418
5419 * Makefile.in (aarch64-insn.o): New rule.
5420 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5421
9812b2e6
YQ
54222015-09-21 Yao Qi <yao.qi@linaro.org>
5423
5424 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5425
18fe412b
YQ
54262015-09-21 Yao Qi <yao.qi@linaro.org>
5427
5428 * tracepoint.c (max_jump_pad_size): Remove.
5429
a0cc84cd
YQ
54302015-09-18 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c: Don't include sys/uio.h.
5433 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5434
d78908cf
WW
54352015-09-16 Wei-cheng Wang <cole945@gmail.com>
5436
5437 * tracepoint.c (eval_result_type): Change prototype.
5438 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5439
d57e0d50
PA
54402015-09-15 Pedro Alves <palves@redhat.com>
5441
5442 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5443 Check whether to report exec events instead of checking whether
5444 multiprocess is enabled.
5445
5a676acc
PA
54462015-09-15 Pedro Alves <palves@redhat.com>
5447
5448 PR remote/18965
5449 * remote-utils.c (prepare_resume_reply): Merge
5450 TARGET_WAITKIND_VFORK_DONE switch case with the
5451 TARGET_WAITKIND_FORKED case.
5452
7c5d0fad
YQ
54532015-09-15 Yao Qi <yao.qi@linaro.org>
5454
5455 * server.c (handle_query): Check string comparison using
5456 "else if" instead of "if".
5457
750ce8d1
YQ
54582015-09-15 Yao Qi <yao.qi@linaro.org>
5459
5460 * server.c (vCont_supported): New global variable.
5461 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5462 matches. Append ";vContSupported+" to own_buf.
5463 (handle_v_requests): Append ";s;S" to own_buf if target supports
5464 hardware single step or vCont_supported is false.
5465 (capture_main): Set vCont_supported to zero.
5466
70b90b91
YQ
54672015-09-15 Yao Qi <yao.qi@linaro.org>
5468
5469 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5470 it to ...
5471 (linux_supports_hardware_single_step): ... New function.
5472 (linux_target_ops): Update.
5473 * lynx-low.c (lynx_target_ops): Set field
5474 supports_hardware_single_step to target_can_do_hardware_single_step.
5475 * nto-low.c (nto_target_ops): Likewise.
5476 * spu-low.c (spu_target_ops): Likewise.
5477 * win32-low.c (win32_target_ops): Likewise.
5478 * target.c (target_can_do_hardware_single_step): New function.
5479 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5480 Remove. <supports_hardware_single_step>: New field.
5481 (target_supports_conditional_breakpoints): Remove.
5482 (target_supports_hardware_single_step): New macro.
5483 (target_can_do_hardware_single_step): Declare.
5484 * server.c (handle_query): Use target_supports_hardware_single_step
5485 instead of target_supports_conditional_breakpoints.
5486
ade90bde
YQ
54872015-09-15 Yao Qi <yao.qi@linaro.org>
5488
5489 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5490 function.
5491 (struct linux_target_ops the_low_target): Install
5492 aarch64_linux_siginfo_fixup.
5493
94585166
DB
54942015-09-11 Don Breazeal <donb@codesourcery.com>
5495 Luis Machado <lgustavo@codesourcery.com>
5496
5497 * linux-low.c (linux_mourn): Static declaration.
5498 (linux_arch_setup): Move in front of
5499 handle_extended_wait.
5500 (linux_arch_setup_thread): New function.
5501 (handle_extended_wait): Handle exec events. Call
5502 linux_arch_setup_thread. Make event_lwp argument a
5503 pointer-to-a-pointer.
5504 (check_zombie_leaders): Do not check stopped threads.
5505 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5506 (linux_low_filter_event): Add lwp and thread for exec'ing
5507 non-leader thread if leader thread has been deleted.
5508 Refactor code into linux_arch_setup_thread and call it.
5509 Pass child lwp pointer by reference to handle_extended_wait.
5510 (linux_wait_for_event_filtered): Update comment.
5511 (linux_wait_1): Prevent clobbering exec event status.
5512 (linux_supports_exec_events): New function.
5513 (linux_target_ops) <supports_exec_events>: Initialize new member.
5514 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5515 new member.
5516 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5517 * server.c (report_exec_events): New global variable.
5518 (handle_query): Handle qSupported query for exec-events feature.
5519 (captured_main): Initialize report_exec_events.
5520 * server.h (report_exec_events): Declare new global variable.
5521 * target.h (struct target_ops) <supports_exec_events>: New
5522 member.
5523 (target_supports_exec_events): New macro.
5524 * win32-low.c (win32_target_ops) <supports_exec_events>:
5525 Initialize new member.
5526
0568462b
MM
55272015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5528
5529 * linux-low.c (linux_low_enable_btrace): Remove.
5530 (linux_target_ops): Replace linux_low_enable_btrace with
5531 linux_enable_btrace.
5532
39edd165
YQ
55332015-09-03 Yao Qi <yao.qi@linaro.org>
5534
5535 * linux-aarch64-low.c (aarch64_insert_point): Call
5536 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5537 returns true.
5538
1db33b5a
UW
55392015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5540
5541 * linux-low.c (check_stopped_by_breakpoint): Use
5542 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5543
ab290430
PA
55442015-08-27 Pedro Alves <palves@redhat.com>
5545
5546 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5547
8d749320
SM
55482015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5549
6711b7f8
SM
5550 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5551 the XNEW-family equivalent.
8d749320
SM
5552 (compile_bytecodes): Likewise.
5553 * dll.c (loaded_dll): Likewise.
5554 * event-loop.c (append_callback_event): Likewise.
5555 (create_file_handler): Likewise.
5556 (create_file_event): Likewise.
5557 * hostio.c (handle_open): Likewise.
5558 * inferiors.c (add_thread): Likewise.
5559 (add_process): Likewise.
5560 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5561 * linux-arm-low.c (arm_new_process): Likewise.
5562 (arm_new_thread): Likewise.
5563 * linux-low.c (add_to_pid_list): Likewise.
5564 (linux_add_process): Likewise.
5565 (handle_extended_wait): Likewise.
5566 (add_lwp): Likewise.
5567 (enqueue_one_deferred_signal): Likewise.
5568 (enqueue_pending_signal): Likewise.
5569 (linux_resume_one_lwp_throw): Likewise.
5570 (linux_resume_one_thread): Likewise.
5571 (linux_read_memory): Likewise.
5572 (linux_write_memory): Likewise.
5573 * linux-mips-low.c (mips_linux_new_process): Likewise.
5574 (mips_linux_new_thread): Likewise.
5575 (mips_add_watchpoint): Likewise.
5576 * linux-x86-low.c (initialize_low_arch): Likewise.
5577 * lynx-low.c (lynx_add_process): Likewise.
5578 * mem-break.c (set_raw_breakpoint_at): Likewise.
5579 (set_breakpoint): Likewise.
5580 (add_condition_to_breakpoint): Likewise.
5581 (add_commands_to_breakpoint): Likewise.
5582 (clone_agent_expr): Likewise.
5583 (clone_one_breakpoint): Likewise.
5584 * regcache.c (new_register_cache): Likewise.
5585 * remote-utils.c (look_up_one_symbol): Likewise.
5586 * server.c (queue_stop_reply): Likewise.
5587 (start_inferior): Likewise.
5588 (queue_stop_reply_callback): Likewise.
5589 (handle_target_event): Likewise.
5590 * spu-low.c (fetch_ppc_memory): Likewise.
5591 (store_ppc_memory): Likewise.
5592 * target.c (set_target_ops): Likewise.
5593 * thread-db.c (thread_db_load_search): Likewise.
5594 (try_thread_db_load_1): Likewise.
5595 * tracepoint.c (add_tracepoint): Likewise.
5596 (add_tracepoint_action): Likewise.
5597 (create_trace_state_variable): Likewise.
5598 (cmd_qtdpsrc): Likewise.
5599 (cmd_qtro): Likewise.
5600 (add_while_stepping_state): Likewise.
5601 * win32-low.c (child_add_thread): Likewise.
5602 (get_image_name): Likewise.
5603
ed8b7b42
YQ
56042015-08-25 Yao Qi <yao.qi@linaro.org>
5605
5606 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5607
db3cb7cb
YQ
56082015-08-25 Yao Qi <yao.qi@linaro.org>
5609
5610 * Makefile.in (aarch64-linux.o): New rule.
5611 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5612 srv_tgtobj.
5613 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5614 (aarch64_init_debug_reg_state): Make it extern.
5615 (aarch64_linux_prepare_to_resume): Remove.
5616
f6011a1c
YQ
56172015-08-25 Yao Qi <yao.qi@linaro.org>
5618
5619 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5620 lwp_arch_private_info and ptid_of_lwp.
5621
88e2cf7e
YQ
56222015-08-25 Yao Qi <yao.qi@linaro.org>
5623
5624 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5625 Find proc_info by find_process_pid. All callers updated.
5626
5e35436e
YQ
56272015-08-25 Yao Qi <yao.qi@linaro.org>
5628
5629 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5630 Remove.
5631 (debug_reg_change_callback): Remove.
5632 (aarch64_notify_debug_reg_change): Remove.
5633
4a8a7965
YQ
56342015-08-25 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5637 Call current_lwp_ptid.
5638
32a271ee
YQ
56392015-08-25 Yao Qi <yao.qi@linaro.org>
5640
5641 * linux-aarch64-low.c (debug_reg_change_callback): Use
5642 debug_printf.
5643
0d51c8d7
YQ
56442015-08-25 Yao Qi <yao.qi@linaro.org>
5645
5646 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5647
31a43dd5
YQ
56482015-08-25 Yao Qi <yao.qi@linaro.org>
5649
5650 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5651
8ee52567
YQ
56522015-08-25 Yao Qi <yao.qi@linaro.org>
5653
5654 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5655 the code.
5656
ff3f0f45
YQ
56572015-08-25 Yao Qi <yao.qi@linaro.org>
5658
5659 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5660 Remove.
5661 (debug_reg_change_callback): Remove argument entry and add argument
5662 lwp. Remove local variable thread. Don't print thread id in the
5663 debugging output. Don't check whether pid of thread equals to pid.
5664 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5665 iterate_over_lwps instead find_inferior.
5666
3d40fbb5
PA
56672015-08-24 Pedro Alves <palves@redhat.com>
5668
5669 * inferiors.c (get_first_process): New function.
5670 * inferiors.h (get_first_process): New declaration.
5671 * remote-utils.c (read_ptid): Default to the first process in the
5672 list, instead of to the current thread's process.
5673
438e1e42
PA
56742015-08-24 Pedro Alves <palves@redhat.com>
5675
5676 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5677 * event-loop.c: Likewise.
5678 * remote-utils.c: Likewise.
5679 * tracepoint.c: Likewise.
5680
a8c6d4fc
PA
56812015-08-24 Pedro Alves <palves@redhat.com>
5682
5683 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5684 ptid_get_lwp.
5685
99b0bb12
PA
56862015-08-21 Pedro Alves <palves@redhat.com>
5687
5688 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5689 instead of literal 1.
5690
f8904751
PA
56912015-08-21 Pedro Alves <palves@redhat.com>
5692
5693 * tdesc.c (default_description): Explicitly zero-initialize.
5694
465a859e
PA
56952015-08-21 Pedro Alves <palves@redhat.com>
5696
5697 PR gdb/18749
5698 * inferiors.c (remove_thread): Discard any pending stop reply for
5699 this thread.
5700 * server.c (remove_all_on_match_pid): Rename to ...
5701 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5702 instead of a pid.
5703 (discard_queued_stop_replies): Change parameter to a ptid. Now
5704 extern.
5705 (handle_v_kill, kill_inferior_callback, captured_main)
5706 (process_serial_event): Adjust.
5707 * server.h (discard_queued_stop_replies): Declare.
5708
f0db101d
PA
57092015-08-21 Pedro Alves <palves@redhat.com>
5710
5711 * linux-low.c (wait_for_sigstop): Always switch to no thread
5712 selected if the previously current thread dies.
5713 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5714 process instead of the current thread's.
5715 * remote-utils.c (input_interrupt): Don't check if there's no
5716 current thread.
5717 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5718 current thread to the general thread fails, error out.
5719 (handle_qxfer_auxv, handle_qxfer_libraries)
5720 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5721 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5722 (handle_query): Check if there's a thread selected instead of
5723 checking whether there's any thread in the thread list.
5724 (handle_qxfer_threads, handle_qxfer_btrace)
5725 (handle_qxfer_btrace_conf): Don't error out early if there's no
5726 thread in the thread list.
5727 (handle_v_cont, myresume): Don't set the current thread to the
5728 continue thread.
5729 (process_serial_event) <Hg handling>: Also set thread_id if the
5730 previous general thread is still alive.
5731 (process_serial_event) <g/G handling>: If setting the current
5732 thread to the general thread fails, error out.
5733 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5734 thread's lwp instead of the current thread's.
5735 * target.c (set_desired_thread): If the desired thread was not
5736 found, leave the current thread pointing to NULL. Return an int
5737 (boolean) indicating success.
5738 * target.h (set_desired_thread): Change return type to int.
5739
40045d91
MF
57402015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5741
5742 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5743 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5744 #includes.
5745 (ps_get_thread_area): New function.
5746
45face3b
GB
57472015-08-19 Gary Benson <gbenson@redhat.com>
5748
5749 * hostio.c (handle_pread): Do not attempt to read more data
5750 than hostio_reply_with_data can fit in a packet.
5751
16d5f642
JB
57522015-08-18 Joel Brobecker <brobecker@adacore.com>
5753
5754 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5755
a738da3a
MF
57562015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5757
5758 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5759
33ebda9d
PA
57602015-08-06 Pedro Alves <palves@redhat.com>
5761
5762 * tracepoint.c (expr_eval_result): Now an int.
5763
a44892be
PA
57642015-08-06 Pedro Alves <palves@redhat.com>
5765
5766 * gdbthread.h (struct regcache): Forward declare.
5767 (struct thread_info) <regcache_data>: Now a struct regcache
5768 pointer.
5769 * inferiors.c (inferior_regcache_data)
5770 (set_inferior_regcache_data): Now work with struct regcache
5771 pointers.
5772 * inferiors.h (struct regcache): Forward declare.
5773 (inferior_regcache_data, set_inferior_regcache_data): Now work
5774 with struct regcache pointers.
5775 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5776 (free_register_cache_thread): Remove struct regcache pointer
5777 casts.
5778
608a1e46
PA
57792015-08-06 Pedro Alves <palves@redhat.com>
5780
5781 * server.c (captured_main): On error, print the exception message
5782 to stderr, and if run_once is set, throw a quit.
5783
f0ce0d3a
PA
57842015-08-06 Pedro Alves <palves@redhat.com>
5785
5786 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5787 the current thread.
5788
bf47e248
PA
57892015-08-06 Pedro Alves <palves@redhat.com>
5790
5791 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5792 reading beyond the passed in buffer length.
5793
b6b9ffcc
PL
57942015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5795
5796 * tracepoint.c (symbol_list) <required>: Remove.
5797
863d01bd
PA
57982015-08-06 Pedro Alves <palves@redhat.com>
5799
5800 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5801 count if stopping and suspending threads.
5802 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5803 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5804 (linux_detach): Complete an ongoing step-over.
5805 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5806 throughout.
5807 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5808 (linux_wait_1): If passing a signal to the inferior after
5809 finishing a step-over, unsuspend and re-resume all lwps. If we
5810 see a single-step event but the thread should be continuing, don't
5811 pass the trap to gdb.
5812 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5813 internal_error instead of gdb_assert.
5814 (enqueue_pending_signal): New function.
5815 (check_ptrace_stopped_lwp_gone): Add debug output.
5816 (start_step_over): Use internal_error instead of gdb_assert.
5817 (complete_ongoing_step_over): New function.
5818 (linux_resume_one_thread): Don't resume a suspended thread.
5819 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5820 it stepping.
5821
00db26fa
PA
58222015-08-06 Pedro Alves <palves@redhat.com>
5823
5824 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5825 (linux_thread_alive): Use lwp_is_marked_dead.
5826 (extended_event_reported): Delete.
5827 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5828 instead of extended_event_reported.
5829 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5830 as well.
5831 (lwp_is_marked_dead): New function.
5832 (lwp_running): Use lwp_is_marked_dead.
5833 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5834 comment.
5835
ad071a30
PA
58362015-08-06 Pedro Alves <palves@redhat.com>
5837
5838 * linux-low.c (linux_wait_1): Move fork event output out of the
5839 !report_to_gdb check. Pass event_child->waitstatus to
5840 target_waitstatus_to_string instead of ourstatus.
5841
524b57e6
YQ
58422015-08-04 Yao Qi <yao.qi@linaro.org>
5843
5844 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5845 if current_thread is 32 bit.
5846
6085d6f6
YQ
58472015-08-04 Yao Qi <yao.qi@linaro.org>
5848
5849 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5850 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5851 * server.c (extended_protocol): Remove "static".
5852 * server.h (extended_protocol): Declare it.
5853
8a7e4587
YQ
58542015-08-04 Yao Qi <yao.qi@linaro.org>
5855
5856 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5857 both aarch64 and aarch32.
5858 (aarch64_set_pc): Likewise.
5859
3b53ae99
YQ
58602015-08-04 Yao Qi <yao.qi@linaro.org>
5861
5862 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5863 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5864 arm-with-neon.xml to srv_xmlfiles.
5865 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5866 (is_64bit_tdesc): New function.
5867 (aarch64_linux_read_description): New function.
5868 (aarch64_arch_setup): Call aarch64_linux_read_description.
5869 (regs_info): Rename to regs_info_aarch64.
5870 (aarch64_regs_info): Return right regs_info.
5871 (initialize_low_arch): Call initialize_low_arch_aarch32.
5872
bd9e6534
YQ
58732015-08-04 Yao Qi <yao.qi@linaro.org>
5874
5875 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5876 * linux-aarch32-low.c: New file.
5877 * linux-aarch32-low.h: New file.
5878 * linux-arm-low.c (arm_fill_gregset): Move it to
5879 linux-aarch32-low.c.
5880 (arm_store_gregset): Likewise.
5881 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5882 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5883 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5884 (regs_info): Rename to regs_info_arm.
5885 (arm_regs_info): Return regs_info_aarch32 if
5886 have_ptrace_getregset is 1 and target description is
5887 arm_with_neon or arm_with_vfpv3.
5888 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5889 Call initialize_low_arch_aarch32 instead.
5890
ded48a5e
YQ
58912015-08-04 Yao Qi <yao.qi@linaro.org>
5892
5893 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5894 * linux-low.c: ... here.
5895 * linux-low.h (have_ptrace_getregset): Declare it.
5896
96e9210f
PA
58972015-08-04 Pedro Alves <palves@redhat.com>
5898
5899 * thread-db.c (struct thread_db): Use new typedefs.
5900 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5901 CHK calls.
5902 (disable_thread_event_reporting): Cast result of dlsym to
5903 destination function pointer type.
5904 (thread_db_mourn): Use td_ta_delete_ftype.
5905
af60a1ef
SL
59062015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5907
5908 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5909 arch variant.
5910 (CDX_BREAKPOINT): Define for R2.
5911 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5912 (the_low_target): Add comments.
5913
e8b41681
YQ
59142015-07-30 Yao Qi <yao.qi@linaro.org>
5915
5916 * linux-arm-low.c (arm_hwcap): Remove it.
5917 (arm_read_description): New local variable arm_hwcap. Don't
5918 set arm_hwcap to zero.
5919
89abb039
YQ
59202015-07-30 Yao Qi <yao.qi@linaro.org>
5921
5922 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5923 Use regcache->tdesc instead.
5924 (arm_store_wmmxregset): Likewise.
5925 (arm_fill_vfpregset): Likewise.
5926 (arm_store_vfpregset): Likewise.
5927
deca266c
YQ
59282015-07-30 Yao Qi <yao.qi@linaro.org>
5929
5930 * linux-arm-low.c: Include arch/arm.h.
5931 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5932 (arm_store_gregset): Likewise.
5933
aa58a496
SM
59342015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5935
5936 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5937 ptrace's 4th parameter.
5938
50904b25
YQ
59392015-07-27 Yao Qi <yao.qi@linaro.org>
5940
5941 * configure.srv (case aarch64*-*-linux*): Don't set
5942 srv_linux_usrregs.
5943
5826e159
PA
59442015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5945
5946 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5947 sys/ptrace.h.
5948 * linux-arm-low.c: Likewise.
5949 * linux-cris-low.c: Likewise.
5950 * linux-crisv32-low.c: Likewise.
5951 * linux-low.c: Likewise.
5952 * linux-m68k-low.c: Likewise.
5953 * linux-mips-low.c: Likewise.
5954 * linux-nios2-low.c: Likewise.
5955 * linux-s390-low.c: Likewise.
5956 * linux-sparc-low.c: Likewise.
5957 * linux-tic6x-low.c: Likewise.
5958 * linux-tile-low.c: Likewise.
5959 * linux-x86-low.c: Likewise.
5960
54019719
PA
59612015-07-24 Pedro Alves <palves@redhat.com>
5962
5963 * config.in: Regenerate.
5964 * configure: Regenerate.
5965
eb7aa561
PA
59662015-07-24 Pedro Alves <palves@redhat.com>
5967
5968 * acinclude.m4: Include ../ptrace.m4.
5969 * configure.ac: Call GDB_AC_PTRACE.
5970 * config.in, configure: Regenerate.
5971
55d7b841
YQ
59722015-07-24 Yao Qi <yao.qi@linaro.org>
5973
5974 * linux-low.c (linux_create_inferior): Remove setting to
5975 proc->priv->new_inferior.
5976 (linux_attach): Likewise.
5977 (linux_low_filter_event): Likewise.
5978 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5979
c06cbd92
YQ
59802015-07-24 Yao Qi <yao.qi@linaro.org>
5981
5982 * linux-low.c (linux_arch_setup): New function.
5983 (linux_low_filter_event): If proc->tdesc is NULL and
5984 proc->attached is true, call the_low_target.arch_setup.
5985 Otherwise, keep status pending, and return.
5986 (linux_resume_one_lwp_throw): Don't call get_pc if
5987 thread->while_stepping isn't NULL. Don't call
5988 get_thread_regcache if proc->tdesc is NULL.
5989 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5990 (linux_target_ops): Install arch_setup.
5991 * server.c (start_inferior): Call the_target->arch_setup.
5992 * target.h (struct target_ops) <arch_setup>: New field.
5993 (target_arch_setup): New marco.
5994 * lynx-low.c (lynx_target_ops): Update.
5995 * nto-low.c (nto_target_ops): Update.
5996 * spu-low.c (spu_target_ops): Update.
5997 * win32-low.c (win32_target_ops): Update.
5998
5ae3ebba
YQ
59992015-07-24 Yao Qi <yao.qi@linaro.org>
6000
6001 * linux-low.c (linux_add_process): Don't set
6002 proc->priv->new_inferior.
6003 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6004 (linux_attach): Likewise.
6005
eb97750b
YQ
60062015-07-24 Yao Qi <yao.qi@linaro.org>
6007
6008 * server.c (start_inferior): Code refactor.
6009
51aee833
YQ
60102015-07-24 Yao Qi <yao.qi@linaro.org>
6011
6012 * server.c (process_serial_event): Set general_thread.
6013
af1b22f3
YQ
60142015-07-21 Yao Qi <yao.qi@linaro.org>
6015
6016 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6017 aarch64_linux_get_debug_reg_capacity.
6018
554717a3
YQ
60192015-07-17 Yao Qi <yao.qi@linaro.org>
6020
6021 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6022 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6023 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6024 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6025 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6026 (AARCH64_HWP_ALIGNMENT): Likewise.
6027 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6028 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6029 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6030 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6031 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6032 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6033 (struct aarch64_debug_reg_state): Likewise.
6034 (struct arch_lwp_info): Likewise.
6035 (aarch64_align_watchpoint): Likewise.
6036 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6037 (aarch64_watchpoint_length): Likewise.
6038 (aarch64_point_encode_ctrl_reg): Likewise
6039 (aarch64_point_is_aligned): Likewise.
6040 (aarch64_align_watchpoint): Likewise.
6041 (aarch64_linux_set_debug_regs):
6042 (aarch64_dr_state_insert_one_point): Likewise.
6043 (aarch64_dr_state_remove_one_point): Likewise.
6044 (aarch64_handle_breakpoint): Likewise.
6045 (aarch64_handle_aligned_watchpoint): Likewise.
6046 (aarch64_handle_unaligned_watchpoint): Likewise.
6047 (aarch64_handle_watchpoint): Likewise.
6048
c67ca4de
YQ
60492015-07-17 Yao Qi <yao.qi@linaro.org>
6050
6051 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6052 and don't aarch64_get_debug_reg_state. All callers update.
6053 (aarch64_handle_aligned_watchpoint): Likewise.
6054 (aarch64_handle_unaligned_watchpoint): Likewise.
6055 (aarch64_handle_watchpoint): Likewise.
6056 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6057 (aarch64_remove_point): Likewise.
6058
25abf979
YQ
60592015-07-17 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6062 debug_printf.
6063 (aarch64_handle_unaligned_watchpoint): Likewise.
6064
db1ff28b
JK
60652015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 Revert the previous 3 commits:
6068 Move gdb_regex* to common/
6069 Move linux_find_memory_regions_full & co.
6070 gdbserver build-id attribute generator
6071
700ca40f
JK
60722015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6073 Jan Kratochvil <jan.kratochvil@redhat.com>
6074
6075 gdbserver build-id attribute generator.
6076 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6077 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6078 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6079 (find_phdr): New.
6080 (get_dynamic): Use find_pdhr to traverse program headers.
6081 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6082 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6083 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6084 (get_hex_build_id): New.
6085 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6086 to reply XML document.
6087
9904185c
JK
60882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6089 Jan Kratochvil <jan.kratochvil@redhat.com>
6090
6091 * target.c: Include target/target-utils.h and fcntl.h.
6092 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6093 (target_fileio_read_stralloc): New functions.
6094
6e5b4429
JK
60952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6096
6097 * Makefile.in (OBS): Add gdb_regex.o.
6098 (gdb_regex.o): New.
6099 * config.in: Rebuilt.
6100 * configure: Rebuilt.
6101
ddc98fbf
JK
61022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6103 Jan Kratochvil <jan.kratochvil@redhat.com>
6104
6105 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6106 * Makefile.in (OBS): Add target-utils.o.
6107 (linux-maps.o, target-utils.o): New.
6108 * configure.srv (srv_linux_obj): Add linux-maps.o.
6109
e57bb7a0
PL
61102015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6111
6112 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6113 function, return 1.
6114 (the_low_target): Install it.
6115
586b02a9
PA
61162015-07-14 Pedro Alves <palves@redhat.com>
6117
6118 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6119 Instead, ignore ECHILD, and throw an error for other errnos.
6120
58c1b36c
PA
61212015-07-10 Pedro Alves <palves@redhat.com>
6122
6123 * event-loop.c (struct callback_event) <data>: Change type to
6124 gdb_client_data instance instead of gdb_client_data pointer.
6125 (append_callback_event): Adjust.
6126
421530db
PL
61272015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6128
6129 * linux-aarch64-low.c: Add comments for each linux_target_ops
6130 method. Remove comments already covered in target_ops and
6131 linux_target_ops definitions.
6132 (the_low_target): Add comments for each unimplemented method.
6133
c2d65f38
YQ
61342015-07-09 Yao Qi <yao.qi@linaro.org>
6135
6136 * linux-aarch64-low.c (aarch64_regmap): Remove.
6137 (aarch64_usrregs_info): Remove.
6138 (regs_info): Set field usrregs to NULL.
6139
b20a6524
MM
61402015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6141
6142 * linux-low.c: Include "rsp-low.h"
6143 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6144 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6145 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6146 (handle_btrace_enable_pt): New.
6147 (handle_btrace_general_set): Support "pt".
6148 (handle_btrace_conf_general_set): Support "pt:size".
6149
96c97461
PL
61502015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6151
6152 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6153 Z_PACKET_SW_BP.
6154
37d66942
PL
61552015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6156
6157 * linux-aarch64-low.c: Remove comment about endianness.
6158 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6159 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6160 memcmp.
6161
dc06243f
GB
61622015-06-24 Gary Benson <gbenson@redhat.com>
6163
6164 * linux-i386-ipa.c (stdint.h): Do not include.
6165 * lynx-i386-low.c (stdint.h): Likewise.
6166 * lynx-ppc-low.c (stdint.h): Likewise.
6167 * mem-break.c (stdint.h): Likewise.
6168 * thread-db.c (stdint.h): Likewise.
6169 * tracepoint.c (stdint.h): Likewise.
6170 * win32-low.c (stdint.h): Likewise.
6171
124e13d9
SM
61722015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6173
6174 * server.c (write_qxfer_response): Update call to
6175 remote_escape_output.
6176
909c2cda
JK
61772015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6178 Jan Kratochvil <jan.kratochvil@redhat.com>
6179
6180 Merge multiple hex conversions.
6181 * gdbreplay.c (tohex): Rename to 'fromhex'.
6182 (logchar): Use fromhex.
6183
24c05f46
JK
61842015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6185
6186 * server.c (handle_qxfer_libraries): Set `version' attribute for
6187 <library-list>.
6188
14d2069a
GB
61892015-06-10 Gary Benson <gbenson@redhat.com>
6190
6191 * target.h (struct target_ops) <multifs_open>: New field.
6192 <multifs_unlink>: Likewise.
6193 <multifs_readlink>: Likewise.
6194 * linux-low.c (nat/linux-namespaces.h): New include.
6195 (linux_target_ops): Initialize the_target->multifs_open,
6196 the_target->multifs_unlink and the_target->multifs_readlink.
6197 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6198 * hostio.c (hostio_fs_pid): New static variable.
6199 (hostio_handle_new_gdb_connection): New function.
6200 (handle_setfs): Likewise.
6201 (handle_open): Use the_target->multifs_open as appropriate.
6202 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6203 (handle_readlink): Use the_target->multifs_readlink as
6204 appropriate.
6205 (handle_vFile): Handle vFile:setfs packets.
6206 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6207 after target_handle_new_gdb_connection.
6208
4b8b5e72
GB
62092015-06-10 Gary Benson <gbenson@redhat.com>
6210
6211 * configure.ac (AC_CHECK_FUNCS): Add setns.
6212 * config.in: Regenerate.
6213 * configure: Likewise.
6214 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6215 (linux-namespaces.o): New rule.
6216 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6217
3ac2e371
GB
62182015-06-09 Gary Benson <gbenson@redhat.com>
6219
6220 * hostio.c (handle_open): Process mode argument with
6221 fileio_to_host_mode.
6222
ca9b78ce
YQ
62232015-06-01 Yao Qi <yao.qi@linaro.org>
6224
6225 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6226 * linux-x86-low.c: Likewise.
6227
bfacd19d
DB
62282015-05-28 Don Breazeal <donb@codesourcery.com>
6229
6230 * linux-low.c (handle_extended_wait): Initialize
6231 thread_info.last_resume_kind for new fork children.
6232
452003ef
PA
62332015-05-15 Pedro Alves <palves@redhat.com>
6234
6235 * target.h (target_handle_new_gdb_connection): Rewrite using if
6236 wrapped in do/while.
6237
1041a03c
JB
62382015-05-14 Joel Brobecker <brobecker@adacore.com>
6239
6240 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6241 * configure, config.in: Regenerate.
6242 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6243 Declare typedef.
6244
c269dbdb
DB
62452015-05-12 Don Breazeal <donb@codesourcery.com>
6246
6247 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6248 PTRACE_EVENT_VFORK_DONE.
6249 (linux_low_ptrace_options, extended_event_reported): Add vfork
6250 events.
6251 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6252 and "vforkdone" for RSP 'T' Stop Reply Packet.
6253 * server.h (report_vfork_events): Declare
6254 global variable.
6255
3a8a0396
DB
62562015-05-12 Don Breazeal <donb@codesourcery.com>
6257
6258 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6259 (the_low_target) <new_fork>: Initialize new member.
6260 * linux-arm-low.c (arm_new_fork): New function.
6261 (the_low_target) <new_fork>: Initialize new member.
6262 * linux-low.c (handle_extended_wait): Call new target function
6263 new_fork.
6264 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6265 * linux-mips-low.c (mips_add_watchpoint): New function
6266 extracted from mips_insert_point.
6267 (the_low_target) <new_fork>: Initialize new member.
6268 (mips_linux_new_fork): New function.
6269 (mips_insert_point): Call mips_add_watchpoint.
6270 * linux-x86-low.c (x86_linux_new_fork): New function.
6271 (the_low_target) <new_fork>: Initialize new member.
6272
de0d863e
DB
62732015-05-12 Don Breazeal <donb@codesourcery.com>
6274
6275 * linux-low.c (handle_extended_wait): Implement return value,
6276 rename argument 'event_child' to 'event_lwp', handle
6277 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6278 (linux_low_ptrace_options): New function.
6279 (linux_low_filter_event): Call linux_low_ptrace_options,
6280 use different argument fo linux_enable_event_reporting,
6281 use return value from handle_extended_wait.
6282 (extended_event_reported): New function.
6283 (linux_wait_1): Call extended_event_reported and set
6284 status to report fork events.
6285 (linux_write_memory): Add pid to debug message.
6286 (reset_lwp_ptrace_options_callback): New function.
6287 (linux_handle_new_gdb_connection): New function.
6288 (linux_target_ops): Initialize new structure member.
6289 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6290 * lynx-low.c: Initialize new structure member.
6291 * remote-utils.c (prepare_resume_reply): Implement stop reason
6292 "fork" for "T" stop message.
6293 * server.c (handle_query): Call handle_new_gdb_connection.
6294 * server.h (report_fork_events): Declare global flag.
6295 * target.h (struct target_ops) <handle_new_gdb_connection>:
6296 New member.
6297 (target_handle_new_gdb_connection): New macro.
6298 * win32-low.c: Initialize new structure member.
6299
ddcbc397
DB
63002015-05-12 Don Breazeal <donb@codesourcery.com>
6301
6302 * mem-break.c (APPEND_TO_LIST): Define macro.
6303 (clone_agent_expr): New function.
6304 (clone_one_breakpoint): New function.
6305 (clone_all_breakpoints): New function.
6306 * mem-break.h: Declare new functions.
6307
89245bc0
DB
63082015-05-12 Don Breazeal <donb@codesourcery.com>
6309
6310 * linux-low.c (linux_supports_fork_events): New function.
6311 (linux_supports_vfork_events): New function.
6312 (linux_target_ops): Initialize new structure members.
6313 (initialize_low): Call linux_check_ptrace_features.
6314 * lynx-low.c (lynx_target_ops): Initialize new structure
6315 members.
6316 * server.c (report_fork_events, report_vfork_events):
6317 New global flags.
6318 (handle_query): Add new features to qSupported packet and
6319 response.
6320 (captured_main): Initialize new global variables.
6321 * target.h (struct target_ops) <supports_fork_events>:
6322 New member.
6323 <supports_vfork_events>: New member.
6324 (target_supports_fork_events): New macro.
6325 (target_supports_vfork_events): New macro.
6326 * win32-low.c (win32_target_ops): Initialize new structure
6327 members.
6328
835205d0
GB
63292015-05-12 Gary Benson <gbenson@redhat.com>
6330
6331 * server.c (handle_qxfer_exec_file): Use current process
6332 if annex is empty.
6333
21e94bd9
SL
63342015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6335
6336 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6337 Remove HAVE_PTRACE_GETREGS conditionals.
6338 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6339 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6340
45614f15
YQ
63412015-05-08 Yao Qi <yao.qi@linaro.org>
6342
6343 * linux-low.c (linux_supports_conditional_breakpoints): New
6344 function.
6345 (linux_target_ops): Install new target method.
6346 * lynx-low.c (lynx_target_ops): Install NULL hook for
6347 supports_conditional_breakpoints.
6348 * nto-low.c (nto_target_ops): Likewise.
6349 * spu-low.c (spu_target_ops): Likewise.
6350 * win32-low.c (win32_target_ops): Likewise.
6351 * server.c (handle_query): Check
6352 target_supports_conditional_breakpoints.
6353 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6354 New field.
6355 (target_supports_conditional_breakpoints): New macro.
6356
80ad801e
PA
63572015-05-06 Pedro Alves <palves@redhat.com>
6358
6359 PR server/18081
6360 * server.c (start_inferior): If the process exits, mourn it.
6361
819843c7
GB
63622015-04-21 Gary Benson <gbenson@redhat.com>
6363
6364 * hostio.c (fileio_open_flags_to_host): Factored out to
6365 fileio_to_host_openflags in common/fileio.c. Single use
6366 updated.
6367
a2d5a9d7
MF
63682015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6369
6370 * linux-xtensa-low.c (xtensa_fill_gregset)
6371 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6372 XCHAL_HAVE_LOOP.
6373
deb44829
MF
63742015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6375
6376 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6377 (regs_info): Replace usrregs pointer with NULL.
6378
e57f1de3
GB
63792015-04-17 Gary Benson <gbenson@redhat.com>
6380
6381 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6382 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6383 * server.c (handle_qxfer_exec_file): New function.
6384 (qxfer_packets): Add exec-file entry.
6385 (handle_query): Report qXfer:exec-file:read as supported packet.
6386
62828379
RN
63872015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6388
6389 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6390
b88bb450
GB
63912015-04-09 Gary Benson <gbenson@redhat.com>
6392
6393 * hostio-errno.c (errno_to_fileio_error): Remove function.
6394 Update caller to use remote_fileio_to_fio_error.
6395
c8f4bfdd
YQ
63962015-04-09 Yao Qi <yao.qi@linaro.org>
6397
6398 * linux-low.c (linux_insert_point): Call
6399 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6400 (linux_remove_point): Call remove_memory_breakpoint if type is
6401 raw_bkpt_type_sw.
6402 * linux-x86-low.c (x86_insert_point): Don't call
6403 insert_memory_breakpoint.
6404 (x86_remove_point): Don't call remove_memory_breakpoint.
6405
41f98f02
PA
64062015-04-01 Pedro Alves <palves@redhat.com>
6407 Cleber Rosa <crosa@redhat.com>
6408
6409 * server.c (gdbserver_usage): Reorganize and extend the usage
6410 message.
6411
2bf6fb9d
PA
64122015-03-24 Pedro Alves <palves@redhat.com>
6413
6414 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6415 output. Also dump TRAP_TRACE.
6416 (linux_low_filter_event): In debug output, distinguish a
6417 resume_stop SIGSTOP from a delayed SIGSTOP.
6418
369f6daa
GB
64192015-03-24 Gary Benson <gbenson@redhat.com>
6420
6421 * linux-x86-low.c (x86_linux_new_thread): Moved to
6422 nat/x86-linux.c.
6423 (x86_linux_prepare_to_resume): Likewise.
6424
8e5d4070
GB
64252015-03-24 Gary Benson <gbenson@redhat.com>
6426
6427 * Makefile.in (x86-linux-dregs.o): New rule.
6428 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6429 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6430 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6431 (x86_linux_dr_get): Likewise.
6432 (x86_linux_dr_set): Likewise.
6433 (update_debug_registers_callback): Likewise.
6434 (x86_linux_dr_set_addr): Likewise.
6435 (x86_linux_dr_get_addr): Likewise.
6436 (x86_linux_dr_set_control): Likewise.
6437 (x86_linux_dr_get_control): Likewise.
6438 (x86_linux_dr_get_status): Likewise.
6439 (x86_linux_update_debug_registers): Likewise.
6440
2b95d440
GB
64412015-03-24 Gary Benson <gbenson@redhat.com>
6442
6443 * linux-x86-low.c (x86_linux_update_debug_registers):
6444 New function, factored out from...
6445 (x86_linux_prepare_to_resume): ...this.
6446
14b0bc68
GB
64472015-03-24 Gary Benson <gbenson@redhat.com>
6448
6449 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6450 (x86_linux_dr_set): Likewise.
6451 (update_debug_registers_callback): Likewise.
6452 (x86_linux_dr_set_addr): Likewise.
6453 (x86_linux_dr_get_addr): Likewise.
6454 (x86_linux_dr_set_control): Likewise.
6455 (x86_linux_dr_get_control): Likewise.
6456 (x86_linux_dr_get_status): Likewise.
6457 (x86_linux_prepare_to_resume): Likewise.
6458
5dfe6ca8
GB
64592015-03-24 Gary Benson <gbenson@redhat.com>
6460
6461 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6462 Use perror_with_name. Pass string through gettext.
6463 (x86_linux_dr_set): Likewise.
6464
d33472ad
GB
64652015-03-24 Gary Benson <gbenson@redhat.com>
6466
6467 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6468 (x86_linux_dr_set_addr): ...this.
6469 (x86_dr_low_get_addr): Rename to...
6470 (x86_linux_dr_get_addr): ...this.
6471 (x86_dr_low_set_control): Rename to...
6472 (x86_linux_dr_set_control): ...this.
6473 (x86_dr_low_get_control): Rename to...
6474 (x86_linux_dr_get_control): ...this.
6475 (x86_dr_low_get_status): Rename to...
6476 (x86_linux_dr_get_status): ...this.
6477 (x86_dr_low): Update with new function names.
6478
4b134ca1
GB
64792015-03-24 Gary Benson <gbenson@redhat.com>
6480
6481 * Makefile.in (x86-linux.o): New rule.
6482 * configure.srv: Add x86-linux.o to relevant targets.
6483 * linux-low.c (lwp_set_arch_private_info): New function.
6484 (lwp_arch_private_info): Likewise.
6485 * linux-x86-low.c: Include nat/x86-linux.h.
6486 (arch_lwp_info): Removed structure.
6487 (update_debug_registers_callback):
6488 Use lwp_set_debug_registers_changed.
6489 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6490 and lwp_set_debug_registers_changed.
6491 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6492
34c703da
GB
64932015-03-24 Gary Benson <gbenson@redhat.com>
6494
6495 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6496 * linux-arm-low.c (arm_new_thread): Likewise.
6497 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6498 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6499 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6500 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6501
cff068da
GB
65022015-03-24 Gary Benson <gbenson@redhat.com>
6503
6504 * linux-low.c (ptid_of_lwp): New function.
6505 (lwp_is_stopped): Likewise.
6506 (lwp_stop_reason): Likewise.
6507 * linux-x86-low.c (update_debug_registers_callback):
6508 Use lwp_is_stopped.
6509 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6510 lwp_stop_reason.
6511
b2f7c7e8
GB
65122015-03-24 Gary Benson <gbenson@redhat.com>
6513
6514 * linux-low.h (linux_stop_lwp): Remove declaration.
6515
6d4ee8c6
GB
65162015-03-24 Gary Benson <gbenson@redhat.com>
6517
6518 * linux-low.h: Include nat/linux-nat.h.
6519 * linux-low.c (iterate_over_lwps_args): New structure.
6520 (iterate_over_lwps_filter): New function.
6521 (iterate_over_lwps): Likewise.
6522 * linux-x86-low.c (update_debug_registers_callback):
6523 Update signature to what iterate_over_lwps expects.
6524 Remove PID check that iterate_over_lwps now performs.
6525 (x86_dr_low_set_addr): Use iterate_over_lwps.
6526 (x86_dr_low_set_control): Likewise.
6527
70a0bb6b
GB
65282015-03-24 Gary Benson <gbenson@redhat.com>
6529
6530 * linux-x86-low.c (x86_debug_reg_state): New function.
6531 (x86_linux_prepare_to_resume): Use the above.
6532
7b669087
GB
65332015-03-24 Gary Benson <gbenson@redhat.com>
6534
6535 * linux-low.c (current_lwp_ptid): New function.
6536 * linux-x86-low.c: Include nat/linux-nat.h.
6537 (x86_dr_low_get_addr): Use current_lwp_ptid.
6538 (x86_dr_low_get_control): Likewise.
6539 (x86_dr_low_get_status): Likewise.
6540
eef49a3d
PA
65412015-03-20 Pedro Alves <palves@redhat.com>
6542
6543 * tracepoint.c (cmd_qtstatus): Make "str" const.
6544
b2333d22
PA
65452015-03-20 Pedro Alves <palves@redhat.com>
6546
6547 * server.c (handle_general_set): Make "req_str" const.
6548
23f238d3
PA
65492015-03-19 Pedro Alves <palves@redhat.com>
6550
6551 * linux-low.c (linux_resume_one_lwp): Rename to ...
6552 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6553 instead call perror_with_name.
6554 (check_ptrace_stopped_lwp_gone): New function.
6555 (linux_resume_one_lwp): Reimplement as wrapper around
6556 linux_resume_one_lwp_throw that swallows errors if the LWP is
6557 gone.
6558
91baf43f
PA
65592015-03-19 Pedro Alves <palves@redhat.com>
6560
6561 * linux-low.c (count_events_callback, select_event_lwp_callback):
6562 No longer check whether the thread has resume_stop as last resume
6563 kind.
6564
8bf3b159
PA
65652015-03-19 Pedro Alves <palves@redhat.com>
6566
6567 * linux-low.c (count_events_callback, select_event_lwp_callback):
6568 Use the lwp's status_pending_p field, not the thread's.
6569
b90fc188
PA
65702015-03-19 Pedro Alves <palves@redhat.com>
6571
6572 * linux-low.c (select_event_lwp_callback): Update comments to
6573 no longer mention SIGTRAP.
6574
464b0089
GB
65752015-03-18 Gary Benson <gbenson@redhat.com>
6576
6577 * server.c (handle_query): Do not report vFile:fstat as supported.
6578
aa9e327f
GB
65792015-03-11 Gary Benson <gbenson@redhat.com>
6580
6581 * hostio.c (sys/types.h): New include.
6582 (sys/stat.h): Likewise.
6583 (common-remote-fileio.h): Likewise.
6584 (handle_fstat): New function.
6585 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 6586
791c0056
GB
65872015-03-11 Gary Benson <gbenson@redhat.com>
6588
6589 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6590 struct stat.st_blocks and struct stat.st_blksize.
6591 * configure: Regenerate.
6592 * config.in: Likewise.
6593 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6594 (OBS): Add common-remote-fileio.o.
6595 (common-remote-fileio.o): New rule.
6596
9a9df970
PA
65972015-03-09 Pedro Alves <palves@redhat.com>
6598
6599 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6600 'struct sockaddr' pointer in 'accept' call.
6601
9eb1356e
PA
66022015-03-09 Pedro Alves <palves@redhat.com>
6603
6604 Revert:
6605 2015-03-07 Pedro Alves <palves@redhat.com>
6606 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6607 or <winsock2.h> here. Instead include "gdb_socket.h".
6608 (remote_open): Use union gdb_sockaddr_u.
6609 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6610 or <winsock2.h> here. Instead include "gdb_socket.h".
6611 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6612 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6613 or <sys/un.h>.
6614 (init_named_socket, gdb_agent_helper_thread): Use union
6615 gdb_sockaddr_u.
6616
aac331e4
PA
66172015-03-07 Pedro Alves <palves@redhat.com>
6618
6619 * configure.ac (build_warnings): Move
6620 -Wdeclaration-after-statement to the C-specific set.
6621 * configure: Regenerate.
6622
366c75fc
PA
66232015-03-07 Pedro Alves <palves@redhat.com>
6624
6625 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6626 or <winsock2.h> here. Instead include "gdb_socket.h".
6627 (remote_open): Use union gdb_sockaddr_u.
6628 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6629 or <winsock2.h> here. Instead include "gdb_socket.h".
6630 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6631 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6632 or <sys/un.h>.
6633 (init_named_socket, gdb_agent_helper_thread): Use union
6634 gdb_sockaddr_u.
6635
492d29ea
PA
66362015-03-07 Pedro Alves <palves@redhat.com>
6637
6638 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6639 instead.
6640
60a191ed
YQ
66412015-03-06 Yao Qi <yao.qi@linaro.org>
6642
6643 * linux-aarch64-low.c (aarch64_insert_point): Use
6644 show_debug_regs as a boolean.
6645 (aarch64_remove_point): Likewise.
6646
f5771b1d
PA
66472015-03-05 Pedro Alves <palves@redhat.com>
6648
6649 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6650 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6651 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6652 * nto-low.c (nto_target_ops): Likewise.
6653 * spu-low.c (spu_target_ops): Likewise.
6654 * win32-low.c (win32_target_ops): Likewise.
6655
3e572f71
PA
66562015-03-04 Pedro Alves <palves@redhat.com>
6657
72f4393d 6658 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
6659 Decide whether a breakpoint triggered based on the SIGTRAP's
6660 siginfo.si_code.
72f4393d
L
6661 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6662 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
6663 (linux_low_filter_event): Check for breakpoints before checking
6664 watchpoints.
6665 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6666 siginfo.si_code.
72f4393d
L
6667 (linux_stopped_by_sw_breakpoint)
6668 (linux_supports_stopped_by_sw_breakpoint)
6669 (linux_stopped_by_hw_breakpoint)
6670 (linux_supports_stopped_by_hw_breakpoint): New functions.
6671 (linux_target_ops): Install new target methods.
3e572f71 6672
1ec68e26
PA
66732015-03-04 Pedro Alves <palves@redhat.com>
6674
6675 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6676 * server.c (swbreak_feature, hwbreak_feature): New globals.
6677 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6678 (captured_main): Clear swbreak_feature and hwbreak_feature.
6679 * server.h (swbreak_feature, hwbreak_feature): Declare.
6680 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6681 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6682 supports_stopped_by_hw_breakpoint>: New fields.
6683 (target_supports_stopped_by_sw_breakpoint)
6684 (target_stopped_by_sw_breakpoint)
6685 (target_supports_stopped_by_hw_breakpoint)
6686 (target_stopped_by_hw_breakpoint): Declare.
6687
15c66dd6
PA
66882015-03-04 Pedro Alves <palves@redhat.com>
6689
6690 enum lwp_stop_reason -> enum target_stop_reason
6691 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6692 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6693 (linux_wait_1, stuck_in_jump_pad_callback)
6694 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6695 (linux_stopped_by_watchpoint):
6696 * linux-low.h (enum lwp_stop_reason): Delete.
6697 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6698 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6699
98fc70d6
YQ
67002015-03-04 Yao Qi <yao.qi@linaro.org>
6701
6702 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6703
dd2ac174
GB
67042015-03-03 Gary Benson <gbenson@redhat.com>
6705
6706 * hostio.c (handle_vFile): Fix prefix lengths.
6707
d68e53f4
MM
67082015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6709
6710 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6711 ptr_bits.
6712
bf2d68ab
AA
67132015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6714
6715 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6716 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6717 (clean): Add "rm -f" for above C files.
6718 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6719 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6720 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6721 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6722 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6723 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6724 (init_registers_s390x_vx_linux64)
6725 (init_registers_s390x_tevx_linux64)
6726 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6727 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6728 declarations.
6729 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6730 (s390_store_vxrs_high): New functions.
6731 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6732 NT_S390_VXRS_HIGH.
6733 (s390_arch_setup): Add logic for selecting one of the new target
6734 descriptions. Activate the new vector regsets if applicable.
6735 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6736 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6737 and init_registers_s390x_tevx_linux64.
6738
c966a859
PA
67392015-03-01 Pedro Alves <palves@redhat.com>
6740
6741 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6742 parameter.
6743
4180215b
PA
67442015-02-27 Pedro Alves <palves@redhat.com>
6745
6746 * linux-x86-low.c (u_debugreg_offset): New function.
6747 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6748
749bab01
PA
67492015-02-27 Pedro Alves <palves@redhat.com>
6750
6751 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6752 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6753 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6754 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6755 (ps_lsetfpregs, ps_getpid)
6756 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6757 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6758 (ps_lsetxregs, ps_plog): Declare.
6759
3c14e5a3
PA
67602015-02-27 Pedro Alves <palves@redhat.com>
6761
6762 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6763 IP_AGENT_EXPORT_FUNC.
6764 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6765 IP_AGENT_EXPORT_FUNC.
6766 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6767 (IP_AGENT_EXPORT): Delete.
6768 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6769 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6770 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6771 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6772 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6773 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6774 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6775 (traceframe_read_count, traceframe_write_count)
6776 (traceframes_created, trace_state_variables, get_raw_reg)
6777 (get_trace_state_variable_value, set_trace_state_variable_value)
6778 (ust_loaded, helper_thread_id, cmd_buf): Use
6779 IPA_SYM_EXPORTED_NAME.
6780 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6781 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6782 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6783 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6784 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6785 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6786 EXTERN_C_PUSH/EXTERN_C_POP.
6787 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6788 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6789 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6790 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6791 (traceframe_write_count, traceframe_read_count)
6792 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6793 (about_to_request_buffer_space, get_trace_state_variable_value)
6794 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6795 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6796 EXTERN_C_PUSH/EXTERN_C_POP.
6797 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6798 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6799 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6800 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6801 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6802 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6803 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6804 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6805 Define.
6806 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6807 (IP_AGENT_EXPORT_VAR_DECL): Define.
6808 (tracing): Declare.
6809 (gdb_agent_get_raw_reg): Declare.
6810
fe978cb0
PA
68112015-02-27 Tom Tromey <tromey@redhat.com>
6812 Pedro Alves <palves@redhat.com>
6813
6814 Rename symbols whose names are reserved C++ keywords throughout.
6815
3bc3d82a
PA
68162015-02-27 Pedro Alves <palves@redhat.com>
6817
6818 * Makefile.in (COMPILER): New, get it from autoconf.
6819 (CXX): Get from autoconf instead.
6820 (COMPILE.pre): Use COMPILER.
6821 (CC-LD): Rename to ...
6822 (CC_LD): ... this. Use COMPILER.
6823 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6824 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6825 * acinclude.m4: Include build-with-cxx.m4.
6826 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6827 Disable -Werror by default if building in C++ mode.
6828 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6829 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6830 the C++ compiler. Save/restore CXXFLAGS too.
6831 * configure: Regenerate.
6832
07697489
PA
68332015-02-27 Pedro Alves <palves@redhat.com>
6834
6835 * acinclude.m4: Include libiberty.m4.
6836 * configure.ac: Call libiberty_INIT.
6837 * config.in, configure: Regenerate.
6838
9beb7c4e
PA
68392015-02-26 Pedro Alves <palves@redhat.com>
6840
6841 * linux-low.c (linux_wait_1): When incrementing the PC past a
6842 program breakpoint always use the_low_target.breakpoint_len as
6843 increment, rather than the maximum between that and
6844 the_low_target.decr_pc_after_break.
6845
8090aef2
PA
68462015-02-23 Pedro Alves <palves@redhat.com>
6847
6848 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6849 thread was doing a step-over; always adjust the PC if
6850 we stepped over a permanent breakpoint.
6851 (linux_wait_1): If we stepped over breakpoint that was on top of a
6852 permanent breakpoint, manually advance the PC past it.
6853
bc9540e8
PA
68542015-02-23 Pedro Alves <palves@redhat.com>
6855
6856 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6857 modes.
6858 (x86_fill_gregset, x86_store_gregset): Use it when handling
6859 $orig_eax.
6860
2db9a427
PA
68612015-02-20 Pedro Alves <palves@redhat.com>
6862
6863 * thread-db.c: Include "nat/linux-procfs.h".
6864 (thread_db_init): Skip listing new threads if the kernel supports
6865 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6866
afa8d396
PA
68672015-02-20 Pedro Alves <palves@redhat.com>
6868
6869 * linux-low.c (status_pending_p_callback): Use ptid_match.
6870
c9587f88
AT
68712015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6872
6873 PR breakpoints/16812
6874 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6875 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6876 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6877
b05ec7a5
AT
68782015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6879
6880 PR breakpoints/15956
6881 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6882
d33501a5
MM
68832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6884
6885 * linux-low.c (linux_low_btrace_conf): Print size.
6886 * server.c (handle_btrace_conf_general_set): New.
6887 (hanle_general_set): Call handle_btrace_conf_general_set.
6888 (handle_query): Report Qbtrace-conf:bts:size as supported.
6889
f4abbc16
MM
68902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6891
6892 * linux-low.c (linux_low_enable_btrace): Update parameters.
6893 (linux_low_btrace_conf): New.
6894 (linux_target_ops)<to_btrace_conf>: Initialize.
6895 * server.c (current_btrace_conf): New.
6896 (handle_btrace_enable): Rename to ...
6897 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6898 to target_enable_btrace. Update comment. Update users.
6899 (handle_qxfer_btrace_conf): New.
6900 (qxfer_packets): Add btrace-conf entry.
6901 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6902 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6903 (target_ops)<read_btrace_conf>: New.
6904 (target_enable_btrace): Update parameters.
6905 (target_read_btrace_conf): New.
6906
043c3577
MM
69072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6908
6909 * server.c (handle_btrace_general_set): Remove call to
6910 target_supports_btrace.
6911 (supported_btrace_packets): New.
6912 (handle_query): Call supported_btrace_packets.
6913 * target.h: include btrace-common.h.
6914 (btrace_target_info): Removed.
6915 (supports_btrace, target_supports_btrace): Update parameters.
6916
734b0e4b
MM
69172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6918
6919 * Makefile.in (SFILES): Add common/btrace-common.c.
6920 (OBS): Add common/btrace-common.o.
6921 (btrace-common.o): Add build rules.
6922 * linux-low: Include btrace-common.h.
6923 (linux_low_read_btrace): Use struct btrace_data. Call
6924 btrace_data_init and btrace_data_fini.
6925
d6c146e9
PA
69262015-02-06 Pedro Alves <palves@redhat.com>
6927
6928 * thread-db.c (find_new_threads_callback): Add debug output.
6929
20ba1ce6
PA
69302015-02-04 Pedro Alves <palves@redhat.com>
6931
6932 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6933 (resume_stopped_resumed_lwps): New function.
6934 (linux_wait_for_event_filtered): Use it.
6935
8cc73a39
SDJ
69362015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6937
6938 * Makefile.in (SFILES): Add linux-personality.c.
6939 (linux-personality.o): New rule.
6940 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6941 list of objects to be built.
6942 * linux-low.c: Include nat/linux-personality.h.
6943 (linux_create_inferior): Remove code to disable address space
6944 randomization (moved to ../nat/linux-personality.c). Create
6945 cleanup to disable address space randomization.
6946
fb23d554
SDJ
69472015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6948
6949 * Makefile.in (posix-strerror.o): New rule.
6950 (mingw-strerror.o): Likewise.
6951 * configure: Regenerated.
6952 * configure.ac: Source file ../common/common.host. Initialize new
6953 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6954
cdf43629
YQ
69552015-01-14 Yao Qi <yao@codesourcery.com>
6956
6957 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6958 (ppc-linux.o): New rule.
6959 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6960 * configure.ac: AC_CHECK_FUNCS(getauxval).
6961 * config.in: Re-generated.
6962 * configure: Re-generated.
6963 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6964 ppc64_64bit_inferior_p
6965
514c5338
YQ
69662015-01-14 Yao Qi <yao@codesourcery.com>
6967
6968 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6969 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6970 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6971 (PT_ORIG_R3, PT_TRAP): Likewise.
6972 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6973 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6974 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6975
3368c1e5
JB
69762015-01-10 Joel Brobecker <brobecker@adacore.com>
6977
6978 * i387-fp.c (i387_cache_to_xsave): In look over
6979 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6980 zmmh_low_space field by use of zmmh_high_space.
6981
582511be
PA
69822015-01-09 Pedro Alves <palves@redhat.com>
6983
6984 * linux-low.c (step_over_bkpt): Move higher up in the file.
6985 (handle_extended_wait): Don't store the stop_pc here.
6986 (get_stop_pc): Adjust comments and rename to ...
6987 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6988 stopped for a software breakpoint or hardware breakpoint.
6989 (thread_still_has_status_pending_p): New function.
6990 (status_pending_p_callback): Use
6991 thread_still_has_status_pending_p. If the event is no longer
6992 interesting, resume the LWP.
6993 (handle_tracepoints): Add assert.
6994 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6995 (wstatus_maybe_breakpoint): New function.
6996 (cancel_breakpoint): Delete function.
6997 (check_stopped_by_watchpoint): New function, factored out from
6998 linux_low_filter_event.
6999 (lp_status_maybe_breakpoint): Delete function.
7000 (linux_low_filter_event): Remove filter_ptid argument.
7001 Leave thread group exits pending here. Store the LWP's stop PC.
7002 Always leave events pending.
7003 (linux_wait_for_event_filtered): Pull all events out of the
7004 kernel, and leave them all pending.
7005 (count_events_callback, select_event_lwp_callback): Consider all
7006 events.
7007 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7008 (select_event_lwp): Only give preference to the stepping LWP in
7009 all-stop mode. Adjust comments.
7010 (ignore_event): New function.
7011 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7012 references to cancel_breakpoints. Adjust to renames. Also give
7013 equal priority to all LWPs that have had events in non-stop mode.
7014 If reporting a software breakpoint event, unadjust the LWP's PC.
7015 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7016 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7017 Adjust.
7018 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7019 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7020 (linux_stopped_by_watchpoint): Adjust.
7021 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7022 * linux-low.h (enum lwp_stop_reason): New.
7023 (struct lwp_info) <stop_pc>: Adjust comment.
7024 <stopped_by_watchpoint>: Delete field.
7025 <stop_reason>: New field.
7026 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7027 * mem-break.c (software_breakpoint_inserted_here)
7028 (hardware_breakpoint_inserted_here): New function.
7029 * mem-break.h (software_breakpoint_inserted_here)
7030 (hardware_breakpoint_inserted_here): Declare.
7031 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7032 (cancel_breakpoints): Delete.
7033 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7034 (upload_fast_traceframes): Remove references to
7035 cancel_breakpoints.
7036
a33e3959
PA
70372015-01-09 Pedro Alves <palves@redhat.com>
7038
7039 * thread-db.c (find_new_threads_callback): Ignore thread if the
7040 kernel thread ID is -1.
7041
8784d563
PA
70422015-01-09 Pedro Alves <palves@redhat.com>
7043
7044 * linux-low.c (linux_attach_fail_reason_string): Move to
7045 nat/linux-ptrace.c, and rename.
7046 (linux_attach_lwp): Update comment.
7047 (attach_proc_task_lwp_callback): New function.
7048 (linux_attach): Adjust to rename and use
7049 linux_proc_attach_tgid_threads.
7050 (linux_attach_fail_reason_string): Delete declaration.
7051
76f2b779
JB
70522015-01-01 Joel Brobecker <brobecker@adacore.com>
7053
7054 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7055 * server.c (gdbserver_version): Likewise.
7056
fafcc06a
SDJ
70572014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7058
7059 * remote-utils.c: Include ctype.h.
7060 (input_interrupt): Explicitly handle the case when the char
7061 received is the NUL byte. Improve the printing of non-ASCII
7062 characters.
7063
beed38b8
JB
70642014-12-16 Joel Brobecker <brobecker@adacore.com>
7065
7066 * linux-low.c (linux_low_filter_event): Update call to
7067 linux_enable_event_reporting following the addition of
7068 a new parameter to that function.
7069
bf330350
CU
70702014-12-16 Catalin Udma <catalin.udma@freescale.com>
7071
7072 PR server/17457
7073 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7074 (AARCH64_FPCR_REGNO): Likewise.
7075 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7076 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7077 (aarch64_store_fpregset): Likewise.
7078
5227d625
JB
70792014-12-15 Joel Brobecker <brobecker@adacore.com>
7080
7081 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7082 Remove FIXME comment about assumption about N.
7083
f93b65a0
JB
70842014-12-13 Joel Brobecker <brobecker@adacore.com>
7085
7086 * configure.ac: If large-file support is disabled in GDBserver,
7087 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7088 * configure: Regenerate.
7089
e5a9158d
AA
70902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7091
7092 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7093 warning upon ENODATA from ptrace.
7094 * linux-s390-low.c (s390_store_tdb): New.
7095 (s390_regsets): Add regset for NT_S390_TDB.
7096
feea5f36
AA
70972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7098
7099 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7100 without a fill_function.
7101 * linux-s390-low.c (s390_fill_last_break): Remove.
7102 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7103 (s390_arch_setup): Use regset's size instead of fill_function for
7104 loop end condition.
7105
098dbe61
AA
71062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7107
7108 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7109 the regset's store function when ptrace returned an error.
7110 * regcache.c (get_thread_regcache): Invalidate register cache
7111 before fetching inferior's registers.
7112
28eef672
AA
71132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7114
7115 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7116 while-loop as for-loop.
7117 (regsets_store_inferior_registers): Likewise.
7118
bdca27a2
YQ
71192014-11-28 Yao Qi <yao@codesourcery.com>
7120
7121 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7122 * config.in, configure: Re-generate.
7123 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7124 is defined.
7125
9c232dda
YQ
71262014-11-21 Yao Qi <yao@codesourcery.com>
7127
7128 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7129 (AC_CHECK_HEADERS): Remove malloc.h.
7130 * configure: Re-generated.
7131 * config.in: Re-generated.
7132 * server.h: Don't include alloca.h and malloc.h.
7133 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7134 Don't include malloc.h.
7135
43968415
JB
71362014-11-17 Joel Brobecker <brobecker@adacore.com>
7137
7138 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7139 corresponding ERRNO check in same block.
7140
40e91bc7
PA
71412014-11-12 Pedro Alves <palves@redhat.com>
7142
7143 * server.c (cont_thread): Update comment.
7144 (start_inferior, attach_inferior): No longer clear cont_thread.
7145 (handle_v_cont): No longer set cont_thread.
7146 (captured_main): Clear cont_thread each time a GDB connects.
7147
c2c118cf
PA
71482014-11-12 Pedro Alves <palves@redhat.com>
7149
7150 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7151 thread, and don't resume all threads if the Hc thread has exited.
7152
78708b7c
PA
71532014-11-12 Pedro Alves <palves@redhat.com>
7154
7155 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7156 the process group instead of to a specific LWP.
7157
a2abc7de
PA
71582014-10-15 Pedro Alves <palves@redhat.com>
7159
7160 PR server/17487
7161 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7162 parameter.
7163 (arm_set_thread_context): Delete.
7164 (the_low_target): Adjust.
7165 * win32-i386-low.c (debug_registers_changed)
7166 (debug_registers_used): Delete.
7167 (update_debug_registers_callback): New function.
7168 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7169 needing to update their debug registers.
7170 (win32_get_current_dr): New function.
7171 (x86_dr_low_get_addr, x86_dr_low_get_control)
7172 (x86_dr_low_get_status): Fetch the debug register from the thread
7173 record's context.
7174 (i386_initial_stuff): Adjust.
7175 (i386_get_thread_context): Remove current_event parameter. Don't
7176 clear debug_registers_changed nor copy DR values to
7177 debug_reg_state.
7178 (i386_set_thread_context): Delete.
7179 (i386_prepare_to_resume): New function.
7180 (i386_thread_added): Mark the thread as needing to update irs
7181 debug registers.
7182 (the_low_target): Remove i386_set_thread_context and install
7183 i386_prepare_to_resume.
7184 * win32-low.c (win32_get_thread_context): Adjust.
7185 (win32_set_thread_context): Use SetThreadContext
7186 directly.
7187 (win32_prepare_to_resume): New function.
7188 (win32_require_context): New function, factored out from ...
7189 (thread_rec): ... this.
7190 (continue_one_thread): Call win32_prepare_to_resume on each thread
7191 we're about to continue.
7192 (win32_resume): Call win32_prepare_to_resume on the event thread.
7193 * win32-low.h (struct win32_thread_info)
7194 <debug_registers_changed>: New field.
7195 (struct win32_target_ops): Change prototype of set_thread_context,
7196 delete set_thread_context and add prepare_to_resume.
7197 (win32_require_context): New declaration.
7198
a442d071
GB
71992014-10-08 Gary Benson <gbenson@redhat.com>
7200
7201 * server.h: Do not include common-exceptions.h.
7202
6f1947e8
GB
72032014-10-08 Gary Benson <gbenson@redhat.com>
7204
7205 * server.h: Do not include cleanups.h.
7206
63b434a4
JH
72072014-09-30 James Hogan <james.hogan@imgtec.com>
7208
7209 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7210 mips64-dsp-linux.c.
7211
c4d9ceb6
YQ
72122014-09-23 Yao Qi <yao@codesourcery.com>
7213
7214 * linux-low.c (lp_status_maybe_breakpoint): New function.
7215 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7216 (count_events_callback): Likewise.
7217 (select_event_lwp_callback): Likewise.
7218 (cancel_breakpoints_callback): Likewise.
7219
89a5711c
DB
72202014-09-19 Don Breazeal <donb@codesourcery.com>
7221
7222 * linux-low.c (handle_extended_wait): Call
7223 linux_ptrace_get_extended_event.
7224 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7225 linux_is_extended_waitstatus.
7226
bffc0964
JB
72272014-09-16 Joel Brobecker <brobecker@adacore.com>
7228
7229 * Makefile.in (CPPFLAGS): Define.
7230 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7231 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7232
0bfdf32f
GB
72332014-09-16 Gary Benson <gbenson@redhat.com>
7234
7235 * inferiors.h (current_inferior): Renamed as...
7236 (current_thread): New variable. All uses updated.
7237 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7238 (maybe_move_out_of_jump_pad): Likewise.
7239 (cancel_breakpoint): Likewise.
7240 (linux_low_filter_event): Likewise.
7241 (wait_for_sigstop): Likewise.
7242 (linux_resume_one_lwp): Likewise.
7243 (need_step_over_p): Likewise.
7244 (start_step_over): Likewise.
7245 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7246 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7247 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7248 and save_inferior as saved_thread.
7249 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7250 saved_thread.
7251 (regcache_invalidate_thread): Likewise.
7252 * remote-utils.c (prepare_resume_reply): Likewise.
7253 * thread-db.c (thread_db_get_tls_address): Likewise.
7254 (disable_thread_event_reporting): Likewise.
7255 (remove_thread_event_breakpoints): Likewise.
7256 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7257 as saved_thread.
7258 * target.h (set_desired_inferior): Renamed as...
7259 (set_desired_thread): New declaration. All uses updated.
7260 * server.c (myresume): Updated comment to reference thread instead
7261 of inferior.
7262 (handle_serial_event): Likewise.
7263 (handle_target_event): Likewise.
7264
361c8ade
GB
72652014-09-12 Tom Tromey <tromey@redhat.com>
7266 Gary Benson <gbenson@redhat.com>
7267
7268 * regcache.h: Include common-regcache.h.
7269 (regcache_read_pc): Don't declare.
7270 * regcache.c (get_thread_regcache_for_ptid): New function.
7271
bd9269f7
GB
72722014-09-11 Tom Tromey <tromey@redhat.com>
7273 Gary Benson <gbenson@redhat.com>
7274
7275 * symbol.c: New file.
7276 * Makefile.in (SFILES): Add symbol.c.
7277 (OBS): Add symbol.o.
7278
f8c1d06b
GB
72792014-09-11 Gary Benson <gbenson@redhat.com>
7280
7281 * target.c (target_stop_ptid, target_continue_ptid): New
7282 functions.
7283
721ec300
GB
72842014-09-11 Tom Tromey <tromey@redhat.com>
7285 Gary Benson <gbenson@redhat.com>
7286
7287 * target.h: Include target/target.h.
7288 * target.c (target_read_memory, target_read_uint32)
7289 (target_write_memory): New functions.
7290
c5e92cca
GB
72912014-09-11 Gary Benson <gbenson@redhat.com>
7292
7293 * server.h (debug_hw_points): Don't declare.
7294 * server.c (debug_hw_points): Don't define. Replace all uses
7295 with show_debug_regs.
7296 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7297 all uses with show_debug_regs.
7298
2e4bb98a
EBM
72992014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7300
7301 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7302 endianness into account.
7303 (ppc_supply_ptrace_register): Likewise.
7304
ac740bc7
JH
73052014-09-03 James Hogan <james.hogan@imgtec.com>
7306
7307 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7308 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7309
97ea6506
GB
73102014-09-03 Gary Benson <gbenson@redhat.com>
7311
7312 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7313 ALL_DEBUG_ADDRESS_REGISTERS.
7314
df7e5265
GB
73152014-09-02 Gary Benson <gbenson@redhat.com>
7316
7317 * i386-low.h: Renamed as...
7318 * x86-low.h: New file. All type, function and variable name
7319 prefixes changed from "i386_" to "x86_". All references updated.
7320 * i386-low.c: Renamed as...
7321 * x86-low.c: New file. All type, function and variable name
7322 prefixes changed from "i386_" to "x86_". All references updated.
7323
ed859da7
GB
73242014-09-02 Gary Benson <gbenson@redhat.com>
7325
7326 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7327 (x86_linux_new_thread): Likewise.
7328
860789c7
GB
73292014-08-29 Gary Benson <gbenson@redhat.com>
7330
7331 * server.h (setjmp.h): Do not include.
7332 (toplevel): Do not declare.
7333 (common-exceptions.h): Include.
7334 (cleanups.h): Likewise.
7335 * server.c (toplevel): Do not define.
7336 (exit_code): New static global.
7337 (detach_or_kill_for_exit_cleanup): New function.
7338 (main): New function. Original main renamed to...
7339 (captured_main): New function.
7340 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7341
ff55e1b5
GB
73422014-08-29 Gary Benson <gbenson@redhat.com>
7343
7344 * Makefile.in (SFILES): Add common/common-exceptions.c.
7345 (OBS): Add common-exceptions.o.
7346 (common-exceptions.o): New rule.
7347 * utils.c (prepare_to_throw_exception): New function.
7348
e9bcb658
GB
73492014-08-29 Gary Benson <gbenson@redhat.com>
7350
7351 * config.in: Regenerate.
7352 * configure: Likewise.
7353
e3180625
GB
73542014-08-29 Gary Benson <gbenson@redhat.com>
7355
7356 * Makefile.in (SFILES): Add common/cleanups.c.
7357 (OBS): cleanups.o.
7358 (cleanups.o): New rule.
7359
e3d6ba5d
GB
73602014-08-29 Gary Benson <gbenson@redhat.com>
7361
7362 * utils.c (internal_vwarning): New function.
7363
7096e886
GB
73642014-08-28 Gary Benson <gbenson@redhat.com>
7365
7366 * utils.h (fatal): Remove declaration.
7367 * utils.c (fatal): Remove function.
7368
14ce3192
GB
73692014-08-28 Gary Benson <gbenson@redhat.com>
7370
7371 * tracepoint.c (gdb_agent_init): Replace fatal with
7372 perror_with_name.
7373 (initialize_tracepoint): Likewise.
7374
50278d59
GB
73752014-08-28 Gary Benson <gbenson@redhat.com>
7376
7377 * remote-utils.c (remote_prepare): Replace fatal with error.
7378
aa96c426
GB
73792014-08-28 Gary Benson <gbenson@redhat.com>
7380
7381 * linux-low.c (linux_async): Replace fatal with warning.
7382 Tidy up and return.
7383 (linux_start_non_stop): Return -1 if linux_async failed.
7384
f7160e97
GB
73852014-08-28 Gary Benson <gbenson@redhat.com>
7386
7387 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7388 gdb_assert.
7389 (i386_dr_low_get_addr): Remove vague comment.
7390 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7391 gdb_assert.
7392
38e08fca
GB
73932014-08-28 Gary Benson <gbenson@redhat.com>
7394
7395 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7396 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7397 internal_error.
7398 (linux_resume_one_lwp): Likewise.
7399 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7400 gdb_assert.
7401 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7402 with internal_error.
7403 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7404 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7405 (find_register_by_name): Replace fatal with internal_error.
7406 (find_regno): Likewise.
7407 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7408 * thread-db.c (thread_db_create_event): Likewise.
7409 (thread_db_load_search): Likewise.
7410 (try_thread_db_load_1): Likewise.
7411 * tracepoint.c (get_jump_space_head): Replace fatal with
7412 internal_error.
7413 (claim_trampoline_space): Likewise.
7414 (have_fast_tracepoint_trampoline_buffer): Likewise.
7415 (cmd_qtstart): Likewise.
7416 (stop_tracing): Likewise.
7417 (fast_tracepoint_collecting): Likewise.
7418 (target_malloc): Likewise.
7419 (download_tracepoint): Likewise.
7420 (download_trace_state_variables): Replace check with gdb_assert.
7421 (upload_fast_traceframes): Replace fatal with internal_error.
7422
34abf635
GB
74232014-08-19 Tom Tromey <tromey@redhat.com>
7424 Gary Benson <gbenson@redhat.com>
7425
7426 * Makefile.in (SFILES): Add common/common-debug.c.
7427 (OBS): Add common-debug.o.
7428 (common-debug.o): New rule.
7429 * debug.h (debug_printf): Don't declare.
7430 * debug.c (debug_printf): Renamed and rewritten as...
7431 (debug_vprintf): New function.
7432
f6e94d78
GB
74332014-08-19 Gary Benson <gbenson@redhat.com>
7434
7435 * utils.h: Do not include print-utils.h.
7436
9239eeab
GB
74372014-08-19 Tom Tromey <tromey@redhat.com>
7438 Gary Benson <gbenson@redhat.com>
7439
7440 * server.h: Add static assertion.
7441 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7442
ef87c8bb
GB
74432014-08-19 Tom Tromey <tromey@redhat.com>
7444 Gary Benson <gbenson@redhat.com>
7445
7446 * Makefile.in (SFILES): Add common/errors.c.
7447 (OBS): Add errors.o.
7448 (IPA_OBS): Add errors-ipa.o.
7449 (errors.o): New rule.
7450 (errors-ipa.o): Likewise.
7451 * utils.h (perror_with_name, error, warning): Don't declare.
7452 * utils.c (warning): Renamed and rewritten as...
7453 (vwarning): New function.
7454 (error): Renamed and rewritten as...
7455 (verror): New function.
7456 (internal_error): Renamed and rewritten as...
7457 (internal_verror): New function.
7458
bb974a24
GB
74592014-08-07 Gary Benson <gbenson@redhat.com>
7460
7461 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7462 * configure: Regenerate.
7463 * config.in: Likewise.
7464 * server.h: Do not include errno.h.
7465 * event-loop.c: Likewise.
7466 * hostio-errno.c: Likewise.
7467 * linux-low.c: Likewise.
7468 * remote-utils.c: Likewise.
7469 * spu-low.c: Likewise.
7470 * utils.c: Likewise.
7471 * gdbreplay.c: Unconditionally include errno.h.
7472
6d3d12eb
GB
74732014-08-07 Gary Benson <gbenson@redhat.com>
7474
7475 * server.h: Do not include string.h.
7476 * event-loop.c: Likewise.
7477 * linux-low.c: Likewise.
7478 * regcache.c: Likewise.
7479 * remote-utils.c: Likewise.
7480 * spu-low.c: Likewise.
7481 * utils.c: Likewise.
7482
dccbb609
GB
74832014-08-07 Gary Benson <gbenson@redhat.com>
7484
7485 * server.h: Do not include gdb_assert.h.
7486
e76df0d0
GB
74872014-08-07 Gary Benson <gbenson@redhat.com>
7488
7489 * server.h: Do not include common-utils.h.
7490
4cb9c816
GB
74912014-08-07 Gary Benson <gbenson@redhat.com>
7492
7493 * server.h: Do not include ptid.h.
7494 * notif.h: Likewise.
7495
3995eeee
GB
74962014-08-07 Gary Benson <gbenson@redhat.com>
7497
7498 * server.h: Do not include gdb_locale.h.
7499
cb9f1a9b
GB
75002014-08-07 Gary Benson <gbenson@redhat.com>
7501
7502 * server.h: Do not include gdb/signals.h.
7503 * win32-low.c: Likewise.
7504
a5fceff8
GB
75052014-08-07 Gary Benson <gbenson@redhat.com>
7506
7507 * server.h: Do not include pathmax.h.
7508
b9391142
GB
75092014-08-07 Gary Benson <gbenson@redhat.com>
7510
7511 * server.h: Do not include libiberty.h.
7512 * linux-bfin-low.c: Likewise.
7513
0e443c87
GB
75142014-08-07 Gary Benson <gbenson@redhat.com>
7515
7516 * server.h: Do not include ansidecl.h.
7517
8ebb3f56
GB
75182014-08-07 Gary Benson <gbenson@redhat.com>
7519
7520 * linux-x86-low.c: Do not include stddef.h.
7521 * lynx-ppc-low.c: Likewise.
7522 * tracepoint.c: Likewise.
7523
8980bdf6
GB
75242014-08-07 Gary Benson <gbenson@redhat.com>
7525
7526 * server.h: Do not include stdarg.h.
7527 * nto-low.c: Likewise.
7528
d7096f71
GB
75292014-08-07 Gary Benson <gbenson@redhat.com>
7530
7531 * server.h: Do not include stdlib.h.
7532 * inferiors.c: Likewise.
7533 * linux-low.c: Likewise.
7534 * regcache.c: Likewise.
7535 * spu-low.c: Likewise.
7536 * tracepoint.c: Likewise.
7537 * utils.c: Likewise.
7538
d02f550d
GB
75392014-08-07 Gary Benson <gbenson@redhat.com>
7540
7541 * server.h: Do not include stdio.h.
7542 * linux-low.c: Likewise.
7543 * remote-utils.c: Likewise.
7544 * spu-low.c: Likewise.
7545 * utils.c: Likewise.
7546 * wincecompat.c: Likewise.
7547
87f6c4e3
GB
75482014-08-06 Gary Benson <gbenson@redhat.com>
7549
7550 * regcache.c (init_register_cache): Move conditionals inside if.
7551
7089dca4
GB
75522014-08-06 Gary Benson <gbenson@redhat.com>
7553
7554 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7555
462f517e
GB
75562014-07-31 Gary Benson <gbenson@redhat.com>
7557
7558 * ax.h: Do not include server.h.
7559 * gdbthread.h: Likewise.
7560 * lynx-low.h: Likewise.
7561 * notif.h: Likewise.
7562
976411d6
GB
75632014-07-30 Gary Benson <gbenson@redhat.com>
7564
7565 * server.h: Include common-defs.h.
7566 Do not include config.h or build-gnulib-gdbserver/config.h.
7567
d41f6d8e
GB
75682014-07-30 Gary Benson <gbenson@redhat.com>
7569
7570 * hostio-errno.c: Move server.h to top of includes list.
7571 * inferiors.c: Likewise.
7572 * linux-x86-low.c: Likewise.
7573 * notif.c: Include server.h.
7574
314c6a35
TT
75752014-07-24 Tom Tromey <tromey@redhat.com>
7576 Gary Benson <gbenson@redhat.com>
7577
7578 * server.h (CORE_ADDR): Now unsigned.
7579
69ff6be5
PA
75802014-07-16 Pedro Alves <palves@redhat.com>
7581
7582 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7583
ce9e3fe7
PA
75842014-07-15 Pedro Alves <palves@redhat.com>
7585
7586 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7587 copy.
7588
e76126e8
PA
75892014-07-11 Pedro Alves <palves@redhat.com>
7590
7591 * linux-low.c (kill_wait_lwp): New function, based on
7592 kill_one_lwp_callback, but use my_waitpid directly.
7593 (kill_one_lwp_callback, linux_kill): Use it.
7594
8e9db26e
PA
75952014-06-23 Pedro Alves <palves@redhat.com>
7596
7597 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7598 before setting DR0..DR3.
7599
698b3e08
GB
76002014-06-20 Gary Benson <gbenson@redhat.com>
7601
7602 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7603 * configure: Regenerated.
7604 * config.in: Likewise.
7605
125f8a3d
GB
76062014-06-20 Gary Benson <gbenson@redhat.com>
7607
7608 * Makefile.in (SFILES): Update locations for files moved
7609 from common to nat.
7610 (object file files): Reordered.
7611
42995dbd
GB
76122014-06-20 Gary Benson <gbenson@redhat.com>
7613
7614 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7615 (i386_dr_low_set_addr): Likewise.
7616 (i386_dr_low_get_addr): Likewise.
7617 (i386_dr_low_can_set_control): Likewise.
7618 (i386_dr_low_set_control): Likewise.
7619 (i386_dr_low_get_control): Likewise.
7620 (i386_dr_low_get_status): Likewise.
7621 (i386_get_debug_register_length): Likewise.
7622 * linux-x86-low.c (i386_dr_low_set_addr):
7623 Changed signature. Made static.
7624 (i386_dr_low_get_addr): Likewise.
7625 (i386_dr_low_set_control): Likewise.
7626 (i386_dr_low_get_control): Likewise.
7627 (i386_dr_low_get_status): Likewise.
7628 (i386_dr_low): New global variable.
7629 * win32-i386-low.c (i386_dr_low_set_addr):
7630 Changed signature. Made static.
7631 (i386_dr_low_get_addr): Likewise.
7632 (i386_dr_low_set_control): Likewise.
7633 (i386_dr_low_get_control): Likewise.
7634 (i386_dr_low_get_status): Likewise.
7635 (i386_dr_low): New global variable.
7636
e1d2394b
MS
76372014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7638
7639 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7640 * Makefile.in (AR, AR_FLAGS): Define.
7641 * configure: Regenerate.
7642
3a8ee006
GB
76432014-06-19 Gary Benson <gbenson@redhat.com>
7644
7645 * Makefile.in (i386-dregs.o): New rule.
7646 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7647 * i386-low.c (target.h): Remove include.
7648 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7649 (DR_CONTROL_SHIFT): Likewise.
7650 (DR_CONTROL_SIZE): Likewise.
7651 (DR_RW_EXECUTE): Likewise.
7652 (DR_RW_WRITE): Likewise.
7653 (DR_RW_READ): Likewise.
7654 (DR_RW_IORW): Likewise.
7655 (DR_LEN_1): Likewise.
7656 (DR_LEN_2): Likewise.
7657 (DR_LEN_4): Likewise.
7658 (DR_LEN_8): Likewise.
7659 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7660 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7661 (DR_ENABLE_SIZE): Likewise.
7662 (DR_LOCAL_SLOWDOWN): Likewise.
7663 (DR_GLOBAL_SLOWDOWN): Likewise.
7664 (DR_CONTROL_RESERVED): Likewise.
7665 (I386_DR_CONTROL_MASK): Likewise.
7666 (I386_DR_VACANT): Likewise.
7667 (I386_DR_LOCAL_ENABLE): Likewise.
7668 (I386_DR_GLOBAL_ENABLE): Likewise.
7669 (I386_DR_DISABLE): Likewise.
7670 (I386_DR_SET_RW_LEN): Likewise.
7671 (I386_DR_GET_RW_LEN): Likewise.
7672 (I386_DR_WATCH_HIT): Likewise.
7673 (i386_wp_op_t): Likewise.
7674 (i386_show_dr): Likewise.
7675 (i386_length_and_rw_bits): Likewise.
7676 (i386_insert_aligned_watchpoint): Likewise.
7677 (i386_remove_aligned_watchpoint): Likewise.
7678 (i386_handle_nonaligned_watchpoint): Likewise.
7679 i386_update_inferior_debug_regs(): Likewise.
7680 (i386_dr_insert_watchpoint): Likewise.
7681 (i386_dr_remove_watchpoint): Likewise.
7682 (i386_dr_region_ok_for_watchpoint): Likewise.
7683 (i386_dr_stopped_data_address): Likewise.
7684 (i386_dr_stopped_by_watchpoint): Likewise.
7685
8f26655c
GB
76862014-06-19 Gary Benson <gbenson@redhat.com>
7687
7688 * i386-low.c (i386_dr_show): Renamed to
7689 i386_show_dr and made static. All uses updated.
7690 (i386_dr_length_and_rw_bits): Renamed to
7691 i386_length_and_rw_bits and made static.
7692 All uses updated.
7693 (i386_dr_insert_aligned_watchpoint): Renamed to
7694 i386_insert_aligned_watchpoint and made static.
7695 All uses updated.
7696 (i386_dr_remove_aligned_watchpoint): Renamed to
7697 i386_remove_aligned_watchpoint and made static.
7698 All uses updated.
7699 (i386_dr_update_inferior_debug_regs): Renamed to
7700 i386_update_inferior_debug_regs and made static.
7701 All uses updated.
7702
b9228891
GB
77032014-06-18 Gary Benson <gbenson@redhat.com>
7704
5171def3
GB
7705 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7706 (i386_dr_low_can_set_control): Likewise.
7707 (i386_get_debug_register_length): Likewise.
7708 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7709 (i386_dr_low_can_set_control): Likewise.
7710 (i386_get_debug_register_length): Likewise.
7711
77122014-06-17 Gary Benson <gbenson@redhat.com>
7713
b9228891
GB
7714 * i386-low.h (i386-dregs.h): New include.
7715 (DR_FIRSTADDR): Now in i386-dregs.h.
7716 (DR_LASTADDR): Likewise.
7717 (DR_NADDR): Likewise.
7718 (DR_STATUS): Likewise.
7719 (DR_CONTROL): Likewise.
7720 (i386_debug_reg_state): Likewise.
7721 (i386_dr_insert_watchpoint): Likewise.
7722 (i386_dr_remove_watchpoint): Likewise.
7723 (i386_dr_region_ok_for_watchpoint): Likewise.
7724 (i386_dr_stopped_data_address): Likewise.
7725 (i386_dr_stopped_by_watchpoint): Likewise.
7726 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7727
4be83cc2
GB
77282014-06-18 Gary Benson <gbenson@redhat.com>
7729
7730 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7731 i386_dr_insert_watchpoint.
7732 (i386_low_remove_watchpoint): Renamed to
7733 i386_dr_remove_watchpoint.
7734 (i386_low_region_ok_for_watchpoint): Renamed to
7735 i386_dr_region_ok_for_watchpoint.
7736 (i386_low_stopped_data_address): Renamed to
7737 i386_dr_stopped_data_address.
7738 (i386_low_stopped_by_watchpoint): Renamed to
7739 i386_dr_stopped_by_watchpoint.
7740 * i386-low.c (i386_show_dr): Renamed to
7741 i386_dr_show and made nonstatic. All uses updated.
7742 (i386_length_and_rw_bits): Renamed to
7743 i386_dr_length_and_rw_bits and made nonstatic.
7744 All uses updated.
7745 (i386_insert_aligned_watchpoint): Renamed to
7746 i386_dr_insert_aligned_watchpoint and made nonstatic.
7747 All uses updated.
7748 (i386_remove_aligned_watchpoint): Renamed to
7749 i386_dr_remove_aligned_watchpoint and made nonstatic.
7750 All uses updated.
7751 (i386_update_inferior_debug_regs): Renamed to
7752 i386_dr_update_inferior_debug_regs and made nonstatic.
7753 All uses updated.
7754 (i386_low_insert_watchpoint): Renamed to
7755 i386_dr_insert_watchpoint. All uses updated.
7756 (i386_low_remove_watchpoint): Renamed to
7757 i386_dr_remove_watchpoint. All uses updated.
7758 (i386_low_region_ok_for_watchpoint): Renamed to
7759 i386_dr_region_ok_for_watchpoint. All uses updated.
7760 (i386_low_stopped_data_address): Renamed to
7761 i386_dr_stopped_data_address. All uses updated.
7762 (i386_low_stopped_by_watchpoint): Renamed to
7763 i386_dr_stopped_by_watchpoint. All uses updated.
7764
131aa0d4
GB
77652014-06-18 Gary Benson <gbenson@redhat.com>
7766
7767 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7768 (i386_dr_low_can_set_control): Likewise.
7769 (i386_insert_aligned_watchpoint): New check.
7770
d9305f7f
GB
77712014-06-18 Gary Benson <gbenson@redhat.com>
7772
7773 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7774 Renamed to state.
7775
e927c9fc
GB
77762014-06-18 Gary Benson <gbenson@redhat.com>
7777
7778 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7779 instead of fatal and error.
7780 (i386_handle_nonaligned_watchpoint): Likewise.
7781
1b6d4134
GB
77822014-06-18 Gary Benson <gbenson@redhat.com>
7783
7784 * i386-low.c (i386_get_debug_register_length): New macro.
7785 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7786 (i386_show_dr): Use debug_printf instead of fprintf. Use
7787 phex to format values.
7788
6e62758f
GB
77892014-06-18 Gary Benson <gbenson@redhat.com>
7790
7791 * i386-low.h: Comment changes.
7792 * i386-low.c: Likewise.
7793
fc6e2f03
GB
77942014-06-18 Gary Benson <gbenson@redhat.com>
7795
7796 * i386-low.c: Whitespace changes.
7797
f9d1eeed
TT
77982014-06-12 Tom Tromey <tromey@redhat.com>
7799
7800 * utils.c (freeargv): Remove.
7801
0b04e523
TT
78022014-06-12 Tom Tromey <tromey@redhat.com>
7803
7804 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7805 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7806 (parse_debug_format_options): Likewise.
7807 (gdbserver_usage): Likewise.
7808 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7809 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7810 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7811 against libiberty.
7812 ($(LIBGNU)): Depend on libiberty.
7813 (all-lib): Recurse into all subdirs.
7814 (install-only): Invoke "install" target in subdirs.
7815 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7816 targets.
7817 * configure: Rebuild.
7818 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7819 for vasprintf, vsnprintf, or gettimeofday.
7820 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7821 srv_tgtobj.
7822
270c9937
JB
78232014-06-05 Joel Brobecker <brobecker@adacore.com>
7824
7825 * development.sh: Delete.
7826 * Makefile.in (config.status): Adjust dependency on development.sh.
7827 * configure.ac: Adjust development.sh source call.
7828 * configure: Regenerate.
7829
0a261ed8
PA
78302014-06-02 Pedro Alves <palves@redhat.com>
7831
7832 * ax.c (gdb_free_agent_expr): New function.
7833 * ax.h (gdb_free_agent_expr): New declaration.
7834 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7835 list.
7836 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7837 static.
7838 (clear_breakpoint_conditions_and_commands): New function.
7839 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7840 (clear_breakpoint_conditions_and_commands): New declaration.
7841
e9dae05e
RR
78422014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7843
7844 * linux-aarch64-low.c (asm/ptrace.h): Include.
7845
5876f503
JK
78462014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7847
7848 Fix TLS access for -static -pthread.
7849 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7850 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7851 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7852
802e8e6d
PA
78532014-05-20 Pedro Alves <palves@redhat.com>
7854
7855 * linux-aarch64-low.c (aarch64_insert_point)
7856 (aarch64_remove_point): No longer check whether the type is
7857 supported here. Adjust to new interface.
7858 (the_low_target): Install aarch64_supports_z_point_type as
7859 supports_z_point_type method.
7860 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7861 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7862 instead of a Z packet char. Adjust.
7863 (arm_supports_z_point_type): New function.
7864 (arm_insert_point, arm_remove_point): Adjust to new interface.
7865 (the_low_target): Install arm_supports_z_point_type.
7866 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7867 (cris_insert_point, cris_remove_point): Adjust to new interface.
7868 Don't check whether the type is supported here.
7869 (the_low_target): Install cris_supports_z_point_type.
7870 * linux-low.c (linux_supports_z_point_type): New function.
7871 (linux_insert_point, linux_remove_point): Adjust to new interface.
7872 * linux-low.h (struct linux_target_ops) <insert_point,
7873 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7874 raw_breakpoint pointer parameter.
7875 <supports_z_point_type>: New method.
7876 * linux-mips-low.c (mips_supports_z_point_type): New function.
7877 (mips_insert_point, mips_remove_point): Adjust to new interface.
7878 Use mips_supports_z_point_type.
7879 (the_low_target): Install mips_supports_z_point_type.
7880 * linux-ppc-low.c (the_low_target): Install NULL as
7881 supports_z_point_type method.
7882 * linux-s390-low.c (the_low_target): Install NULL as
7883 supports_z_point_type method.
7884 * linux-sparc-low.c (the_low_target): Install NULL as
7885 supports_z_point_type method.
7886 * linux-x86-low.c (x86_supports_z_point_type): New function.
7887 (x86_insert_point): Adjust to new insert_point interface. Use
7888 insert_memory_breakpoint. Adjust to new
7889 i386_low_insert_watchpoint interface.
7890 (x86_remove_point): Adjust to remove_point interface. Use
7891 remove_memory_breakpoint. Adjust to new
7892 i386_low_remove_watchpoint interface.
7893 (the_low_target): Install x86_supports_z_point_type.
7894 * lynx-low.c (lynx_target_ops): Install NULL as
7895 supports_z_point_type callback.
7896 * nto-low.c (nto_supports_z_point_type): New.
7897 (nto_insert_point, nto_remove_point): Adjust to new interface.
7898 (nto_target_ops): Install nto_supports_z_point_type.
7899 * mem-break.c: Adjust intro comment.
7900 (struct raw_breakpoint) <raw_type, size>: New fields.
7901 <inserted>: Update comment.
7902 <shlib_disabled>: Delete field.
7903 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7904 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7905 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7906 (raw_bkpt_type_to_target_hw_bp_type): New function.
7907 (find_enabled_raw_code_breakpoint_at): New function.
7908 (find_raw_breakpoint_at): New type and size parameters. Use them.
7909 (insert_memory_breakpoint): New function, based off
7910 set_raw_breakpoint_at.
7911 (remove_memory_breakpoint): New function.
7912 (set_raw_breakpoint_at): Reimplement.
7913 (set_breakpoint): New, based on set_breakpoint_at.
7914 (set_breakpoint_at): Reimplement.
7915 (delete_raw_breakpoint): Go through the_target->remove_point
7916 instead of assuming memory breakpoints.
7917 (find_gdb_breakpoint_at): Delete.
7918 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7919 (find_gdb_breakpoint): New function.
7920 (set_gdb_breakpoint_at): Delete.
7921 (z_type_supported): New function.
7922 (set_gdb_breakpoint_1): New function, loosely based off
7923 set_gdb_breakpoint_at.
7924 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7925 (delete_gdb_breakpoint_at): Delete.
7926 (delete_gdb_breakpoint_1): New function, loosely based off
7927 delete_gdb_breakpoint_at.
7928 (delete_gdb_breakpoint): New function.
7929 (clear_gdb_breakpoint_conditions): Rename to ...
7930 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7931 breakpoint.
7932 (add_condition_to_breakpoint): Make static.
7933 (add_breakpoint_condition): Take a struct breakpoint pointer
7934 instead of an address. Adjust.
7935 (gdb_condition_true_at_breakpoint): Rename to ...
7936 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7937 z_type parameter.
7938 (gdb_condition_true_at_breakpoint): Reimplement.
7939 (add_breakpoint_commands): Take a struct breakpoint pointer
7940 instead of an address. Adjust.
7941 (gdb_no_commands_at_breakpoint): Rename to ...
7942 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7943 parameter. Return true if no breakpoint was found. Change debug
7944 output.
7945 (gdb_no_commands_at_breakpoint): Reimplement.
7946 (run_breakpoint_commands): Rename to ...
7947 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7948 and change return type to boolean.
7949 (run_breakpoint_commands): New function.
7950 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7951 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7952 breakpoint. Go through the_target->remove_point instead of
7953 assuming memory breakpoint.
7954 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7955 software and hardware breakpoints.
7956 (reinsert_raw_breakpoint): Go through the_target->insert_point
7957 instead of assuming memory breakpoint.
7958 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7959 software and hardware breakpoints.
7960 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7961 Check both software and hardware breakpoints.
7962 (validate_inserted_breakpoint): Assert the breakpoint is a
7963 software breakpoint. Set the inserted flag to -1 instead of
7964 setting shlib_disabled.
7965 (delete_disabled_breakpoints): Adjust.
7966 (validate_breakpoints): Only validate software breakpoints.
7967 Adjust to inserted flag change.
7968 (check_mem_read, check_mem_write): Skip breakpoint types other
7969 than software breakpoints. Adjust to inserted flag change.
7970 * mem-break.h (enum raw_bkpt_type): New enum.
7971 (raw_breakpoint, struct process_info): Forward declare.
7972 (Z_packet_to_target_hw_bp_type): Delete declaration.
7973 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7974 (set_gdb_breakpoint, delete_gdb_breakpoint)
7975 (clear_breakpoint_conditions): New declarations.
7976 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7977 (breakpoint_inserted_here): Update comment.
7978 (add_breakpoint_condition, add_breakpoint_commands): Replace
7979 address parameter with a breakpoint pointer parameter.
7980 (gdb_breakpoint_here): Update comment.
7981 (delete_gdb_breakpoint_at): Delete.
7982 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7983 * server.c (process_point_options): Take a struct breakpoint
7984 pointer instead of an address. Adjust.
7985 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7986 delete_gdb_breakpoint.
7987 * spu-low.c (spu_target_ops): Install NULL as
7988 supports_z_point_type method.
7989 * target.h: Include mem-break.h.
7990 (struct target_ops) <prepare_to_access_memory>: Update comment.
7991 <supports_z_point_type>: New field.
7992 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7993 instead of a char. Also take a raw breakpoint pointer.
7994 * win32-arm-low.c (the_low_target): Install NULL as
7995 supports_z_point_type.
7996 * win32-i386-low.c (i386_supports_z_point_type): New function.
7997 (i386_insert_point, i386_remove_point): Adjust to new interface.
7998 (the_low_target): Install i386_supports_z_point_type.
7999 * win32-low.c (win32_supports_z_point_type): New function.
8000 (win32_insert_point, win32_remove_point): Adjust to new interface.
8001 (win32_target_ops): Install win32_supports_z_point_type.
8002 * win32-low.h (struct win32_target_ops):
8003 <supports_z_point_type>: New method.
8004 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8005 instead of a char. Also take a raw breakpoint pointer.
8006
932539e3
PA
80072014-05-20 Pedro Alves <palves@redhat.com>
8008
8009 * mem-break.h: Include break-common.h.
8010 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8011 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8012 (Z_packet_to_target_hw_bp_type): New declaration.
8013 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8014 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8015 (Z_PACKET_ACCESS_WP): Delete macros.
8016 (Z_packet_to_hw_type): Delete function.
8017 * i386-low.h: Don't include break-common.h here.
8018 (Z_packet_to_hw_type): Delete declaration.
8019 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8020 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8021 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8022 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8023 * linux-aarch64-low.c: Don't include break-common.h here.
8024 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8025 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8026 (Z_packet_to_target_hw_bp_type): Delete function.
8027 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8028 function.
8029 (mips_insert_point, mips_remove_point): Use
8030 Z_packet_to_target_hw_bp_type.
8031
4ff0d3d8
PA
80322014-05-20 Pedro Alves <palves@redhat.com>
8033
8034 * linux-aarch64-low.c: Include break-common.h.
8035 (enum target_point_type): Delete.
8036 (Z_packet_to_point_type): Rename to ...
8037 (Z_packet_to_target_hw_bp_type): ... this, and return a
8038 target_hw_bp_type instead.
8039 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8040 instead of an enum target_point_type.
8041 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8042 breakpoint type.
8043 (aarch64_dr_state_insert_one_point)
8044 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8045 (aarch64_handle_aligned_watchpoint)
8046 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8047 Take an enum target_hw_bp_type instead of an enum
8048 target_point_type.
8049 (aarch64_supports_z_point_type): New function.
8050 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8051 use Z_packet_to_target_hw_bp_type.
8052
786dc519
JB
80532014-05-20 Joel Brobecker <brobecker@adacore.com>
8054
8055 * configure.ac: Only use -Werror by default when DEVELOPMENT
8056 is true.
8057 * configure: Regenerate.
8058
9e0aa64f
JK
80592014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8060
8061 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8062 * linux-x86-low.c (X86_64_USER_REGS): New.
8063 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8064
2b577b92
YQ
80652014-04-28 Yao Qi <yao@codesourcery.com>
8066
8067 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8068 name.
8069
94611da2
PA
80702014-04-25 Pedro Alves <palves@redhat.com>
8071
8072 PR server/16255
8073 * linux-low.c (linux_attach_fail_reason_string): New function.
8074 (linux_attach_lwp): Delete.
8075 (linux_attach_lwp_1): Rename to ...
8076 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8077 argument. Remove "initial" parameter. Return int instead of
8078 void. Don't error or warn here.
8079 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8080 failure to attach to the tgid. Call warning when failing to
8081 attach to an lwp.
8082 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8083 argument. Remove "initial" parameter. Return int instead of
8084 void. Don't error or warn here.
8085 (linux_attach_fail_reason_string): New declaration.
8086 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8087 interface change. Use linux_attach_fail_reason_string.
8088
01f9f808
MS
80892014-04-24 Michael Sturm <michael.sturm@mintel.com>
8090 Walfred Tedeschi <walfred.tedeschi@intel.com>
8091
8092 * Makefile.in: Added rules to handle new files
8093 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8094 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8095 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8096 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8097 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8098 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8099 x32-avx512-linux.o.
8100 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8101 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8102 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8103 i386/x32-avx512.xml.
8104 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8105 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8106 i386/x32-avx512-linux.xml.
8107 * i387-fp.c (num_avx512_k_registers): New constant for number
8108 of K registers.
8109 (num_avx512_zmmh_low_registers): New constant for number of
8110 lower ZMM registers (0-15).
8111 (num_avx512_zmmh_high_registers): New constant for number of
8112 higher ZMM registers (16-31).
8113 (num_avx512_ymmh_registers): New contant for number of higher
8114 YMM registers (ymm16-31 added by avx521 on x86_64).
8115 (num_avx512_xmm_registers): New constant for number of higher
8116 XMM registers (xmm16-31 added by AVX512 on x86_64).
8117 (struct i387_xsave): Add space for AVX512 registers.
8118 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8119 Add code to handle AVX512 registers.
8120 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8121 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8122 prototypei from generated file.
8123 (tdesc_amd64_avx512_linux): Likewise.
8124 (init_registers_x32_avx512_linux): Likewise.
8125 (tdesc_x32_avx512_linux): Likewise.
8126 (init_registers_i386_avx512_linux): Likewise.
8127 (tdesc_i386_avx512_linux): Likewise.
8128 (x86_64_regmap): Add AVX512 registers.
8129 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8130 mask.
8131 (initialize_low_arch): Add code to initialize AVX512 registers.
8132
51aa91f9
PA
81332014-04-23 Pedro Alves <palves@redhat.com>
8134
8135 * mem-break.c (find_gdb_breakpoint_at): Make static.
8136 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8137
a4165e94
PA
81382014-04-23 Pedro Alves <palves@redhat.com>
8139
8140 * i386-low.c: Don't include break-common.h here.
8141 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8142 prototype to take target_hw_bp_type as argument instead of a Z
8143 packet char.
8144 * i386-low.h: Include break-common.h here.
8145 (Z_packet_to_hw_type): Declare.
8146 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8147 prototypes.
8148 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8149 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8150 (x86_remove_point): Convert the packet number to a
8151 target_hw_bp_type before calling i386_low_remove_watchpoint.
8152 * win32-i386-low.c (i386_insert_point): Convert the packet number
8153 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8154 (i386_remove_point): Convert the packet number to a
8155 target_hw_bp_type before calling i386_low_remove_watchpoint.
8156
b8acf843
PA
81572014-04-23 Pedro Alves <palves@redhat.com>
8158
8159 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8160
d708bcd1
PA
81612014-04-10 Pedro Alves <palves@redhat.com>
8162
8163 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8164 Check if the condition or command is NULL before checking if the
8165 breakpoint is known. On success, return true.
8166 * mem-break.h (add_breakpoint_condition): Document return.
8167 (add_breakpoint_commands): Add describing comment.
8168 * server.c (skip_to_semicolon): New function.
8169 (process_point_options): Use it.
8170
2eec7d5b
PA
81712014-04-09 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8174 to lwpid_of.
8175
fa96cb38
PA
81762014-02-27 Pedro Alves <palves@redhat.com>
8177
8178 PR 12702
8179 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8180 macros.
8181 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8182 output.
8183 (last_thread_of_process_p): Take a PID argument instead of a
8184 thread pointer.
8185 (linux_wait_for_lwp): Delete.
8186 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8187 functions.
8188 (linux_low_filter_event): New function, party factored out from
8189 linux_wait_for_event.
8190 (linux_wait_for_event): Rename to ...
8191 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8192 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8193 sigsuspend. Check for zombie leaders.
8194 (linux_wait_for_event): Reimplement as wrapper around
8195 linux_wait_for_event_filtered.
8196 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8197 a normal or signal exit is seen, it's the whole process exiting.
8198 (wait_for_sigstop): No longer a for_each_inferior callback.
8199 Rewrite on top of linux_wait_for_event_filtered.
8200 (stop_all_lwps): Call wait_for_sigstop directly.
8201 * server.c (resume, handle_target_event): Handle
8202 TARGET_WAITKIND_NO_RESUMED.
8203
d763de10
JB
82042014-02-26 Joel Brobecker <brobecker@adacore.com>
8205
8206 * win32-low.c (psapi_get_dll_name,
8207 * win32_CreateToolhelp32Snapshot): Delete.
8208 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8209 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8210 Delete.
8211 (handle_load_dll): Add function description.
8212 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8213
850a0f76
JB
82142014-02-26 Joel Brobecker <brobecker@adacore.com>
8215
8216 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8217 Add comment.
8218 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8219 base address when calling win32_add_one_solib.
8220 (handle_load_dll): Delete local variable load_addr.
8221 Remove 0x1000 offset applied to DLL base address when calling
8222 win32_add_one_solib.
8223 (handle_unload_dll): Add comment.
8224
f25b3fc3
JB
82252014-02-26 Joel Brobecker <brobecker@adacore.com>
8226
8227 * win32-low.c (win32_add_all_dlls): Renames
8228 win32_ensure_ntdll_loaded. Rewrite function documentation.
8229 Adjust implementation to always load all DLLs.
8230 Add 0x1000 offset to DLL base address when calling
8231 win32_add_one_solib.
8232 (child_initialization_done): New static global.
8233 (do_initial_child_stuff): Set child_initialization_done to
8234 zero during child initialization, and 1 after. Replace call
8235 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8236 Add comment.
8237 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8238 (handle_unload_dll): Add function documentation.
8239 (get_child_debug_event): Ignore load and unload DLL events
8240 during child initialization.
8241
d86d4aaf
DE
82422014-02-20 Doug Evans <dje@google.com>
8243
3bc32da3 8244 Remove global all_lwps.
d86d4aaf
DE
8245 * inferiors.h (ptid_of): Move here from linux-low.h.
8246 (pid_of, lwpid_of): Ditto.
8247 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8248 parameter is a struct thread_info * now.
8249 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8250 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8251 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8252 directly.
8253 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8254 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8255 * linux-arm-low.c (update_registers_callback): Update, "entry"
8256 parameter is a struct thread_info * now.
8257 Fetch lwpid from current_inferior directly.
8258 (arm_insert_point): Pass &all_threads to find_inferior instead of
8259 &all_lwps.
8260 (arm_remove_point): Ditto.
8261 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8262 (arm_prepare_to_resume): Fetch pid from thread.
8263 (arm_read_description): Fetch lwpid from current_inferior directly.
8264 * linux-low.c (all_lwps): Delete.
8265 (delete_lwp): Delete call to remove_inferior.
8266 (handle_extended_wait): Fetch lwpid from thread.
8267 (add_lwp): Don't set lwp->entry.id. Remove call to
8268 add_inferior_to_list.
8269 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8270 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8271 (kill_one_lwp_callback): Ditto.
8272 (linux_kill): Don't dereference NULL pointer.
8273 Fetch ptid,lwpid from thread.
8274 (get_detach_signal): Fetch ptid from thread.
8275 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8276 Simplify call to regcache_invalidate_thread.
8277 (delete_lwp_callback): Update, "entry" parameter is a
8278 struct thread_info * now. Fetch pid from thread.
8279 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8280 (status_pending_p_callback): Update, "entry" parameter is a
8281 struct thread_info * now. Fetch ptid from thread.
8282 (find_lwp_pid): Update, "entry" parameter is a
8283 struct thread_info * now.
8284 (linux_wait_for_lwp): Fetch pid from thread.
8285 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8286 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8287 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8288 (dequeue_one_deferred_signal): Ditto.
8289 (cancel_breakpoint): Fetch ptid from current_inferior.
8290 (linux_wait_for_event): Pass &all_threads to find_inferior,
8291 not &all_lwps. Fetch ptid, lwpid from thread.
8292 (count_events_callback): Update, "entry" parameter is a
8293 struct thread_info * now.
8294 (select_singlestep_lwp_callback): Ditto.
8295 (select_event_lwp_callback): Ditto.
8296 (cancel_breakpoints_callback): Ditto.
8297 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8298 not &all_lwps.
8299 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8300 (unsuspend_one_lwp): Update, "entry" parameter is a
8301 struct thread_info * now.
8302 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8303 not &all_lwps.
8304 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8305 Fetch lwpid from thread, not lwp.
8306 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8307 Pass &all_threads to find_inferior, not &all_lwps.
8308 (send_sigstop): Fetch lwpid from thread, not lwp.
8309 (send_sigstop_callback): Update, "entry" parameter is a
8310 struct thread_info * now.
8311 (suspend_and_send_sigstop_callback): Ditto.
8312 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8313 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8314 struct thread_info * now.
8315 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8316 from thread, lwp.
8317 (lwp_running): Update, "entry" parameter is a
8318 struct thread_info * now.
8319 (stop_all_lwps): Fetch ptid from thread.
8320 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8321 (linux_resume_one_lwp): Fetch lwpid from thread.
8322 (linux_set_resume_request): Update, "entry" parameter is a
8323 struct thread_info * now. Fetch pid, lwpid from thread.
8324 (resume_status_pending_p): Update, "entry" parameter is a
8325 struct thread_info * now.
8326 (need_step_over_p): Ditto. Fetch lwpid from thread.
8327 (start_step_over): Fetch lwpid from thread.
8328 (linux_resume_one_thread): Update, "entry" parameter is a
8329 struct thread_info * now. Fetch lwpid from thread.
8330 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8331 (proceed_one_lwp): Update, "entry" parameter is a
8332 struct thread_info * now. Fetch lwpid from thread.
8333 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8334 struct thread_info * now.
8335 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8336 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8337 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8338 directly.
8339 (regsets_store_inferior_registers): Ditto.
8340 (fetch_register, store_register): Ditto.
8341 (linux_read_memory, linux_write_memory): Ditto.
8342 (linux_request_interrupt): Ditto.
8343 (linux_read_auxv): Ditto.
8344 (linux_xfer_siginfo): Ditto.
8345 (linux_qxfer_spu): Ditto.
8346 (linux_qxfer_libraries_svr4): Ditto.
8347 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8348 moved to inferiors.h.
8349 (get_lwp): Delete.
8350 (get_thread_lwp): Update.
8351 (struct lwp_info): Delete member "entry". Simplify comment for
8352 member "thread".
8353 (all_lwps): Delete.
8354 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8355 current_inferior directly.
8356 (update_watch_registers_callback): Update, "entry" parameter is a
8357 struct thread_info * now. Fetch pid from thread.
8358 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8359 (mips_insert_point): Fetch lwpid from current_inferior.
8360 Pass &all_threads to find_inferior, not &all_lwps.
8361 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8362 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8363 directly.
8364 (mips_stopped_data_address): Ditto.
8365 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8366 directly.
8367 * linux-tile-low.c (tile_arch_setup): Ditto.
8368 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8369 (update_debug_registers_callback): Update, "entry" parameter is a
8370 struct thread_info * now. Fetch pid from thread.
8371 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8372 Pass &all_threads to find_inferior, not &all_lwps.
8373 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8374 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8375 Pass &all_threads to find_inferior, not &all_lwps.
8376 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8377 (i386_dr_low_get_status): Ditto.
8378 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8379 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8380 (x86_linux_read_description): Ditto.
8381 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8382
3b8361aa
DE
83832014-02-20 Doug Evans <dje@google.com>
8384
8385 * inferiors.c (get_first_inferior): Fix buglet.
8386
f7667f0d
DE
83872014-02-19 Doug Evans <dje@google.com>
8388
8389 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8390 * inferiors.c (add_thread): Change result type to struct thread_info *.
8391 All callers updated.
8392 (add_lwp): Call add_thread here instead of in callers.
8393 All callers updated.
8394 * linux-low.h (get_lwp_thread): Rewrite.
8395 (struct lwp_info): New member "thread".
8396
b3312d80
DE
83972014-02-19 Doug Evans <dje@google.com>
8398
8399 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8400 All callers updated.
8401
ecc6f45c
DE
84022014-02-19 Doug Evans <dje@google.com>
8403
8404 * inferiors.c (add_thread): Fix whitespace.
8405
649ebbca
DE
84062014-02-19 Doug Evans <dje@google.com>
8407
8408 * dll.c (clear_dlls): Replace accessing list implemention details
8409 with API function.
8410 * gdbthread.h (get_first_thread): Declare.
8411 * inferiors.c (for_each_inferior_with_data): New function.
8412 (get_first_thread): New function.
8413 (find_thread_ptid): Simplify.
8414 (get_first_inferior): New function.
8415 (clear_list): Delete.
8416 (one_inferior_p): New function.
8417 (clear_inferior_list): New function.
8418 (clear_inferiors): Update.
8419 * inferiors.h (for_each_inferior_with_data): Declare.
8420 (clear_inferior_list): Declare.
8421 (one_inferior_p): Declare.
8422 (get_first_inferior): Declare.
8423 * linux-low.c (linux_wait_for_event): Replace accessing list
8424 implemention details with API function.
8425 * server.c (target_running): Ditto.
8426 (accumulate_file_name_length): New function.
8427 (emit_dll_description): New function.
8428 (handle_qxfer_libraries): Replace accessing list implemention
8429 details with API function.
8430 (handle_qxfer_threads_worker): New function.
8431 (handle_qxfer_threads_proper): Replace accessing list implemention
8432 details with API function.
8433 (handle_query): Ditto.
8434 (visit_actioned_threads_callback_ftype): New typedef.
8435 (visit_actioned_threads_data): New struct.
8436 (visit_actioned_threads): Rewrite to be find_inferior callback.
8437 (resume): Call find_inferior.
8438 (handle_status): Replace accessing list implemention
8439 details with API function.
8440 (process_serial_event): Replace accessing list implemention details
8441 with API function.
8442 * target.c (set_desired_inferior): Replace accessing list implemention
8443 details with API function.
8444 * tracepoint.c (same_process_p): New function.
8445 (gdb_agent_about_to_close): Replace accessing list implemention
8446 details with API function.
8447 * win32-low.c (child_delete_thread): Replace accessing list
8448 implemention details with API function.
8449 (match_dll_by_basename): New function.
8450 (dll_is_loaded_by_basename): New function.
8451 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8452 details call to dll_is_loaded_by_basename.
8453
80894984
DE
84542014-02-19 Doug Evans <dje@google.com>
8455
8456 * dll.h (struct dll_info): Add comment.
8457 * gdbthread.h (struct thread_info): Add comment.
8458 (current_ptid): Simplify.
8459 * inferiors.c (add_process): Update.
8460 (remove_process): Update.
8461 * inferiors.h (struct process_info): Rename member "head" to "entry".
8462 * linux-low.c (delete_lwp): Update.
8463 (add_lwp): Update.
8464 (last_thread_of_process_p): Update.
8465 (kill_one_lwp_callback, linux_kill): Update.
8466 (status_pending_p_callback): Update.
8467 (wait_for_sigstop): Update. Simplify read of ptid.
8468 (start_step_over): Update.
8469 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8470 (get_lwp_thread): Update.
8471 (struct lwp_info): Rename member "head" to "entry".
8472 * regcache.h (inferior_list_entry): Delete.
8473 * server.c (kill_inferior_callback): Update.
8474 (detach_or_kill_inferior_callback): Update.
8475 (print_started_pid): Update.
8476 (print_attached_pid): Update.
8477 (process_serial_event): Simplify read of ptid.
8478 * thread-db.c (thread_db_create_event): Update.
8479 (thread_db_get_tls_address): Update.
8480 * win32-low.c (current_inferior_ptid): Simplify.
8481
46917d26
TT
84822014-02-19 Tom Tromey <tromey@redhat.com>
8483
8484 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8485 argument.
8486 (target_supports_btrace): Update.
8487
0759a81e
YQ
84882014-02-14 Yao Qi <yao@codesourcery.com>
8489
8490 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8491 (rsp-low-ipa.o): New target.
8492
a7191e8b
TT
84932014-02-12 Tom Tromey <tromey@redhat.com>
8494
8495 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8496 convert_ascii_to_int.
8497 * regcache.c (registers_to_string): Likewise.
8498 * remote-utils.c (decode_M_packet): Likewise.
8499 * server.c (process_serial_event): Likewise.
8500
ff0e980e
TT
85012014-02-12 Tom Tromey <tromey@redhat.com>
8502
8503 * server.c (handle_query, handle_v_run): Use hex2bin, not
8504 unhexify.
8505 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8506
e9371aff
TT
85072014-02-12 Tom Tromey <tromey@redhat.com>
8508
8509 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8510 convert_int_to_ascii.
8511 * regcache.c (registers_to_string, collect_register_as_string):
8512 Likewise.
8513 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8514 Likewise.
8515 * server.c (process_serial_event): Likewise.
8516 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8517 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8518
971dc0b8
TT
85192014-02-12 Tom Tromey <tromey@redhat.com>
8520
8521 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8522 bin2hex, not hexify.
8523 * tracepoint.c (cmd_qtstatus): Likewise.
8524
0a822afb
TT
85252014-02-12 Tom Tromey <tromey@redhat.com>
8526
8527 * remote-utils.c (monitor_output): Pass explicit length to
8528 hexify.
8529
9c3d6531
TT
85302014-02-12 Tom Tromey <tromey@redhat.com>
8531
8532 * tracepoint.c: Include rsp-low.h.
8533 * server.c: Include rsp-low.h.
8534 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8535 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8536 declare.
8537 * remote-utils.c: Include rsp-low.h.
8538 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8539 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8540 (convert_int_to_ascii, convert_ascii_to_int): Move to
8541 common/rsp-low.c.
8542 * regcache.c: Include rsp-low.h.
8543 * ax.c: Include rsp-low.h.
8544 * Makefile.in (SFILES): Add common/rsp-low.c.
8545 (OBS): Add rsp-low.o.
8546 (rsp-low.o): New target.
8547
01fd3ea5
TT
85482014-02-12 Tom Tromey <tromey@redhat.com>
8549
8550 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8551 Include print-utils.h.
8552 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8553 (plongest, thirty_two, phex_nz): Remove.
8554 * Makefile.in (SFILES): Add common/print-utils.c.
8555 (OBS): Add print-utils.o.
8556 (print-utils-ipa.o): New target.
8557 (print-utils.o): New target.
8558 (IPA_OBJS): Add print-utils-ipa.o.
8559
e99dc820
TT
85602014-02-06 Tom Tromey <tromey@redhat.com>
8561
8562 * Makefile.in (SFILES): Fix indentation.
8563
ee1e2d4f
DE
85642014-02-05 Doug Evans <dje@google.com>
8565
8566 * linux-low.c (linux_wait_for_event): Improve comment.
8567 (linux_wait_1): Keep current_inferior in sync with event_child.
8568
f5a02773
DE
85692014-01-22 Doug Evans <dje@google.com>
8570
8571 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8572
87ce2a04
DE
85732014-01-22 Doug Evans <dje@google.com>
8574
8575 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8576 * configure: Regenerate.
8577 * config.in: Regenerate.
8578 * Makefile.in (SFILES): Add debug.c.
8579 (OBS): Add debug.o.
8580 * debug.c: New file.
8581 * debug.h: New file.
8582 * linux-aarch64-low.c (*): Update all debugging printfs to use
8583 debug_printf instead of fprintf.
8584 * linux-arm-low.c (*): Ditto.
8585 * linux-cris-low.c (*): Ditto.
8586 * linux-crisv32-low.c (*): Ditto.
8587 * linux-m32r-low.c (*): Ditto.
8588 * linux-sparc-low.c (*): Ditto.
8589 * linux-x86.c (*): Ditto.
8590 * linux-low.c (*): Ditto.
8591 (linux_wait_1): Add calls to debug_enter, debug_exit.
8592 (linux_wait): Remove redundant debugging printf.
8593 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8594 (linux_resume, unstop_all_lwps): Ditto.
8595 * mem-break.c (*): Update all debugging printfs to use
8596 debug_printf instead of fprintf.
8597 * remote-utils.c (*): Ditto.
8598 * thread-db.c (*): Ditto.
8599 * server.c #include <ctype.h>, "gdb_vecs.h".
8600 (debug_threads): Moved to debug.c.
8601 (*): Update all debugging printfs to use debug_printf instead of
8602 fprintf.
8603 (start_inferior): Replace call to fflush with call to debug_flush.
8604 (monitor_show_help): Mention set debug-format.
8605 (parse_debug_format_options): New function.
8606 (handle_monitor_command): Handle "monitor set debug-format".
8607 (gdbserver_usage): Mention --debug-format.
8608 (main): Parse --debug-format.
8609 * server.h (debug_threads): Declaration moved to debug.h.
8610 #include "debug.h".
8611 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8612 trace_debug_1 that uses debug_printf.
8613 (tracepoint_look_up_symbols): Update all debugging printfs to use
8614 debug_printf instead of fprintf.
8615
e671835b
BS
86162014-01-20 Baruch Siach <baruch@tkos.co.il>
8617
8618 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8619 sys/ptrace.h.
8620
b5737fa9
PA
86212014-01-17 Pedro Alves <palves@redhat.com>
8622
ea38d2a9 8623 PR build/16445
c7faa97a
PA
8624 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8625 defined after including gdb_proc_service.h.
b5737fa9 8626
40ed484e
DE
86272014-01-16 Doug Evans <dje@google.com>
8628
8629 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8630 (match_dll): Use it.
8631
969c39fb
MM
86322014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8633
8634 * target.h (target_ops) <read_btrace>: Change parameters and
8635 return type to allow error reporting.
8636 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8637 trace reading errors on.
8638 * linux-low.c (linux_low_read_btrace): Pass trace reading
8639 errors on.
8640 (linux_low_disable_btrace): New.
8641
ab7f45ba
DE
86422014-01-15 Doug Evans <dje@google.com>
8643
8644 * inferiors.c (thread_id_to_gdb_id): Delete.
8645 * inferiors.h (thread_id_to_gdb_id): Delete.
8646
66af0f44
EZ
86472014-01-13 Eli Zaretskii <eliz@gnu.org>
8648
8649 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8650 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8651 versions.
8652
9939e131
PA
86532014-01-08 Pedro Alves <palves@redhat.com>
8654
8655 * server.c (handle_status): Don't discard previous queued stop
8656 replies or thread's pending status here.
8657 (main) <disconnection>: Do it here instead.
8658
b7ea362b
PA
86592014-01-08 Pedro Alves <palves@redhat.com>
8660
8661 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8662 * server.c (visit_actioned_threads, handle_pending_status): New
8663 function.
8664 (handle_v_cont): Factor out parts to ...
8665 (resume): ... this new function. If in all-stop, and a thread
8666 being resumed has a pending status, report it without actually
8667 resuming.
8668 (myresume): Adjust to use the new 'resume' function.
8669 (clear_pending_status_callback, set_pending_status_callback)
8670 (find_status_pending_thread_callback): New functions.
8671 (handle_status): Handle the case of multiple threads having
8672 interesting statuses to report. Report threads' real last signal
8673 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8674 with an interesting thread to report the status for, instead of
8675 always reporting the status of the first thread.
8676
28498c42
JB
86772014-01-01 Joel Brobecker <brobecker@adacore.com>
8678
8679 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8680 * gdbreplay.c (gdbreplay_version): Likewise.
8681
f45c82da
YZ
86822013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8683
8684 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8685 iov.iov_len with the real length in use.
8686
379a5e2d
JB
86872013-12-13 Joel Brobecker <brobecker@adacore.com>
8688
8689 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8690 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8691 for all targets that use win32-low.c.
8692 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8693 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8694
4210d83e
PA
86952013-12-13 Pedro Alves <palves@redhat.com>
8696
8697 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8698 if equal to TARGET_WAITKIND_LOADED.
8699 * win32-low.c (cached_status): New static global.
8700 (win32_wait): Add declaration.
8701 (do_initial_child_stuff): Flush all initial pending debug events
8702 up to the initial breakpoint.
8703 (win32_wait): If CACHED_STATUS was set, return that instead
8704 of doing a real wait. Remove the code resuming the execution
8705 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8706 during the initial phase. Also remove the code changing
8707 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8708 TARGET_WAITKIND_STOPPED.
8709
e7f0d979
YQ
87102013-12-11 Yao Qi <yao@codesourcery.com>
8711
8712 * notif.c (handle_notif_ack): Return 0 if no notification
8713 matches.
8714
ebcf782c
DE
87152013-11-20 Doug Evans <dje@google.com>
8716
8717 * linux-low.c (linux_set_resume_request): Fix comment.
8718
20ad9378
DE
87192013-11-20 Doug Evans <dje@google.com>
8720
8721 * linux-low.c (resume_status_pending_p): Tweak comment.
8722
a196ebeb
WT
87232013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8724
8725 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8726 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8727 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8728 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8729 (srv_amd64_regobj): Add amd64-mpx.o.
8730 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8731 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8732 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8733 * i387-fp.c (num_pl_bnd_register) Added constant.
8734 (num_pl_bnd_cfg_registers) Added constant.
8735 (struct i387_xsave) Added reserved area and MPX fields.
8736 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8737 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8738 function.
8739 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8740 (init_registers_amd64_mpx_linux): Declare new function.
8741 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8742 (x86_64_regmap): Add MPX registers.
8743 (x86_linux_read_description): Add MPX case.
8744 (initialize_low_arch): Initialize MPX targets.
8745
0080a2f6
TT
87462013-11-18 Tom Tromey <tromey@redhat.com>
8747
8748 * configure: Rebuild.
8749 * configure.ac: Don't check for stdlib.h.
8750 * gdbreplay.c: Unconditionally include stdlib.h.
8751
2978b111
TT
87522013-11-18 Tom Tromey <tromey@redhat.com>
8753
8754 * config.in: Rebuild.
8755 * configure: Rebuild.
8756 * configure.ac: Don't use AC_HEADER_DIRENT.
8757
a3d08894
TT
87582013-11-18 Tom Tromey <tromey@redhat.com>
8759
8760 * server.h: Don't check HAVE_STRING_H.
8761 * gdbreplay.c: Don't check HAVE_STRING_H.
8762 * configure: Rebuild.
8763
0a5dd17d
TT
87642013-11-18 Tom Tromey <tromey@redhat.com>
8765
8766 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8767 LIBGNU.
8768
1bd2f0ba
TT
87692013-11-08 Tom Tromey <tromey@redhat.com>
8770
8771 * configure, config.in: Rebuild.
8772 * configure.ac: Remove unused configury.
8773
3266f10b
TT
87742013-11-08 Tom Tromey <tromey@redhat.com>
8775
8776 * acinclude.m4: Include common.m4, codeset.m4.
8777 * configure, config.in: Rebuild.
8778 * configure.ac: Use GDB_AC_COMMON.
8779
6682d959
AA
87802013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8781
8782 * linux-s390-low.c (HWCAP_S390_TE): New define.
8783 (s390_arch_setup): Consider the TE field in the HWCAP for
8784 determining 'have_regset_tdb'.
8785
fd0a4d76
SDJ
87862013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8787
8788 PR gdb/16014
8789 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8790 call to sizeof.
8791
1a3d890b
PA
87922013-10-02 Pedro Alves <palves@redhat.com>
8793
8794 * server.c (process_serial_event): Don't output "GDBserver
8795 exiting" if GDB is connected through stdio.
8796 * target.c (mywait): Likewise, be silent if GDB is connected
8797 through stdio.
8798
97ad4581
JB
87992013-10-01 Joel Brobecker <brobecker@adacore.com>
8800
8801 * lynx-low.c (lynx_add_threads_after_attach): New function.
8802 (lynx_attach): Remove call to add_thread. Add call to
8803 lynx_add_threads_after_attach instead.
8804
5b4e221c
MF
88052013-09-28 Mike Frysinger <vapier@gentoo.org>
8806
8807 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8808 * config.in, configure: Regenerated.
8809
ee47b2f8
YQ
88102013-09-18 Yao Qi <yao@codesourcery.com>
8811
8812 PR server/15959
8813 * server.c (start_inferior): Clear 'resume_info'.
8814
d6707650 88152013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8816
d6707650
JW
8817 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8818 for each register.
8819
9243dd0e 88202013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 8821
9243dd0e
JW
8822 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8823 linux-tile-low.o to srv_tgtobj.
8824
c623a6ef
WN
88252013-09-16 Will Newton <will.newton@linaro.org>
8826
8827 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8828 out regs.
8829
fb71d39e
PA
88302013-09-06 Pedro Alves <palves@redhat.com>
8831
8832 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8833 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8834 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8835 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8836 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8837 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8838
8e7e9910
PA
88392013-09-06 Pedro Alves <palves@redhat.com>
8840
8841 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8842 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8843
7c3a12ca
PA
88442013-09-06 Pedro Alves <palves@redhat.com>
8845
8846 * linux-amd64-ipa.c: Include tracepoint.h.
8847 * linux-i386-ipa.c: Include tracepoint.h.
8848
8eb3d7b6
RW
88492013-09-06 Ricard Wanderlof <ricardw@axis.com>
8850
8851 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8852 (ps_get_thread_area): New function.
8853
eddddb9d
RW
88542013-09-06 Ricard Wanderlof <ricardw@axis.com>
8855
8856 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8857 (initialize_low_arch): Call init_registers_crisv32 rather than
8858 init_register_crisv32.
8859
533b0600
PA
88602013-09-05 Pedro Alves <palves@redhat.com>
8861
8862 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8863 to ...
8864 * hostio.h: ... this new file.
8865 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8866 win32-low.c: Include hostio.h.
8867
0ce3d3b5
PA
88682013-09-05 Pedro Alves <palves@redhat.com>
8869
8870 * server.h (gdb_client_data, handler_func, callback_handler_func)
8871 (delete_file_handler, add_file_handler, append_callback_event)
8872 (delete_callback_event, start_event_loop, initialize_event_loop):
8873 Move to event-loop.h and include it.
8874 * event-loop.h: New file.
8875
799cdc37
PA
88762013-09-05 Pedro Alves <palves@redhat.com>
8877
8878 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8879 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8880 (loaded_dll, unloaded_dll): Move to ...
8881 * dll.h: ... this new file.
8882 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8883
6a6bbd9d
PA
88842013-09-05 Pedro Alves <palves@redhat.com>
8885
8886 * server.h (current_process, get_thread_process, all_processes)
8887 (add_inferior_to_list, for_each_inferior, current_inferior)
8888 (remove_inferior, add_process, remove_process, find_process_pid)
8889 (have_started_inferiors_p, have_attached_inferiors_p)
8890 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8891 (clear_inferiors, find_inferior, find_inferior_id)
8892 (inferior_target_data, set_inferior_target_data)
8893 (inferior_regcache_data, set_inferior_regcache_data): Move to
8894 inferiors.h, and include it.
8895 * inferiors.h: New file.
8896
f699aaba
PA
88972013-09-05 Pedro Alves <palves@redhat.com>
8898
8899 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8900 Move ...
72f4393d 8901 * ax.h: ... here.
f699aaba 8902
c144c7a0
PA
89032013-09-05 Pedro Alves <palves@redhat.com>
8904
8905 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8906 tracepoint.h.
8907 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8908 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8909 (handle_tracepoint_general_set, handle_tracepoint_query)
8910 (tracepoint_finished_step, tracepoint_was_hit)
8911 (release_while_stepping_state_list, current_traceframe)
8912 (in_readonly_region, traceframe_read_mem)
8913 (fetch_traceframe_registers, traceframe_read_sdata)
8914 (traceframe_read_info, struct fast_tpoint_collect_status)
8915 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8916 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8917 (supply_fast_tracepoint_registers)
8918 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8919 (ipa_tdesc, claim_trampoline_space)
8920 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8921 (agent_mem_read, agent_get_trace_state_variable_value)
8922 (agent_set_trace_state_variable_value, agent_tsv_read)
8923 (agent_mem_read_string, get_raw_reg_func_addr)
8924 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8925 * tracepoint.h: ... this new file.
8926
ff42e6ab
PA
89272013-09-05 Pedro Alves <palves@redhat.com>
8928
8929 * server.h (perror_with_name, error, fatal, warning, paddress)
8930 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8931 include it.
8932 * utils.h: New file.
8933
541af0f4
PA
89342013-09-05 Pedro Alves <palves@redhat.com>
8935
8936 * server.h (remote_debug, noack_mode, transport_is_reliable)
8937 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8938 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8939 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8940 (write_enn, initialize_async_io, enable_async_io)
8941 (disable_async_io, check_remote_input_interrupt_request)
8942 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8943 (dead_thread_notify, prepare_resume_reply)
8944 (decode_address_to_semicolon, decode_address, decode_m_packet)
8945 (decode_M_packet, decode_X_packet, decode_xfer_write)
8946 (decode_search_memory_packet, unhexify, hexify)
8947 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8948 (look_up_one_symbol, relocate_instruction)
8949 (monitor_output): Move to remote-utils.h, and include it.
8950 * remote-utils.h: New file.
8951
eebdf26b
PA
89522013-09-05 Pedro Alves <palves@redhat.com>
8953
8954 * server.h (_): Delete.
8955
3aafd2ff
PA
89562013-09-02 Pedro Alves <palves@redhat.com>
8957
8958 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8959 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8960 allocated.
8961 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8962
cee83bcb
PM
89632013-09-02 Pierre Muller <muller@sourceware.org>
8964
8965 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8966 or WriteProcessMemory complete successfully and handle
8967 ERROR_PARTIAL_COPY error.
8968
9a13b2fa
PA
89692013-09-02 Pedro Alves <palves@redhat.com>
8970
8971 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8972 error instead of EIO.
8973
602e3198
JK
89742013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8975
8976 PR server/15604
8977 * linux-low.c: Include filestuff.h.
8978 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8979 * lynx-low.c: Include filestuff.h.
8980 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8981 * server.c: Include filestuff.h.
8982 (main): Call notice_open_fds.
8983 * spu-low.c: Include filestuff.h.
8984 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8985
96d7229d
LM
89862013-08-22 Luis Machado <lgustavo@codesourcery.com>
8987
8988 * Makefile.in: Explain why ../target and ../nat are not
8989 listed as include file search paths.
8990 (linux-waitpid.o): New object file rule.
8991 * configure.srv (srv_native_linux_obj): New variable.
8992 Replace all occurrences of linux native object files with
8993 $srv_native_linux_obj.
8994 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8995 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8996 (linux_enable_event_reporting): Remove declaration.
8997 (my_waitpid): Moved to common/linux-waitpid.c.
8998 (linux_wait_for_event): Pass ptid when calling
8999 linux_enable_event_reporting.
9000 (linux_supports_tracefork_flag): Remove.
9001 (linux_enable_event_reporting): Likewise.
9002 (linux_tracefork_grandchild): Remove.
9003 (STACK_SIZE): Moved to common/linux-ptrace.c.
9004 (linux_tracefork_child): Remove.
9005 (linux_test_for_tracefork): Remove.
9006 (linux_look_up_symbols): Call linux_supports_traceclone.
9007 (initialize_low): Remove call to linux_test_for_tracefork.
9008 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9009 common/linux-ptrace.h.
9010 (PTRACE_TYPE_ARG4): Likewise.
9011 Include linux-ptrace.h.
9012
32940073
PA
90132013-08-21 Pedro Alves <palves@redhat.com>
9014
9015 * config.in: Renegerate.
9016
33b60d58 90172013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 9018
33b60d58
LM
9019 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9020 (SFILES): Remove $(srcdir)/common/target-common.c and
9021 add $(srcdir)/target/waitstatus.c.
9022 (OBS): Remove target-common.o and add waitstatus.o.
9023 (server_h): Remove $(srcdir)/../common/target-common.h and
9024 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9025 and $(srcdir)/../target/waitstatus.h.
9026 (target-common.o): Remove.
9027 (waitstatus.o): New target object file.
9028 * target.h: Do not include target-common.h and
9029 include target/resume.h, target/wait.h and
9030 target/waitstatus.h.
9031
b8e1b30e
LM
90322013-08-13 Luis Machado <lgustavo@codesourcery.com>
9033
9034 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9035 to PTRACE_TYPE_ARG3.
9036 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9037 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9038 PTRACE_TYPE_ARG4.
9039 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9040 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9041
7a60ad40
YQ
90422013-07-27 Jie Zhang <jie@codesourcery.com>
9043 Daniel Jacobowitz <dan@codesourcery.com>
9044 Yao Qi <yao@codesourcery.com>
9045
9046 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9047 (mips-linux-watch.o): New rule.
9048 (mips_linux_watch_h): New variable.
9049 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9050 srv_tgtobj.
9051 * linux-mips-low.c: Include mips-linux-watch.h.
9052 (struct arch_process_info, struct arch_lwp_info): New.
9053 (update_watch_registers_callback): New function.
9054 (mips_linux_new_process, mips_linux_new_thread) New functions.
9055 (mips_linux_prepare_to_resume, mips_insert_point): New
9056 functions.
9057 (mips_remove_point, mips_stopped_by_watchpoint): New
9058 functions.
9059 (rsp_bp_type_to_target_hw_bp_type): New function.
9060 (mips_stopped_data_address): New function.
9061 (the_low_target): Add watchpoint support functions.
9062
de6f69ad
YQ
90632013-07-27 Yao Qi <yao@codesourcery.com>
9064
9065 * i386-low.c: Include break-common.h.
9066 (enum target_hw_bp_type): Remove.
9067
3360c0bf
LM
90682013-07-24 Luis Machado <lgustavo@codesourcery.com>
9069
9070 * Makefile.in (SFILES): /common/target-common.c.
9071 (OBS): Add target-common.o.
9072 (server_h): Add $(srcdir)/../common/target-common.h.
9073 (target-common.o): New target.
9074 * server.c (queue_stop_reply_callback): Free
9075 status string after use.
9076 * target.c (target_waitstatus_to_string): Remove.
9077 * target.h: Include target-common.h.
9078 (resume_kind): Likewise.
9079 (target_waitkind): Likewise.
9080 (target_waitstatus): Likewise.
9081 (TARGET_WNOHANG): Likewise.
9082
bd885420
YQ
90832013-07-04 Yao Qi <yao@codesourcery.com>
9084
9085 * Makefile.in (host_alias): Use @host_noncanonical@.
9086 (target_alias): Use @target_noncanonical@.
9087 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9088 ACX_NONCANONICAL_HOST.
9089 * configure: Regenerated.
9090
9091 Revert:
9092 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9093
9094 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9095 * configure: Rebuild.
9096 * Makefile.in (version_host, version_target): Get from configure.
9097 (version.c): Use $(version_host) and $(version_target).
9098
17ef446e
PA
90992013-07-03 Pedro Alves <palves@redhat.com>
9100
9101 * Makefile.in (config.status): Depend on development.sh.
9102 * acinclude.m4: Include libmcheck.m4.
9103 * configure: Regenerate.
9104
7a9a7487
MG
91052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9106
9107 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9108 attribute inside the parentheses.
9109 (winapi_DebugSetProcessKillOnExit): Ditto.
9110 (winapi_DebugBreakProcess): Ditto.
9111 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 9112
49b64de6
MG
91132013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9114
9115 * notif.h (notif_event): Add a dummy member to avoid compiler
9116 errors.
9117
d5749ee7
PA
91182013-07-01 Pedro Alves <palves@redhat.com>
9119
9120 * hostio.c (HOSTIO_PATH_MAX): Define.
9121 (require_filename, handle_open, handle_unlink, handle_readlink):
9122 Use it.
9123
d8d2a3ee
PA
91242013-07-01 Pedro Alves <palves@redhat.com>
9125
9126 * server.h: Include "pathmax.h".
9127 * linux-low.c: Don't include sys/param.h.
9128 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9129 MAXPATHLEN.
9130 * win32-low.c: Don't include sys/param.h.
9131 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9132
bc7dea8d
PA
91332013-07-01 Pedro Alves <palves@redhat.com>
9134
9135 * event-loop.c: Don't check HAVE_UNISTD_H before including
9136 <unistd.h>.
9137 * gdbreplay.c: Likewise.
9138 * remote-utils.c: Likewise.
9139 * server.c: Likewise.
9140 * configure.ac: Don't check for unistd.h.
9141 * configure: Regenerate.
9142
d6c2da54
TT
91432013-06-28 Tom Tromey <tromey@redhat.com>
9144
9145 * Makefile.in (version.c): Use version.in, not
9146 common/version.in.
9147
257b6bec
MG
91482013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9149
9150 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9151 * configure: Rebuild.
9152 * Makefile.in (version_host, version_target): Get from configure.
9153 (version.c): Use $(version_host) and $(version_target).
9154
86ebe149
DK
91552013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9156
9157 Fix trace-status to output user name without trailing colon.
9158 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9159
f30aa5af
DK
91602013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9161
9162 Fix trace-status to output proper start-time and stop-time.
9163 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9164 output start time and stop time in hex as gdb expects.
9165
28a93511
YQ
91662013-06-26 Pedro Alves <pedro@codesourcery.com>
9167
9168 * tracepoint.c (build_traceframe_info_xml): Output trace state
9169 variables present in the trace buffer.
9170
01208463
TT
91712013-06-24 Tom Tromey <tromey@redhat.com>
9172
9173 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9174 create-version.sh.
9175 (version.o): Remove.
9176 * gdbreplay.c: Include version.h.
9177 (version, host_name): Don't declare.
9178 * server.h: Include version.h.
9179 (version, host_name): Don't declare.
9180
760256f9
PA
91812013-06-12 Pedro Alves <palves@redhat.com>
9182
9183 * linux-x86-low.c (linux_is_elf64): Delete global.
9184 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9185 with local linux_pid_exe_is_elf_64_file use.
9186
030031ee
PA
91872013-06-11 Pedro Alves <palves@redhat.com>
9188
9189 * linux-low.c (regset_disabled, disable_regset): New functions.
9190 (regsets_fetch_inferior_registers)
9191 (regsets_store_inferior_registers): Use them.
9192 (initialize_regsets_info); Don't allocate the disabled_regsets
9193 array here.
9194 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9195 comment.
9196
5da6eb0a
PA
91972013-06-11 Pedro Alves <palves@redhat.com>
9198
9199 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9200 xmalloc.
9201
7e5aaa09
PA
92022013-06-11 Pedro Alves <palves@redhat.com>
9203
9204 * linux-x86-low.c (initialize_low_arch): Call
9205 init_registers_x32_avx_linux.
9206
d878444c
JK
92072013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9208
9209 Fix compatibility with Android Bionic.
9210 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9211 it is not empty.
9212
3aee8918
PA
92132013-06-07 Pedro Alves <palves@redhat.com>
9214
5f2b57b5 9215 PR server/14823
3aee8918
PA
9216 * Makefile.in (OBS): Add tdesc.o.
9217 (IPA_OBJS): Add tdesc-ipa.o.
9218 (tdesc-ipa.o): New rule.
9219 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9220 interface.
9221 * linux-low.c (new_inferior): Delete.
9222 (disabled_regsets, num_regsets): Delete.
9223 (linux_add_process): Adjust to set the new per-process
9224 new_inferior flag.
9225 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9226 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9227 was a stop. When calling arch_setup, switch the current inferior
9228 to the thread that got an event.
9229 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9230 (regsets_fetch_inferior_registers)
9231 (regsets_store_inferior_registers): New regsets_info parameter.
9232 Adjust to use it.
9233 (linux_register_in_regsets): New regs_info parameter. Adjust to
9234 use it.
9235 (register_addr, fetch_register, store_register): New usrregs_info
9236 parameter. Adjust to use it.
9237 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9238 parameter regs_info. Adjust to use it.
9239 (linux_fetch_registers): Get the current inferior's regs_info, and
9240 adjust to use it.
9241 (linux_store_registers): Ditto.
9242 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9243 (initialize_low): Don't initialize the target_regsets here. Call
9244 initialize_low_arch.
9245 * linux-low.h (target_regsets): Delete declaration.
9246 (struct regsets_info): New.
9247 (struct usrregs_info): New.
9248 (struct regs_info): New.
9249 (struct process_info_private) <new_inferior>: New field.
9250 (struct linux_target_ops): Delete the num_regs, regmap, and
9251 regset_bitmap fields. New field regs_info.
9252 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9253 * i387-fp.c (num_xmm_registers): Delete.
9254 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9255 calls to new interface.
9256 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9257 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9258 Infer the number of xmm registers from the regcache's target
9259 description.
9260 * i387-fp.h (num_xmm_registers): Delete.
9261 * inferiors.c (add_thread): Don't install the thread's regcache
9262 here.
9263 * proc-service.c (gregset_info): Fetch the current inferior's
9264 regs_info. Adjust to use it.
9265 * regcache.c: Include tdesc.h.
9266 (register_bytes, reg_defs, num_registers)
9267 (gdbserver_expedite_regs): Delete.
9268 (get_thread_regcache): If the thread doesn't have a regcache yet,
9269 create one, instead of aborting gdbserver.
9270 (regcache_invalidate_one): Rename to ...
9271 (regcache_invalidate_thread): ... this.
9272 (regcache_invalidate_one): New.
9273 (regcache_invalidate): Only invalidate registers of the current
9274 process.
9275 (init_register_cache): Add target_desc parameter, and use it.
9276 (new_register_cache): Ditto. Assert the target description has a
9277 non zero registers_size.
9278 (regcache_cpy): Add assertions. Adjust.
9279 (realloc_register_cache, set_register_cache): Delete.
9280 (registers_to_string, registers_from_string): Adjust.
9281 (find_register_by_name, find_regno, find_register_by_number)
9282 (register_cache_size): Add target_desc parameter, and use it.
9283 (free_register_cache_thread, free_register_cache_thread_one)
9284 (regcache_release, register_cache_size): New.
9285 (register_size): Add target_desc parameter, and use it.
9286 (register_data, supply_register, supply_register_zeroed)
9287 (supply_regblock, supply_register_by_name, collect_register)
9288 (collect_register_as_string, collect_register_by_name): Adjust.
9289 * regcache.h (struct target_desc): Forward declare.
9290 (struct regcache) <tdesc>: New field.
9291 (init_register_cache, new_register_cache): Add target_desc
9292 parameter.
9293 (regcache_invalidate_thread): Declare.
9294 (regcache_invalidate_one): Delete declaration.
9295 (regcache_release): Declare.
9296 (find_register_by_number, register_cache_size, register_size)
9297 (find_regno): Add target_desc parameter.
9298 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9299 declarations.
9300 * remote-utils.c: Include tdesc.h.
9301 (outreg, prepare_resume_reply): Adjust.
9302 * server.c: Include tdesc.h.
9303 (gdbserver_xmltarget): Delete declaration.
9304 (get_features_xml, process_serial_event): Adjust.
9305 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9306 declare.
9307 (struct process_info) <tdesc>: New field.
9308 (ipa_tdesc): Declare.
9309 * tdesc.c: New file.
9310 * tdesc.h: New file.
9311 * tracepoint.c: Include tdesc.h.
9312 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9313 (get_context_regcache): Adjust to pass ipa_tdesc down.
9314 (do_action_at_tracepoint): Adjust to get the register cache size
9315 from the context regcache's description.
9316 (traceframe_walk_blocks): Adjust to get the register cache size
9317 from the current trace frame's description.
9318 (traceframe_get_pc): Adjust to get current trace frame's
9319 description and pass it down.
9320 (gdb_collect): Adjust to get the register cache size from the
9321 IPA's description.
9322 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9323 (gdbserver_xmltarget): Delete.
9324 (initialize_low_tracepoint): Set the ipa's target description.
9325 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9326 (initialize_low_tracepoint): Set the ipa's target description.
9327 * linux-x86-low.c: Include tdesc.h.
9328 [__x86_64__] (is_64bit_tdesc): New.
9329 (ps_get_thread_area, x86_get_thread_area): Use it.
9330 (i386_cannot_store_register): Rename to ...
9331 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9332 (i386_cannot_fetch_register): Rename to ...
9333 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9334 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9335 to new interface.
9336 (target_regsets): Rename to ...
9337 (x86_regsets): ... this.
9338 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9339 interface.
9340 (x86_siginfo_fixup): Use is_64bit_tdesc.
9341 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9342 (tdesc_x32_avx_linux, tdesc_x32_linux)
9343 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9344 Declare.
9345 (x86_linux_update_xmltarget): Delete.
9346 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9347 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9348 (AMD64_LINUX_USER64_CS): New.
9349 (x86_linux_read_description): New, based on
9350 x86_linux_update_xmltarget.
9351 (same_process_callback): New.
9352 (x86_arch_setup_process_callback): New.
9353 (x86_linux_update_xmltarget): New.
9354 (x86_regsets_info): New.
9355 (amd64_linux_regs_info): New.
9356 (i386_linux_usrregs_info): New.
9357 (i386_linux_regs_info): New.
9358 (x86_linux_regs_info): New.
9359 (x86_arch_setup): Reimplement.
9360 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9361 (x86_emit_ops): Ditto.
9362 (the_low_target): Adjust. Install x86_linux_regs_info,
9363 x86_cannot_fetch_register, and x86_cannot_store_register.
9364 (initialize_low_arch): New.
9365 * linux-ia64-low.c (tdesc_ia64): Declare.
9366 (ia64_fetch_register): Adjust.
9367 (ia64_usrregs_info, regs_info): New globals.
9368 (ia64_regs_info): New function.
9369 (the_low_target): Adjust.
9370 (initialize_low_arch): New function.
9371 * linux-sparc-low.c (tdesc_sparc64): Declare.
9372 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9373 Adjust.
9374 (sparc_arch_setup): New function.
9375 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9376 (the_low_target): Adjust.
9377 (initialize_low_arch): New function.
9378 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9379 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9380 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9381 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9382 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9383 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9384 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9385 (tdesc_powerpc_isa205_vsx64l): Declare.
9386 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9387 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9388 (ppc_set_pc, ppc_get_hwcap): Adjust.
9389 (ppc_usrregs_info): Forward declare.
9390 (!__powerpc64__) ppc_regmap_adjusted: New global.
9391 (ppc_arch_setup): Adjust to the current process'es target
9392 description.
9393 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9394 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9395 (ppc_store_evrregset): Adjust.
9396 (target_regsets): Rename to ...
9397 (ppc_regsets): ... this, and make static.
9398 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9399 (ppc_regs_info): New function.
9400 (the_low_target): Adjust.
9401 (initialize_low_arch): New function.
9402 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9403 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9404 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9405 (tdesc_s390x_linux64v2): Declare.
9406 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9407 (s390_fill_gregset, s390_store_last_break): Adjust.
9408 (target_regsets): Rename to ...
9409 (s390_regsets): ... this, and make static.
9410 (s390_get_pc, s390_set_pc): Adjust.
9411 (s390_get_hwcap): New target_desc parameter, and use it.
9412 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9413 (s390_arch_setup): Adjust to set the current process'es target
9414 description. Don't adjust the regmap.
9415 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9416 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9417 (regs_info_3264): New globals.
9418 (s390_regs_info): New function.
9419 (the_low_target): Adjust.
9420 (initialize_low_arch): New function.
9421 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9422 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9423 [__mips64] (init_registers_mips_linux)
9424 (init_registers_mips_dsp_linux): Delete defines.
9425 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9426 (have_dsp): New global.
9427 (mips_read_description): New, based on mips_arch_setup.
9428 (mips_arch_setup): Reimplement.
9429 (get_usrregs_info): New function.
9430 (mips_cannot_fetch_register, mips_cannot_store_register)
9431 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9432 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9433 (target_regsets): Rename to ...
9434 (mips_regsets): ... this, and make static.
9435 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9436 (dsp_regs_info, regs_info): New globals.
9437 (mips_regs_info): New function.
9438 (the_low_target): Adjust.
9439 (initialize_low_arch): New function.
9440 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9441 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9442 Declare.
9443 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9444 (arm_read_description): New, with bits factored from
9445 arm_arch_setup.
9446 (arm_arch_setup): Reimplement.
9447 (target_regsets): Rename to ...
9448 (arm_regsets): ... this, and make static.
9449 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9450 (arm_regs_info): New function.
9451 (the_low_target): Adjust.
9452 (initialize_low_arch): New function.
9453 * linux-m68k-low.c (tdesc_m68k): Declare.
9454 (target_regsets): Rename to ...
9455 (m68k_regsets): ... this, and make static.
9456 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9457 (m68k_regs_info): New function.
9458 (m68k_arch_setup): New function.
9459 (the_low_target): Adjust.
9460 (initialize_low_arch): New function.
9461 * linux-sh-low.c (tdesc_sharch): Declare.
9462 (target_regsets): Rename to ...
9463 (sh_regsets): ... this, and make static.
9464 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9465 (sh_regs_info, sh_arch_setup): New functions.
9466 (the_low_target): Adjust.
9467 (initialize_low_arch): New function.
9468 * linux-bfin-low.c (tdesc_bfin): Declare.
9469 (bfin_arch_setup): New function.
9470 (bfin_usrregs_info, regs_info): New globals.
9471 (bfin_regs_info): New function.
9472 (the_low_target): Adjust.
9473 (initialize_low_arch): New function.
9474 * linux-cris-low.c (tdesc_cris): Declare.
9475 (cris_arch_setup): New function.
9476 (cris_usrregs_info, regs_info): New globals.
9477 (cris_regs_info): New function.
9478 (the_low_target): Adjust.
9479 (initialize_low_arch): New function.
9480 * linux-cris-low.c (tdesc_crisv32): Declare.
9481 (cris_arch_setup): New function.
9482 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9483 (cris_regs_info): New function.
9484 (the_low_target): Adjust.
9485 (initialize_low_arch): New function.
9486 * linux-m32r-low.c (tdesc_m32r): Declare.
9487 (m32r_arch_setup): New function.
9488 (m32r_usrregs_info, regs_info): New globals.
9489 (m32r_regs_info): Adjust.
9490 (initialize_low_arch): New function.
9491 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9492 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9493 (tic6x_usrregs_info): Forward declare.
9494 (tic6x_read_description): New function, based on ...
9495 (tic6x_arch_setup): ... this. Reimplement.
9496 (target_regsets): Rename to ...
9497 (tic6x_regsets): ... this, and make static.
9498 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9499 (tic6x_regs_info): New function.
9500 (the_low_target): Adjust.
9501 (initialize_low_arch): New function.
9502 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9503 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9504 (target_regsets): Rename to ...
9505 (xtensa_regsets): ... this, and make static.
9506 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9507 globals.
9508 (xtensa_arch_setup, xtensa_regs_info): New functions.
9509 (the_low_target): Adjust.
9510 (initialize_low_arch): New function.
9511 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9512 (nios2_arch_setup): Set the current process'es tdesc.
9513 (target_regsets): Rename to ...
9514 (nios2_regsets): ... this.
9515 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9516 (nios2_regs_info): New function.
9517 (the_low_target): Adjust.
9518 (initialize_low_arch): New function.
a261b8f5
PA
9519 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9520 (aarch64_arch_setup): Set the current process'es tdesc.
9521 (target_regsets): Rename to ...
9522 (aarch64_regsets): ... this.
9523 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9524 (aarch64_regs_info): New function.
9525 (the_low_target): Adjust.
9526 (initialize_low_arch): New function.
3aee8918
PA
9527 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9528 globals.
9529 (target_regsets): Rename to ...
9530 (tile_regsets): ... this.
9531 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9532 (tile_regs_info): New function.
9533 (tile_arch_setup): Set the current process'es tdesc.
9534 (the_low_target): Adjust.
9535 (initialize_low_arch): New function.
9536 * spu-low.c (tdesc_spu): Declare.
9537 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9538 * win32-arm-low.c (tdesc_arm): Declare.
9539 (arm_arch_setup): New function.
9540 (the_low_target): Install arm_arch_setup instead of
9541 init_registers_arm.
9542 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9543 (init_windows_x86): Rename to ...
9544 (i386_arch_setup): ... this. Set `win32_tdesc'.
9545 (the_low_target): Adjust.
9546 * win32-low.c (win32_tdesc): New global.
9547 (child_add_thread): Don't create the thread cache here.
9548 (do_initial_child_stuff): Set the new process'es tdesc.
9549 * win32-low.h (struct target_desc): Forward declare.
9550 (win32_tdesc): Declare.
9551 * lynx-i386-low.c (tdesc_i386): Declare global.
9552 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9553 * lynx-low.c (lynx_tdesc): New global.
9554 (lynx_add_process): Set the new process'es tdesc.
9555 * lynx-low.h (struct target_desc): Forward declare.
9556 (lynx_tdesc): Declare global.
9557 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9558 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9559 * nto-low.c (nto_tdesc): New global.
9560 (do_attach): Set the new process'es tdesc.
9561 * nto-low.h (struct target_desc): Forward declare.
9562 (nto_tdesc): Declare.
9563 * nto-x86-low.c (tdesc_i386): Declare.
9564 (nto_x86_arch_setup): Set `nto_tdesc'.
9565
b1fbec62
GB
95662013-06-04 Gary Benson <gbenson@redhat.com>
9567
9568 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9569 to qSupported response when appropriate.
9570 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9571 with nonzero-length annex.
9572 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9573 arguments supplied in annex.
9574
d1ec4ce7
DE
95752013-05-31 Doug Evans <dje@google.com>
9576
ac44adcb 9577 PR server/15594
d1ec4ce7
DE
9578 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9579 64 bits in 64-cross-32 environment.
9580
9b25f2d3
PA
95812013-05-28 Pedro Alves <palves@redhat.com>
9582
9583 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9584 (aarch64-without-fpu.c): Delete rule.
9585 * configure.srv (aarch64*-*-linux*): Remove references to
9586 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9587 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9588 declaration.
9589
6740dc9c
PA
95902013-05-24 Pedro Alves <palves@redhat.com>
9591
9592 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9593 instead of strchr/decode_address. Error if the range isn't split
9594 with a ','. Don't assume there's be a ':' in the action.
9595
c2d6af84
PA
95962013-05-23 Yao Qi <yao@codesourcery.com>
9597 Pedro Alves <palves@redhat.com>
9598
9599 * linux-low.c (lwp_in_step_range): New function.
9600 (linux_wait_1): If the thread was range stepping and stopped
9601 outside the stepping range, report the stop to GDB. Otherwise,
9602 continue stepping. Add range stepping debug output.
9603 (linux_set_resume_request): Copy the step range from the resume
9604 request to the lwp.
9605 (linux_supports_range_stepping): New.
9606 (linux_target_ops) <supports_range_stepping>: Set to
9607 linux_supports_range_stepping.
9608 * linux-low.h (struct linux_target_ops)
9609 <supports_range_stepping>: New field.
9610 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9611 * linux-x86-low.c (x86_supports_range_stepping): New.
9612 (the_low_target) <supports_range_stepping>: Set to
9613 x86_supports_range_stepping.
9614 * server.c (handle_v_cont): Handle 'r' action.
9615 (handle_v_requests): Append ";r" if the target supports range
9616 stepping.
9617 * target.h (struct thread_resume) <step_range_start,
9618 step_range_end>: New fields.
9619 (struct target_ops) <supports_range_stepping>:
9620 New field.
9621 (target_supports_range_stepping): New macro.
9622
58794e1a
JB
96232013-05-17 Joel Brobecker <brobecker@adacore.com>
9624
9625 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9626 confusion in comment.
9627
d631c5a7
JB
96282013-05-17 Joel Brobecker <brobecker@adacore.com>
9629
9630 * lynx-low.c (struct process_info_private): New type.
9631 (lynx_add_process): New function.
9632 (lynx_create_inferior, lynx_attach): Replace calls to
9633 add_process by calls to lynx_add_process.
9634 (lynx_resume): If PTID is null, then try using
9635 current_process()->private->last_wait_event_ptid.
9636 Add comments.
9637 (lynx_clear_inferiors): Delete. The contents of that function
9638 has been inlined in lynx_mourn;
9639 (lynx_wait_1): Save the ptid in the process's private data.
9640 (lynx_mourn): Free the process' private data. Replace call
9641 to lynx_clear_inferiors by call to clear_inferiors.
9642
96f7a20f
YQ
96432013-05-17 Yao Qi <yao@codesourcery.com>
9644
9645 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9646 the right place.
9647
db0dfaa0
LM
96482013-05-16 Luis Machado <lgustavo@codesourcery.com>
9649
9650 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9651 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9652 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9653 PT_TEXT_END_ADDR guards. Update comments.
9654 (linux_target_op) <read_offsets>: Conditionally define to
9655 linux_read_offsets if the target is UCLIBC and if it defines
9656 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9657
68f5f838
SL
96582013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9659 Andrew Jenner <andrew@codesourcery.com>
9660
9661 * Makefile.in (SFILES): Add linux-nios2-low.c.
9662 (clean): Add action to delete nios2-linux.c.
9663 (nios2-linux.c): New rule.
9664 * configure.srv: Add nios2*-*-linux*.
9665 * linux-nios2-low.c: New.
9666
1ebff1fd
HAQ
96672013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9668
9669 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9670
f6150862
HZ
96712013-04-25 Hui Zhu <hui@codesourcery.com>
9672
9673 PR gdb/15186
f6150862
HZ
9674 * ax.c (ax_printf): Add fflush.
9675
614c279d
TT
96762013-04-22 Tom Tromey <tromey@redhat.com>
9677
9678 * Makefile.in (SFILES): Add filestuff.c.
9679 (OBS): Add filestuff.o.
9680 (filestuff.o): New target.
9681 * config.in, configure: Rebuild.
9682 * configure.ac: Check for fdwalk, pipe2.
9683
7d4e5717
PA
96842013-04-17 Pedro Alves <palves@redhat.com>
9685
9686 * configure.ac (USE_THREAD_DB): Delete variable.
9687 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9688 Don't AC_SUBST USE_THREAD_DB.
9689 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9690 * config.in, configure: Regenerate.
9691
d5c93e41
PA
96922013-04-16 Pedro Alves <palves@redhat.com>
9693
9694 * linux-low.h (struct lwp_info) <thread_known>: Move under
9695 the USE_THREAD_DB #ifdef.
9696
04f5fe89
PA
96972013-04-16 Pedro Alves <palves@redhat.com>
9698
9699 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9700 (linux-low.o): Delete rule.
9701 * linux-low.h: Always include "gdb_thread_db.h" instead of
9702 conditionally including thread_db.h.
9703 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9704 HAVE_THREAD_DB_H.
9705
480b27bf
JK
97062013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9707
9708 * Makefile.in (install-only): Fix make install regression.
9709
43662968
JK
97102013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9711
9712 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9713 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9714 installation.
9715 * gdbserver.1: Remove.
9716
3e74e146
PA
97172013-03-22 Pedro Alves <palves@redhat.com>
9718
9719 * linux-low.c (handle_extended_wait): Don't call
9720 linux_enable_event_reporting.
9721
a8347a2a
TT
97222013-03-15 Tony Theodore <tonyt@logyst.com>
9723
9724 PR build/9098:
9725 * Makefile.in (SHELL): Use @SHELL@.
9726
eeb56fa7
SDJ
97272013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9728
9729 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9730 compiler warning.
9731
4fa7e2ff
JB
97322013-03-13 Joel Brobecker <brobecker@adacore.com>
9733
9734 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9735 Remove extraneous NULL element.
9736
8ddb1965
YQ
97372013-03-13 Yao Qi <yao@codesourcery.com>
9738
9739 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9740 'V' block in trace frame.
9741
9accd112
MM
97422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9743
9744 * target.h (struct target_ops): Add btrace ops.
9745 (target_supports_btrace): New macro.
9746 (target_enable_btrace): New macro.
9747 (target_disable_btrace): New macro.
9748 (target_read_btrace): New macro.
9749 * gdbthread.h (struct thread_info): Add btrace field.
9750 * server.c: Include btrace-common.h.
9751 (handle_btrace_general_set): New function.
9752 (handle_btrace_enable): New function.
9753 (handle_btrace_disable): New function.
9754 (handle_general_set): Call handle_btrace_general_set.
9755 (handle_qxfer_btrace): New function.
9756 (struct qxfer qxfer_packets[]): Add btrace entry.
9757 * inferiors.c (remove_thread): Disable btrace.
9758 * linux-low: Include linux-btrace.h.
9759 (linux_low_enable_btrace): New function.
9760 (linux_low_read_btrace): New function.
9761 (linux_target_ops): Add btrace ops.
9762 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9763 Add srv_linux_btrace=yes.
9764 (x86_64-*-linux*): Add linux-btrace.o.
9765 Add srv_linux_btrace=yes.
9766 * configure.ac: Define HAVE_LINUX_BTRACE.
9767 * config.in: Regenerated.
9768 * configure: Regenerated.
9769
5cc22e4c
MM
97702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9771
9772 * server.c (handle_qxfer): Preserve error message if -3 is
9773 returned.
9774 (qxfer): Document the -3 return value.
9775
7c97f91e
MM
97762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9777
9778 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9779 (linux_btrace_h): New variable.
9780 (linux-btrace.o): New rule.
9781
be9a119c 97822013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
9783 Hafiz Abid Qadeer <abidh@codesourcery.com>
9784
9785 * tracepoint.c (trace_buffer_size): New global.
9786 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9787 (init_trace_buffer): Change to one-argument function. Allocate
9788 trace buffer memory.
9789 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9790 handle QTBuffer:size packet.
9791 (cmd_bigqtbuffer_size): New function.
9792 (initialize_tracepoint): Call init_trace_buffer with
9793 DEFAULT_TRACE_BUFFER_SIZE.
9794 * server.c (handle_query): Add QTBuffer:size in the
9795 supported packets.
9796
e64f7499
YQ
97972013-03-07 Yao Qi <yao@codesourcery.com>
9798
9799 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9800 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9801 of -1.
9802 (cmd_qtsp): Adjust condition. Do post increment.
9803 Set cur_action and cur_step_action back to 0.
9804
f0ae6fc3
PA
98052013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9806
9807 PR server/15236
9808 * linux-low.c (linux_write_memory): Return early success if LEN is
9809 zero.
9810
b5b0b0af
CV
98112013-03-05 Corinna Vinschen <vinschen@redhat.de>
9812
334ad4a8 9813 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 9814
589bc927
TT
98152013-02-28 Tom Tromey <tromey@redhat.com>
9816
9817 * configure.ac: Invoke AC_SYS_LARGEFILE.
9818 * configure, config.in: Rebuild.
9819
dfe07582
CV
98202013-02-28 Corinna Vinschen <vinschen@redhat.com>
9821
9822 * win32-low.c: Throughout, fix format strings and casts of
9823 printf-like functions to avoid type related warnings on all
9824 platforms.
9825 (get_child_debug_event): Print dwDebugEventCode as hex since
9826 that's how it's usually documented.
9827
736cd585
YQ
98282013-02-28 Yao Qi <yao@codesourcery.com>
9829
9830 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9831 pulongest.
9832
e1f58301
JW
98332013-02-27 Jiong Wang <jiwang@tilera.com>
9834
9835 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9836 (reg-tilegx32.c): New rule.
9837 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9838 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9839 different register info initializer according to elf class.
9840 (init_registers_tilgx32): New function. The tilegx32 register info
9841 initializer.
9842 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9843 (tile_store_gregset): Likewise.
9844
d171ca78
YQ
98452013-02-27 Yao Qi <yao@codesourcery.com>
9846
9847 * server.c (process_point_options): Print debug message when
9848 debug_threads is true.
9849
282bbdf3
YQ
98502013-02-26 Yao Qi <yao@codesourcery.com>
9851
9852 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9853
aca22551
PA
98542013-02-19 Pedro Alves <palves@redhat.com>
9855 Kai Tietz <ktietz@redhat.com>
9856
9857 PR gdb/15161
9858
9859 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9860 instead of strtoul to extract address from packet.
9861 (process_serial_event) <'z'>: Likewise.
9862
4f3cee1c
YQ
98632013-02-18 Yao Qi <yao@codesourcery.com>
9864
9865 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9866
8e1d55a3
PA
98672013-02-14 Pedro Alves <palves@redhat.com>
9868
9869 Plug memory leak.
9870
9871 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9872 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9873
458820da
PA
98742013-02-14 Pedro Alves <palves@redhat.com>
9875
9876 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9877
baea0dae
PA
98782013-02-14 Pedro Alves <palves@redhat.com>
9879
9880 * tracepoint.c (save_string): Delete.
9881 (add_tracepoint_action): Use savestring instead of save_string.
9882
0b1afbb3
PA
98832013-02-12 Pedro Alves <palves@redhat.com>
9884
9885 * linux-xtensa-low.c: Ditto.
9886 * xtensa-xtregs.c: Ditto.
9887
8a4ac37e
PA
98882013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9889
9890 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9891 thread_db.
9892
148de6bb
MS
98932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9894
9895 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9896 aarch64_num_wp_regs and aarch64_num_bp_regs to
9897 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9898
55fac6e0
MS
98992013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9900
9901 * linux-aarch64-low.c (ps_get_thread_area): Replace
9902 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9903
176eb98c
MS
99042013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9905 Marcus Shawcroft <marcus.shawcroft@arm.com>
9906 Nigel Stephens <nigel.stephens@arm.com>
9907 Yufeng Zhang <yufeng.zhang@arm.com>
9908
9909 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9910 (aarch64.c, aarch64-without-fpu.c): New targets.
9911 * configure.srv (aarch64*-*-linux*): New.
9912 * linux-aarch64-low.c: New file.
9913
56f7af9c
MS
99142013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9915
43aaf8b6 9916 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
9917 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9918 (dequeue_one_deferred_signal, linux_resume_one_thread)
9919 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9920 (linux_tracefork_grandchild, linux_test_for_tracefork)
9921 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9922 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9923 where the argument is 0.
9924
60f662b0
YQ
99252013-01-25 Yao Qi <yao@codesourcery.com>
9926
9927 * event-loop.c: Include "queue.h".
9928 (gdb_event_p): New typedef.
9929 (struct gdb_event) <next_event>: Remove.
9930 (event_queue): Change to QUEUE(gdb_event_p).
9931 (async_queue_event): Remove.
9932 (gdb_event_xfree): New.
9933 (initialize_event_loop): New.
9934 (process_event): Use API from QUEUE.
9935 (wait_for_event): Likewise.
9936 * server.c (main): Call initialize_event_loop.
9937 * server.h (initialize_event_loop): Declare.
9938
5ae4861a
YQ
99392013-01-18 Yao Qi <yao@codesourcery.com>
9940
9941 * ax.h (struct eval_agent_expr_context): New.
9942 (gdb_eval_agent_expr): Update declaration.
9943 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9944 TFRAME. Add new argument CTX.
9945 * server.h (struct eval_agent_expr_context): Declare.
9946 (agent_mem_read, agent_tsv_read): Update declaration.
9947 (agent_mem_read_string): Likewise.
9948 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9949 (add_traceframe_block): Add new argument TPOINT.
9950 Increase TPOINT->traceframe_usage.
9951 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9952 eval_tracepoint_agent_expr.
9953 (condition_true_at_tracepoint): Likewise.
9954 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9955 (agent_mem_read_string, agent_tsv_read): Likewise.
9956
85e00e85
YQ
99572013-01-16 Yao Qi <yao@codesourcery.com>
9958
9959 * linux-low.c (linux_resume_one_lwp): Don't check
9960 'lwp->bp_reinsert != 0'.
9961
4039cf45
JB
99622013-01-07 Joel Brobecker <brobecker@adacore.com>
9963 Pedro Alves <palves@redhat.com>
9964
9965 * lynx-low.c (ptrace_request_to_str): Define a temporary
9966 macro and use it to simplify this function's implementation.
9967
9044dee2
JB
99682013-01-07 Joel Brobecker <brobecker@adacore.com>
9969
9970 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9971 sets errno.
9972
e6352c8f
JB
99732013-01-07 Joel Brobecker <brobecker@adacore.com>
9974
9975 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9976
50681a27
JB
99772013-01-07 Joel Brobecker <brobecker@adacore.com>
9978
9979 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9980
3f6e77ef
JB
99812013-01-07 Joel Brobecker <brobecker@adacore.com>
9982
9983 * lynx-low.c (lynx_resume): Use the resume_info parameter
9984 to determine the ptid for the lynx_ptrace call, unless
9985 it is equal to minus_one_ptid, in which case we use the
9986 ptid of the current_inferior.
9987 (lynx_wait_1): After having received a thread create/exit
9988 event, resume the inferior's execution using the signaling
9989 thread's ptid, rather than the old ptid.
9990
7fda33ae
JB
99912013-01-07 Joel Brobecker <brobecker@adacore.com>
9992
9993 * lynx-low.c (lynx_resume): Delete variable ret.
9994
b9786c74
JB
99952013-01-01 Joel Brobecker <brobecker@adacore.com>
9996
9997 * gdbreplay.c (gdbreplay_version): Update copyright year.
9998 * server.c (gdbserver_version): Likewise.
9999
8b93d60f
JB
100002012-12-17 Joel Brobecker <brobecker@adacore.com>
10001
10002 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10003 new thread.
10004
037335a7
JB
100052012-12-17 Joel Brobecker <brobecker@adacore.com>
10006
10007 * lynx-low.c (ptrace_request_to_str): Add handling for
10008 PTRACE_GETTRACESIG.
10009
52d4cbd8
JB
100102012-12-17 Joel Brobecker <brobecker@adacore.com>
10011
10012 * lynx-low.c (lynx_attach): Delete variable new_process.
10013
ab8f6ca9
JB
100142012-12-17 Joel Brobecker <brobecker@adacore.com>
10015
10016 * lynx-low.c (lynx_create_inferior): Delete variable
10017 new_process.
10018
78cbc024
JB
100192012-12-17 Joel Brobecker <brobecker@adacore.com>
10020
10021 * lynx-low.c (ptrace_request_to_str): Do not handle
10022 PTRACE_GETTHREADLIST if this macro does not exist.
10023
14a00470
YQ
100242012-12-15 Yao Qi <yao@codesourcery.com>
10025
10026 * Makefile.in (OBS): Add notif.o.
10027 * notif.c, notif.h: New.
10028 * server.c: Include "notif.h".
10029 (struct vstop_notif) <next>: Remove.
10030 <base>: New field.
10031 (queue_stop_reply): Update.
10032 (push_event, send_next_stop_reply): Remove.
10033 (discard_queued_stop_replies): Update.
10034 (notif_stop): New variable.
10035 (handle_v_stopped): Remove.
10036 (handle_v_requests): Don't call handle_v_stopped. Call
10037 handle_ack_notif instead.
10038 (queue_stop_reply_callback): Call notif_event_enque instead
10039 of queue_stop_reply.
10040 (handle_status): Don't call send_next_stop_reply, call
10041 notif_write_event instead.
10042 (kill_inferior_callback): Likewise.
10043 (detach_or_kill_inferior_callback): Likewise.
10044 (main): Call initialize_notif.
10045 (process_serial_event): Call QUEUE_is_empty.
10046 (handle_target_event): Call notif_push instead of push event.
10047 * server.h (push_event): Remove declaration.
10048
61c125b9
TT
100492012-12-10 Tom Tromey <tromey@redhat.com>
10050
10051 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10052 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10053 macros.
10054 (.c.o): Rewrite.
10055 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10056 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10057 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10058 (amd64-linux-ipa.o, ax.o): Rewrite.
10059 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10060 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10061 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10062 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10063 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10064 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10065 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10066 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10067 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10068 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10069 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10070 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10071 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10072 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10073 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10074 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10075 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10076 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10077 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10078 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10079 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10080 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10081 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10082 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10083 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10084 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10085 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10086 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10087 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10088 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10089 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10090 (reg-tilegx.o): Remove.
10091 (all_object_files): New macro.
10092 Include .deps files.
10093 * aclocal.m4, configure: Rebuild.
10094 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10095 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10096 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10097
e90e9ad9
TT
100982012-12-05 Tom Tromey <tromey@redhat.com>
10099
10100 PR gdb/14917:
10101 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10102
02d403bf 101032012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
10104
10105 * configure.ac: Check for linux/perf_event.h.
10106 * config.in: Regenerated.
10107 * configure: Regenerated.
10108
0270a750
PA
101092012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10110
10111 * hostio.c (handle_readlink): Decrease buffer size
10112 parameter passed to readlink by one byte.
10113
8c29b58e
YQ
101142012-11-26 Yao Qi <yao@codesourcery.com>
10115
10116 * configure.ac (build_warnings): Append '-Wempty-body'.
10117 * configure: Regenerated.
10118 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10119 body.
10120
8bdce1ff
PM
101212012-11-15 Pierre Muller <muller@sourceware.org>
10122
10123 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10124 * config.in: Regenerate.
10125 * configure: Regenerate.
10126 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10127 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10128 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10129 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10130 header.
10131 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10132 instead of <sys/wait.h> header.
10133 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10134
02d403bf 101352012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
10136
10137 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10138 (various make rules): Remove -DGDBSERVER
10139
fbd5db48
YQ
101402012-11-09 Yao Qi <yao@codesourcery.com>
10141
10142 * spu-low.c (current_ptid): Move it to ..
10143 * gdbthread.h: ... here. New.
10144 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10145 * server.c (myresume, process_serial_event): Likewise.
10146 * thread-db.c (thread_db_find_new_threads): Likewise.
10147 * tracepoint.c (run_inferior_command): Likewise.
10148
b3dc46ff
AB
101492012-10-01 Andrew Burgess <aburgess@broadcom.com>
10150
10151 * server.c (handle_search_memory_1): Include access length in
10152 warning message.
10153
07c04788
HPN
101542012-09-05 Michael Brandt <michael.brandt@axis.com>
10155
10156 * linux-crisv32-low.c: Fix compile errors.
10157
918d227b
YQ
101582012-09-04 Yao Qi <yao@codesourcery.com>
10159
10160 * tracepoint.c (cmd_qtsv): Adjust debug message.
10161 Don't check CUR_TPOINT.
10162
18c1b81a
YQ
101632012-08-28 Yao Qi <yao@codesourcery.com>
10164
10165 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10166 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10167 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10168 Remove declarations of xmalloc, xreallloc, xstrdup and
10169 freeargv.
10170 * Makefile.in (libiberty_h): New.
10171 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10172 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10173
dc82f37b
YQ
101742012-08-23 Yao Qi <yao@codesourcery.com>
10175
10176 * server.h: Remove declaration of 'xsnprintf'.
10177
406b1477
KS
101782012-08-22 Keith Seitz <keiths@redhat.com>
10179
10180 * server.h: Include build-gnulib-gbserver/config.h.
10181 * gdbreplay.c: Likewise.
10182
e6712ff1
DE
101832012-08-08 Doug Evans <dje@google.com>
10184
10185 * Makefile.in (SFILES): Add gdb_vecs.c.
10186 (OBS): Add gdb_vecs.o.
10187 (gdb_vecs_h, host_defs_h): New variables.
10188 (thread-db.o): Add $(gdb_vecs_h) dependency.
10189 (gdb_vecs.o): New rule.
10190 * thread-db.c: #include "gdb_vecs.h".
10191 (thread_db_load_search): Use a vector to iterate over path elements.
10192 Handle text appearing after "$pdir".
10193
10194 * configure.ac: Add check for strstr.
10195 * config.in: Regenerate.
10196 * configure: Regenerate.
10197
7c3270ae
UW
101982012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10199
10200 * hostio.c (handle_pread): If pread fails, fall back to attempting
10201 lseek/read.
10202 (handle_pwrite): Likewise for pwrite.
10203
b62e2b27
UW
102042012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10205
10206 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10207 between unsupported TYPE and unimplementable ADDR/LEN combination.
10208 (arm_insert_point): Act on new return value.
10209
78a99e91
PA
102102012-07-31 Pedro Alves <palves@redhat.com>
10211
10212 * server.c (process_point_options): Only skip tokens if we find
10213 one that is unrecognized. Don't treat 'X' specially while
10214 skipping unrecognized tokens.
10215
fcf303ab
UW
102162012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10217
10218 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10219 to 4-byte-align HW breakpoint addresses for Thumb.
10220
7255706c
YQ
102212012-07-27 Yao Qi <yao@codesourcery.com>
10222
10223 PR remote/14161.
10224
10225 * server.h: Declare gdb_agent_about_to_close.
10226 * target.c (kill_inferior): Include "agent.h".
10227 New. Send command 'kill'.
10228 * target.h (kill_inferior): Removed macro.
10229 * tracepoint.c (gdb_agent_about_to_close): New.
10230 (gdb_agent_helper_thread): Handle command 'close'.
10231 Wait endlessly until the inferior stops.
10232 Install gdb_agent_remove_socket to atexit hook.
10233 (agent_socket_name): New static variable.
10234 (gdb_agent_socket_init): Replace local variable 'name' with
10235 'agent_socket_name'.
10236 (gdb_agent_remove_socket): New.
10237
5a3f286f
YQ
102382012-07-27 Yao Qi <yao@codesourcery.com>
10239
10240 * server.c (process_point_options): Stop at 'X' when parsing.
10241
961bd387
ME
102422012-07-19 Michael Eager <eager@eagercon.com>
10243
a261b8f5 10244 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
10245 to hw_execute.
10246 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10247 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10248 hardware breakpoint.
10249
aa7c7447
JK
102502012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10251
10252 * gdbserver/linux-low.c (initialize_low): Call
10253 linux_ptrace_init_warnings.
10254
7f216e7c
DE
102552012-07-02 Doug Evans <dje@google.com>
10256
10257 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10258 pointer to int.
10259
d3ce09f5
SS
102602012-07-02 Stan Shebs <stan@codesourcery.com>
10261
10262 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10263 (ax.o): Add it to build rule.
10264 (ax-ipa.o): Ditto.
10265 (OBS): Add format.o.
10266 (IPA_OBS): Add format.o.
10267 * server.c (handle_query): Claim support for breakpoint commands.
10268 (process_point_options): Add command case.
10269 (process_serial_event): Leave running if there are printfs in
10270 effect.
10271 * mem-break.h (any_persistent_commands): Declare.
10272 (add_breakpoint_commands): Declare.
10273 (gdb_no_commands_at_breakpoint): Declare.
10274 (run_breakpoint_commands): Declare.
10275 * mem-break.c (struct point_command_list): New struct.
10276 (struct breakpoint): New field command_list.
10277 (any_persistent_commands): New function.
10278 (add_commands_to_breakpoint): New function.
10279 (add_breakpoint_commands): New function.
10280 (gdb_no_commands_at_breakpoint): New function.
10281 (run_breakpoint_commands): New function.
10282 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10283 locally.
10284 * ax.c: Include format.h.
10285 (ax_printf): New function.
10286 (gdb_eval_agent_expr): Add printf opcode.
10287
2f8f6aed
YQ
102882012-06-13 Yao Qi <yao@codesourcery.com>
10289
10290 * server.c (start_inferior): Remove duplicated writes to fields
10291 'last_resume_kind' and 'last_status' of 'current_inferior'.
10292
0c9070b3
YQ
102932012-06-12 Yao Qi <yao@codesourcery.com>
10294 Pedro Alves <palves@redhat.com>
10295
10296 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10297 comment.
10298 * server.c (handle_v_cont): Extend comment.
10299
c52daf70
YQ
103002012-06-11 Yao Qi <yao@codesourcery.com>
10301
10302 * linux-low.c (linux_attach): Add 'static'.
10303
d38bbb0a
YQ
103042012-06-06 Yao Qi <yao@codesourcery.com>
10305
10306 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10307
89dc0afd
JK
103082012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10309
10310 Fix gcc -flto compilation warning.
10311 * server.c (main): Make variable multi_mode and attach volatile.
10312
75f62ce7
TJB
103132012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10314
10315 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10316 if the platform doesn't know about it.
10317
65f479b6
PA
103182012-05-30 Jeff Kenton <jkenton@tilera.com>
10319
10320 * Makefile.in (SFILES): Add linux-tile-low.c.
10321 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10322 * configure.srv: Handle tilegx-*-linux*.
10323 * linux-tile-low.c: New file.
10324
0c5bf5a9
JK
103252012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10326
10327 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10328
a493e3e2
PA
103292012-05-24 Pedro Alves <palves@redhat.com>
10330
10331 PR gdb/7205
10332
43aaf8b6 10333 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 10334
2ea28649
PA
103352012-05-24 Pedro Alves <palves@redhat.com>
10336
10337 PR gdb/7205
10338
10339 Replace target_signal with gdb_signal throughout.
10340
8d409d16
MR
103412012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10342
10343 * linux-low.c (linux_store_registers): Avoid the copying sequence
10344 when no data has been retrieved by ptrace.
10345
23512c01
MGD
103462012-05-22 Will Deacon <will.deacon@arm.com>
10347
10348 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10349 Include asm/ptrace.h.
10350 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10351 already defined.
10352
4934b29e
MR
103532012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10354
10355 * linux-low.c (linux_store_registers): Don't re-retrieve data
10356 with ptrace that has already been obtained from /proc. Always
10357 copy any data retrieved with ptrace to the buffer supplied.
10358
bde24c0a
PA
103592012-05-11 Yao Qi <yao@codesourcery.com>
10360 Pedro Alves <palves@redhat.com>
10361
10362 * linux-low.c (enum stopping_threads_kind): New.
10363 (stopping_threads): Change type to `enum stopping_threads_kind'.
10364 (handle_extended_wait): If stopping and suspending threads, leave
10365 the new_lwp suspended too.
10366 (linux_wait_for_event): Adjust.
10367 (stop_all_lwps): Set `stopping_threads' to
10368 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10369 whether we're suspending threads or just stopping them. Assert no
10370 recursion happens.
10371
623b6bdf
YQ
103722012-04-29 Yao Qi <yao@codesourcery.com>
10373
10374 * server.h: Move some code to ...
10375 * gdbthread.h: ... here. New.
10376 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10377 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10378 (nto-low.o, win32-low.o): Likewise.
10379 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10380 * regcache.c, remote-utils.c, server.c: Likewise.
10381 * target.c, tracepoint.c, win32-low.c: Likewise.
10382
f15f9948
TJB
103832012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10384
10385 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10386 (PTRACE_ARG4_TYPE): Likewise.
10387 (PTRACE_XFER_TYPE): Likewise.
10388 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10389 ptrace to PTRACE_ARG3_TYPE.
10390 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10391 (PTRACE_ARG4_TYPE): Likewise.
10392 (PTRACE_XFER_TYPE): Likewise.
10393 (linux_detach_one_lwp): Cast fourth argument of
10394 ptrace to long then PTRACE_ARG4_TYPE.
10395 (regsets_fetch_inferior_registers): Cast third argument of
10396 ptrace to long then PTRACE_ARG3_TYPE.
10397 (regsets_store_inferior_registers): Likewise.
10398
38ea300a
PA
103992012-04-20 Pedro Alves <palves@redhat.com>
10400
10401 * configure: Regenerate.
10402
c971b7fa
PA
104032012-04-19 Pedro Alves <palves@redhat.com>
10404
43aaf8b6 10405 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 10406 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
10407 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10408 (all, install-only, uninstall, clean-info, all-lib, clean): No
10409 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10410 (maintainer-clean realclean distclean): Use subdir_do.
10411 (subdir_do): New.
10412 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 10413 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
10414 * acinclude.m4: Include acx_configure_dir.m4.
10415 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10416 calls. Call AC_PROG_RANLIB. Configure gnulib using
10417 ACX_CONFIGURE_DIR.
10418 (GNULIB): New.
10419 (GNULIB_STDINT_H): Adjust.
10420 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10421 * gdbreplay.c: Include build-gnulib/config.h.
10422 * server.h: Likewise.
10423 * aclocal.m4: Regenerate.
10424 * config.in: Regenerate.
10425 * configure: Regenerate.
c971b7fa 10426
809277f8
PA
104272012-04-19 Pedro Alves <palves@redhat.com>
10428
10429 * Makefile.in (LIBGNU, INCGNU): Adjust.
10430 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10431 (all, install-only, uninstall, clean-info, all-lib, clean)
10432 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10433 * configure.ac: Adjust AC_OUTPUT output.
10434 * aclocal.m4: Regenerate.
10435 * configure: Regenerate.
10436
fd9bb8b8
PA
104372012-04-19 Pedro Alves <palves@redhat.com>
10438
10439 * Makefile.in (generated_files): New.
10440 (server_h): Remove the explicit dependency on config.h, and depend
10441 on $generated_files.
10442
1c298c66
PA
104432012-04-19 Pedro Alves <palves@redhat.com>
10444
10445 * Makefile.in (INCGNU): Add -Ignulib.
10446
57c4b50b
PA
104472012-04-19 Pedro Alves <palves@redhat.com>
10448
10449 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10450 (INCGNU): ... this, and spell out -I here.
10451 (GNULIB_LIB): Rename to ...
10452 (LIBGNU): ... this.
10453 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10454
1030e047
PA
104552012-04-19 Pedro Alves <palves@redhat.com>
10456
10457 * config.in: Regenerate.
10458
447d4319
PA
104592012-04-19 Pedro Alves <palves@redhat.com>
10460
10461 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10462 * server.h (memmem): Remove declaration.
10463 * config.in: Regenerate.
10464 * configure: Regenerate.
10465
aad9eab9
YQ
104662012-04-19 Yao Qi <yao@codesourcery.com>
10467
10468 * Makefile.in (SFILES): Add common/vec.c.
10469 (OBS): Add vec.o.
10470 (vec.o): New rule.
10471
3e10640f
YQ
104722012-04-19 Yao Qi <yao@codesourcery.com>
10473
10474 * remote-utils.c (prepare_resume_reply): Replace with macro
10475 target_core_of_thread.
10476 * server.c (handle_qxfer_threads_proper): Likewise.
10477 * target.h (traget_core_of_thread): New macro.
10478
71622373
PA
104792012-04-18 Pedro Alves <palves@redhat.com>
10480
10481 * aclocal.m4: Regenerate.
10482 * configure: Regenerate.
10483
80d26939
YQ
104842012-04-16 Yao Qi <yao@codesourcery.com>
10485
10486 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10487 duplicated on address.
10488
42476b70
YQ
104892012-04-16 Yao Qi <yao@codesourcery.com>
10490
10491 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10492 (struct tracepoint_action_ops) <send>: New field.
10493 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10494 (agent_expr_send, x_tracepoint_action_send): New.
10495 (l_tracepoint_action_send): New.
10496 (cmd_qtdp): Download and install tracepoint
10497 according to `use_agent'.
10498 (run_inferior_command): Add one more parameter `len'.
10499 Update callers.
10500 (tracepoint_send_agent): New.
10501 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10502
7bc83639
YQ
105032012-04-16 Yao Qi <yao@codesourcery.com>
10504
10505 * tracepoint.c (download_tracepoints): Moved to ...
10506 (cmd_qtstart): ... here.
10507
5f18041e
YQ
105082012-04-14 Yao Qi <yao@codesourcery.com>
10509
10510 * tracepoint.c: Include inttypes.h.
10511 (struct collect_memory_action): Use sized types.
10512 (struct tracepoint): Likewise.
10513 (cmd_qtdp, stop_tracing): Update print specifiers.
10514 (cmd_qtp, response_tracepoint): Likewise.
10515 (collect_data_at_tracepoint): Likewise.
10516 (collect_data_at_step): Likewise.
10517
55a8c076
YQ
105182012-04-14 Yao Qi <yao@codesourcery.com>
10519
10520 Import gnulib module inttypes.
10521 * aclocal.m4, config.in, configure: Regenerated.
10522
dc750257
YQ
105232012-04-14 Yao Qi <yao@codesourcery.com>
10524
10525 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10526 Makefile and config.status at last.
10527
0ab5faf9
YQ
105282012-04-13 Yao Qi <yao@codesourcery.com>
10529
10530 * tracepoint.c: Include stdint.h unconditionally.
10531
18f5fd81
TJB
105322012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10533
10534 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10535 on BFD_HAVE_SYS_PROCFS_TYPE.
10536 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10537 * configure: Regenerate.
10538 * config.in: Likewise.
10539
4d47af5c
L
105402012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10541
10542 * Makefile.in (clean): Also remove x32.c x32-linux.c
10543 x32-avx.c x32-avx-linux.c.
10544 (x32.o): New target.
10545 (x32.c): Likewise.
10546 (x32-linux.o): Likewise.
10547 (x32-linux.c): Likewise.
10548 (x32-avx.o): Likewise.
10549 (x32-avx.c): Likewise.
10550 (x32-avx-linux.o): Likewise.
10551 (x32-avx-linux.c): Likewise.
10552
10553 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10554 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10555 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10556 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10557 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10558 i386/x32-avx-linux.xml.
10559
10560 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10561 (init_registers_x32_avx_linux): Likwise.
10562 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10563 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10564
ecedbe58
PA
105652012-04-13 Pedro Alves <palves@redhat.com>
10566
10567 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10568 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10569 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10570 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10571 the sub-make.
10572
c92b5177
L
105732012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10574
10575 * linux-x86-low.c (compat_x32_clock_t): New.
10576 (compat_x32_siginfo_t): Likewise.
10577 (compat_x32_siginfo_from_siginfo): Likewise.
10578 (siginfo_from_compat_x32_siginfo): Likewise.
10579 (linux_is_elf64): Likewise.
10580 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10581 and siginfo_from_compat_x32_siginfo for x32.
10582 (x86_arch_setup): Set linux_is_elf64.
10583
214d508e
L
105842012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10585
10586 PR gdb/13969
10587 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10588 e_machine field.
10589 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10590 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10591 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10592 compatible with process.
10593
c9a1864a
YQ
105942012-04-12 Yao Qi <yao@codesourcery.com>
10595
10596 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10597 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10598 (install-only, install-info, clean): Handle sub dir gnulib.
10599 (all-lib, am--refresh): New targets.
10600 (memmem.o): Remove target.
10601 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10602 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10603 (AC_REPLACE_FUNCS): Remove memmem.
10604 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10605 (AC_OUTPUT): Generate Makefile in gnulib/.
10606 * aclocal.m4, config.in, configure: Regenerated.
10607
367ba2c2
MR
106082012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10609
10610 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10611
9d236627
PA
106122012-04-05 Pedro Alves <palves@redhat.com>
10613
10614 -Werror=strict-aliasing
10615
10616 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10617 pointer.
10618
111217b3
PA
106192012-04-04 Pedro Alves <palves@redhat.com>
10620
10621 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10622 (sparc_store_gregset_from_stack, sparc_store_gregset)
10623 (sparc_breakpoint_at): Fix formatting.
10624
8365dcf5
TJB
106252012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10626
10627 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10628 are available.
10629 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10630 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10631 * config.in: Regenerate.
10632 * configure: Likewise.
10633
689cc2ae
PA
106342012-03-29 Pedro Alves <palves@redhat.com>
10635
10636 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10637 Correct ptrace arguments.
10638
c14dfd32
PA
106392012-03-28 Pedro Alves <palves@redhat.com>
10640
10641 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10642 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10643 (IA64_FR1_REGNUM): New defines.
10644 (ia64_fetch_register): New.
10645 (the_low_target): Install it.
10646 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10647 field.
10648 * linux-low.c (linux_fetch_registers): Try the
10649 the_low_target.fetch_register hook first.
10650
10651 * linux-arm-low.c (the_low_target): Adjust.
10652 * linux-bfin-low.c (the_low_target): Adjust.
10653 * linux-cris-low.c (the_low_target): Adjust.
10654 * linux-crisv32-low.c (the_low_target): Adjust.
10655 * linux-m32r-low.c (the_low_target): Adjust.
10656 * linux-m68k-low.c (the_low_target): Adjust.
10657 * linux-mips-low.c (the_low_target): Adjust.
10658 * linux-ppc-low.c (the_low_target): Adjust.
10659 * linux-s390-low.c (the_low_target): Adjust.
10660 * linux-sh-low.c (the_low_target): Adjust.
10661 * linux-sparc-low.c (the_low_target): Adjust.
10662 * linux-tic6x-low.c (the_low_target): Adjust.
10663 * linux-x86-low.c (the_low_target): Adjust.
10664 * linux-xtensa-low.c (the_low_target): Adjust.
10665
63c88e13
PA
106662012-03-26 Pedro Alves <palves@redhat.com>
10667
10668 * server.c (handle_qxfer_libraries): Don't bail early if
10669 the_target->qxfer_libraries_svr4 is not NULL.
10670
fb723180
PA
106712012-03-26 Pedro Alves <palves@redhat.com>
10672
10673 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10674
0afae3cf
PA
106752012-03-23 Pedro Alves <palves@redhat.com>
10676
10677 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10678 "library-list-svr4" element's start tag when the the DSO list is
10679 empty.
10680
485f1ee4
PA
106812012-03-23 Pedro Alves <palves@redhat.com>
10682
10683 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10684 a variable whose type size is the same as the inferior's pointer
10685 size.
10686
a5362b9a
TS
106872012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10688
10689 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10690 struct siginfo.
10691 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10692 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10693 * linux-low.h: Include <signal.h>.
10694 (struct siginfo): Remove forward declaration.
10695 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10696 struct siginfo.
10697
d226c142
MF
106982012-03-21 Mike Frysinger <vapier@gentoo.org>
10699
10700 * .gitignore: Ignore more files.
10701
122f36ef
PA
107022012-03-19 Pedro Alves <palves@redhat.com>
10703 Jan Kratochvil <jan.kratochvil@redhat.com>
10704
10705 * server.c (cont_thread, general_thread): Add describing comments.
10706 (start_inferior): Clear `cont_thread'.
10707 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10708 of a process.
10709
fc3e5175
YQ
107102012-03-15 Yao Qi <yao@codesourcery.com>
10711
10712 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10713 handling to ...
10714 (cmd_qtdp): ... here.
10715
8d0d92cd
YQ
107162012-03-15 Yao Qi <yao@codesourcery.com>
10717
10718 * tracepoint.c (struct tracepoint_action_ops): New.
10719 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10720 (m_tracepoint_action_download): New.
10721 (r_tracepoint_action_download): New.
10722 (x_tracepoint_action_download): New.
10723 (l_tracepoint_action_download): New.
10724 (add_tracepoint_action): Install `action->ops' according type.
10725 (download_tracepoint_1): Move code `download' function pointer
10726 of various tracepoint_action_ops.
10727
87b0bb13
JK
107282012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10729
10730 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10731 linux_ptrace_attach_warnings.
10732
5f572dec
JK
107332012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 * Makefile.in (linux-ptrace.o): New.
10736 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10737 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10738 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10739 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10740 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10741 of these targets.
10742 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10743
f4647387
YQ
107442012-03-08 Yao Qi <yao@codesourcery.com>
10745 Pedro Alves <palves@redhat.com>
10746
10747 Fix PR server/13392.
10748 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10749 offset of JMP insn.
10750 * tracepoint.c (remove_tracepoint): New.
10751 (cmd_qtdp): Call remove_tracepoint when failed to install.
10752
9b224c5e
PA
107532012-03-07 Pedro Alves <palves@redhat.com>
10754
10755 * linux-low.c (get_detach_signal): New.
10756 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10757 Pass on pending signals to PTRACE_DETACH. Check the result of the
10758 ptrace call.
10759 * server.c (program_signals, program_signals_p): New.
10760 (handle_general_set): Handle QProgramSignals.
10761 * server.h (program_signals, program_signals_p): Declare.
10762
e237a7e2
JK
107632012-03-05 Pedro Alves <palves@redhat.com>
10764 Jan Kratochvil <jan.kratochvil@redhat.com>
10765
10766 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10767 New comment why.
10768
5808517f
YQ
107692012-03-03 Yao Qi <yao@codesourcery.com>
10770
10771 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10772 agent_look_up_symbols.
10773
58b4daa5
YQ
107742012-03-03 Yao Qi <yao@codesourcery.com>
10775
10776 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10777 (linux-x86-low.o): Likewise.
10778 * server.h: Remove in_process_agent_loaded.
10779 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10780 common/agent.c.
10781 Update callers.
10782
8ffcbaaf
YQ
107832012-03-03 Yao Qi <yao@codesourcery.com>
10784
10785 * tracepoint.c (gdb_agent_capability): New global.
10786 (in_process_agent_loaded_ust): Renamed to
10787 `in_process_agent_supports_ust'.
10788 Update callers.
10789 (in_process_agent_supports_ust): Call agent_capability_check.
10790 (clear_installed_tracepoints): Assert that agent supports
10791 agent.
10792
d1feda86
YQ
107932012-03-03 Yao Qi <yao@codesourcery.com>
10794
10795 * linux-low.c (linux_supports_agent): New.
10796 (linux_target_ops): Initialize field `supports_agent' with
10797 linux_supports_agent.
10798 * target.h (struct target_ops) <supports_agent>: New.
10799 (target_supports_agent): New macro.
10800 * server.c (handle_general_set): Handle packet 'QAgent'.
10801 (handle_query): Send `QAgent+'.
10802 * Makefile.in (server.o): Depends on agent.h.
10803
2fa291ac
YQ
108042012-03-03 Yao Qi <yao@codesourcery.com>
10805
10806 * Makefile.in (OBS): Add agent.o.
10807 Add new rule for agent.o.
10808 Track dependence of tracepoint.c on agent.h.
10809 * tracepoint.c (run_inferior_command_1):
10810 (run_inferior_command): Call agent_run_command.
10811 (gdb_ust_connect_sync_socket): Deleted. Move it to
10812 common/agent.c.
10813 (resume_thread, stop_thread): Likewise.
10814 (gdb_ust_socket_init): Renamed to ...
10815 (gdb_agent_socket_init): ... New.
10816 (gdb_ust_thread): Renamed to ...
10817 (gdb_agent_helper_thread): ... New.
10818 (gdb_ust_init): Move some code to ...
10819 (gdb_agent_init): ... here. New.
10820 [HAVE_UST]: Call gdb_ust_init.
10821 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10822 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10823 * config.in, configure: Regenerated.
10824
05044653
PA
108252012-03-02 Pedro Alves <palves@redhat.com>
10826
10827 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10828 * linux-low.c (struct simple_pid_list): New.
10829 (stopped_pids): New a struct simple_pid_list pointer.
10830 (add_to_pid_list, pull_pid_from_list): New.
10831 (handle_extended_wait): Don't assume the first signal new children
10832 report is SIGSTOP. Adjust call to pull_pid_from_list.
10833 (linux_wait_for_lwp): Adjust.
10834
8d00225b
YQ
108352012-03-02 Yao Qi <yao@codesourcery.com>
10836
10837 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10838 debug log.
10839
19560ba5
YQ
108402012-03-02 Yao Qi <yao@codesourcery.com>
10841
10842 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10843 `stop_pc' and `tpoint'. Update caller.
10844
1faeff08
MR
108452012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10846
10847 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10848 * linux-low.c (use_linux_regsets): New macro.
10849 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10850 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10851 (linux_register_in_regsets): New function.
10852 (usr_fetch_inferior_registers): Skip registers covered by
10853 regsets.
10854 (usr_store_inferior_registers): Likewise.
10855 (usr_fetch_inferior_registers): New macro.
10856 (usr_store_inferior_registers): Likewise.
10857 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10858 (linux_store_registers): Likewise.
10859 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10860 prototype.
10861 (init_registers_mips64_dsp_linux): Likewise.
10862 (init_registers_mips_linux): New macro.
10863 (init_registers_mips_dsp_linux): Likewise.
10864 (mips_dsp_num_regs): Likewise.
10865 (DSP_BASE, DSP_CONTROL): New fallback macros.
10866 (mips_base_regs): New macro.
10867 (mips_regmap): Use it. Fix the size.
10868 (mips_dsp_regmap): New variable.
10869 (mips_dsp_regset_bitmap): Likewise.
10870 (mips_arch_setup): New function.
10871 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10872 than mips_regmap.
10873 (mips_cannot_store_register): Likewise.
10874 (the_low_target): Update .arch_setup, .num_regs and .regmap
10875 initializers. Add .regset_bitmap initializer.
10876 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10877 initializer.
10878 * linux-bfin-low.c (the_low_target): Likewise.
10879 * linux-cris-low.c (the_low_target): Likewise.
10880 * linux-crisv32-low.c (the_low_target): Likewise.
10881 * linux-ia64-low.c (the_low_target): Likewise.
10882 * linux-m32r-low.c (the_low_target): Likewise.
10883 * linux-m68k-low.c (the_low_target): Likewise.
10884 * linux-ppc-low.c (the_low_target): Likewise.
10885 * linux-s390-low.c (the_low_target): Likewise.
10886 * linux-sh-low.c (the_low_target): Likewise.
10887 * linux-sparc-low.c (the_low_target): Likewise.
10888 * linux-tic6x-low.c (the_low_target): Likewise.
10889 * linux-x86-low.c (the_low_target): Likewise.
10890 * linux-xtensa-low.c (the_low_target): Likewise.
10891 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10892 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10893 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10894 srv_xmlfiles.
10895 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10896 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10897
c03e6ccc
YQ
108982012-02-29 Yao Qi <yao@codesourcery.com>
10899 Pedro Alves <palves@redhat.com>
10900
10901 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10902 `step_over_finished' is true.
10903
644cebc9
PA
109042012-02-27 Pedro Alves <palves@redhat.com>
10905
10906 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10907 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10908
c14d7ab2
PA
109092012-02-27 Pedro Alves <palves@redhat.com>
10910
10911 PR server/9684
10912 * linux-low.c (pid_is_stopped): New.
10913 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10914
412c89dd
LM
109152012-02-25 Luis Machado <lgustavo@codesourcery.com>
10916
10917 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10918 of conditions.
10919
b745defe
MR
109202012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10921
10922 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10923
9f3a5c85
LM
109242012-02-24 Luis Machado <lgustavo@codesourcery>
10925
10926 * server.c (handle_query): Advertise support for target-side
10927 breakpoint condition evaluation.
10928 (process_point_options): New function.
10929 (process_serial_event): When inserting a breakpoint, check for
10930 a target-side condition that should be evaluated.
10931
10932 * mem-break.c: Include regcache.h and ax.h.
10933 (point_cond_list_t): New data structure.
10934 (breakpoint) <cond_list>: New field.
10935 (find_gdb_breakpoint_at): Make non-static.
10936 (delete_gdb_breakpoint_at): Clear any target-side
10937 conditions.
10938 (clear_gdb_breakpoint_conditions): New function.
10939 (add_condition_to_breakpoint): Likewise.
10940 (add_breakpoint_condition): Likewise.
10941 (gdb_condition_true_at_breakpoint): Likewise.
10942 (gdb_breakpoint_here): Return result directly instead
10943 of going through a local variable.
10944
10945 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10946 (clear_gdb_breakpoint_conditions): Likewise.
10947 (add_breakpoint_condition): Likewise.
10948 (gdb_condition_true_at_breakpoint): Likewise.
10949
10950 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10951 (need_step_over_p): Take target-side breakpoint condition into
10952 consideration.
10953
5e1dc496
LM
109542012-02-24 Luis Machado <lgustavo@codesourcery>
10955
10956 * server.h: Include tracepoint.h.
10957 (agent_mem_read, agent_get_trace_state_variable_value,
10958 agent_set_trace_state_variable_value,
10959 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10960 get_set_tsv_func_addr): New prototypes.
10961
10962 * ax.h: New include file.
10963 * ax.c: New source file.
10964
10965 * tracepoint.c: Include ax.h.
10966 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10967 agent_expr, eval_result_type): Move to ax.h.
10968 (parse_agent_expr): Rename to ...
10969 (gdb_parse_agent_expr): ... this, make it non-static and move
10970 to ax.h.
10971 (unparse_agent_expr) Rename to ...
10972 (gdb_unparse_agent_expr): ... this, make it non-static and move
10973 to ax.h.
10974 (eval_agent_expr): Rename to ...
10975 (eval_tracepoint_agent_expr): ... this.
10976 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10977 forward declarations.
10978 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10979 (agent_get_trace_state_variable_value): New function.
10980 (agent_set_trace_state_variable_value): New function.
10981 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10982 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10983 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10984 (condition_true_at_tracepoint): Likewise.
10985 (parse_agent_expr): Rename to ...
10986 (gdb_parse_agent_expr): ... this and move to ax.c.
10987 (unparse_agent_expr): Rename to ...
10988 (gdb_unparse_agent_expr): ... this and move to ax.c.
10989 (gdb_agent_op_name): Move to ax.c.
10990 (eval_agent_expr): Rename to ...
10991 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10992 and move to ax.c.
10993 (eval_tracepoint_agent_expr): New function.
10994 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 10995 non-static.
5e1dc496
LM
10996 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10997 ax.c.
10998 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10999 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11000 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11001 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11002 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11003 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11004 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11005 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11006 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11007 (compile_bytecodes): Remove forward declaration.
11008 (is_goto_target): Move to ax.c.
11009 (compile_bytecodes): Move to ax.c and call
11010 agent_get_trace_state_variable_value (...) and
11011 agent_set_trace_state_variable_value (...).
11012
11013 * Makefile.in: Update ax.c and IPA dependencies.
11014
277e4e52
PA
110152012-02-24 Pedro Alves <palves@redhat.com>
11016
11017 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11018 (cmd_bigqtbuffer_circular): ... this. Only handle
11019 'QTBuffer:circular:'.
11020 (handle_tracepoint_general_set): Adjust.
11021
bf4c19f7
YQ
110222012-02-16 Yao Qi <yao@codesourcery.com>
11023
11024 * inferiors.c: Move code to ...
11025 * dll.c: .... here. New.
11026 * server.h: Declare clear_dlls.
11027 * Makefile.in (SFILES): Add dll.c.
11028 (OBS): Add dll.o
11029 (dll.o): New rule.
11030
d73f2619
YQ
110312012-02-11 Yao Qi <yao@codesourcery.com>
11032
11033 * server.c: (handle_monitor_command): Add a new parameter
11034 `own_buf'.
11035 (handle_query): Update caller.
11036
f8255c2a
JB
110372012-02-09 Joel Brobecker <brobecker@adacore.com>
11038
11039 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11040 * configure, config.in: Regenerate.
11041 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11042 is not defined.
11043
da84f473
PA
110442012-02-02 Pedro Alves <palves@redhat.com>
11045
11046 Try SIGKILL first, then PTRACE_KILL.
11047 * linux-low.c (linux_kill_one_lwp): New.
11048 (linux_kill_one_lwp): Rename to ...
11049 (kill_one_lwp_callback): ... this. Use the new
11050 linux_kill_one_lwp.
11051
e886a173
PA
110522012-02-02 Pedro Alves <palves@redhat.com>
11053
11054 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11055 inferior.
11056
be07f1a2
PA
110572012-01-27 Pedro Alves <palves@redhat.com>
11058
11059 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11060 (elf_64_file_p): Make static.
11061 (linux_pid_exe_is_elf_64_file): New.
11062 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11063 Delete declarations.
11064 (linux_pid_exe_is_elf_64_file): Declare.
11065 * linux-x86-low.c (x86_arch_setup): Use
11066 linux_pid_exe_is_elf_64_file.
11067
d8301ad1
JK
110682012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11069
11070 * linux-low.c (linux_wait_for_event_1): Rename to ...
11071 (linux_wait_for_event): ... here and merge it with former
11072 linux_wait_for_event - new variable wait_ptid, use it.
11073 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11074
01b17894
PA
110752012-01-23 Pedro Alves <palves@redhat.com>
11076
11077 * server.c (main): Avoid yet another case of infinite loop while
11078 detaching/killing after a longjmp.
11079
e825046f
JK
110802012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11081
11082 Code cleanup.
11083 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11084
b9e7b9c3
UW
110852012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11086
11087 * hostio.c (handle_readlink): New function.
11088 (handle_vFile): Call it to handle "vFile:readlink" packets.
11089
901f9912
UW
110902012-01-20 Pedro Alves <palves@redhat.com>
11091 Ulrich Weigand <ulrich.weigand@linaro.org>
11092
11093 * server.c (handle_v_requests): Only support vAttach and vRun to
11094 start multiple processes when in extended protocol mode.
11095
fc1ab1a0
PA
110962012-01-17 Pedro Alves <palves@redhat.com>
11097
11098 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11099 memalign plus mprotect to allocate the scratch buffer.
11100
7d5d4e98
PA
111012012-01-13 Pedro Alves <palves@redhat.com>
11102
11103 * server.c (attach_inferior): Clear `cont_thread'.
11104
f128d5e9
PA
111052012-01-13 Pedro Alves <palves@redhat.com>
11106
11107 * server.c (main): Avoid infinite loop while detaching/killing
11108 after a longjmp.
11109
06db92f0
DE
111102012-01-09 Doug Evans <dje@google.com>
11111
11112 * server.c (start_inferior): Set last_ptid in --wrapper case.
11113
32d92999
YQ
111142012-01-06 Yao Qi <yao@codesourcery.com>
11115
11116 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11117 defined.
11118 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11119
5e0a92a9
YQ
111202012-01-04 Yao Qi <yao@codesourcery.com>
11121
11122 * tracepoint.c (cmd_qtdp): Print debug message
11123 for static tracepoint.
11124
ae639e8c
YQ
111252012-01-04 Yao Qi <yao@codesourcery.com>
11126
11127 * tracepoint.c (trace_vdebug): Differentiate debug message
11128 between gdbserver and IPA.
11129
f72429c5
YQ
111302012-01-03 Yao Qi <yao@codesourcery.com>
11131
11132 * tracepoint.c (tracepoint_was_hit): Don't collect for
11133 static tracepoint.
11134
12c3e59c
JB
111352012-01-02 Joel Brobecker <brobecker@adacore.com>
11136
11137 * terminal.h: Reformat copyright header.
11138
67827812
JB
111392012-01-02 Joel Brobecker <brobecker@adacore.com>
11140
11141 * server.c (gdbserver_version): Update copyright year.
11142 * gdbreplay.c (gdbreplay_version): Likewise.
11143
3e52c33d
JK
111442011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11145
11146 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11147
11148 Revert:
11149 2011-12-18 Hui Zhu <teawater@gmail.com>
11150 * linux-low.c (linux_create_inferior): Save return value to ret.
11151
66f1260e
HZ
111522011-12-18 Hui Zhu <teawater@gmail.com>
11153
11154 * linux-low.c (linux_create_inferior): Save return value to ret.
11155
e77616d7
DE
111562011-12-16 Doug Evans <dje@google.com>
11157
e7b06c57
DE
11158 * linux-low.c (linux_create_inferior): If stdio connection,
11159 redirect stdin from /dev/null, stdout to stderr.
11160 * remote-utils.c (remote_is_stdio): New static global.
11161 (remote_connection_is_stdio): New function.
11162 (remote_prepare): Handle stdio connection.
11163 (remote_open): Ditto.
11164 (remote_close): Don't close stdin for stdio connections.
11165 (read_prim,write_prim): New functions. Replace all calls to
11166 read/write to these.
11167 * server.c (main): Watch for "-" argument. Move call to
11168 remote_prepare before start_inferior.
11169 * server.h (STDIO_CONNECTION_NAME): New macro.
11170 (remote_connection_is_stdio): Declare.
11171
e77616d7
DE
11172 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11173 in debugging output.
11174
82067193
YQ
111752011-12-15 Yao Qi <yao@codesourcery.com>
11176
11177 * tracepoint.c: Include sys/syscall.h.
11178 (gdb_ust_thread): Remove preprocessor conditional.
11179
82bfbe7e
PA
111802011-12-14 Pedro Alves <pedro@codesourcery.com>
11181
11182 * linux-low.c (linux_detach_one_lwp): Call
11183 the_low_target.prepare_to_resume before detaching.
11184
712c6575
YQ
111852011-12-14 Yao Qi <yao@codesourcery.com>
11186
11187 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11188 of write.
11189
d54d1edf
YQ
111902011-12-14 Yao Qi <yao@codesourcery.com>
11191
11192 * i386-low.c (i386_low_stopped_data_address): Initialize local
11193 variable `control'.
11194
6210a125
PA
111952011-12-13 Pedro Alves <pedro@codesourcery.com>
11196
11197 PR remote/13492
11198
11199 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11200 DR_CONTROL unless necessary. Extend comments.
11201 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11202 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11203
2ece8244
YQ
112042011-12-13 Yao Qi <yao@codesourcery.com>
11205
11206 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11207 macros.
11208 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11209
784867a5
JK
112102011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11211
11212 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11213 Print new debug message for such case.
11214
6bf36717
JK
112152011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11216
11217 Fix overlapping memcpy.
11218 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11219 the read_inferior_memory transfer.
11220 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11221 write_inferior_memory transfer.
11222 (set_fast_tracepoint_jump): New variable buf. Use it for the
11223 read_inferior_memory and write_inferior_memory transfers.
11224 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11225 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11226 Use it for the write_inferior_memory transfer.
11227 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11228 buffers.
11229
50275556
MR
112302011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11231
11232 * linux-low.c (fetch_register, store_register): Make code
11233 consistent, fix formatting.
11234
7325beb4
MR
112352011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11236
11237 * linux-low.c (usr_store_inferior_registers): Factor out code
11238 to handle individual registers into...
11239 (store_register): ... this new function.
11240
c642a434
UW
112412011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11242
11243 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11244 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11245 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11246 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11247 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11248 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11249 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11250 (srv_xmlfiles): Add new XML files.
11251
11252 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11253 and <sys/uio.h>.
11254 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11255 (init_registers_s390_linux32v1): Add prototype.
11256 (init_registers_s390_linux32v2): Likewise.
11257 (init_registers_s390_linux64v1): Likewise.
11258 (init_registers_s390_linux64v2): Likewise.
11259 (init_registers_s390x_linux64v1): Likewise.
11260 (init_registers_s390x_linux64v2): Likewise.
11261 (s390_num_regs): Increment to 52.
11262 (s390_regmap): Add orig_r2 register.
11263 (s390_num_regs_3264): Increment to 68.
11264 (s390_regmap_3264): Add orig_r2 register.
11265 (s390_collect_ptrace_register): Handle orig_r2 register.
11266 (s390_supply_ptrace_register): Likewise.
11267 (s390_fill_last_break): New function.
11268 (s390_store_last_break): Likewise.
11269 (s390_fill_system_call): New function.
11270 (s390_store_system_call): Likewise.
11271 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11272 register sets.
11273 (s390_check_regset): New function.
11274 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11275 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11276 Update target_regsets for available register sets.
11277
2268b414
JK
112782011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11279 Jan Kratochvil <jan.kratochvil@redhat.com>
11280
11281 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11282 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11283 New.
11284 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11285 * linux-low.h (struct process_info_private): New member r_debug.
11286 * server.c (handle_qxfer_libraries): Call
11287 the_target->qxfer_libraries_svr4.
11288 (handle_qxfer_libraries_svr4): New function.
11289 (qxfer_packets): New entry "libraries-svr4".
11290 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11291 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11292 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11293 PACKET_qXfer_libraries_svr4.
11294
d6db1fab
UW
112952011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11296
11297 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11298 PSW address/mask between 8-byte and 16-byte formats.
11299 (s390_supply_ptrace_register): Likewise.
11300 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11301 basic addressing mode bit.
11302
242f5f1c
SS
113032011-11-24 Stan Shebs <stan@codesourcery.com>
11304
11305 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11306
f196051f
SS
113072011-11-17 Stan Shebs <stan@codesourcery.com>
11308
11309 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11310 (tracing_start_time): New global.
11311 (tracing_stop_time): New global.
11312 (tracing_user_name): New global.
11313 (tracing_notes): New global.
11314 (tracing_stop_note): New global.
11315 (cmd_qtstart): Set traceframe_usage, start_time.
11316 (stop_tracing): Set stop_time.
11317 (cmd_qtstatus): Report additional status.
11318 (cmd_qtp): New function.
11319 (handle_tracepoint_query): Call it.
11320 (cmd_qtnotes): New function.
11321 (handle_tracepoint_general_set): Call it.
11322 (get_timestamp): Rename from tsv_get_timestamp.
11323
405f8e94
SS
113242011-11-14 Stan Shebs <stan@codesourcery.com>
11325 Kwok Cheung Yeung <kcy@codesourcery.com>
11326
11327 * linux-x86-low.c (small_jump_insn): New.
11328 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11329 trampoline and error message, build a trampoline and issue a small
11330 jump instruction to it.
11331 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11332 trampoline and error message.
11333 (x86_get_min_fast_tracepoint_insn_len): New.
11334 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11335 * linux-low.h (struct linux_target_ops): Add arguments to
11336 install_fast_tracepoint_jump_pad operation, add new operation.
11337 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11338 arguments.
11339 (linux_get_min_fast_tracepoint_insn_len): New function.
11340 (linux_target_op): Add new operation.
11341 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11342 (gdb_trampoline_buffer_end): Ditto.
11343 (gdb_trampoline_buffer_error): Ditto.
11344 (struct ipa_sym_addresses): Add fields for new IPA variables.
11345 (symbol_list): Add entries for new IPA variables.
11346 (struct tracepoint): Add fields to hold the address range of the
11347 trampoline used by the tracepoint.
11348 (trampoline_buffer_head): New static variable.
11349 (trampoline_buffer_tail): Ditto.
11350 (claim_trampoline_space): New function.
11351 (have_fast_tracepoint_trampoline_buffer): New function.
11352 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11353 structure.
11354 (install_fast_tracepoint): Ditto, also add error buffer argument.
11355 (cmd_qtminftpilen): New function.
11356 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11357 (fast_tracepoint_from_trampoline_address): New function.
11358 (fast_tracepoint_collecting): Handle trampoline as part of jump
11359 pad space.
11360 (set_trampoline_buffer_space): New function.
11361 (initialize_tracepoint): Initialize new IPA variables.
11362 * target.h (struct target_ops): Add arguments to
11363 install_fast_tracepoint_jump_pad operation, add new
11364 get_min_fast_tracepoint_insn_len operation.
11365 (target_get_min_fast_tracepoint_insn_len): New.
11366 (install_fast_tracepoint_jump_pad): Add arguments.
11367 * server.h (IPA_BUFSIZ): Define.
11368 * linux-i386-ipa.c: Include extra header files.
11369 (initialize_fast_tracepoint_trampoline_buffer): New function.
11370 (initialize_low_tracepoint): Call it.
11371 * server.h (set_trampoline_buffer_space): Declare.
11372 (claim_trampoline_space): Ditto.
11373 (have_fast_tracepoint_trampoline_buffer): Ditto.
11374
1e4d1764
YQ
113752011-11-14 Yao Qi <yao@codesourcery.com>
11376
11377 * server.c (handle_query): Handle InstallInTrace for qSupported.
11378 * tracepoint.c (add_tracepoint): Sort list.
11379 (install_tracepoint, download_tracepoint): New.
11380 (cmd_qtdp): Call them to install and download tracepoints.
11381 (sort_tracepoints): Removed.
11382 (cmd_qtstart): Update.
11383
5c73ff4e
YQ
113842011-11-14 Yao Qi <yao@codesourcery.com>
11385
11386 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11387 * mem-break.h: Declare.
11388 * tracepoint.c (cmd_qtstart): Move some code to ...
11389 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11390 New.
11391 (download_tracepoints): Move some code to ...
11392 (download_tracepoint_1): ... here. New.
11393
86a30030
YQ
113942011-11-08 Yao Qi <yao@codesourcery.com>
11395
11396 * remote-utils.c (relocate_instruction): A comment fix.
11397
8d26e50c
JB
113982011-11-07 Joel Brobecker <brobecker@adacore.com>
11399
11400 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11401 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11402 dr_status_mirror and dr_control_mirror from debug_reg_state.
11403 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11404 (i386_initial_stuff): Remove use of deleted globals.
11405 (i386_get_thread_context, i386_set_thread_context,
11406 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11407 from debug_reg_state.
11408
a59306a3
YQ
114092011-11-05 Yao Qi <yao@codesourcery.com>
11410
11411 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11412 address as TPOINT's.
11413
3065dfb6
SS
114142011-11-02 Stan Shebs <stan@codesourcery.com>
11415
11416 * tracepoint.c (agent_mem_read_string): New function.
11417 (eval_agent_expr): Call it for tracenz.
11418 * server.c (handle_query): Report support for tracenz.
11419
fd0d8c7c
YQ
114202011-11-02 Yao Qi <yao@codesourcery.com>
11421
11422 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11423
609086b1
YQ
114242011-11-02 Yao Qi <yao@codesourcery.com>
11425
11426 * target.h: Fix a typo in comment.
11427
b9fd1791
PA
114282011-10-31 Pedro Alves <pedro@codesourcery.com>
11429
11430 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11431 clobber the breakpoints' shadows with fast tracepoint jumps.
11432 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11433 * target.c (write_inferior_memory): Also pass MYADDR down to
11434 check_mem_write.
11435
03583c20
UW
114362011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11437
11438 * configure.ac: Check support for personality routine.
11439 * configure: Regenerate.
11440 * config.in: Likewise.
11441 * linux-low.c: Include <sys/personality.h>.
11442 Define ADDR_NO_RANDOMIZE if necessary.
11443 (linux_create_inferior): Disable address space randomization when
11444 forking inferior, if requested.
11445 (linux_supports_disable_randomization): New function.
11446 (linux_target_ops): Install it.
11447 * server.h (disable_randomization): Declare.
11448 * server.c (disable_randomization): New global variable.
11449 (handle_general_set): Handle QDisableRandomization.
11450 (handle_query): Likewise for qSupported.
11451 (main): Support --disable-randomization and --no-disable-randomization
11452 command line arguments.
11453 * target.h (struct target_ops): Add supports_disable_randomization.
11454 (target_supports_disable_randomization): New macro.
11455
723b724b
MF
114562011-09-29 Mike Frysinger <vapier@gentoo.org>
11457
11458 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11459 ifdef check.
11460 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11461 [!PT_GETDSBT] (target_loadmap): New definition.
11462 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11463 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11464 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11465 and PT_GETDSBT to LINUX_LOADMAP.
11466 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11467 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11468
55329a5c 114692011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
11470
11471 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11472 (arm_linux_hwbp_cap): New static variable.
11473 (arm_linux_get_hwbp_cap): Replace by ...
11474 (arm_linux_init_hwbp_cap): ... this new function.
11475 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11476 (arm_linux_get_hw_watchpoint_count): Likewise.
11477 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11478 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11479 (arm_prepare_to_resume): Use perror_with_name instead of error.
11480
55329a5c 114812011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
11482
11483 * linux-arm-low.c: Include <signal.h>.
11484 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11485 (struct arm_linux_hwbp_cap): New data type.
11486 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11487 (struct arm_linux_hw_breakpoint): New data type.
11488 (MAX_BPTS, MAX_WPTS): Define.
11489 (struct arch_process_info, struct arch_lwp_info): New data types.
11490 (arm_linux_get_hwbp_cap): New function.
11491 (arm_linux_get_hw_breakpoint_count): Likewise.
11492 (arm_linux_get_hw_watchpoint_count): Likewise.
11493 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11494 (arm_hwbp_control_initialize): Likewise.
11495 (arm_hwbp_control_is_enabled): Likewise.
11496 (arm_hwbp_control_is_initialized): Likewise.
11497 (arm_hwbp_control_disable): Likewise.
11498 (arm_linux_hw_breakpoint_equal): Likewise.
11499 (arm_linux_hw_point_initialize): Likewise.
11500 (struct update_registers_data): New data structure.
11501 (update_registers_callback: New function.
11502 (arm_insert_point): Likewise.
11503 (arm_remove_point): Likewise.
11504 (arm_stopped_by_watchpoint): Likewise.
11505 (arm_stopped_data_address): Likewise.
11506 (arm_new_process): Likewise.
11507 (arm_new_thread): Likewise.
11508 (arm_prepare_to_resume): Likewise.
11509 (the_low_target): Register arm_insert_point, arm_remove_point,
11510 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11511 arm_new_thread, and arm_prepare_to_resume.
11512
6b9801d4
SS
115132011-09-15 Stan Shebs <stan@codesourcery.com>
11514
11515 * server.h (struct emit_ops): Add compare-goto fields.
11516 * tracepoint.c (gdb_agent_op_sizes): New table.
11517 (emit_eq_goto): New function.
11518 (emit_ne_goto): New function.
11519 (emit_lt_goto): New function.
11520 (emit_le_goto): New function.
11521 (emit_gt_goto): New function.
11522 (emit_ge_goto): New function.
11523 (is_goto_target): New function.
11524 (compile_bytecodes): Recognize special cases of compare-goto
11525 combinations and call specialized emitters for them.
11526 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11527 (amd64_emit_ne_goto): New function.
11528 (amd64_emit_lt_goto): New function.
11529 (amd64_emit_le_goto): New function.
11530 (amd64_emit_gt_goto): New function.
11531 (amd64_emit_ge_goto): New function.
11532 (amd64_emit_ops): Add the new functions.
11533 (i386_emit_eq_goto): New function.
11534 (i386_emit_ne_goto): New function.
11535 (i386_emit_lt_goto): New function.
11536 (i386_emit_le_goto): New function.
11537 (i386_emit_gt_goto): New function.
11538 (i386_emit_ge_goto): New function.
11539 (i386_emit_ops): Add the new functions.
11540
bf15cbda
SS
115412011-09-08 Stan Shebs <stan@codesourcery.com>
11542
11543 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11544 (i386_emit_epilogue): Restore %ebx.
11545
943ca1dd
JZ
115462011-08-31 Jie Zhang <jzhang918@gmail.com>
11547
11548 * server.c (step_thread): Remove definition.
11549 (process_serial_event): Don't handle Hs.
11550 * server.h (step_thread): Remove declaration.
11551 * target.c (set_desired_inferior): Remove use of step_thread.
11552
e3deef73
LM
115532011-08-24 Luis Machado <lgustavo@codesourcery.com>
11554
11555 * linux-low.c: Include linux-procfs.h.
11556 (linux_attach_lwp_1): Update comments.
11557 (linux_attach): Scan for existing threads when attaching to a
11558 process that is the tgid.
11559 * Makefile.in: Update dependencies.
11560
13da1c97
LM
115612011-08-24 Luis Machado <lgustavo@codesourcery.com>
11562
11563 * configure.srv: Add linux-procfs.o dependencies.
11564
881127c9
YQ
115652011-08-14 Yao Qi <yao@codesourcery.com>
11566
11567 * target.h (struct target_ops): Fix indent.
11568 * win32-low.c (win32_target_ops): Fix comment.
11569
58dbd541
YQ
115702011-08-14 Andrew Jenner <andrew@codesourcery.com>
11571 Yao Qi <yao@codesourcery.com>
11572
11573 * Makefile.in (clean): Remove tic6x-*.c files.
11574 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11575 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11576 (tic6x-c64xp-linux.c): Likewise.
11577 * configure.srv: Add support for tic6x-*-uclinux.
11578 * linux-tic6x-low.c: New.
11579 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11580
78d85199
YQ
115812011-08-14 Andrew Stubbs <ams@codesourcery.com>
11582 Yao Qi <yao@codesourcery.com>
11583
11584 * target.h (struct target_ops): Add read_loadmap.
11585 * linux-low.c (struct target_loadseg): New type.
11586 (struct target_loadmap): New type.
11587 (linux_read_loadmap): New function.
11588 (linux_target_ops): Add linux_read_loadmap.
11589 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
11590 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11591 to NULL.
78d85199 11592
a959a88d
EZ
115932011-08-05 Eli Zaretskii <eliz@gnu.org>
11594
11595 * win32-low.c: Include <stdint.h>.
11596
1ced966e
PA
115972011-07-22 Pedro Alves <pedro@codesourcery.com>
11598
11599 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11600 to the inferior here.
11601 (i386_remove_aligned_watchpoint): Ditto.
11602 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11603 fit part of the watchpoint in the debug registers.
11604 (i386_update_inferior_debug_regs): New.
11605 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11606 registers, and only update the inferior on success.
11607 (i386_low_remove_watchpoint): Ditto.
11608
d26e3629
KY
116092011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11610
11611 * linux-low.c (compare_ints, unique, list_threads, show_process,
11612 linux_core_of_thread): Delete.
11613 (linux_target_ops): Change linux_core_of_thread to
11614 linux_common_core_of_thread.
11615 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11616 * utils.c (malloc_failure): Change type of argument.
11617 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11618 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11619 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11620 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11621 (IPA_OBJS): Add common-utils-ipa.o.
11622 (ptid_h, linux_osdata_h): New macros.
11623 (server_h): Add common/common-utils.h, common/xml-utils.h,
11624 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11625 common/ptid.h.
11626 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11627 ptid.o, buffer.o): New rules.
11628 (linux-low.o): Add common/linux-osdata.h as a dependency.
11629 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11630 * configure.ac: Add AC_HEADER_DIRENT check.
11631 * config.in: Regenerate.
11632 * configure: Regenerate.
11633 * remote-utils.c (xml_escape_text): Delete.
11634 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11635 buffer_xml_printf): Move to common/buffer.c.
11636 * server.c (main): Remove call to initialize_inferiors.
11637 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11638 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11639 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11640 internal_error, gdb_assert, gdb_assert_fail): Delete.
11641 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11642 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11643 common/buffer.h.
11644 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11645 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11646 initialize_inferiors): Delete.
11647
2275a1a7
PA
116482011-07-20 Pedro Alves <pedro@codesourcery.com>
11649
11650 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11651 symbol error.
11652
0a5b1e09
PA
116532011-05-31 Pedro Alves <pedro@codesourcery.com>
11654
11655 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11656 assertion.
11657 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11658
6938fd34
YQ
116592011-05-26 Yao Qi <yao@codesourcery.com>
11660
11661 * Makefile.in (thread-db.o): Track dependence to
11662 common/gdb_thread_db.h.
11663 * thread-db.c: include gdb_thread_db.h from right place.
11664
b481f9e0
TT
116652011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11666
11667 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11668 __FILE__ and __LINE__ to internal_error.
11669
98a5dd13
DE
116702011-05-13 Doug Evans <dje@google.com>
11671
11672 * thread-db.c (try_thread_db_load_from_sdir): New function.
11673 (try_thread_db_load_from_dir): New function.
11674 (thread_db_load_search): Handle $sdir, ignore $pdir.
11675 Remove trying of system directories if search of
11676 libthread-db-search-path fails, that is now done via $sdir.
11677
d248b706
KY
116782011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11679
11680 * server.c (handle_query): Add EnableDisableTracepoints to the list
11681 of supported features.
43aaf8b6 11682 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 11683 tracepoints.
43aaf8b6
PA
11684 (cmd_qtenable_disable): New.
11685 (cmd_qtstart): Install tracepoints even if disabled.
11686 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11687 receiving a QTEnable or QTDisable packet.
11688 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11689 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11690 tracepoints.
11691 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 11692
84e578fb
DE
116932011-05-10 Doug Evans <dje@google.com>
11694
11695 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11696
71f55dd8
DE
116972011-05-04 Doug Evans <dje@google.com>
11698
11699 * linux-low.c (linux_join): Skip process lookup.
11700 * spu-low.c (spu_join): Ditto.
11701 * server.c (join_inferiors_callback): Delete.
11702 (process_serial_event): For 'D' packet (detach) call join_inferior
11703 directly.
11704
4d393d60
JM
117052011-05-04 Joseph Myers <joseph@codesourcery.com>
11706
11707 * README: Don't mention xscale*-*-linux*.
11708 * configure.srv (xscale*-*-linux*): Don't handle target.
11709
b00ad6ff
NF
117102011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11711
11712 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11713 casting pointers.
11714 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11715 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11716 (i386_emit_void_call_2): Likewise.
11717
af96c192
YQ
117182011-04-26 Yao Qi <yao@codesourcery.com>
11719
43aaf8b6
PA
11720 * linux-low.c: Move common macros to linux-ptrace.h.
11721 Include linux-ptrace.h.
af96c192
YQ
11722 * Makefile.in (linux_ptrace_h): New.
11723 (linux-low.o): Depends on linux-ptrace.h.
11724
03f2bd59
JK
117252011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11726
11727 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11728 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11729 (remote_prepare): New function with most of the TCP code from ...
11730 (remote_open): ... here. Detect PORT here unconditionally. Move also
11731 setting transport_is_reliable.
11732 * server.c (run_once): New variable.
11733 (gdbserver_usage): Document it.
11734 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11735 the first run if RUN_ONCE.
11736 * server.h (run_once, remote_prepare): New declarations.
11737
7a9dd1b2
TT
117382011-04-19 Tom Tromey <tromey@redhat.com>
11739
11740 * win32-low.c (handle_load_dll): Remove duplicate "the".
11741
81239425
PM
117422011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11743
11744 Remove support for old Cygwin 1.5 versions.
11745 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11746 function to avoid warning.
11747 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11748 warning.
11749
9e0627f1
PM
117502011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11751
11752 * gdbserver/server.h (Macro _): Define it if not available.
11753
588eebee
MS
117542011-03-14 Michael Snyder <msnyder@vmware.com>
11755
348af9f7 11756 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 11757
43f70d4c
JB
117582011-03-10 Joel Brobecker <brobecker@adacore.com>
11759
11760 * Makefile.in (maintainer-clean realclean distclean): Remove
11761 "make ... subdir_do" command.
11762
348af9f7
MS
117632011-03-10 Michael Snyder <msnyder@vmware.com>
11764
11765 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11766
11767 * server.c (handle_v_run): Free alloced buffer on early return.
11768
e637a4f5
YQ
117692011-03-09 Yao Qi <yao@codesourcery.com>
11770
11771 Revert:
11772 2011-03-04 Yao Qi <yao@codesourcery.com>
11773
11774 * Makefile.in: Remove GNU make feature --directory.
11775
11776 2011-03-05 Yao Qi <yao@codesourcery.com>
11777
11778 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11779 (subdir_do): New make target. Copied from gdb/Makefile.
11780 (maintainer-clean, realclean, distclean, clean): Call corresponding
11781 make targets in common/Makefile.
11782
11783 2011-02-11 Yao Qi <yao@codesourcery.com>
11784
11785 * configure.ac: Call AC_PROG_RANLIB.
11786 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11787 * configure: Regenerate.
11788
e6edda56
JK
117892011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11790
11791 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11792
e5141119
JB
117932011-03-06 Yao Qi <yao@codesourcery.com>
11794
11795 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11796
64794aa4
JB
117972011-03-05 Yao Qi <yao@codesourcery.com>
11798
11799 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11800 (subdir_do): New make target. Copied from gdb/Makefile.
11801 (maintainer-clean, realclean, distclean, clean): Call corresponding
11802 make targets in common/Makefile.
11803
7a762829
YQ
118042011-03-04 Yao Qi <yao@codesourcery.com>
11805
11806 * Makefile.in: Remove GNU make feature --directory.
11807
348af9f7
MS
118082011-03-04 Michael Snyder <msnyder@vmware.com>
11809
11810 * server.c (queue_stop_reply): Call xmalloc not malloc.
11811
118122011-03-02 Michael Snyder <msnyder@vmware.com>
11813
11814 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11815
9f72fee2
MS
118162011-02-28 Michael Snyder <msnyder@vmware.com>
11817
588eebee
MS
11818 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11819 (cmd_qtframe): Ditto.
11820 (cmd_qtbuffer): Ditto.
11821 (cmd_bigqtbuffer): Ditto.
11822
9f72fee2
MS
11823 * utils.c (decimal2str): Initialize 'width' to nine, then
11824 don't mess with it.
11825
8040bd49
UW
118262011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11827
11828 * hostio.c (require_data): Free *data, not data.
11829
7e52cbd0
JK
118302011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11831
11832 * hostio.c (require_data): Use free, not xfree.
11833
9130f83e
MS
118342011-02-27 Michael Snyder <msnyder@vmware.com>
11835
4b812f4e
MS
11836 * server.c (handle_query): Discard unused value.
11837
9130f83e
MS
11838 * hostio.c (require_data): Free malloc memory before returning
11839 error.
11840
69d37113
MS
118412011-02-26 Michael Snyder <msnyder@vmware.com>
11842
11843 * linux-low.c (list_threads): Call closedir for dirent.
11844
35f5825a
MS
118452011-02-27 Michael Snyder <msnyder@vmware.com>
11846
2a589cef
MS
11847 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11848 a case statement falls through.
11849
0adea5f7
MS
11850 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11851
35f5825a
MS
11852 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11853 in comparison.
11854
238f1c74
MS
118552011-02-26 Michael Snyder <msnyder@vmware.com>
11856
11857 * utils.c (decimal2str): Eliminate dead code and dead param.
11858 (pulongest): Drop dead param from call to decimal2str.
11859 (plongest): Ditto.
11860
633ff500
JB
118612011-02-24 Joel Brobecker <brobecker@adacore.com>
11862
11863 Revert the following patch (not approved yet):
11864 2011-02-21 Hui Zhu <teawater@gmail.com>
11865 * tracepoint.c (tp_printf): New function.
11866 (eval_agent_expr): Handle gdb_agent_op_printf.
11867
f9c6ff72
HZ
118682011-02-21 Hui Zhu <teawater@gmail.com>
11869
11870 * tracepoint.c (tp_printf): New function.
11871 (eval_agent_expr): Handle gdb_agent_op_printf.
11872
94d5e490
TT
118732011-02-18 Tom Tromey <tromey@redhat.com>
11874
11875 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11876 (tracepoint.o): Likewise.
11877 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11878 (gdb_agent_op_names): Likewise.
11879
c7f96d2b
TT
118802011-02-18 Tom Tromey <tromey@redhat.com>
11881
11882 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11883 gdb_agent_op_rot>: New constants.
11884 (gdb_agent_op_names): Add pick and roll.
11885 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11886 cases.
11887
0feedb2c
JK
118882011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11889
11890 * aclocal.m4: Regenerated with aclocal-1.11.1.
11891
b3b9301e
PA
118922011-02-14 Pedro Alves <pedro@codesourcery.com>
11893
11894 * server.c (handle_qxfer_traceframe_info): New.
11895 (qxfer_packets): Register "traceframe-info".
11896 (handle_query): Report support for qXfer:traceframe-info:read+.
11897 * tracepoint.c (match_blocktype): New.
11898 (traceframe_find_block_type): Rename to ...
11899 (traceframe_walk_blocks): ... this. Add callback filter argument,
11900 and use it.
11901 (traceframe_find_block_type): New, reimplemented on top of
11902 traceframe_walk_blocks.
11903 (build_traceframe_info_xml): New.
11904 (traceframe_read_info): New.
11905 * server.h (traceframe_read_info): Declare.
11906
4f3e6fb7
YQ
119072011-02-11 Yao Qi <yao@codesourcery.com>
11908
11909 * configure.ac: Call AC_PROG_RANLIB.
11910 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11911 * configure: Regenerate.
11912
764880b7
PA
119132011-02-07 Pedro Alves <pedro@codesourcery.com>
11914
11915 * server.c (gdb_read_memory): Change return semantics to allow
11916 partial transfers.
11917 (handle_search_memory_1): Adjust.
11918 (process_serial_event) <'m' packet>: Handle partial transfers.
11919 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11920
1c79eb8a
PA
119212011-01-28 Pedro Alves <pedro@codesourcery.com>
11922
11923 * regcache.c (init_register_cache): Initialize
11924 regcache->register_status.
11925 (free_register_cache): Release regcache->register_status.
11926 (regcache_cpy): Copy register_status.
11927 (registers_to_string): Print 'x's for unavailable registers.
11928 (supply_register): Mark the register's status valid or
11929 unavailable, depending on whether a buffer was passed in or not.
11930 (supply_register_zeroed): New.
11931 (supply_regblock): Mark the registers' status valid or
11932 unavailable, depending on whether a buffer was passed in or not.
11933 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11934 (struct regcache): New `register_status' field.
11935 (supply_register_zeroed): Declare.
11936 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11937 supply_register_zeroed, rather than passing a NULL buffer to
11938 supply_register.
11939 * tracepoint.c (fetch_traceframe_registers): Update comment.
11940
85724a0e
PA
119412011-01-28 Pedro Alves <pedro@codesourcery.com>
11942
11943 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11944 buffer explicit.
11945
d08aafef
PA
119462011-01-25 Pedro Alves <pedro@codesourcery.com>
11947
11948 * server.h (decode_xfer_write): Change prototype.
11949 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11950 and don't extract the annex here.
11951 * server.c (decode_xfer_read): Remove `annex' parameter,
11952 and don't extract the annex here.
11953 (decode_xfer): New.
11954 (struct qxfer): New.
11955 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11956 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11957 (handle_qxfer_statictrace): New functions, abstracted out from
11958 handle_query, and made to use the struct qxfer interface.
11959 (handle_threads_qxfer_proper): Rename to ...
11960 (handle_qxfer_threads_proper): ... this.
11961 (handle_threads_qxfer): Rename to ...
11962 (handle_qxfer_threads): ... this. Adjust.
11963 (qxfer_packets): New array.
11964 (handle_qxfer): New function.
11965 (handle_query): Use handle_qxfer.
11966
493e2a69
MS
119672011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11968
11969 * gdbreplay.c: Shorten lines of >= 80 columns.
11970 * linux-low.c: Ditto.
11971 * linux-ppc-low.c: Ditto.
11972 * linux-s390-low.c: Ditto.
11973 * linux-sparc-low.c: Ditto.
11974 * linux-x86-low.c: Ditto.
11975 * linux-xtensa-low.c: Ditto.
11976 * mem-break.c: Ditto.
11977 * nto-low.c: Ditto.
11978 * regcache.h: Ditto.
11979 * remote-utils.c: Ditto.
11980 * server.c: Ditto.
11981 * server.h: Ditto.
11982 * thread-db.c: Ditto.
11983 * tracepoint.c: Ditto.
11984 * utils.c: Ditto.
11985 * win32-low.h: Ditto.
11986
44944448
JB
119872011-01-05 Joel Brobecker <brobecker@adacore.com>
11988
11989 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11990 update.
11991
71ce852c
JB
119922011-01-01 Joel Brobecker <brobecker@adacore.com>
11993
11994 * server.c (gdbserver_version): Update copyright year in version
11995 output.
11996 * gdbreplay.c (gdbreplay_version): Ditto.
11997
eb826dc6
MF
119982010-12-29 Jie Zhang <jie.zhang@analog.com>
11999
12000 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12001 * linux-bfin-low.c: New file.
12002 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12003 PT_DATA_ADDR for BFIN targets.
12004 * Makefile.in (SFILES): Add linux-bfin-low.c.
12005 (clean): Remove reg-bfin.c.
12006 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12007 * README: Mention supported Blackfin targets.
12008
39ab222a
MF
120092010-12-23 Mike Frysinger <vapier@gentoo.org>
12010
12011 * .gitignore: New file.
12012
a1f2ce7d
MF
120132010-11-16 Mike Frysinger <vapier@gentoo.org>
12014
12015 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12016
f474844c
JZ
120172010-10-22 Jie Zhang <jie@codesourcery.com>
12018
12019 * Makefile.in: Add FLAGS_TO_PASS variable.
12020 (install): Remove dependency of install-only and recursively
12021 invoke make for install-only.
12022
f1048712
DE
120232010-10-04 Doug Evans <dje@google.com>
12024
12025 * Makefile.in (uninstall): Use $(DESTDIR).
12026
b53a1623
PA
120272010-09-24 Pedro Alves <pedro@codesourcery.com>
12028
e6ee044d
PA
12029 PR gdb/11842
12030
b53a1623
PA
12031 * linux-x86-low.c (compat_siginfo_from_siginfo)
12032 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12033 si_code is < 0. Check for si_code == SI_TIMER before checking for
12034 si_code < 0.
12035
fa1bd1e4
JB
120362010-09-13 Joel Brobecker <brobecker@adacore.com>
12037
12038 * lynx-i386-low.c: New file.
12039 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12040
47fac8f8
JB
120412010-09-13 Joel Brobecker <brobecker@adacore.com>
12042
12043 * lynx-low.c (ptrace_request_to_str): Remove handling for
12044 request values that have been removed in LynxOS 5.x.
12045
1adfc54d
JB
120462010-09-13 Joel Brobecker <brobecker@adacore.com>
12047
12048 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12049 <ptrace.h>
12050
c2a66c29
NS
120512010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12052
12053 * configure.ac: Add --enable-inprocess-agent option.
12054 * configure: Rebuilt.
12055
32fcada3
YQ
120562010-09-06 Yao Qi <yao@codesourcery.com>
12057
12058 * linux-low.c (linux_kill): Remove unused variable.
12059 (linux_stabilize_threads): Likewise.
12060 * server.c (start_inferior): Likewise.
12061 (queue_stop_reply_callback): Likewise.
12062 * tracepoint.c (do_action_at_tracepoint): Likewise.
12063
0cccb683
YQ
120642010-09-06 Yao Qi <yao@codesourcery.com>
12065
12066 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12067 on return.
12068
423ec54c
JK
120692010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12070
12071 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12072
12ac6819
PA
120732010-09-06 Pedro Alves <pedro@codesourcery.com>
12074
12075 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12076 "$(IPA_DEPFILES)".
12077
8ed54b31
JB
120782010-09-01 Joel Brobecker <brobecker@adacore.com>
12079
12080 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12081 gdbserver/lynx-ppc-low.c: New files.
12082 * Makefile.in (lynx_low_h): New variable.
12083 (lynx-low.o, lynx-ppc-low.o): New rules.
12084 * configure.ac: On LynxOS, link with -lnetinet.
12085 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12086 * configure: regenerate.
12087
bb0116a4
JB
120882010-09-01 Joel Brobecker <brobecker@adacore.com>
12089
12090 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12091 * configure.ac: Add check for vasprintf and vsnprintf.
12092 * configure, config.in: Regenerate.
12093 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12094
a778ab81 120952010-09-01 Joel Brobecker <brobecker@adacore.com>
12096
12097 * gdbreplay.c: Move include of alloca.h up, next to include of
12098 malloc.h.
12099 * server.h: Add include of malloc.h.
12100 * mem-break.c: Remove include of malloc.h.
12101 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12102
8b034a19 121032010-09-01 Joel Brobecker <brobecker@adacore.com>
12104
12105 * Makefile.in (memmem.o): Build with -Wno-error.
12106
121072010-09-01 Joel Brobecker <brobecker@adacore.com>
12108
12109 * utils.c (xsnprintf): Make non-static.
12110 * server.h: Add xsnprintf declaration.
12111 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12112 replace calls to snprintf by calls to xsnprintf throughout.
12113
121142010-09-01 Joel Brobecker <brobecker@adacore.com>
12115
12116 * configure.ac: Add configure check for alloca.
12117 * configure, config.in: Regenerate.
12118 * server.h: Include alloca.h if it exists.
12119 * gdbreplay.c: Include alloca.h if it exists.
12120
1a981360
PA
121212010-08-28 Pedro Alves <pedro@codesourcery.com>
12122
12123 * linux-low.c (__SIGRTMIN): Define if not already defined.
12124 (linux_create_inferior): Check for __ANDROID__ rather than
12125 __SIGRTMIN.
12126 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12127 are already deferred.
12128 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12129 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12130 stopped and already has a pending signal to report.
12131 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12132 a pending signal to report or is moving out of a jump pad.
12133 (linux_init_signals): Check for __ANDROID__ rather than
12134 __SIGRTMIN.
12135
b4d51a55
PA
121362010-08-28 Pedro Alves <pedro@codesourcery.com>
12137
12138 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12139 debug_threads check. Avoid a linear search when not doing debug
12140 output.
12141
ec48365d
PA
121422010-08-27 Pedro Alves <pedro@codesourcery.com>
12143
12144 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12145 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12146 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12147 (process_event): Change local fd's type to gdb_fildes_t.
12148 (create_file_handler): Adjust prototype.
12149 (delete_file_handler): Adjust prototype.
12150 (handle_file_event): Adjust prototype. Use pfildes.
12151 (create_file_event): Adjsut prototype.
12152 * remote-utils.c (remote_desc, listen_desc): Change type to
12153 gdb_fildes_t.
12154 * server.h: New gdb_fildes_t typedef.
12155 [USE_WIN32API]: Include winsock2.h.
12156 (delete_file_handler, add_file_handler): Adjust prototypes.
12157 (pfildes): Declare.
12158 * utils.c (pfildes): New.
12159
854d88f0
PA
121602010-08-27 Pedro Alves <pedro@codesourcery.com>
12161
12162 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12163 * configure: Regenerate.
12164
0146f85b
PA
121652010-08-27 Pedro Alves <pedro@codesourcery.com>
12166
12167 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12168 (linux_done_accessing_memory): ... this.
12169 (linux_target_ops): Adjust.
12170 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12171 * nto-low.c (nto_target_ops): Adjust comment.
12172 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12173 * spu-low.c (spu_target_ops): Adjust comment.
12174 * target.h (target_ops): Rename unprepare_to_access_memory field
12175 to done_accessing_memory.
12176 (unprepare_to_access_memory): Rename to ...
12177 (done_accessing_memory): ... this.
12178
90d74c30
PA
121792010-08-26 Pedro Alves <pedro@codesourcery.com>
12180
12181 * linux-low.c (linux_prepare_to_access_memory): New.
12182 (linux_unprepare_to_access_memory): New.
12183 (linux_target_ops): Install them.
12184 * server.c (read_memory): Rename to ...
12185 (gdb_read_memory): ... this. Use
12186 prepare_to_access_memory/prepare_to_access_memory.
12187 (write_memory): Rename to ...
12188 (gdb_write_memory): ... this. Use
12189 prepare_to_access_memory/prepare_to_access_memory.
12190 (handle_search_memory_1): Adjust.
12191 (process_serial_event): Adjust.
12192 * target.h (struct target_ops): New fields
12193 prepare_to_access_memory and unprepare_to_access_memory.
12194 (prepare_to_access_memory, unprepare_to_access_memory): New.
12195 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12196 prepare_to_access_memory/prepare_to_access_memory.
12197 * nto-low.c (nto_target_ops): Adjust.
12198 * spu-low.c (spu_target_ops): Adjust.
12199 * win32-low.c (win32_target_ops): Adjust.
12200
fd467969
PA
122012010-08-26 Pedro Alves <pedro@codesourcery.com>
12202
12203 * Makefile.in (WARN_CFLAGS): Get it from configure.
12204 (WERROR_CFLAGS): New.
12205 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12206 * configure.ac: Introduce --enable-werror, which adds -Werror to
12207 the compiler command line. Enabled by default. Disable with
12208 --disable-werror. Add -Wdeclaration-after-statement
12209 Wpointer-arith and -Wformat-nonliteral to warning flags.
12210 * configure: Regenerate.
12211
331e2f5f
PA
122122010-08-26 Pedro Alves <pedro@codesourcery.com>
12213
12214 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12215
e581f2b4
PA
122162010-08-26 Pedro Alves <pedro@codesourcery.com>
12217
12218 * gdbreplay.c (remote_error): New.
12219 (gdbchar): New.
12220 (expect): Use gdbchar. Check for error reading from GDB.
12221 Clarify sync error output.
12222 (play): Check for errors writing to GDB.
12223 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12224 * remote-utils.c (getpkt): Check for errors writing to the remote
12225 descriptor.
12226
3c11dd79
PA
122272010-08-25 Pedro Alves <pedro@codesourcery.com>
12228
12229 * linux-low.c (linux_wait_1): Move non-debugging code out of
12230 `debug_threads' control.
12231
d20a8ad9
PA
122322010-08-25 Pedro Alves <pedro@codesourcery.com>
12233
12234 * linux-low.c (linux_wait_1): Don't set last_status here.
12235 * server.c (push_event, queue_stop_reply_callback): Assert we're
12236 not pushing a TARGET_WAITKIND_IGNORE event.
12237 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12238 (myresume, handle_target_event): Set the thread's last_resume_kind
12239 and last_status from the target returned status.
12240
964e4306
PA
122412010-08-25 Pedro Alves <pedro@codesourcery.com>
12242
12243 PR threads/10729
12244
12245 * linux-x86-low.c (update_debug_registers_callback): New.
12246 (i386_dr_low_set_addr): Use it.
12247 (i386_dr_low_get_addr): New.
12248 (i386_dr_low_set_control): Use update_debug_registers_callback.
12249 (i386_dr_low_get_control): New.
12250 (i386_dr_low_get_status): Adjust.
12251 * linux-low.c (linux_stop_lwp): New.
12252 * linux-low.h (linux_stop_lwp): Declare.
12253
12254 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12255 argument instead of a i386_debug_reg_state.
12256 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12257 a i386_debug_reg_state.
12258 (i386_insert_aligned_watchpoint): Adjust.
12259 (i386_remove_aligned_watchpoint): Adjust.
12260 (i386_low_stopped_data_address): Read the debug registers from the
12261 inferior instead of from the mirrors.
12262 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12263 (i386_dr_low_get_addr): Declare.
12264 (i386_dr_low_get_control): Declare.
12265 (i386_dr_low_get_status): Change prototype.
12266
12267 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12268 (i386_dr_low_get_addr): New.
12269 (i386_dr_low_get_control): New.
12270 (i386_dr_low_get_status): Adjust prototype. Return
12271 dr_status_mirror.
12272 (i386_initial_stuff): Clear dr_status_mirror and
12273 dr_control_mirror.
12274 (i386_get_thread_context): Adjust.
12275 (i386_set_thread_context): Adjust.
12276 (i386_thread_added): Adjust.
12277
5f21a75b
PA
122782010-08-24 Pedro Alves <pedro@codesourcery.com>
12279
12280 * linux-low.h (linux_thread_area): Delete declaration.
12281
3e4c1235
TS
122822010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12283
12284 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12285 after its termination.
12286
1971b033
PA
122872010-08-09 Pedro Alves <pedro@codesourcery.com>
12288
12289 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12290 (gdb_wants_all_stopped): Delete.
12291 (linux_wait_1): Don't call them.
12292 * server.c (handle_v_cont): Tag all threads as want-stopped.
12293 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12294 stopped as "client-wants-stopped".
12295
310444ac
PA
122962010-07-31 Pedro Alves <pedro@codesourcery.com>
12297
12298 * Makefile.in (signals_h): New.
12299 (server_h): Depend on it.
12300 (server.o): Don't depend on $(signals_def).
12301 (signals.o): Depend on $(signals_def).
12302
a19cae16
JK
123032010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12304
12305 * Makefile.in (signals_def): New.
12306 (server_h): Append include/gdb/signals.h and signals_def.
12307 (server.o): Append signals_def.
12308
30d50328
JK
123092010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12310
12311 * server.c (handle_target_event): Use target_signal_to_host for
12312 resume_info.sig initialization.
12313 * target.h (struct thread_resume) <sig>: New comment.
12314
5c3216e2
OS
123152010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12316
c6f46ca0
OS
12317 * server.c (handle_query): strcpy() the returned string from paddress()
12318 instead of sprintf().
5c3216e2
OS
12319 * utils.c (paddress): Return phex_nz().
12320
6bd31874
JB
123212010-07-07 Joel Brobecker <brobecker@adacore.com>
12322
12323 * server.c (handle_v_cont): Call mourn_inferior if process
12324 just exited.
12325 (myresume): Likewise.
12326
0fb4aa4b
PA
123272010-07-01 Pedro Alves <pedro@codesourcery.com>
12328
12329 Static tracepoints, and integration with UST.
12330
12331 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12332 * mem-break.c (uninsert_all_breakpoints)
12333 (reinsert_all_breakpoints): New.
12334 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12335 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12336 (gdb_agent_ust_loaded, helper_thread_id)
12337 (gdb_agent_helper_thread_id): New macros.
12338 (struct ipa_sym_addresses): Add addr_ust_loaded,
12339 addr_helper_thread_id, addr_cmd_buf.
12340 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12341 (in_process_agent_loaded_ust): New.
12342 (write_e_ust_not_loaded): New.
12343 (maybe_write_ipa_ust_not_loaded): New.
12344 (struct collect_static_trace_data_action): New.
12345 (enum tracepoint_type) <static_tracepoint>: New.
12346 (struct tracepoint) <handle>: Mention static tracepoints.
12347 (struct static_tracepoint_ctx): New.
12348 (CMD_BUF_SIZE): New.
12349 (add_tracepoint_action): Handle static tracepoint actions.
12350 (unprobe_marker_at): New.
12351 (clear_installed_tracepoints): Handle static tracepoints.
12352 (cmd_qtdp): Handle static tracepoints.
12353 (probe_marker_at): New.
12354 (cmd_qtstart): Handle static tracepoints.
12355 (response_tracepoint): Handle static tracepoints.
12356 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12357 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12358 (get_context_regcache): Handle static tracepoints.
12359 (do_action_at_tracepoint): Handle static tracepoint actions.
12360 (traceframe_find_block_type): Handle static trace data blocks.
12361 (traceframe_read_sdata): New.
12362 (download_tracepoints): Download static tracepoint actions.
12363 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12364 (GDB_PROBE_NAME): New.
12365 (ust_ops): New.
12366 (GET_UST_SYM): New.
12367 (USTF): New.
12368 (dlsym_ust): New.
12369 (ust_marker_to_static_tracepoint): New.
12370 (gdb_probe): New.
12371 (collect_ust_data_at_tracepoint): New.
12372 (gdb_ust_probe): New.
12373 (UNIX_PATH_MAX, SOCK_DIR): New.
12374 (gdb_ust_connect_sync_socket): New.
12375 (resume_thread, stop_thread): New.
12376 (run_inferior_command): New.
12377 (init_named_socket): New.
12378 (gdb_ust_socket_init): New.
12379 (cstr_to_hexstr): New.
12380 (next_st): New.
12381 (first_marker, next_marker): New.
12382 (response_ust_marker): New.
12383 (cmd_qtfstm, cmd_qtsstm): New.
12384 (unprobe_marker_at, probe_marker_at): New.
12385 (cmd_qtstmat, gdb_ust_thread): New.
12386 (gdb_ust_init): New.
12387 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12388 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12389 (ST_REGENTRY): New.
12390 (x86_64_st_collect_regmap): New.
12391 (X86_64_NUM_ST_COLLECT_GREGS): New.
12392 (AMD64_RIP_REGNUM): New.
12393 (supply_static_tracepoint_registers): New.
12394 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12395 (ST_REGENTRY): New.
12396 (i386_st_collect_regmap): New.
12397 (i386_NUM_ST_COLLECT_GREGS): New.
12398 (supply_static_tracepoint_registers): New.
12399 * server.c (handle_query): Handle qXfer:statictrace:read.
12400 <qSupported>: Report support for StaticTracepoints, and
12401 qXfer:statictrace:read features.
12402 * server.h (traceframe_read_sdata)
12403 (supply_static_tracepoint_registers): Declare.
12404 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12405 (unpack_varlen_hex): Include in IPA build.
12406 * Makefile.in (ustlibs, ustinc): New.
12407 (IPA_OBJS): Add remote-utils-ipa.o.
12408 ($(IPA_LIB)): Link -ldl and -lpthread.
12409 (UST_CFLAGS): New.
12410 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12411 * config.in, configure: Regenerate.
12412
9e4344e5
PA
124132010-06-20 Ian Lance Taylor <iant@google.com>
12414 Pedro Alves <pedro@codesourcery.com>
12415
12416 * linux-x86-low.c (always_true): Delete.
12417 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12418 trying to fool the compiler with always_true.
12419
c6beb2cb
PA
124202010-06-20 Pedro Alves <pedro@codesourcery.com>
12421
12422 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12423 conditions in gdbserver.
12424
d2ed6730
UW
124252010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12426
12427 * spu-low.c (spu_read_memory): Wrap around local store limit.
12428 (spu_write_memory): Likewise.
12429
4e29fb54
PA
124302010-06-15 Pedro Alves <pedro@codesourcery.com>
12431
12432 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12433 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12434 LONGEST uses.
12435 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12436 uses.
12437 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12438 uses with LONGEST uses.
12439
6a271cae
PA
124402010-06-14 Stan Shebs <stan@codesourcery.com>
12441 Pedro Alves <pedro@codesourcery.com>
12442
12443 Bytecode compiler.
12444
12445 * linux-x86-low.c: Include limits.h.
12446 (add_insns): New.
12447 (always_true): New.
12448 (EMIT_ASM): New.
12449 (EMIT_ASM32): New.
12450 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12451 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12452 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12453 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12454 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12455 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12456 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12457 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12458 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12459 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12460 (amd64_emit_void_call_2): New.
12461 (amd64_emit_ops): New.
12462 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12463 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12464 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12465 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12466 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12467 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12468 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12469 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12470 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12471 (i386_emit_stack_adjust, i386_emit_int_call_1)
12472 (i386_emit_void_call_2): New.
12473 (i386_emit_ops): New.
12474 (x86_emit_ops): New.
12475 (the_low_target): Install x86_emit_ops.
12476 * server.h (struct emit_ops): New.
12477 (get_raw_reg_func_addr): Declare.
12478 (current_insn_ptr, emit_error): Declare.
12479 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12480 (set_trace_state_variable_value): New defines.
12481 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12482 addr_get_trace_state_variable_value and
12483 addr_set_trace_state_variable_value.
12484 (symbol_list): New fields for get_raw_reg,
12485 get_trace_state_variable_value and set_trace_state_variable_value.
12486 (condfn): New typedef.
12487 (struct tracepoint): New field `compiled_cond'.
12488 (do_action_at_tracepoint): Clear compiled_cond.
12489 (get_trace_state_variable_value, set_trace_state_variable_value):
12490 Export in the IPA.
12491 (condition_true_at_tracepoint): If there's a compiled condition,
12492 run that.
12493 (current_insn_ptr, emit_error): New globals.
12494 (struct bytecode_address): New.
12495 (get_raw_reg_func_addr): New.
12496 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12497 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12498 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12499 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12500 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12501 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12502 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12503 (compile_tracepoint_condition, compile_bytecodes): New.
12504 * target.h (emit_ops): Forward declare.
12505 (struct target_ops): New field emit_ops.
12506 (target_emit_ops): New.
12507 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12508 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12509 * linux-low.c (linux_emit_ops): New.
12510 (linux_target_ops): Install it.
12511 * linux-low.h (struct linux_target_ops): New field emit_ops.
12512
92b72907
UW
125132010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12514
12515 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12516 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12517
fa593d66
PA
125182010-06-01 Pedro Alves <pedro@codesourcery.com>
12519 Stan Shebs <stan@codesourcery.com>
12520
12521 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12522 (all): Depend on $(extra_libraries).
12523 (install-only): Install the IPA.
12524 (IPA_OBJS, IPA_LIB): New.
12525 (clean): Remove the IPA lib.
12526 (IPAGENT_CFLAGS): New.
12527 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12528 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12529 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12530 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12531 * configure.ac: Check for atomic builtins support in the compiler.
12532 (IPA_DEPFILES, extra_libraries): Define.
12533 * configure.srv (ipa_obj): Add description.
12534 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12535 (i[34567]86-*-linux*): Set ipa_obj.
12536 (x86_64-*-linux*): Set ipa_obj.
12537 * linux-low.c (stabilizing_threads): New.
12538 (supports_fast_tracepoints): New.
12539 (linux_detach): Stabilize threads before detaching.
12540 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12541 the lwp is either not stabilizing, or is moving out of a jump pad.
12542 (linux_fast_tracepoint_collecting): New.
12543 (maybe_move_out_of_jump_pad): New.
12544 (enqueue_one_deferred_signal): New.
12545 (dequeue_one_deferred_signal): New.
12546 (linux_wait_for_event_1): If moving out of a jump pad, defer
12547 pending signals to later.
12548 (linux_stabilize_threads): New.
12549 (linux_wait_1): Check if threads need moving out of jump pads, and
12550 do it if so.
12551 (stuck_in_jump_pad_callback): New.
12552 (move_out_of_jump_pad_callback): New.
12553 (lwp_running): New.
12554 (linux_resume_one_lwp): Handle moving out of jump pads.
12555 (linux_set_resume_request): Dequeue deferred signals.
12556 (need_step_over_p): Also step over fast tracepoint jumps.
12557 (start_step_over): Also uninsert fast tracepoint jumps.
12558 (finish_step_over): Also reinsert fast tracepoint jumps.
12559 (linux_install_fast_tracepoint_jump): New.
12560 (linux_target_ops): Install linux_stabilize_threads and
12561 linux_install_fast_tracepoint_jump_pad.
12562 * linux-low.h (linux_target_ops) <get_thread_area,
12563 install_fast_tracepoint_jump_pad>: New fields.
12564 (struct lwp_info) <collecting_fast_tracepoint,
12565 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12566 (linux_get_thread_area): Declare.
12567 * linux-x86-low.c (jump_insn): New.
12568 (x86_get_thread_area): New.
12569 (append_insns): New.
12570 (push_opcode): New.
12571 (amd64_install_fast_tracepoint_jump_pad): New.
12572 (i386_install_fast_tracepoint_jump_pad): New.
12573 (x86_install_fast_tracepoint_jump_pad): New.
12574 (the_low_target): Install x86_get_thread_area and
12575 x86_install_fast_tracepoint_jump_pad.
12576 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12577 (struct fast_tracepoint_jump): New.
12578 (fast_tracepoint_jump_insn): New.
12579 (fast_tracepoint_jump_shadow): New.
12580 (find_fast_tracepoint_jump_at): New.
12581 (fast_tracepoint_jump_here): New.
12582 (delete_fast_tracepoint_jump): New.
12583 (set_fast_tracepoint_jump): New.
12584 (uninsert_fast_tracepoint_jumps_at): New.
12585 (reinsert_fast_tracepoint_jumps_at): New.
12586 (set_breakpoint_at): Use write_inferior_memory.
12587 (uninsert_raw_breakpoint): Use write_inferior_memory.
12588 (check_mem_read): Mask out fast tracepoint jumps.
12589 (check_mem_write): Mask out fast tracepoint jumps.
12590 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12591 (set_fast_tracepoint_jump): Declare.
12592 (delete_fast_tracepoint_jump)
12593 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12594 (reinsert_fast_tracepoint_jumps_at): Declare.
12595 * regcache.c: Don't compile many functions when building the
12596 in-process agent library.
12597 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12598 the register buffer in the heap.
12599 (free_register_cache): If the register buffer isn't owned by the
12600 regcache, don't free it.
12601 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12602 pre-existing register caches.
12603 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12604 type.
12605 (convert_ascii_to_int): : Constify `from' parameter type.
12606 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12607 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12608 the needed buffer in-place.
12609 (relocate_instruction): New.
12610 * server.c (handle_query) <qSymbols>: If the target supports
12611 tracepoints, give it a chance of looking up symbols. Report
12612 support for fast tracepoints.
12613 (handle_status): Stabilize threads.
12614 (process_serial_event): Adjust.
12615 * server.h (struct fast_tracepoint_jump): Forward declare.
12616 (struct process_info) <fast_tracepoint_jumps>: New field.
12617 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12618 (decode_X_packet, decode_M_packet): Adjust.
12619 (relocate_instruction): Declare.
12620 (in_process_agent_loaded): Declare.
12621 (tracepoint_look_up_symbols): Declare.
12622 (struct fast_tpoint_collect_status): Declare.
12623 (fast_tracepoint_collecting): Declare.
12624 (force_unlock_trace_buffer): Declare.
12625 (handle_tracepoint_bkpts): Declare.
12626 (initialize_low_tracepoint)
12627 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12628 * target.h (struct target_ops) <stabilize_threads,
12629 install_fast_tracepoint_jump_pad>: New fields.
12630 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12631 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12632 [HAVE_STDINT_H]: Include stdint.h.
12633 (trace_debug_1): Rename to ...
12634 (trace_vdebug): ... this.
12635 (trace_debug): Rename to ...
12636 (trace_debug_1): ... this. Add `level' parameter.
12637 (trace_debug): New.
12638 (ATTR_USED, ATTR_NOINLINE): New.
12639 (IP_AGENT_EXPORT): New.
12640 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12641 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12642 (about_to_request_buffer_space, trace_buffer_is_full)
12643 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12644 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12645 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12646 (traceframe_write_count, traceframes_created)
12647 (trace_state_variables)
12648 New renaming defines.
12649 (struct ipa_sym_addresses): New.
12650 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12651 (symbol_list): New.
12652 (ipa_sym_addrs): New.
12653 (all_tracepoint_symbols_looked_up): New.
12654 (in_process_agent_loaded): New.
12655 (write_e_ipa_not_loaded): New.
12656 (maybe_write_ipa_not_loaded): New.
12657 (tracepoint_look_up_symbols): New.
12658 (debug_threads) [IN_PROCESS_AGENT]: New.
12659 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12660 (UNKNOWN_SIDE_EFFECTS): New.
12661 (stop_tracing): New.
12662 (flush_trace_buffer): New.
12663 (stop_tracing_bkpt): New.
12664 (flush_trace_buffer_bkpt): New.
12665 (read_inferior_integer): New.
12666 (read_inferior_uinteger): New.
12667 (read_inferior_data_pointer): New.
12668 (write_inferior_data_pointer): New.
12669 (write_inferior_integer): New.
12670 (write_inferior_uinteger): New.
12671 (struct collect_static_trace_data_action): Delete.
12672 (enum tracepoint_type): New.
12673 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
12674 <actions_str, step_actions, step_actions_str>: Only include in
12675 GDBserver.
fa593d66
PA
12676 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12677 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12678 (tracepoints): Use IP_AGENT_EXPORT.
12679 (last_tracepoint): Don't include in the IPA.
12680 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12681 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12682 (alloced_trace_state_variables): New.
12683 (trace_state_variables): Use IP_AGENT_EXPORT.
12684 (traceframe_t): Delete unused variable.
12685 (circular_trace_buffer): Don't include in the IPA.
12686 (trace_buffer_start): Delete.
12687 (struct trace_buffer_control): New.
12688 (trace_buffer_free): Delete.
12689 (struct ipa_trace_buffer_control): New.
12690 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12691 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12692 New.
12693 (trace_buffer_ctrl): New.
12694 (TRACE_BUFFER_CTRL_CURR): New.
12695 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12696 Reimplement as macros.
12697 (trace_buffer_wrap): Delete.
12698 (traceframe_write_count, traceframe_read_count)
12699 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12700 (struct tracepoint_hit_ctx) <type>: New field.
12701 (struct fast_tracepoint_ctx): New.
12702 (memory_barrier): New.
12703 (cmpxchg): New.
12704 (record_tracepoint_error): Update atomically in the IPA.
12705 (clear_inferior_trace_buffer): New.
12706 (about_to_request_buffer_space): New.
12707 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12708 updating the same buffer.
12709 (add_tracepoint): Default the tracepoint's type to trap
12710 tracepoint, and orig_size to -1.
12711 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12712 internal variables.
12713 (create_trace_state_variable): New parameter `gdb'. Handle it.
12714 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12715 (cmd_qtdp): Handle fast tracepoints.
12716 (cmd_qtdv): Adjust.
12717 (max_jump_pad_size): New.
12718 (gdb_jump_pad_head): New.
12719 (get_jump_space_head): New.
12720 (claim_jump_space): New.
12721 (sort_tracepoints): New.
12722 (MAX_JUMP_SIZE): New.
12723 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12724 IPA.
12725 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12726 support. Upload fast traceframes, and delete internal IPA
12727 breakpoints.
12728 (stop_tracing_handler): New.
12729 (flush_trace_buffer_handler): New.
12730 (cmd_qtstop): Upload fast tracepoints.
12731 (response_tracepoint): Handle fast tracepoints.
12732 (tracepoint_finished_step): Upload fast traceframes. Set the
12733 tracepoint hit context's tracepoint type.
12734 (handle_tracepoint_bkpts): New.
12735 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12736 type. Add comment about fast tracepoints.
12737 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12738 non-existing action_str field.
12739 (get_context_regcache): Handle fast tracepoints.
12740 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12741 to the regcache.
12742 (fast_tracepoint_from_jump_pad_address): New.
12743 (fast_tracepoint_from_ipa_tpoint_address): New.
12744 (collecting_t): New.
12745 (force_unlock_trace_buffer): New.
12746 (fast_tracepoint_collecting): New.
12747 (collecting): New.
12748 (gdb_collect): New.
12749 (write_inferior_data_ptr): New.
12750 (target_tp_heap): New.
12751 (target_malloc): New.
12752 (download_agent_expr): New.
12753 (UALIGN): New.
12754 (download_tracepoints): New.
12755 (download_trace_state_variables): New.
12756 (upload_fast_traceframes): New.
12757 (IPA_FIRST_TRACEFRAME): New.
12758 (IPA_NEXT_TRACEFRAME_1): New.
12759 (IPA_NEXT_TRACEFRAME): New.
12760 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12761 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12762 (gdb_jump_pad_buffer_end): New.
12763 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12764 (initialize_tracepoint): Adjust.
12765 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12766 buffer. Initialize the low module.
12767 * utils.c (PREFIX, TOOLNAME): New.
12768 (malloc_failure): Use PREFIX.
12769 (error): In the IPA, an error causes an exit.
12770 (fatal, warning): Use PREFIX.
12771 (internal_error): Use TOOLNAME.
12772 (NUMCELLS): Increase to 10.
12773 * configure, config.in: Regenerate.
12774
d149dd1d
PA
127752010-06-01 Pedro Alves <pedro@codesourcery.com>
12776
12777 * server.c (handle_query) <qSupported>: Do two passes over the
12778 qSupported string to avoid nesting strtok.
12779
f6528abd
JK
127802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12781
12782 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12783 (CDEPS): New.
12784 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12785 -Wl,--dynamic-list.
12786 * configure: Regenerate.
12787 * proc-service.list: New.
12788
ca2a87a0
JK
127892010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12790
12791 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12792 New comment.
12793
363a6e9f
OS
127942010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12795
12796 * gdbreplay.c (remote_open): Check error return from socket() call by
12797 its equality to -1 not by it being negative.
12798 * remote-utils.c (remote_open): Likewise.
12799
d23b6cb1
PA
128002010-05-23 Pedro Alves <pedro@codesourcery.com>
12801
12802 * config.h: Regenerate.
12803
28d3cf85
MK
128042010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12805
12806 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12807 doesn't provide PTRACE_GET_THREAD_AREA.
12808
fea36a59
MK
128092010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12810
12811 * linux-m68k-low.c: Include <asm/ptrace.h>
12812 (ps_get_thread_area): Implement.
12813
24b066ba
DE
128142010-05-03 Doug Evans <dje@google.com>
12815
12816 * event-loop.c (struct callback_event): New struct.
12817 (callback_list): New global.
12818 (append_callback_event, delete_callback_event): New functions.
12819 (process_callback): New function.
12820 (start_event_loop): Call it.
12821 * remote-utils.c (NOT_SCHEDULED): Define.
12822 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12823 moved out of readchar.
12824 (readchar): Rewrite. Call reschedule before returning.
12825 (reset_readchar): New function.
12826 (remote_close): Call it.
12827 (process_remaining, reschedule): New functions.
12828 * server.h (callback_handler_func): New typedef.
12829 (append_callback_event, delete_callback_event): Declare.
12830
9836d6ea
PA
128312010-05-03 Pedro Alves <pedro@codesourcery.com>
12832
12833 * proc-service.c (ps_pglobal_lookup): Use
12834 thread_db_look_up_one_symbol.
12835 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12836 parameter. Use it instead of all_symbols_looked_up.
12837 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12838 field.
12839 (all_symbols_looked_up): Don't declare.
12840 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12841 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12842 field.
12843 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12844 Set all_symbols_looked_up here.
12845 (thread_db_look_up_one_symbol): New.
12846 (thread_db_get_tls_address): Adjust.
12847 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12848 thread_db object on the heap, and tentatively set it in the
12849 process structure.
12850 (thread_db_init): Don't set all_symbols_looked_up here.
12851 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12852
7984d532
PA
128532010-05-03 Pedro Alves <pedro@codesourcery.com>
12854
12855 * linux-low.c (linux_kill, linux_detach): Adjust.
12856 (status_pending_p_callback): Remove redundant statement. Check
12857 for !TARGET_WAITIKIND_IGNORE, instead of
12858 TARGET_WAITKIND_STOPPED.
12859 (handle_tracepoints): Make sure LWP is locked. Adjust.
12860 (linux_wait_for_event_1): Adjust.
12861 (linux_cancel_breakpoints): New.
12862 (unsuspend_one_lwp): New.
12863 (unsuspend_all_lwps): New.
12864 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12865 (send_sigstop_callback): Change return type to int, add new
12866 `except' parameter and handle it.
12867 (suspend_and_send_sigstop_callback): New.
12868 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12869 pass them down. If SUSPEND, also increment the lwp's suspend
12870 count.
12871 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12872 (need_step_over_p): Don't consider suspended LWPs.
12873 (start_step_over): Adjust.
12874 (proceed_one_lwp): Change return type to int, add new `except'
12875 parameter and handle it.
12876 (unsuspend_and_proceed_one_lwp): New.
12877 (proceed_all_lwps): Use find_inferior instead of
12878 for_each_inferior.
12879 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12880 also decrement the suspend count of LWPs. Pass `except' down,
12881 instead of hacking its suspend count.
12882 (linux_pause_all): Add `freeze' parameter. Adjust.
12883 (linux_unpause_all): New.
12884 (linux_target_ops): Install linux_unpause_all.
12885 * server.c (handle_status): Adjust.
12886 * target.h (struct target_ops): New fields `unpause_all' and
12887 `cancel_breakpoints'. Add new parameter to `pause_all'.
12888 (pause_all): Add new `freeze' parameter.
12889 (unpause_all): New.
12890 (cancel_breakpoints): New.
12891 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12892 cancel breakpoints.
12893 (cmd_qtstart): Pause threads.
12894 (stop_tracing): Pause threads, and cancel breakpoints.
12895 * win32-low.c (win32_target_ops): Adjust.
12896
e471f25b
PA
128972010-05-03 Pedro Alves <pedro@codesourcery.com>
12898
12899 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12900 the inferior right away from here...
12901 (linux_wait_1): ... to here, and adjust to check the thread's
12902 last_resume_kind instead of the lwp's step or stop_expected flags.
12903
1915ef4f
PA
129042010-05-02 Pedro Alves <pedro@codesourcery.com>
12905
12906 * README: Use consistent `GDB' and `GDBserver' spellings.
12907
f9e39928
PA
129082010-05-02 Pedro Alves <pedro@codesourcery.com>
12909
12910 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12911 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12912 (linux_detach_one_lwp): Assume the lwp is stopped.
12913 (any_thread_of): Delete.
12914 (linux_detach): Stop all lwps here. Don't blindly delete all
12915 breakpoints.
12916 (delete_lwp_callback): New.
12917 (linux_mourn): Delete all lwps of the process that is gone.
12918 (linux_wait_1): Don't delete the last lwp of the process here.
12919 * mem-break.h (mark_breakpoints_out): Declare.
12920 * mem-break.c (mark_breakpoints_out): New.
12921 (free_all_breakpoints): Use it.
12922 * server.c (handle_target_event): If the process is gone, mark
12923 breakpoints out.
12924 * thread-db.c (struct thread_db) <create_bp>: New field.
12925 (thread_db_enable_reporting): Fix prototype. Store a thread event
12926 breakpoint reference in the thread_db struct.
12927 (thread_db_load_search): Clear the thread_db object.
12928 (try_thread_db_load_1): Ditto.
12929 (switch_to_process): New.
12930 (disable_thread_event_reporting): Use it.
12931 (remove_thread_event_breakpoints): New.
12932 (thread_db_detach, thread_db_mourn): Use it.
12933
1e7fc18c
PA
129342010-05-01 Pedro Alves <pedro@codesourcery.com>
12935
12936 * linux-low.c (linux_enable_event_reporting): New.
12937 (linux_wait_for_event_1, handle_extended_wait): Use it.
12938
02fc4de7
PA
129392010-04-30 Pedro Alves <pedro@codesourcery.com>
12940
12941 * linux-low.c (linux_kill_one_lwp, linux_kill)
12942 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12943 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12944 SIGSTOP even if the LWP is stopped.
12945 (send_sigstop_callback): New.
12946 (stop_all_lwps): Use send_sigstop_callback instead.
12947 (linux_resume_one_thread): Adjust.
12948 (proceed_one_lwp): Still proceed an LWP that the client has
12949 requested to stop, if we haven't reported it as stopped yet. Make
12950 sure that LWPs the client want stopped, have a pending SIGSTOP.
12951
bc3b5632
DE
129522010-04-26 Doug Evans <dje@google.com>
12953
ae1ada35
DE
12954 * server.c (handle_general_set): Make static.
12955
bc3b5632
DE
12956 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12957 Print received char after testing for error/eof instead of before.
12958 (input_interrupt): Tweak comment.
12959
65730243
DE
129602010-04-23 Doug Evans <dje@google.com>
12961
12962 * server.c (start_inferior): Print inferior argv if --debug.
12963
a8ae7dc0
AR
129642010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12965
12966 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12967 * nto-x86-low.c: Include server.h
12968
1c07cc19
PM
129692010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12970
12971 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12972 be consistent with other sources of this directory.
12973 (init_registers_amd64): Correct name of source file of this function
12974 in the comment.
12975
e0a61e09
PM
129762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12977
12978 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12979 64-bit executables.
12980
54709339
PM
129812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12982
12983 * win32-i386-low.c: Add 64-bit support.
12984 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12985 (init_registers_amd64): Declare.
12986 (mappings): Add 64-bit version of array.
12987 (init_windows_x86): New function.
12988 (the_low_target): Change init_arch field to init_windows_x86.
12989
e8f0053d
PM
129902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12991
12992 * win32-low.c: Adapt to support also 64-bit architecture.
12993 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12994 (get_image_name): Use SIZE_T type for local variable `done'.
12995 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12996 (toolhelp_get_dll_name): Idem.
12997 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12998 Use uintptr_t typecast to avoid warning.
12999 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13000 (handle_exception): Use phex_nz to avoid warning.
13001 (win32_wait): Remove unused local variable `process'.
13002
c481e77e
PM
130032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13004
13005 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13006 `amd64-avx.o'.
13007
12ea4b69
PM
130082010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13009
13010 * configure.ac: Use `ws2_32' library for srv_mingw.
13011 * configure: Regenerate.
13012 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13013 * remote-utils.c: Likewise.
13014
f6d1620c
L
130152010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13016
13017 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13018 if __x86_64__ is defined.
13019
8e642873
PM
130202010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13021
13022 * configure: Regenerate.
13023
711e434b
PM
130242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13025
13026 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13027 * target.h (target_ops): New get_tib_address field.
13028 * win32-low.h (win32_thread_info): Add thread_local_base field.
13029 * win32-low.c (child_add_thread): Add tlb argument.
13030 Set thread_local_base field to TLB.
13031 (get_child_debug_event): Adapt to child_add_thread change.
13032 (win32_get_tib_address): New function.
13033 (win32_target_ops): Set get_tib_address field to
13034 win32_get_tib_address.
13035 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13036
505106cd
PA
130372010-04-12 Pedro Alves <pedro@codesourcery.com>
13038
505106cd
PA
13039 * linux-low.c (linux_mourn): Also remove the process.
13040 * server.c (handle_target_event): Don't remove the process here.
13041 * nto-low.c (nto_mourn): New.
13042 (nto_target_ops): Install it.
13043 * spu-low.c (spu_mourn): New.
13044 (spu_target_ops): Install it.
13045 * win32-low.c (win32_mourn): New.
13046 (win32_target_ops): Install it.
13047
e8470a06
PA
130482010-04-12 Pedro Alves <pedro@codesourcery.com>
13049
13050 * server.h (buffer_xml_printf): Remove redundant `;'.
13051
45ba0d02
PA
130522010-04-12 Pedro Alves <pedro@codesourcery.com>
13053
13054 * regcache.c (set_register_cache): Invalidate regcaches before
13055 changing the register cache layout.
13056 (regcache_invalidate_one): Allow a NULL regcache.
13057 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13058 regcaches before changing the register cache layout or the target
13059 regsets.
13060
59e04013
L
130612010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13062
13063 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13064 variable warning on Linux/x86-64.
13065
8336d594
PA
130662010-04-11 Pedro Alves <pedro@codesourcery.com>
13067
13068 GDBserver disconnected tracing support.
13069
13070 * linux-low.c (linux_remove_process): Delete.
13071 (add_lwp): Don't set last_resume_kind here.
13072 (linux_kill): Use `mourn'.
13073 (linux_detach): Use `thread_db_detach', and `mourn'.
13074 (linux_mourn): New.
13075 (linux_attach_lwp_1): Adjust comment.
13076 (linux_attach): last_resume_kind moved the thread_info; adjust.
13077 (status_pending_p_callback): Adjust.
13078 (linux_wait_for_event_1): Adjust.
13079 (count_events_callback, select_singlestep_lwp_callback)
13080 (select_event_lwp_callback, cancel_breakpoints_callback)
13081 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13082 (proceed_one_lwp): Adjust.
13083 (linux_async): Add debug output.
13084 (linux_thread_stopped): New.
13085 (linux_pause_all): New.
13086 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13087 linux_pause_all.
13088 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13089 (thread_db_free): Delete declaration.
13090 (thread_db_detach, thread_db_mourn): Declare.
13091 * thread-db.c (thread_db_init): Use thread_db_mourn.
13092 (thread_db_free): Delete, split in two.
13093 (disable_thread_event_reporting): New.
13094 (thread_db_detach): New.
13095 (thread_db_mourn): New.
13096
13097 * server.h (struct thread_info) <last_resume_kind>: New field.
13098 <attached>: Add comment.
13099 <gdb_detached>: New field.
13100 (handler_func): Change return type to int.
13101 (handle_serial_event, handle_target_event): Ditto.
13102 (gdb_connected): Declare.
13103 (tracing): Delete.
13104 (disconnected_tracing): Declare.
13105 (stop_tracing): Declare.
13106
13107 * server.c (handle_query) <qSupported>: Report support for
13108 disconnected tracing.
13109 (queue_stop_reply_callback): Account for running threads.
13110 (gdb_wants_thread_stopped): New.
13111 (gdb_wants_all_threads_stopped): New.
13112 (gdb_reattached_process): New.
13113 (handle_status): Clear the `gdb_detached' flag of all processes.
13114 In all-stop, stop all threads.
13115 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13116 (process_serial_event): If the remote connection breaks, or if an
13117 exit was forced with "monitor exit", force an event loop exit.
13118 Handle disconnected tracing on detach.
13119 (handle_serial_event): Adjust.
13120 (handle_target_event): If GDB isn't connected, forward events back
13121 to the inferior, unless the last process exited, in which case,
13122 exit gdbserver. Adjust interface.
13123
13124 * remote-utils.c (remote_open): Don't block in accept. Instead
13125 register an event loop source on the listen socket file
13126 descriptor. Refactor bits into ...
13127 (listen_desc): ... this new global.
13128 (gdb_connected): ... this new function.
13129 (enable_async_notification): ... this new function.
13130 (handle_accept_event): ... this new function.
13131 (remote_close): Clear remote_desc.
13132
13133 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13134
13135 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13136 New fields.
13137 (mourn_inferior): Define.
13138 (target_process_qsupported): Avoid the dangling else problem.
13139 (thread_stopped): Define.
13140 (pause_all): Define.
13141 (target_waitstatus_to_string): Declare.
13142 * target.c (target_waitstatus_to_string): New.
13143
13144 * tracepoint.c (tracing): Make extern.
13145 (disconnected_tracing): New.
13146 (stop_tracing): Make extern. Handle tracing stops due to GDB
13147 disconnecting.
13148 (cmd_qtdisconnected): New.
13149 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13150 (handle_tracepoint_general_set): Handle QTDisconnected.
13151
13152 * event-loop.c (event_handler_func): Change return type to int.
13153 (process_event): Bail out if the event handler wants the event
13154 loop to stop.
13155 (handle_file_event): Ditto.
13156 (start_event_loop): Bail out if the event handler wants the event
13157 loop to stop.
13158
13159 * nto-low.c (nto_target_ops): Adjust.
13160 * spu-low.c (spu_wait): Don't remove the process here.
13161 (spu_target_ops): Adjust.
13162 * win32-low.c (win32_wait): Don't remove the process here.
13163 (win32_target_ops): Adjust.
13164
5d267c4c
PA
131652010-04-11 Pedro Alves <pedro@codesourcery.com>
13166
13167 * regcache.c (realloc_register_cache): Invalidate inferior's
13168 regcache before recreating it.
13169
623ccd72
PA
131702010-04-09 Pedro Alves <pedro@codesourcery.com>
13171
13172 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13173
219f2f23
PA
131742010-04-09 Stan Shebs <stan@codesourcery.com>
13175 Pedro Alves <pedro@codesourcery.com>
13176
13177 * server.h (LONGEST): New.
13178 (struct thread_info) <while_stepping>: New field.
13179 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13180 Declare.
13181 (initialize_tracepoint, handle_tracepoint_general_set)
13182 (handle_tracepoint_query, tracepoint_finished_step)
13183 (tracepoint_was_hit, release_while_stepping_state_list):
13184 (current_traceframe): Declare.
13185 * server.c (handle_general_set): Handle tracepoint packets.
13186 (read_memory): New.
13187 (write_memory): New.
13188 (handle_search_memory_1): Use read_memory.
13189 (handle_query): Report support for conditional tracepoints, trace
13190 state variables, and tracepoint sources. Handle tracepoint
13191 queries.
13192 (main): Initialize the tracepoints module.
13193 (process_serial_event): Handle traceframe reads/writes.
13194
13195 * linux-low.c (handle_tracepoints): New.
13196 (linux_wait_1): Call it.
13197 (linux_resume_one_lwp): Handle while-stepping.
13198 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13199 (linux_target_ops): Install them.
13200 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13201 New field.
13202 * linux-x86-low.c (x86_supports_tracepoints): New.
13203 (the_low_target). Install it.
13204
13205 * mem-break.h (delete_breakpoint): Declare.
13206 * mem-break.c (delete_breakpoint): Make external.
13207
13208 * target.h (struct target_ops): Add `supports_tracepoints',
13209 `read_pc', and `write_pc' fields.
13210 (target_supports_tracepoints): Define.
13211 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13212 (phex_nz): New.
13213
13214 * regcache.h (struct regcache) <registers_owned>: New field.
13215 (init_register_cache, regcache_cpy): Declare.
13216 (regcache_read_pc, regcache_write_pc): Declare.
13217 (register_cache_size): Declare.
13218 (supply_regblock): Declare.
13219 * regcache.c (init_register_cache): New.
13220 (new_register_cache): Use it.
13221 (regcache_cpy): New.
13222 (register_cache_size): New.
13223 (supply_regblock): New.
13224 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 13225
219f2f23
PA
13226 * tracepoint.c: New.
13227
13228 * Makefile.in (OBS): Add tracepoint.o.
13229 (tracepoint.o): New rule.
13230
3a13a53b
L
132312010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13232
13233 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13234 (i386-mmx.o): New.
13235 (i386-mmx.c): Likewise.
13236 (i386-mmx-linux.o): Likewise.
13237 (i386-mmx-linux.c): Likewise.
13238
13239 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13240 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13241 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13242 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13243
13244 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13245 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13246 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13247
1570b33e
L
132482010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13249
13250 * Makefile.in (clean): Updated.
13251 (i386-avx.o): New.
13252 (i386-avx.c): Likewise.
13253 (i386-avx-linux.o): Likewise.
13254 (i386-avx-linux.c): Likewise.
13255 (amd64-avx.o): Likewise.
13256 (amd64-avx.c): Likewise.
13257 (amd64-avx-linux.o): Likewise.
13258 (amd64-avx-linux.c): Likewise.
13259
13260 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13261 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13262 (srv_amd64_regobj): Add amd64-avx.o.
13263 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13264 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13265 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13266 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13267 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13268 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13269 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13270
13271 * i387-fp.c: Include "i386-xstate.h".
13272 (i387_xsave): New.
13273 (i387_cache_to_xsave): Likewise.
13274 (i387_xsave_to_cache): Likewise.
13275 (x86_xcr0): Likewise.
13276
13277 * i387-fp.h (i387_cache_to_xsave): Likewise.
13278 (i387_xsave_to_cache): Likewise.
13279 (x86_xcr0): Likewise.
13280
13281 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13282 * linux-crisv32-low.c (target_regsets): Likewise.
13283 * linux-m68k-low.c (target_regsets): Likewise.
13284 * linux-mips-low.c (target_regsets): Likewise.
13285 * linux-ppc-low.c (target_regsets): Likewise.
13286 * linux-s390-low.c (target_regsets): Likewise.
13287 * linux-sh-low.c (target_regsets): Likewise.
13288 * linux-sparc-low.c (target_regsets): Likewise.
13289 * linux-xtensa-low.c (target_regsets): Likewise.
13290
13291 * linux-low.c: Include <sys/uio.h>.
13292 (regsets_fetch_inferior_registers): Support nt_type.
13293 (regsets_store_inferior_registers): Likewise.
13294 (linux_process_qsupported): New.
13295 (linux_target_ops): Add linux_process_qsupported.
13296
13297 * linux-low.h (regset_info): Add nt_type.
13298 (linux_target_ops): Add process_qsupported.
13299
13300 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13301 and <sys/uio.h>.
13302 (init_registers_i386_avx_linux): New.
13303 (init_registers_amd64_avx_linux): Likewise.
13304 (xmltarget_i386_linux_no_xml): Likewise.
13305 (xmltarget_amd64_linux_no_xml): Likewise.
13306 (PTRACE_GETREGSET): Likewise.
13307 (PTRACE_SETREGSET): Likewise.
13308 (x86_fill_xstateregset): Likewise.
13309 (x86_store_xstateregset): Likewise.
13310 (use_xml): Likewise.
13311 (x86_linux_update_xmltarget): Likewise.
13312 (x86_linux_process_qsupported): Likewise.
13313 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13314 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13315 init_registers_i386_linux here. Call
13316 x86_linux_update_xmltarget.
13317 (the_low_target): Add x86_linux_process_qsupported.
13318
13319 * server.c (handle_query): Call target_process_qsupported.
13320
13321 * target.h (target_ops): Add process_qsupported.
13322 (target_process_qsupported): New.
13323
fc7238bb
PA
133242010-04-03 Pedro Alves <pedro@codesourcery.com>
13325
13326 * inferiors.c (add_thread): Set last_status kind to
13327 TARGET_WAITKIND_IGNORE.
13328 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13329 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13330 (linux_wait_1): Move `thread' local definition to block that uses
13331 it. Don't NULL initialize `event_child'.
13332 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13333 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13334 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13335
bdabb078
PA
133362010-04-01 Pedro Alves <pedro@codesourcery.com>
13337
13338 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13339 an extended waitstatus, or by a watchpoint.
13340 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13341 thread was stepping or has been stopped by a watchpoint.
13342
d3bbe7a0
PA
133432010-04-01 Pedro Alves <pedro@codesourcery.com>
13344
13345 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13346 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13347 of another, then delete the previous, and validate all
13348 breakpoints.
13349 (validate_inserted_breakpoint): New.
13350 (delete_disabled_breakpoints): New.
13351 (validate_breakpoints): New.
13352 (check_mem_read): Validate breakpoints before trusting their
13353 shadow. Delete disabled breakpoints.
13354 (check_mem_write): Validate breakpoints before trusting they
13355 should be inserted. Delete disabled breakpoints.
13356 * mem-break.h (validate_breakpoints):
13357 * server.c (handle_query): Validate breakpoints when we see a
13358 qSymbol query.
13359
8b07ae33
PA
133602010-04-01 Pedro Alves <pedro@codesourcery.com>
13361
13362 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13363 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13364 if we could tell there's a GDB breakpoint at stop_pc.
13365 (need_step_over_p): Don't do a step over if we find a GDB
13366 breakpoint at the resume PC.
13367
13368 * mem-break.c (struct raw_breakpoint): New.
13369 (enum bkpt_type): New type `gdb_breakpoint'.
13370 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13371 fields. New field `raw'.
13372 (find_raw_breakpoint_at): New.
13373 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13374 breakpoint instead.
13375 (set_breakpoint_at): Adjust.
13376 (delete_raw_breakpoint): New.
13377 (release_breakpoint): New.
13378 (delete_breakpoint): Rename to...
13379 (delete_breakpoint_1): ... this. Add proc parameter. Use
13380 release_breakpoint. Return ENOENT.
13381 (delete_breakpoint): Reimplement.
13382 (find_breakpoint_at): Delete.
13383 (find_gdb_breakpoint_at): New.
13384 (delete_breakpoint_at): Delete.
13385 (set_gdb_breakpoint_at): New.
13386 (delete_gdb_breakpoint_at): New.
13387 (gdb_breakpoint_here): New.
13388 (set_reinsert_breakpoint): Use release_breakpoint.
13389 (uninsert_breakpoint): Rename to ...
13390 (uninsert_raw_breakpoint): ... this.
13391 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13392 (reinsert_raw_breakpoint): Change parameter type to
13393 raw_breakpoint.
13394 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13395 instead.
13396 (check_breakpoints): Adjust. Use release_breakpoint.
13397 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13398 (breakpoint_inserted_here): Ditto.
13399 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13400 Don't trust the breakpoint's shadow if it is not inserted.
13401 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13402 (delete_all_breakpoints): Adjust.
13403 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13404 use delete_breakpoint_1.
13405
13406 * mem-break.h (breakpoints_supported): Delete declaration.
13407 (set_gdb_breakpoint_at): Declare.
13408 (gdb_breakpoint_here): Declare.
13409 (delete_breakpoint_at): Delete.
13410 (delete_gdb_breakpoint_at): Declare.
13411
13412 * server.h (struct raw_breakpoint): Forward declare.
13413 (struct process_info): New field `raw_breakpoints'.
13414
13415 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13416 breakpoints.
13417
6bf5e0ba
PA
134182010-03-24 Pedro Alves <pedro@codesourcery.com>
13419
13420 * linux-low.c (status_pending_p_callback): Fix comment.
13421 (linux_wait_for_event_1): Move most of the internal breakpoint
13422 handling from here...
13423 (linux_wait_1): ... to here.
13424 (count_events_callback): New.
13425 (select_singlestep_lwp_callback): New.
13426 (select_event_lwp_callback): New.
13427 (cancel_breakpoints_callback): New.
13428 (select_event_lwp): New.
13429 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13430 priority to all LWPs that have had events that should be reported
13431 to the client. Cancel breakpoints when about to reporting the
13432 event to the client, not while stopping lwps. No longer cancel
13433 finished single-steps here.
13434 (cancel_finished_single_step): Delete.
13435 (cancel_finished_single_steps): Delete.
13436
414a389f
PA
134372010-03-24 Pedro Alves <pedro@codesourcery.com>
13438
13439 * mem-break.c (enum bkpt_type): New.
13440 (struct breakpoint): New field `type'.
13441 (set_breakpoint_at): Change return type to struct breakpoint
13442 pointer. Set type to `other_breakpoint' by default.
13443 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13444 in the breakpoint list.
13445 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13446 (reinsert_breakpoint): Rename to ...
13447 (reinsert_raw_breakpoint): ... this.
13448 (reinsert_breakpoints_at): Adjust.
13449 * mem-break.h (struct breakpoint): Declare.
13450 (set_breakpoint_at): Change return type to struct breakpoint
13451 pointer.
13452
2280c721
PA
134532010-03-24 Pedro Alves <pedro@codesourcery.com>
13454
13455 * server.c (handle_query): Assign, not compare.
13456
d50171e4
PA
134572010-03-24 Pedro Alves <pedro@codesourcery.com>
13458
13459 Teach linux gdbserver to step-over-breakpoints.
13460
13461 * linux-low.c (can_hardware_single_step): New.
13462 (supports_breakpoints): New.
13463 (handle_extended_wait): If stopping threads, read the stop pc of
13464 the new cloned LWP.
13465 (get_pc): New.
13466 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13467 low target doesn't support retrieving the PC.
13468 (add_lwp): Set last_resume_kind to resume_continue.
13469 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13470 (linux_attach): Don't clear stop_expected. Set the lwp's
13471 last_resume_kind to resume_stop.
13472 (linux_detach_one_lwp): Don't check for removed breakpoints.
13473 (check_removed_breakpoint): Delete.
13474 (status_pending_p): Rename to ...
13475 (status_pending_p_callback): ... this. Don't check for removed
13476 breakpoints. Don't consider threads that are stopped from GDB's
13477 perspective.
13478 (linux_wait_for_lwp): Always read the stop_pc here.
13479 (cancel_breakpoint): New.
13480 (step_over_bkpt): New global.
13481 (linux_wait_for_event_1): Implement stepping over breakpoints.
13482 (gdb_wants_lwp_stopped): New.
13483 (gdb_wants_all_stopped): New.
13484 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13485 single-step traps here. Store the thread's last reported target
13486 wait status.
13487 (send_sigstop): Don't clear stop_expected. Always set it,
13488 instead.
13489 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13490 (cancel_finished_single_step): New.
13491 (cancel_finished_single_steps): New.
13492 (wait_for_sigstop): Don't cancel finished single-step traps here.
13493 (linux_resume_one_lwp): Don't check for removed breakpoints.
13494 Don't set `step' on non-hardware step archs.
13495 (linux_set_resume_request): Ignore resume_stop requests if already
13496 stopping or stopped. Set the lwp's last_resume_kind.
13497 (resume_status_pending_p): Don't check for removed breakpoints.
13498 (need_step_over_p): New.
13499 (start_step_over): New.
13500 (finish_step_over): New.
13501 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13502 requests. Clear the thread's last reported target waitstatus.
13503 Don't use the `suspended' flag. Don't consider pending breakpoints.
13504 (linux_resume): Start a step-over if necessary.
13505 (proceed_one_lwp): New.
13506 (proceed_all_lwps): New.
13507 (unstop_all_lwps): New.
13508 * linux-low.h (struct lwp_info): Rewrite comment for the
13509 `suspended' flag. Add the `stop_pc' field. Delete the
13510 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13511 Add `'last_resume_kind' and `need_step_over' fields.
13512 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13513 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13514 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13515 (set_raw_breakpoint_at): New.
13516 (set_breakpoint_at): Rewrite to use it.
13517 (reinsert_breakpoint_handler): Delete.
13518 (set_reinsert_breakpoint): New.
13519 (reinsert_breakpoint_by_bp): Delete.
13520 (delete_reinsert_breakpoints): New.
13521 (uninsert_breakpoint): Rewrite.
13522 (uninsert_breakpoints_at): New.
13523 (reinsert_breakpoint): Rewrite.
13524 (reinsert_breakpoints_at): New.
13525 (check_breakpoints): Rewrite.
13526 (breakpoint_here): New.
13527 (breakpoint_inserted_here): New.
13528 (check_mem_read): Adjust.
13529 * mem-break.h (breakpoints_supported, breakpoint_here)
13530 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13531 (reinsert_breakpoint_by_bp): Delete declaration.
13532 (delete_reinsert_breakpoints): Declare.
13533 (reinsert_breakpoint): Delete declaration.
13534 (reinsert_breakpoints_at): Declare.
13535 (uninsert_breakpoint): Delete declaration.
13536 (uninsert_breakpoints_at): Declare.
13537 (check_breakpoints): Adjust prototype.
13538 * server.h: Adjust include order.
13539 (struct thread_info): Declare here. Add a `last_status' field.
13540
30ba68cb
MS
135412010-03-23 Michael Snyder <msnyder@vmware.com>
13542
13543 * server.c (crc32): New function.
13544 (handle_query): Add handling for 'qCRC:' request.
13545
b9a881c2
PA
135462010-03-23 Pedro Alves <pedro@codesourcery.com>
13547
13548 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13549 lwp had been stopped by a watchpoint.
13550
e92d13d5
PA
135512010-03-16 Pedro Alves <pedro@codesourcery.com>
13552
13553 * server.h (internal_error): Declare.
13554 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13555 * utils.c (internal_error): New function.
13556
64daa791
AS
135572010-03-15 Andreas Schwab <schwab@redhat.com>
13558
13559 * configure.srv: Fix typo setting srv_regobj.
13560
f52cd8cd
PA
135612010-03-15 Pedro Alves <pedro@codesourcery.com>
13562
13563 * linux-low.c (fetch_register): Avoid passing a non string literal
13564 format to `error'.
13565 (usr_store_inferior_registers): Ditto.
13566
93ae6fdc
PA
135672010-03-14 Pedro Alves <pedro@codesourcery.com>
13568
13569 * linux-low.c (linux_write_memory): Bail out early if peeking
13570 memory failed.
13571
c3adc08c
PA
135722010-03-14 Pedro Alves <pedro@codesourcery.com>
13573
13574 * linux-low.h (struct lwp_info): New fields
13575 `stopped_by_watchpoint' and `stopped_data_address'.
13576 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13577 here, and cache them in the lwp object.
13578 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13579 directly.
13580 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13581 field.
13582 (linux_stopped_by_watchpoint): Rewrite.
13583 (linux_stopped_data_address): Rewrite.
13584
bce522a2
PA
135852010-03-06 Simo Melenius <simo.melenius@iki.fi>
13586
13587 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13588 switching the current inferior, not before.
13589
90884b2b
L
135902010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13591
13592 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13593 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13594 i386-linux.c and amd64-linux.c.
13595 (reg-i386.o): Removed.
13596 (reg-i386.c): Likewise.
13597 (reg-i386-linux.o): Likewise.
13598 (reg-i386-linux.c): Likewise.
13599 (reg-x86-64.o): Likewise.
13600 (reg-x86-64.c): Likewise.
13601 (reg-x86-64-linux.o): Likewise.
13602 (reg-x86-64-linux.c): Likewise.
13603 (i386.o): New.
13604 (i386.c): Likewise.
13605 (i386-linux.o): Likewise.
13606 (i386-linux.c): Likewise.
13607 (amd64.o): Likewise.
13608 (amd64.c): Likewise.
13609 (amd64-linux.o): Likewise.
13610 (amd64-linux.c): Likewise.
13611
13612 * configure.srv (srv_i386_regobj): New.
13613 (srv_i386_linux_regobj): Likewise.
13614 (srv_amd64_regobj): Likewise.
13615 (srv_amd64_linux_regobj): Likewise.
13616 (srv_i386_32bit_xmlfiles): Likewise.
13617 (srv_i386_64bit_xmlfiles): Likewise.
13618 (srv_i386_xmlfiles): Likewise.
13619 (srv_amd64_xmlfiles): Likewise.
13620 (srv_i386_linux_xmlfiles): Likewise.
13621 (srv_amd64_linux_xmlfiles): Likewise.
13622 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13623 srv_xmlfiles to $srv_i386_xmlfiles.
13624 (i[34567]86-*-mingw32ce*): Likewise.
13625 (i[34567]86-*-mingw*): Likewise.
13626 (i[34567]86-*-nto*): Likewise.
13627 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13628 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13629 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13630 (x86_64-*-linux*): Likewise.
13631
13632 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13633 (init_registers_amd64_linux): New.
13634 (x86_arch_setup): Replace init_registers_x86_64_linux with
13635 init_registers_amd64_linux.
13636
193f13e6
MK
136372010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13638
13639 * configure.ac: Check for libdl. If it is not available link against
13640 static libthread_db.
13641 * configure: Regenerate.
13642
85d721b8
PA
136432010-02-22 Pedro Alves <pedro@codesourcery.com>
13644
13645 PR9605
13646
13647 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13648 handing a read watchpoint.
13649 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13650
6076632b
DE
136512010-02-12 Doug Evans <dje@google.com>
13652
13653 * linux-low.c (linux_supports_tracefork_flag): Document.
13654 (linux_look_up_symbols): Add comment.
13655
3327ccf7
L
136562010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13657
13658 * regcache.c (supply_register): Clear regcache if buf is NULL.
13659
0718675c 136602010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 13661 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
13662
13663 * inferiors.c (find_inferior): Add function documentation.
13664 (unloaded_dll): Handle the case where the unloaded dll has not
13665 been previously registered in the dll list.
13666
177321bd
DJ
136672010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13668
13669 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13670 (thumb2_breakpoint): New.
13671 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13672
2b009048
DJ
136732010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13674
13675 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13676 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13677 breakpoints.
13678
3be029c7
PA
136792010-01-21 Pedro Alves <pedro@codesourcery.com>
13680
13681 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13682
18f5de3b
JK
136832010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13684
13685 * linux-s390-low.c (s390_collect_ptrace_register)
13686 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13687
3743bb4f
DE
136882010-01-21 Doug Evans <dje@google.com>
13689
14ce3065
DE
13690 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13691 (PTRACE_ARG4_TYPE): New macro.
13692 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13693 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13694 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13695 (usr_store_inferior_registers): Ditto.
13696 (linux_read_memory, linux_write_memory): Ditto.
13697 (linux_test_for_tracefork): Ditto.
13698
3743bb4f
DE
13699 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13700 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13701
8b315be5
PA
137022010-01-21 Pedro Alves <pedro@codesourcery.com>
13703
13704 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13705 target.
13706
85492558
PA
137072010-01-21 Pedro Alves <pedro@codesourcery.com>
13708
13709 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13710 prototype to take a regcache. Adjust.
13711
442ea881
PA
137122010-01-20 Pedro Alves <pedro@codesourcery.com>
13713
13714 * regcache.h (struct thread_info): Forward declare.
13715 (struct regcache): New.
13716 (new_register_cache): Adjust prototype.
13717 (get_thread_regcache): Declare.
13718 (free_register_cache): Adjust prototype.
13719 (registers_to_string, registers_from_string): Ditto.
13720 (supply_register, supply_register_by_name, collect_register)
13721 (collect_register_as_string, collect_register_by_name): Ditto.
13722 * regcache.c (struct inferior_regcache_data): Delete.
13723 (get_regcache): Rename to ...
13724 (get_thread_regcache): ... this. Adjust. Switch inferior before
13725 fetching registers.
13726 (regcache_invalidate_one): Adjust.
13727 (regcache_invalidate): Fix prototype.
13728 (new_register_cache): Return the new register cache.
13729 (free_register_cache): Change prototype.
13730 (realloc_register_cache): Adjust.
13731 (registers_to_string): Change prototype to take a regcache. Adjust.
13732 (registers_from_string): Ditto.
13733 (register_data): Ditto.
13734 (supply_register): Ditto.
13735 (supply_register_by_name): Ditto.
13736 (collect_register): Ditto.
13737 (collect_register_as_string): Ditto.
13738 (collect_register_by_name): Ditto.
13739 * server.c (process_serial_event): Adjust.
13740 * linux-low.h (regset_fill_func, regset_store_func): Change
13741 prototype.
13742 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13743 Change prototype.
13744 * linux-low.c (get_stop_pc): Adjust.
13745 (check_removed_breakpoint): Adjust.
13746 (linux_wait_for_event): Adjust.
13747 (linux_resume_one_lwp): Adjust.
13748 (fetch_register): Add regcache parameter. Adjust.
13749 (usr_store_inferior_registers): Ditto.
13750 (regsets_fetch_inferior_registers): Ditto.
13751 (regsets_store_inferior_registers): Ditto.
13752 (linux_fetch_registers, linux_store_registers): Ditto.
13753 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13754 regcache. Adjust.
43aaf8b6
PA
13755 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13756 Ditto.
442ea881
PA
13757 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13758 prototype to take a regcache.
13759 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13760 * remote-utils.c (convert_ascii_to_int, outreg)
13761 (prepare_resume_reply): Change prototype to take a regcache.
13762 Adjust.
13763 * target.h (struct target_ops) <fetch_registers, store_registers>:
13764 Change prototype to take a regcache.
13765 (fetch_inferior_registers, store_inferior_registers): Change
13766 prototype to take a regcache. Adjust.
13767 * proc-service.c (ps_lgetregs): Adjust.
13768 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13769 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13770 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13771 take a regcache. Adjust.
13772 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13773 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13774 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13775 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13776 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13777 (cris_cannot_fetch_register):
13778 (cris_breakpoint_at): Change prototype to take a regcache.
13779 Adjust.
13780 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13781 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13782 to take a regcache. Adjust.
13783 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13784 Adjust.
13785 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13786 take a regcache. Adjust.
13787 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13788 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13789 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13790 * linux-mips-low.c (mips_get_pc):
13791 (mips_set_pc): Change prototype to take a regcache. Adjust.
13792 (mips_reinsert_addr): Adjust.
13793 (mips_collect_register): Change prototype to take a regcache.
13794 Adjust.
13795 (mips_supply_register):
13796 (mips_collect_register_32bit, mips_supply_register_32bit)
13797 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13798 (mips_store_fpregset): Ditto.
43aaf8b6
PA
13799 * linux-ppc-low.c (ppc_supply_ptrace_register)
13800 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
13801 (parse_spufs_run): Adjust.
13802 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13803 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13804 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13805 take a regcache. Adjust.
13806 * linux-s390-low.c (s390_collect_ptrace_register)
13807 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13808 (s390_set_pc): Change prototype to take a regcache. Adjust.
13809 (s390_arch_setup): Adjust.
13810 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13811 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13812 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13813 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13814 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13815 regcache. Adjust.
13816 (sparc_breakpoint_at): Adjust.
13817 * linux-xtensa-low.c (xtensa_fill_gregset):
13818 (xtensa_store_gregset):
13819 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13820 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13821 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13822 prototype to take a regcache. Adjust.
13823 * win32-arm-low.c (arm_fetch_inferior_register)
13824 (arm_store_inferior_register): Change prototype to take a
13825 regcache. Adjust.
13826 * win32-i386-low.c (i386_fetch_inferior_register)
13827 (i386_store_inferior_register): Change prototype to take a
13828 regcache. Adjust.
13829 * win32-low.c (child_fetch_inferior_registers)
13830 (child_store_inferior_registers): Change prototype to take a
13831 regcache. Adjust.
13832 (win32_wait): Adjust.
13833 (win32_fetch_inferior_registers): Change prototype to take a
13834 regcache. Adjust.
13835 (win32_store_inferior_registers): Adjust.
13836 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13837 store_inferior_register>: Change prototype to take a regcache.
13838
60c3d7b0
DE
138392010-01-20 Doug Evans <dje@google.com>
13840
13841 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13842 #ifdef.
13843 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 13844 (W_STOPCODE): Provide definition if missing.
60c3d7b0 13845
dc146f7c
VP
138462010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13847
13848 * linux-low.c (linux_core_of_thread): New.
13849 (compare_ints, show_process, list_threads): New.
13850 (linux_qxfer_osdata): Report threads and cores.
13851 (linux_target_op): Register linux_core_of_thread.
13852 * remote-utils.c (prepare_resume_reply): Report the core.
13853 (buffer_xml_printf): Support %d specifier.
13854 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13855 New.
13856 (handle_query): Handle qXfer:threads. Announce availability
13857 thereof.
13858 * target.h (struct target_ops): New field core_of_thread.
13859
7803799a
UW
138602010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13861
13862 * Makefile.in (clean): Remove new generated files.
13863 (reg-s390.o, reg-s390.c): Remove rules.
13864 (reg-s390x.o, reg-s390x.c): Likewise.
13865 (s390-linux32.o, s390-linux32.c): Add rules.
13866 (s390-linux64.o, s390-linux64.c): Likewise.
13867 (s390x-linux64.o, s390x-linux64.c): Likewise.
13868 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13869 * linux-s390-low.c: Include <elf.h>.
13870 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13871 (init_registers_s390): Remove prototype.
13872 (init_registers_s390x): Likewise.
13873 (init_registers_s390_linux32): Add prototype.
13874 (init_registers_s390_linux64): Likewise.
13875 (init_registers_s390x_linux64): Likewise.
13876 (s390_num_regs_3264): New define.
13877 (s390_regmap_3264): New global variable.
13878 (s390_cannot_fetch_register): Remove obsolete check.
13879 (s390_cannot_store_register): Likewise.
13880 (s390_collect_ptrace_register): Handle upper/lower register halves.
13881 (s390_supply_ptrace_register): Likewise.
13882 (s390_fill_gregset): Update to register number changes.
13883 (s390_get_hwcap): New routine.
13884 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13885 Install appropriate regmap and register set.
13886
6e7ffa39
JB
138872010-01-01 Joel Brobecker <brobecker@adacore.com>
13888
13889 * server.c (gdbserver_version): Update copyright year to 2010.
13890 * gdbreplay.c (gdbreplay_version): Likewise.
13891
957f3f49
DE
138922009-12-28 Doug Evans <dje@google.com>
13893
13894 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13895 elf/external.h. Include <elf.h> instead but only if necessary.
13896
ca5c370d
PA
138972009-12-28 Pedro Alves <pedro@codesourcery.com>
13898
13899 * linux-low.c (linux_remove_process): Remove `detaching'
13900 parameter. Don't release/detach from thread_db here.
13901 (linux_kill): Release/detach from thread_db here, ...
13902 (linux_detach): ... and here, before actually detaching.
13903 (linux_wait_1): ... and here, when a process exits.
13904 * thread-db.c (any_thread_of): New.
13905 (thread_db_free): Switch the current inferior to a thread of the
13906 passed in process.
13907
4ee62156
DE
139082009-12-21 Doug Evans <dje@google.com>
13909
d90e6a88
DE
13910 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13911
c5f62d5f
DE
13912 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13913 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13914 warning ifndef __NR_tkill. Move setting of errno there too.
13915 Delete unnecessary resetting of errno after syscall.
13916 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13917
10e86dd7
DE
13918 * configure.ac: Check for dladdr.
13919 * config.in: Regenerate.
13920 * configure: Regenerate.
13921 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13922 (try_thread_db_load): Update.
13923
4ee62156
DE
13924 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13925
00f515da
DE
139262009-12-18 Doug Evans <dje@google.com>
13927
e9464885
DE
13928 * event-loop.c: Include unistd.h if it exists.
13929
07d4f67e
DE
13930 * linux-low.c (my_waitpid): Move definition away from being in
13931 between linux_tracefork_child/linux_test_for_tracefork.
13932
00f515da
DE
13933 * gdb_proc_service.h (psaddr_t): Fix type.
13934 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13935 signature to match glibc.
13936
1de1badb
DE
139372009-12-16 Doug Evans <dje@google.com>
13938
13939 * linux-low.c (linux_read_memory): Fix argument to read.
13940
aeeb81d1
PA
139412009-11-26 Pedro Alves <pedro@codesourcery.com>
13942
13943 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13944 events, don't leave current_inferior pointing at null.
13945
10357975
PA
139462009-11-26 Pedro Alves <pedro@codesourcery.com>
13947
13948 * win32-low.c (LOG): Delete.
13949 (OUTMSG): Output to stderr.
13950 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13951 on compile time LOG macro.
13952 (win32_wait): Fix debug output.
13953
cf6e3471
PA
139542009-11-26 Pedro Alves <pedro@codesourcery.com>
13955
13956 * win32-low.c (win32_add_one_solib): If the dll name is
13957 "ntdll.dll", prepend the system directory to the dll path.
13958
0c85e18e
MK
139592009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13960
13961 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13962
9ac544ce 139632009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 13964 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
13965
13966 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13967 * configure.ac: Check for __mcoldfire__ and set
13968 gdb_cv_m68k_is_coldfire.
13969 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13970 reg-cf.o and reg-m68k.o.
13971 * configure: Regenerated.
13972
fd7dd3e6
PA
139732009-11-16 Pedro Alves <pedro@codesourcery.com>
13974
13975 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13976 Pass it to thread_db_free.
13977 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13978 proper `detaching' argument to linux_remove_process.
13979 * linux-low.h (thread_db_free): Add `detaching' parameter.
13980 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13981 to thread_db_free.
13982 (thread_db_free): Add `detaching' parameter. Only
13983 call td_ta_clear_event if detaching from process.
13984
75aa492e
MK
139852009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13986
13987 * thread-db.c (thread_db_free): Fix typo.
13988
21e1bee4
PP
139892009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13990
13991 PR gdb/10838
13992 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13993
8838b45e
NS
139942009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13995
13996 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13997 with an i686 compiler.
13998 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13999 needed.
14000 * configure: Rebuilt.
14001
8a35fb51
SL
140022009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14003
14004 PR gdb/10783
14005
14006 * server.c (handle_search_memory_1): Correct read_addr initialization
14007 in loop for searching subsequent chunks.
14008
96f15937
PP
140092009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14010
14011 * configure.ac: New --with-libthread-db option.
14012 * thread-db.c: Allow direct dependence on libthread_db.
14013 (thread_db_free): Adjust.
14014 * config.in: Regenerate.
14015 * configure: Likewise.
889bf7c5 14016
5f7d1694
PP
140172009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14018
14019 PR gdb/10757
14020 * thread-db.c (attach_thread): New function.
14021 (maybe_attach_thread): Return success/failure.
14022 (find_new_threads_callback): Adjust.
889bf7c5
PA
14023 (thread_db_find_new_threads): Loop until no new threads.
14024
88e3b899
PA
140252009-10-13 Pedro Alves <pedro@codesourcery.com>
14026
14027 * proc-service.c (ps_lgetregs): Formatting.
14028
cdbfd419
PP
140292009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14030
14031 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14032 * configure.ac: Adjust.
14033 * linux-low.h (struct process_info_private): Move members to struct
14034 thread_db.
14035 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14036 * linux-low.c (linux_remove_process): Adjust.
14037 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14038 * server.c (handle_query): Move code ...
14039 (handle_monitor_command): ... here. New function.
14040 * target.h (struct target_ops): New member.
14041 * thread-db.c (struct thread_db): New.
14042 (libthread_db_search_path): New variable.
14043 (thread_db_create_event, thread_db_enable_reporting)
14044 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14045 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14046 (try_thread_db_load_1, dladdr_to_soname): New functions.
14047 (try_thread_db_load, thread_db_load_search): New functions.
14048 (thread_db_init): Search for libthread_db.
14049 (thread_db_free): New function.
14050 (thread_db_handle_monitor_command): Likewise.
14051 * config.in: Regenerate.
14052 * configure: Regenerate.
889bf7c5 14053
4168d2d6
UW
140542009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14055
14056 * spu-low.c (spu_kill): Wait for inferior to terminate.
14057 Call clear_inferiors.
14058 (spu_detach): Call clear_inferiors.
14059
81ecdfbb
RW
140602009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14061
14062 * aclocal.m4: Regenerate.
14063 * config.in: Likewise.
14064 * configure: Likewise.
14065
0b9ff2c0
UW
140662009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14067
14068 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14069 (parse_spufs_run): New function.
14070 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14071 (ppc_breakpoint_at): Handle SPU breakpoints.
14072
efcbbd14
UW
140732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14074
14075 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14076 (SPUFS_MAGIC): Define.
14077 (spu_enumerate_spu_ids): New function.
14078 (linux_qxfer_spu): New function.
14079 (linux_target_ops): Install linux_qxfer_spu.
14080
f4d9bade
UW
140812009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14082
14083 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14084 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14085 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14086 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14087 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14088 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14089 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14090 (init_registers_powerpc_cell32l): Add prototype.
14091 (init_registers_powerpc_cell64l): Likewise.
14092 (ppc_arch_setup): Detect Cell/B.E. architecture.
14093
96e946ca
RW
140942009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14095
14096 * Makefile.in (datarootdir): New variable.
14097
58d6951d
DJ
140982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14099
14100 * linux-low.c (linux_write_memory): Update debugging output.
14101 * Makefile.in (clean): Add new descriptions.
14102 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14103 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14104 * configure.srv: Add new files for arm*-*-linux*.
14105 * linux-arm-low.c: Add new declarations.
14106 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14107 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14108 (HWCAP_VFPv3D16): New.
14109 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14110 instead of __IWMMXT__.
14111 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14112 (arm_arch_setup): New.
14113 (target_regsets): Remove #ifdef. Add VFP regset.
14114 (the_low_target): Use arm_arch_setup.
14115
12b42a12
DJ
141162009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14117
14118 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14119 the main thread again.
14120
ac8c974e
AR
141212009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14122
14123 Adding Neutrino gdbserver.
14124 * configure: Regenerated.
14125 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14126 * configure.srv (i[34567]86-*-nto*): New target.
14127 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14128 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14129 (nto_comctrl) [__QNX__]: New function.
14130 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14131
4424e0c3 141322009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
14133
14134 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14135 srv_tgtobj.
14136
912cf4ba
PA
141372009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14138 Pedro Alves <pedro@codesourcery.com>
14139
14140 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14141 don't support CONTEXT_EXTENDED_REGISTERS.
14142 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14143 (the_low_target): Install them.
14144 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14145 failing with ERROR_PIPE_NOT_CONNECTED.
14146
aa5ca48f
DE
141472009-06-30 Doug Evans <dje@google.com>
14148 Pierre Muller <muller@ics.u-strasbg.fr>
14149
14150 Add h/w watchpoint support to x86-linux, win32-i386.
14151 * Makefile.in (SFILES): Add i386-low.c
14152 (i386_low_h): Define.
14153 (i386-low.o): Add dependencies.
14154 (linux-x86-low.o): Add i386-low.h dependency.
14155 (win32-i386-low.o): Ditto.
14156 * i386-low.c: New file.
14157 * i386-low.h: New file.
14158 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14159 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14160 * linux-low.c (linux_add_process): Initialize arch_private.
14161 (linux_remove_process): Free arch_private.
14162 (add_lwp): Initialize arch_private.
14163 (delete_lwp): Free arch_private.
14164 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14165 provided.
14166 * linux-low.h (process_info_private): New member arch_private.
14167 (lwp_info): New member arch_private.
14168 (linux_target_ops): New members new_process, new_thread,
14169 prepare_to_resume.
14170 (ptid_of): New macro.
14171 * linux-x86-low.c: Include stddef.h, i386-low.h.
14172 (arch_process_info): New struct.
14173 (arch_lwp_info): New struct.
14174 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14175 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14176 (i386_dr_low_get_status): New function.
14177 (x86_insert_point, x86_remove_point): New functions.
14178 (x86_stopped_by_watchpoint): New function.
14179 (x86_stopped_data_address): New function.
14180 (x86_linux_new_process, x86_linux_new_thread): New functions.
14181 (x86_linux_prepare_to_resume): New function.
14182 (the_low_target): Add entries for insert_point, remove_point,
14183 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14184 prepare_to_resume.
14185 * server.c (debug_hw_points): New global.
14186 (monitor_show_help): Document set debug-hw-points.
14187 (handle_query): Process "set debug-hw-points".
14188 * server.h (debug_hw_points): Declare.
14189 (paddress): Declare.
14190 * utils.c (NUMCELLS, CELLSIZE): New macros.
14191 (get_sell, xsnprintf, paddress): New functions.
14192 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14193 remove_point, stopped_by_watchpoint, stopped_data_address.
14194 * win32-i386-low.c: Include i386-low.h.
14195 (debug_reg_state): Replaces dr.
14196 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14197 (i386_dr_low_get_status): New function.
14198 (i386_insert_point, i386_remove_point): New functions.
14199 (i386_stopped_by_watchpoint): New function.
14200 (i386_stopped_data_address): New function.
14201 (i386_initial_stuff): Update.
14202 (get_thread_context,set_thread_context,i386_thread_added): Update.
14203 (the_low_target): Add entries for insert_point,
14204 remove_point, stopped_by_watchpoint, stopped_data_address.
14205 * win32-low.c (win32_insert_watchpoint): New function.
14206 (win32_remove_watchpoint): New function.
14207 (win32_stopped_by_watchpoint): New function.
14208 (win32_stopped_data_address): New function.
14209 (win32_target_ops): Add entries for insert_watchpoint,
14210 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14211 * win32-low.h (win32_target_ops): New members insert_point,
14212 remove_point, stopped_by_watchpoint, stopped_data_address.
14213
d993e290
PA
142142009-06-25 Pedro Alves <pedro@codesourcery.com>
14215
14216 * server.c (process_serial_event): Re-return unsupported, not
14217 error, if the type isn't recognized. Re-allow supporting only
14218 insert or remove packets. Also call require_running for
14219 breakpoints. Add missing break statement to default case. Tidy.
14220 * target.h (struct target_ops): Rename insert_watchpoint to
14221 insert_point, and remove_watchpoint to remove_point.
14222
14223 * linux-low.h (struct linux_target_ops): Likewise.
14224 * linux-low.c (linux_insert_watchpoint): Rename to ...
14225 (linux_insert_point): ... this. Adjust.
14226 (linux_remove_watchpoint): Rename to ...
14227 (linux_remove_point): ... this. Adjust.
14228 (linux_target_ops): Adjust.
14229 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14230 (cris_insert_point): ... this.
14231 (cris_remove_watchpoint): Rename to ...
14232 (cris_remove_point): ... this.
14233 (the_low_target): Adjust.
14234
0f54c268
PM
142352009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14236
14237 * server.c (handle_v_kill): Pass signal_pid to
14238 kill_inferior if multi_process is zero.
14239
c6314022
AR
142402009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14241
14242 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14243 * target.h (target_ops): Comment for *_watchpoint to make it clear
14244 the functions can get types '0' and '1'.
14245
4463ce24
AR
142462009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14247
14248 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14249 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14250 * regcache.c (get_regcache): Likewise.
14251 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14252 * win32-low.c (child_fetch_inferior_registers): Remove check for
14253 regno 0.
14254
cf8fd78b
PA
142552009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14256 Pedro Alves <pedro@codesourcery.com>
14257
14258 * target.h (struct target_ops) <supports_multi_process>: New
14259 callback.
14260 (target_supports_multi_process): New.
14261 * server.c (handle_query): Even if GDB reports support, only
14262 enable multi-process if the target also supports it. Report
14263 multi-process support only if the target backend supports it.
14264 * linux-low.c (linux_supports_multi_process): New function.
14265 (linux_target_ops): Install it as target_supports_multi_process
14266 callback.
14267
47c0c975
DE
142682009-05-24 Doug Evans <dje@google.com>
14269
e09875d4
DE
14270 Global renaming of find_thread_pid to find_thread_ptid.
14271 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14272 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14273 All callers updated.
14274
e27d73f6
DE
14275 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14276 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14277 directly.
14278
47c0c975
DE
14279 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14280 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14281 (linux_resume_one_lwp): Ditto.
14282
2acc282a
DE
142832009-05-23 Doug Evans <dje@google.com>
14284
14285 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14286 from struct inferior_list_entry * to struct lwp_info *.
14287 All callers updated.
14288
9f1036c1
DE
142892009-05-13 Doug Evans <dje@google.com>
14290
14291 * linux-x86-low.c: Don't include assert.h.
14292 (x86_siginfo_fixup): Use fatal, not assert.
14293 (x86_arch_setup): Fix comment.
14294
d0722149
DE
142952009-05-12 Doug Evans <dje@google.com>
14296
14297 Biarch support for i386/amd64 gdbserver.
14298 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14299 Add linux-x86-low.c.
14300 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14301 (linux-x86-low.o): Add.
14302 * linux-x86-64-low.c: Delete.
14303 * linux-i386-low.c: Delete.
14304 * linux-x86-low.c: New file.
14305 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14306 linux-x86-low.o.
14307 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14308 linux-x86-low.o.
14309 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14310 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14311 (linux_child_pid_to_exec_file): New function.
14312 (elf_64_header_p, elf_64_file_p): New functions.
14313 (siginfo_fixup): New function.
14314 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14315 give target a chance to convert layout.
14316 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14317 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14318
fdeb2a12
DE
143192009-05-07 Doug Evans <dje@google.com>
14320
14321 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14322 (regsets_store_inferior_registers): Ditto.
14323
a6dbe5df
PA
143242009-05-06 Pedro Alves <pedro@codesourcery.com>
14325
14326 PR server/10048
14327
14328 * linux-low.c (must_set_ptrace_flags): Delete.
14329 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14330 of the global.
14331 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14332 `lwp->must_set_ptrace_flags' instead.
ba42693b 14333 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
14334 (linux_wait_1): ... not here.
14335
5091eb23
DE
143362009-04-30 Doug Evans <dje@google.com>
14337
9f767825
DE
14338 * inferiors.c (started_inferior_callback): New function.
14339 (attached_inferior_callback): New function.
14340 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14341 * server.c (print_started_pid, print_attached_pid): New functions.
14342 (detach_or_kill_for_exit): New function.
14343 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14344 * server.h (have_started_inferiors_p): Declare.
14345 (have_attached_inferiors_p): Declare.
14346
5091eb23
DE
14347 * inferiors.c (remove_process): Fix memory leak, free process.
14348 * linux-low.c (linux_remove_process): New function.
14349 (linux_kill): Call it instead of remove_process.
14350 (linux_detach, linux_wait_1): Ditto.
14351
155c8968
PA
143522009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14353
14354 * configure.srv: Add x86 Windows CE target.
14355
7fe519cb
UW
143562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14357
14358 * inferiors.c (get_thread_process): Make global.
14359 * server.h (get_thread_process): Add prototype.
14360 * thread-db.c (find_one_thread): Use get_thread_process
14361 instead of current_process.
14362 (thread_db_get_tls_address): Do not crash if called when
14363 thread layer is not yet initialized.
14364
5472f405
UW
143652009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14366
14367 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14368 * spu-low.c (current_tid): Rename to ...
14369 (current_ptid): ... this.
14370 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14371 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14372 ptid_get_lwp (current_ptid) instead of current_tid.
14373 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14374 instead of current_tid. Use find_process_pid to verify pid
14375 argument is valid. Pass proper argument to remove_process.
14376 (spu_thread_alive): Compare current_ptid instead of current_tid.
14377 (spu_resume): Likewise.
14378
55ac2b99
PA
143792009-04-02 Pedro Alves <pedro@codesourcery.com>
14380
14381 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14382 variable.
14383
95954743
PA
143842009-04-01 Pedro Alves <pedro@codesourcery.com>
14385
14386 Implement the multiprocess extensions, and add linux multiprocess
14387 support.
14388
14389 * server.h (ULONGEST): Declare.
14390 (struct ptid, ptid_t): New.
14391 (minus_one_ptid, null_ptid): Declare.
14392 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14393 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14394 (struct inferior_list_entry): Change `id' type from unsigned from
14395 to ptid_t.
14396 (struct sym_cache, struct breakpoint, struct
14397 process_info_private): Forward declare.
14398 (struct process_info): Declare.
14399 (current_process): Declare.
14400 (all_processes): Declare.
14401 (initialize_inferiors): Declare.
14402 (add_thread): Adjust to use ptid_t.
14403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14404 (add_process, remove_process, find_thread_pid): Declare.
14405 (find_inferior_id): Adjust to use ptid_t.
14406 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14407 (multi_process): Declare.
14408 (push_event): Adjust to use ptid_t.
14409 (read_ptid, write_ptid): Declare.
14410 (prepare_resume_reply): Adjust to use ptid_t.
14411 (clear_symbol_cache): Declare.
14412 * inferiors.c (all_processes): New.
14413 (null_ptid, minus_one_ptid): New.
14414 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14415 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14416 (add_thread): Change unsigned long to ptid. Remove gdb_id
14417 parameter. Adjust.
14418 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14419 (gdb_id_to_thread): Rename to ...
14420 (find_thread_pid): ... this. Change unsigned long to ptid.
14421 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14422 (loaded_dll, pull_pid_from_list): Adjust.
14423 (add_process, remove_process, find_process_pid)
14424 (get_thread_process, current_process, initialize_inferiors): New.
14425 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14426 (struct target_waitstatus) <related_pid>: Ditto.
14427 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14428 return type to int.
14429 (struct target_ops) <join>: Add `pid' argument.
14430 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14431 (struct target_ops) <wait>: Add `ptid' field. Change return type
14432 to ptid.
14433 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14434 (mywait): Add `ptid' argument. Change return type to ptid_t.
14435 (target_pid_to_str): Declare.
14436 * target.c (set_desired_inferior): Adjust to use ptids.
14437 (mywait): Add new `ptid' argument. Adjust.
14438 (target_pid_to_str): New.
14439 * mem-break.h (free_all_breakpoints): Declare.
14440 * mem-break.c (breakpoints): Delelete.
14441 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14442 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14443 to use per-process breakpoint list.
14444 (free_all_breakpoints): New.
14445 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14446 (symbol_cache, all_symbols_looked_up): Delete.
14447 (hexchars): New.
14448 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14449 read_ptid): New.
14450 (prepare_resume_reply): Change ptid argument's type from unsigned
14451 long to ptid_t. Adjust. Implement W;process and X;process.
14452 (free_sym_cache, clear_symbol_cache): New.
14453 (look_up_one_symbol): Adjust to per-process symbol cache. *
14454 * server.c (cont_thread, general_thread, step_thread): Change type
14455 to ptid_t.
14456 (attached): Delete.
14457 (multi_process): New.
14458 (last_ptid): Change type to ptid_t.
14459 (struct vstop_notif) <ptid>: Change type to ptid_t.
14460 (queue_stop_reply, push_event): Change `ptid' argument's type to
14461 ptid_t.
14462 (discard_queued_stop_replies): Add `pid' argument.
14463 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14464 changes. Don't reference the `attached' global.
14465 (attach_inferior): Adjust to mywait interface changes.
14466 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14467 features. Handle and report "multiprocess+". Handle
14468 "qAttached:PID".
14469 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14470 changes.
14471 (handle_v_kill): New.
14472 (handle_v_stopped): Adjust to use target_pid_to_str.
14473 (handle_v_requests): Allow multiple attaches and runs when
14474 multiprocess extensions are in effect. Handle "vKill".
14475 (myresume): Adjust to use ptids.
14476 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14477 (handle_status): Adjust to discard_queued_stop_replies interface
14478 change.
14479 (first_thread_of, kill_inferior_callback)
14480 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14481 (main): Call initialize_inferiors. Adjust to use ptids, killing
14482 and detaching from all inferiors. Handle multiprocess packet
14483 variants.
14484 * linux-low.h: Include gdb_proc_service.h.
14485 (struct process_info_private): New.
14486 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14487 <lwpid_of>: Use ptid_get_lwp.
14488 (get_lwp_thread): Adjust.
14489 (struct lwp_info): Add `dead' member.
14490 (find_lwp_pid): Declare.
14491 * linux-low.c (thread_db_active): Delete.
14492 (new_inferior): Adjust comment.
14493 (inferior_pid): Delete.
14494 (linux_add_process): New.
14495 (handle_extended_wait): Adjust.
14496 (add_lwp): Change unsigned long to ptid.
14497 (linux_create_inferior): Add process to processes table. Adjust
14498 to use ptids. Don't set new_inferior here.
14499 (linux_attach_lwp): Rename to ...
14500 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14501 it. Adjust to use ptids.
14502 (linux_attach_lwp): New.
14503 (linux_attach): Add process to processes table. Don't set
14504 new_inferior here.
14505 (struct counter): New.
14506 (second_thread_of_pid_p, last_thread_of_process_p): New.
14507 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14508 multiple processes.
14509 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14510 processes. Remove process from process table.
14511 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14512 to multiple processes.
14513 (any_thread_of): New.
14514 (linux_detach): Add `pid' argument, and handle it. Remove process
14515 from processes table.
14516 (linux_join): Add `pid' argument. Handle it.
14517 (linux_thread_alive): Change unsighed long argument to ptid_t.
14518 Consider dead lwps as not being alive.
14519 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14520 threads we're not interested in.
14521 (same_lwp, find_lwp_pid): New.
14522 (linux_wait_for_lwp): Change `pid' argument's type from int to
14523 ptid_t. Adjust.
14524 (linux_wait_for_event): Rename to ...
14525 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14526 from int to ptid_t. Adjust.
14527 (linux_wait_for_event): New.
14528 (linux_wait_1): Add `ptid' argument. Change return type to
14529 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14530 that exit from the process table.
14531 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14532 Adjust.
14533 (mark_lwp_dead): New.
14534 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14535 stopping all threads, mark its main lwp as dead.
14536 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14537 ptids.
14538 (fetch_register, usr_store_inferior_registers)
14539 (regsets_fetch_inferior_registers)
14540 (regsets_store_inferior_registers, linux_read_memory)
14541 (linux_write_memory): Inline `inferior_pid'.
14542 (linux_look_up_symbols): Adjust to use per-process
14543 `thread_db_active'.
14544 (linux_request_interrupt): Adjust to use ptids.
14545 (linux_read_auxv): Inline `inferior_pid'.
14546 (initialize_low): Don't reference thread_db_active.
14547 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14548 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14549 (ps_getpid): Return the pid of the current inferior.
14550 * thread-db.c (proc_handle, thread_agent): Delete.
14551 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14552 per-process data.
14553 (find_one_thread): Change argument type to ptid_t. Adjust to
14554 per-process data.
14555 (maybe_attach_thread): Adjust to per-process data and ptids.
14556 (thread_db_find_new_threads): Ditto.
14557 (thread_db_init): Ditto.
14558 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14559 processes table. Adjust to use ptids.
14560 (spu_kill, spu_detach): Adjust interface. Remove process from
14561 processes table.
14562 (spu_join, spu_thread_alive): Adjust interface.
14563 (spu_wait): Adjust interface. Remove process from processes
14564 table. Adjust to use ptids.
14565 * win32-low.c (current_inferior_tid): Delete.
14566 (current_inferior_ptid): New.
14567 (debug_event_ptid): New.
14568 (thread_rec): Take a ptid. Adjust.
14569 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14570 (child_delete_thread): Ditto.
14571 (do_initial_child_stuff): Add `attached' argument. Add process to
14572 processes table.
14573 (child_fetch_inferior_registers, child_store_inferior_registers):
14574 Adjust.
14575 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14576 (win32_attach): Pass 1 to do_initial_child_stuff.
14577 (win32_kill): Adjust interface. Remove process from processes
14578 table.
14579 (win32_detach): Ditto.
14580 (win32_join): Adjust interface.
14581 (win32_thread_alive): Take a ptid.
14582 (win32_resume): Adjust to use ptids.
14583 (get_child_debug_event): Ditto.
14584 (win32_wait): Adjust interface. Remove exiting process from
14585 processes table.
14586
bd99dc85
PA
145872009-04-01 Pedro Alves <pedro@codesourcery.com>
14588
14589 Non-stop mode support.
14590
14591 * server.h (non_stop): Declare.
14592 (gdb_client_data, handler_func): Declare.
14593 (delete_file_handler, add_file_handler, start_event_loop):
14594 Declare.
14595 (handle_serial_event, handle_target_event, push_event)
14596 (putpkt_notif): Declare.
14597 * target.h (enum resume_kind): New.
14598 (struct thread_resume): Replace `step' field by `kind' field.
14599 (TARGET_WNOHANG): Define.
14600 (struct target_ops) <wait>: Add `options' argument.
14601 <supports_non_stop, async, start_non_stop>: New fields.
14602 (target_supports_non_stop, target_async): New.
14603 (start_non_stop): Declare.
14604 (mywait): Add `options' argument.
14605 * target.c (mywait): Add `options' argument. Print child exit
14606 notifications here.
14607 (start_non_stop): New.
14608 * server.c (non_stop, own_buf, mem_buf): New globals.
14609 (struct vstop_notif): New.
14610 (notif_queue): New global.
14611 (queue_stop_reply, push_event, discard_queued_stop_replies)
14612 (send_next_stop_reply): New.
14613 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14614 interface changes.
14615 (attach_inferior): In non-stop mode, don't wait for the target
14616 here.
14617 (handle_general_set): Handle QNonStop.
14618 (handle_query): When handling qC, return the current general
14619 thread, instead of the first thread of the list.
14620 (handle_query): If the backend supports non-stop mode, include
14621 QNonStop+ in the qSupported query response.
14622 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14623 and non-stop mode.
14624 (handle_v_attach, handle_v_run): Handle non-stop mode.
14625 (handle_v_stopped): New.
14626 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14627 (myresume): Adjust to use resume_kind. Handle non-stop.
14628 (queue_stop_reply_callback): New.
14629 (handle_status): Handle non-stop mode.
14630 (main): Clear non_stop flag on reconnection. Use the event-loop.
14631 Refactor serial protocol handling from here ...
14632 (process_serial_event): ... to this new function. When GDB
14633 selects any thread, select one here. In non-stop mode, wait until
14634 GDB acks all pending events before exiting.
14635 (handle_serial_event, handle_target_event): New.
14636 * remote-utils.c (remote_open): Install remote_desc in the event
14637 loop.
14638 (remote_close): Remove remote_desc from the event loop.
14639 (putpkt_binary): Rename to...
14640 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14641 (putpkt_binary): New as wrapper around putpkt_binary_1.
14642 (putpkt_notif): New.
14643 (prepare_resume_reply): In non-stop mode, don't change the
14644 general_thread.
14645 * event-loop.c: New.
14646 * Makefile.in (OBJ): Add event-loop.o.
14647 (event-loop.o): New rule.
14648
14649 * linux-low.h (pid_of): Moved here.
14650 (lwpid_of): New.
14651 (get_lwp_thread): Use lwpid_of.
14652 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14653 * linux-low.c (pid_of): Delete.
14654 (inferior_pid): Use lwpid_of.
14655 (linux_event_pipe): New.
14656 (target_is_async_p): New.
14657 (delete_lwp): New.
14658 (handle_extended_wait): Use lwpid_of.
14659 (add_lwp): Don't set lwpid field.
14660 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14661 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14662 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14663 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14664 first. Adjust to linux_wait_for_event interface changes. Use
14665 lwpid_of.
14666 (linux_detach): Don't delete the main lwp here.
14667 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14668 (status_pending_p): Don't consider explicitly suspended lwps.
14669 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14670 pointer. Add OPTIONS argument. Change return type to int. Use
14671 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14672 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14673 pointer. Add status pointer argument. Return a pid instead of a
14674 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14675 changes. In non-stop mode, don't switch to a random thread.
14676 (linux_wait): Rename to...
14677 (linux_wait_1): ... this. Add target_options argument, and handle
14678 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14679 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14680 clean exit and signal exit code. Don't stop all threads in
14681 non-stop mode. In all-stop mode, only stop all threads when
14682 reporting a stop to GDB. Handle explicit thread stop requests.
14683 (async_file_flush, async_file_mark): New.
14684 (linux_wait): New.
14685 (send_sigstop): Use lwpid_of.
14686 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14687 interface changes. In non-stop mode, don't switch to a random
14688 thread.
14689 (linux_resume_one_lwp): Use lwpid_of.
14690 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14691 (linux_resume_one_thread): ... this. Handle resume_stop. In
14692 non-stop mode, don't look for pending flag in all threads.
14693 (resume_status_pending_p): Don't consider explicitly suspended
14694 threads.
14695 (my_waitpid): Reimplement. Emulate __WALL.
14696 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14697 Use lwpid_of.
14698 (sigchld_handler, linux_supports_non_stop, linux_async)
14699 (linux_start_non_stop): New.
14700 (linux_target_ops): Register linux_supports_non_stop, linux_async
14701 and linux_start_non_stop.
14702 (initialize_low): Install SIGCHLD handler.
14703 * thread-db.c (thread_db_create_event, find_one_thread)
14704 (thread_db_get_tls_address): Use lwpid_of.
14705 * win32-low.c (win32_detach): Adjust to use resume_kind.
14706 (win32_wait): Add `options' argument.
14707 * spu-low.c (spu_resume): Adjust to use resume_kind.
14708 (spu_wait): Add `options' argument.
14709
5b1c542e
PA
147102009-04-01 Pedro Alves <pedro@codesourcery.com>
14711
14712 Decouple target code from remote protocol.
14713
14714 * target.h (enum target_waitkind): New.
14715 (struct target_waitstatus): New.
14716 (struct target_ops) <wait>: Return an unsigned long. Take a
14717 target_waitstatus pointer instead of a char pointer.
14718 (mywait): Likewise.
14719 * target.c (mywait): Change prototype to return an unsigned long.
14720 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14721 * server.h (thread_from_wait, old_thread_from_wait): Delete
14722 declarations.
14723 (prepare_resume_reply): Change prototype to take a
14724 target_waitstatus.
14725 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14726 (last_status, last_ptid): New.
14727 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14728 pid instead of a signal.
14729 (attach_inferior): Remove "status" and "signal" parameters.
14730 Adjust.
14731 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14732 not as an address.
14733 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14734 (handle_v_requests, myresume): Remove "status" and "signal"
14735 parameters. Adjust.
14736 (handle_status): New.
14737 (main): Delete local `status'. Adjust.
14738 * remote-utils.c: Include target.h.
14739 (prepare_resume_reply): Change prototype to take a
14740 target_waitstatus. Adjust.
14741
14742 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14743 interface.
14744 * spu-low.c (spu_wait): Adjust.
14745 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14746 Delete.
14747 (win32_wait): Adjust.
14748
2bd7c093
PA
147492009-04-01 Pedro Alves <pedro@codesourcery.com>
14750
14751 * target.h (struct thread_resume): Delete leave_stopped member.
14752 (struct target_ops): Add a `n' argument to the `resume' callback.
14753 * server.c (start_inferior): Adjust.
14754 (handle_v_cont, myresume): Adjust.
14755 * linux-low.c (check_removed_breakpoint): Adjust to resume
14756 interface change, and to removed leave_stopped field.
14757 (resume_ptr): Delete.
14758 (struct thread_resume_array): New.
14759 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14760 resume interface change.
14761 (linux_continue_one_thread, linux_queue_one_thread)
14762 (resume_status_pending_p): Check if the resume field is NULL
14763 instead of checking the leave_stopped member.
14764 (linux_resume): Adjust to the target resume interface change.
14765 * spu-low.c (spu_resume): Adjust to the target resume interface
14766 change.
14767 * win32-low.c (win32_detach, win32_resume): Ditto.
14768
c35fafde
PA
147692009-04-01 Pedro Alves <pedro@codesourcery.com>
14770
14771 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14772 flag.
14773 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14774 pending.
14775 (linux_continue_one_thread): Only preserve the stepping flag if
14776 there's a pending breakpoint.
14777
0a59d50b
PA
147782009-03-31 Pedro Alves <pedro@codesourcery.com>
14779
14780 * server.c (main): After the inferior having exited, call
14781 remote_close before exiting gdbserver.
14782
f04c6d38
TJB
147832009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14784
14785 Fix size of FPSCR in Power 7 processors.
14786 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14787 (PPC_FEATURE_HAS_DFP): New #define.
14788 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14789 size of the FPSCR.
14790
78e5cee6
PA
147912009-03-23 Pedro Alves <pedro@codesourcery.com>
14792
14793 * server.c (handle_query) Whitespace and formatting.
14794
1b3f6016
PA
147952009-03-22 Pedro Alves <pedro@codesourcery.com>
14796
14797 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14798 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14799 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14800 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14801 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14802 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14803 Makefile.in, configure.ac: Fix whitespace throughout.
14804 * configure: Regenerate.
14805
a07b2135
PA
148062009-03-22 Pedro Alves <pedro@codesourcery.com>
14807
14808 * inferiors.c (find_inferior): Make it safe for the callback
14809 function to delete the currently iterated inferior.
14810
67cc2626
PA
148112009-03-22 Pedro Alves <pedro@codesourcery.com>
14812
14813 * Makefile.in (linuw_low_h): Move higher.
14814 (thread-db.o): Depend on $(linux_low_h).
14815
54a0b537
PA
148162009-03-17 Pedro Alves <pedro@codesourcery.com>
14817
14818 Rename "process" to "lwp" throughout.
14819
14820 * linux-low.c (all_processes): Rename to...
14821 (all_lwps): ... this.
14822 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14823 (add_process): Rename to ...
14824 (add_lwp): ... this. Adjust.
14825 (linux_create_inferior): Adjust.
14826 (linux_attach_lwp): Adjust.
14827 (linux_attach): Adjust.
14828 (linux_kill_one_process): Rename to ...
14829 (linux_kill_one_lwp): ... this. Adjust.
14830 (linux_kill): Adjust.
14831 (linux_detach_one_process): Rename to ...
14832 (linux_detach_one_lwp): ... this. Adjust.
14833 (linux_detach): Adjust.
14834 (check_removed_breakpoint): Adjust.
14835 (status_pending_p): Adjust.
14836 (linux_wait_for_process): Rename to ...
14837 (linux_wait_for_lwp): ... this. Adjust.
14838 (linux_wait_for_event): Adjust.
14839 (send_sigstop): Adjust.
14840 (wait_for_sigstop): Adjust.
14841 (stop_all_processes): Rename to ...
14842 (stop_all_lwps): ... this.
14843 (linux_resume_one_process): Rename to ...
14844 (linux_resume_one_lwp): ... this. Adjust.
14845 (linux_set_resume_request, linux_continue_one_thread)
14846 (linux_queue_one_thread, resume_status_pending_p)
14847 (usr_store_inferior_registers, regsets_store_inferior_registers)
14848 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14849 Adjust.
14850 * linux-low.h (get_process): Rename to ...
14851 (get_lwp): ... this. Adjust.
14852 (get_thread_process): Rename to ...
14853 (get_thread_lwp): ... this. Adjust.
14854 (get_process_thread): Rename to ...
14855 (get_lwp_thread): ... this. Adjust.
14856 (struct process_info): Rename to ...
14857 (struct lwp_info): ... this.
14858 (all_processes): Rename to ...
14859 (all_lwps): ... this.
14860 * proc-service.c (ps_lgetregs): Adjust.
14861 * thread-db.c (thread_db_create_event, find_one_thread)
14862 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14863
0b16c5cf
PA
148642009-03-14 Pedro Alves <pedro@codesourcery.com>
14865
14866 * server.c (handle_query): Handle "qAttached".
14867
32de4b9d
NS
148682009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14869
14870 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14871 GPLv3, update license URL.
14872
2aecd87f
DE
148732009-03-01 Doug Evans <dje@google.com>
14874
93efd302 14875 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
14876 (server_h): Add gdb_signals.h.
14877 (signals.o): Update.
14878 * server.h (target_signal_from_host,target_signal_to_host_p)
14879 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14880
86b1f9c5
PM
148812009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14882
14883 * remote-utils.c (getpkt): Also generate remote-debug
14884 information if noack_mode is set.
14885
4aa995e1
PA
148862009-02-06 Pedro Alves <pedro@codesourcery.com>
14887
14888 * server.c (handle_query): Report qXfer:siginfo:read and
14889 qXfer:siginfo:write as supported and handle them.
14890 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14891 * linux-low.c (linux_xfer_siginfo): New.
14892 (linux_target_ops): Set it.
14893
62709adf
PA
148942009-01-26 Pedro Alves <pedro@codesourcery.com>
14895
14896 * server.c (gdbserver_usage): Mention --remote-debug.
14897 (main): Accept '--remote-debug' switch.
14898
aef93bd7
DE
148992009-01-18 Doug Evans <dje@google.com>
14900
14901 * regcache.c (new_register_cache): No need to check result of xcalloc.
14902 * server.c (handle_search_memory): Back out calls to xmalloc,
14903 result is checked and error is returned to user upon failure.
14904 (handle_query): Ditto. Add more checks for result of malloc.
14905 (handle_v_cont): Check result of malloc, report error back to
14906 user upon failure.
14907 (handle_v_run): Ditto. Call freeargv.
14908 * server.h (freeargv): Declare.
14909 * utils.c (freeargv): New fn.
14910
54363045
DE
149112009-01-15 Doug Evans <dje@google.com>
14912
f626972c
DE
14913 * gdbreplay.c (perror_with_name): Make arg const char *.
14914 * server.h (target_signal_to_name): Make return type const char *.
0842e787 14915 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 14916 * utils.c (perror_with_name): Make arg const char *.
54363045 14917
18aae699
PA
149182009-01-14 Pedro Alves <pedro@codesourcery.com>
14919
14920 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14921 when handling a EXIT_PROCESS_DEBUG_EVENT.
14922
ff703abe
JB
149232009-01-06 Joel Brobecker <brobecker@adacore.com>
14924
14925 * gdbreplay.c (gdbreplay_version): Update copyright year.
14926 * server.c (gdbserver_version): Likewise.
14927
f21cc1a2 149282009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
14929
14930 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 14931 (handle_extended_wait): Improve comment.
0e21c1ec 14932
bca929d3
DE
149332008-12-13 Doug Evans <dje@google.com>
14934
14935 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14936 * server.h (ATTR_MALLOC): New macro.
14937 (xmalloc,xcalloc,xstrdup): Declare.
14938 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14939 * inferiors.c: Ditto.
14940 * linux-low.c: Ditto.
14941 * mem-break.c: Ditto.
14942 * regcache.c: Ditto.
14943 * remote-utils.c: Ditto.
14944 * server.c: Ditto.
14945 * target.c: Ditto.
14946 * win32-low.c: Ditto.
14947
97438e3f
DE
149482008-12-12 Doug Evans <dje@google.com>
14949
896c7fbb
DE
14950 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14951 in debugging printf.
14952
97438e3f
DE
14953 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14954
e3b886f8
DE
149552008-12-09 Doug Evans <dje@google.com>
14956
14957 * linux-low.h (struct process_info): Delete member tid, unused.
14958 * thread-db.c (find_one_thread): Update.
14959 (maybe_attach_thread): Update.
14960
07e059b5
VP
149612008-12-02 Pedro Alves <pedro@codesourcery.com>
14962
889bf7c5
PA
14963 * target.h (struct target_ops): Add qxfer_osdata member.
14964 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14965 and dirent.h.
14966 (linux_qxfer_osdata): New functions.
14967 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14968 callback.
14969 * server.c (handle_query): Handle "qXfer:osdata:read:".
14970 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14971 (buffer_xml_printf): New functions.
14972 * server.h (struct buffer): New.
14973 (buffer_grow_str, buffer_grow_str0): New macros.
14974 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14975 (buffer_xml_printf): Declare.
07e059b5 14976
4cab47ab
DE
149772008-11-24 Doug Evans <dje@google.com>
14978
14979 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14980
f142445f
DJ
149812008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14982
14983 * server.c (handle_v_run): Always use the supplied argument list.
14984
d0107bb6 149852008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 14986
d0107bb6
BW
14987 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14988 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 14989
2c4ad781
TJB
149902008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14991
14992 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14993 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14994 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14995 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14996 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14997 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14998 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14999 XML target descriptions.
15000 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15001 when inferior is running on an ISA 2.05 or later processor. Add
15002 special case to return offset for full 64-bit slot of FPSCR when
15003 in 32-bits.
15004
dfb64f85
DJ
150052008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15006
15007 * Makefile.in (SFILES, clean): Added sparc64 files.
15008 (reg-sparc64.o, reg-sparc64.c): New.
15009 * configure.srv (sparc*-*-linux*): New configuration.
15010 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15011 syscall arguments for SPARC.
15012 (regsets_store_inferior_registers): Likewise.
15013 * linux-sparc-low.c: New file.
15014
66b6e1dd
DE
150152008-10-21 Doug Evans <dje@google.com>
15016
15017 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15018 (READLINE_DIR,READLINE_DEP): Delete.
15019 (INTERNAL_CFLAGS): Update.
15020 (LINTFLAGS): Update.
15021
9b710a42
PA
150222008-10-10 Pedro Alves <pedro@codesourcery.com>
15023
15024 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15025 whole argv from the last run, not just argv[0].
15026
5822d809
PA
150272008-09-08 Pedro Alves <pedro@codesourcery.com>
15028
15029 * regcache.c (new_register_cache): Return NULL if the register
15030 cache size isn't known yet.
15031 (free_register_cache): Avoid dereferencing a NULL regcache.
15032
74aac56f
DJ
150332008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15034
15035 * configure.srv: Merge MIPS and MIPS64.
15036
400b20f5
MR
150372008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15038
15039 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15040
677c5bb1
LM
150412008-08-18 Luis Machado <luisgpm@br.ibm.com>
15042
15043 * Makefile.in: Add required vsx dependencies.
15044
15045 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15046 Declare init_registers_powerpc_vsx32l.
15047 Declare init_registers_powerpc_vsx64l.
15048 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15049 (ppc_arch_setup): Check for VSX in hwcap.
15050 (ppc_fill_vsxregset): New function.
15051 (ppc_store_vsxregset): New function.
15052 Add new VSX entry in regset_info target_regsets.
15053
15054 * configure.srv: Add new VSX dependencies.
15055
a6f3e723
SL
150562008-08-12 Pedro Alves <pedro@codesourcery.com>
15057
15058 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15059 (remote_open): Set or clear transport_is_reliable.
15060 (putpkt_binary): Don't expect acks in noack mode.
15061 (getpkt): Don't send ack/nac in noack mode.
15062 * server.c (handle_general_set): Handle QStartNoAckMode.
15063 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15064 qSupported.
15065 (main): Reset noack_mode on every connection.
15066 * server.h (noack_mode): Declare.
15067
a417dc56
RW
150682008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15069
15070 * Makefile.in (GDBREPLAY_OBS): New variable.
15071 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15072
3221518c
UW
150732008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15074 Daniel Jacobowitz <dan@codesourcery.com>
15075
15076 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15077 (usr_store_inferior_registers): Likewise.
15078 (regsets_store_inferior_registers): Likewise.
15079
ec56be1b
PA
150802008-07-31 Rolf Jansen <rj@surtec.com>
15081 Pedro Alves <pedro@codesourcery.com>
15082
15083 * configure.ac: Check for memmem declaration.
15084 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15085 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15086 (disable_packet_qfThreadInfo): Unconditionally compile.
15087 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15088 * configure, config.in: Regenerate.
15089
2fe5e3ff
DE
150902008-07-28 Doug Kwan <dougkwan@google.com>
15091
15092 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15093 (linux_write_memory): Remove declaration of errno.
15094
836acd6d
UW
150952008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15096
15097 * linux-low.c (handle_extended_wait): Do not use "status"
15098 variable uninitialized.
15099
aeba519e
PA
151002008-07-07 Pedro Alves <pedro@codesourcery.com>
15101
15102 * server.c (handle_v_attach): Inhibit reporting dll changes.
15103
db42f210
PA
151042008-06-27 Pedro Alves <pedro@codesourcery.com>
15105
15106 * remote-utils.c (prepare_resume_reply): If requested, don't
15107 output "thread:TID" in the T stop reply.
15108
15109 * server.c (disable_packet_vCont, disable_packet_Tthread)
15110 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15111 (handle_query): If requested, disable support for qC, qfThreadInfo
15112 and qsThreadInfo.
15113 (handle_v_requests): If requested, disable support for vCont.
15114 (gdbserver_show_disableable): New.
15115 (main): Handle --disable-packet and --disable-packet=LIST.
15116
15117 * server.h (disable_packet_vCont, disable_packet_Tthread)
15118 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15119
8e4c5421
CD
151202008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15121
15122 * server.c (gdbserver_usage): Mention --version.
15123
6e23a804
DJ
151242008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * Makefile.in (gdbreplay.o): New rule.
15127
90aa6a40
JM
151282008-06-06 Joseph Myers <joseph@codesourcery.com>
15129
15130 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15131 message, not gdbserver.
15132
c16158bc 151332008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
15134 Nathan Sidwell <nathan@codesourcery.com>
15135 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
15136
15137 * acinclude.m4: Include ../../config/acx.m4.
15138 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15139 * configure, config.in: Regenerate.
15140 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15141 * server.c (gdbserver_version): Print PKGVERSION.
15142 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15143 (main): Adjust gdbserver_usage calls.
15144 * gdbreplay.c (version, host_name): Add declarations.
15145 (gdbreplay_version, gdbreplay_usage): New.
15146 (main): Accept --version and --help options.
15147
aeb75bf5
DJ
151482008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15151 (arm_breakpoint_at): Handle Thumb.
15152 (the_low_target): Add comment.
15153
76b233dd
UW
151542008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15155
15156 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15157
08388c79
DE
151582008-05-09 Doug Evans <dje@google.com>
15159
a3c83fae
DE
15160 * server.h (decode_search_memory_packet): Declare.
15161 * remote-utils.c (decode_search_memory_packet): New fn.
15162 * server.c (handle_search_memory_1): New fn.
08388c79
DE
15163 (handle_search_memory): New fn.
15164 (handle_query): Process qSearch:memory packets.
15165
bb9c3d36
UW
151662008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15167
15168 * regcache.c (registers_length): Remove.
15169 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15170 full register packet.
15171 * regcache.h (registers_length): Remove prototype.
15172 * server.h (PBUFSIZ): Define to 16384.
15173
7284e1be
UW
151742008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15175
15176 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15177 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15178 powerpc-64l.o, and powerpc-altivec64l.o.
15179 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15180 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15181 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15182 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15183 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15184 to srv_xmlfiles.
15185
15186 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15187 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15188 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15189 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15190 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15191 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15192 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15193 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15194 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15195 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15196 (clean): Update.
15197
15198 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15199 (init_registers_powerpc_32l): ... this new prototype.
15200 (init_registers_powerpc_32): Remove, replace by ...
15201 (init_registers_powerpc_altivec32l): ... this new prototype.
15202 (init_registers_powerpc_e500): Remove, replace by ...
15203 (init_registers_powerpc_e500l): ... this new prototype.
15204 (init_registers_ppc64): Remove, replace by ...
15205 (init_registers_powerpc_64l): ... this new prototype.
15206 (init_registers_powerpc_64): Remove, replace by ...
15207 (init_registers_powerpc_altivec64l): ... this new prototype.
15208 (ppc_num_regs): Set to 73.
15209 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15210 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15211 (ppc_cannot_store_register): Handle orig_r3 and trap.
15212 (ppc_arch_setup): Update init_registers_... calls.
15213 (ppc_fill_gregset): Handle orig_r3 and trap.
15214
15215 * inferiors.c (clear_inferiors): Reset current_inferior.
15216
fdc59709
PB
152172008-04-23 Paolo Bonzini <bonzini@gnu.org>
15218
889bf7c5
PA
15219 * acinclude.m4: Add override.m4.
15220 * configure: Regenerate.
fdc59709 15221
c9b2f845
UW
152222008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15223
15224 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15225 initial call to init_register_ppc64.
15226
550512b8
UW
152272008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15228
43aaf8b6
PA
15229 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15230 single powerpc*-*-linux* case.
550512b8
UW
15231 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15232
b6430ec3
UW
152332008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15234
15235 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 15236 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
15237 from reg_xmlfiles.
15238 * linux-ppc-low.c: Include <elf.h>.
15239 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15240 (ppc_hwcap): New global variable.
15241 (ppc_regmap): Remove __SPE__ #ifdef sections.
15242 (ppc_regmap_e500): New global variable.
15243 (ppc_cannot_store_register): Update __SPE__ special case.
15244 (ppc_get_hwcap): New function.
15245 (ppc_arch_setup): Use it to determine whether inferior supports
15246 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15247 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15248 Do not access registers if target does not support AltiVec.
15249 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15250 Do not access registers if target does not support SPE.
15251 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15252
52fa2412
UW
152532008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15254
15255 * linux-low.c (disabled_regsets, num_regsets): New.
15256 (use_regsets_p): Delete.
15257 (linux_wait_for_process): Clear disabled_regsets.
15258 (regsets_fetch_inferior_registers): Check and set it.
15259 (regsets_store_inferior_registers): Likewise.
15260 (linux_fetch_registers, linux_store_registers): Do not use
15261 use_regsets_p.
15262 (initialize_low): Allocate disabled_regsets.
15263
e28b3332
DJ
152642008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15265
15266 * Makefile.in (LIBOBJS): New.
15267 (OBS): Use LIBOBJS.
15268 (memmem.o): New rule.
15269 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15270 * configure: Regenerated.
15271
4536995d
UW
152722008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15273
15274 * server.c (handle_query): Never return "unsupported" for
15275 qXfer:features:read queries.
15276
221c031f
UW
152772008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15278
15279 * server.c (get_features_xml): Fix inverted condition.
15280 (handle_query): Always support qXfer:feature:read.
15281
ccd213ac
DJ
152822008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15283
15284 * server.c (wrapper_argv): New.
15285 (start_inferior): Handle wrapper_argv. If set, expect an extra
15286 trap.
15287 (gdbserver_usage): Document --wrapper.
15288 (main): Parse --wrapper.
15289
6fe305f7
UW
152902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15291
15292 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15293 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15294 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15295 (ppc_set_pc): Likewise.
15296 (ppc_arch_setup): New function.
15297 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15298 of collect_register.
889bf7c5 15299 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 15300
5b0a002e
UW
153012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15302
15303 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15304 instead of linux-ppc64-low.o.
15305 * linux-ppc64-low.c: Remove file.
15306 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15307 (linux-ppc64-low.o): Remove rule.
15308
15309 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15310 (init_registers_powerpc_64): Likewise.
15311 (ppc_regmap): Conditionally define depending on __powerpc64__.
15312 (ppc_cannot_store_register): Do not special-case "fpscr" when
15313 compiled on __powerpc64__.
15314 (ppc_collect_ptrace_register): New function.
15315 (ppc_supply_ptrace_register): New function.
15316 (ppc_breakpoint): Change type to "unsigned int".
15317 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15318 (the_low_target): Conditionally provide initializers for the
889bf7c5 15319 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
15320 collect_ptrace_register and supply_ptrace_register members.
15321
9b4b61c8
UW
153222008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15323
15324 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15325 * server.c (gdbserver_xmltarget): Define.
15326 (get_features_xml): Use it to replace "target.xml" and arch_string.
15327
15328 * configure.srv: Remove srv_xmltarget. Add XML files that were
15329 mentioned there to srv_xmlfiles instead. Remove conditional tests
15330 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15331 srv_xmlfiles and srv_regobj to include all possible choices.
15332 * configure.ac (srv_xmltarget): Remove.
15333 (srv_xmlfiles): Do not add "target.xml".
15334 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15335 checks for supplementary target information.
15336 * configure: Regenerate.
15337 * Makefile.in (XML_TARGET): Remove.
15338 (target.xml): Remove rule.
15339 (clean): Do not clean up target.xml.
15340 (.PRECIOUS): Do not mention target.xml.
15341
15342 * target.h (struct target_ops): Remove arch_string member.
15343 * linux-low.c (linux_arch_string): Remove.
15344 (linux_target_ops): Remove arch_string initializer.
15345 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15346 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15347 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15348 * spu-low.c (spu_arch_string): Remove.
15349 (spu_target_ops): Remove arch_string initializer.
15350 * win32-low.c (win32_arch_string): Remove.
15351 (win32_target_ops): Remove arch_string initializer.
15352 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15353 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15354 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15355
ee1a7ae4
UW
153562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15357
15358 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15359 by collect_ptrace_register and supply_ptrace_register hooks.
15360 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15361 instead of checking for the_low_target.left_pad_xfer.
15362 (usr_store_inferior_registers): Use collect_ptrace_register callback
15363 instead of checking for the_low_target.left_pad_xfer.
15364
15365 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15366 (s390_supply_ptrace_register): Likewise.
15367 (s390_fill_gregset): Call s390_collect_ptrace_register.
15368 (the_low_target): Update.
15369
15370 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15371 (ppc_supply_ptrace_register): Likewise.
15372 (the_low_target): Update.
15373
15374 * linux-i386-low.c (the_low_target): Update.
15375 * linux-x86-64-low.c (the_low_target): Update.
15376
d61ddec4
UW
153772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15378
15379 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15380 reg-s390.o and reg-s390x.o.
15381
15382 * linux-low.c (new_inferior): New global variable.
15383 (linux_create_inferior, linux_attach): Set it.
15384 (linux_wait_for_process): Call the_low_target.arch_setup after the
15385 target has stopped for the first time.
15386 (initialize_low): Do not call the_low_target.arch_setup.
15387
15388 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15389 (s390_set_pc): Likewise.
15390 (s390_arch_setup): New function.
15391 (the_low_target): Use s390_arch_setup as arch_setup routine.
15392
15393 * regcache.c (realloc_register_cache): New function.
15394 (set_register_cache): Call it for each existing regcache.
15395
d05b4ac3
UW
153962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15397
15398 * server.h (init_registers): Remove prototype.
15399
15400 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15401 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15402 instead of init_registers ().
15403 * linux-arm-low.c (init_registers_arm): Add prototype.
15404 (init_registers_arm_with_iwmmxt): Likewise.
15405 (the_low_target): Add initializer for arch_setup field.
15406 * linux-cris-low.c (init_registers_cris): Add prototype.
15407 (the_low_target): Add initializer for arch_setup field.
15408 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15409 (the_low_target): Add initializer for arch_setup field.
15410 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15411 (the_low_target): Add initializer for arch_setup field.
15412 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15413 (the_low_target): Add initializer for arch_setup field.
15414 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15415 (the_low_target): Add initializer for arch_setup field.
15416 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15417 (the_low_target): Add initializer for arch_setup field.
15418 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15419 (init_registers_mips64_linux): Likewise.
15420 (the_low_target): Add initializer for arch_setup field.
15421 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15422 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15423 (the_low_target): Add initializer for arch_setup field.
15424 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15425 (init_registers_powerpc_64): Likewise.
15426 (the_low_target): Add initializer for arch_setup field.
15427 * linux-s390-low.c (init_registers_s390): Add prototype.
15428 (init_registers_s390x): Likewise.
15429 (the_low_target): Add initializer for arch_setup field.
15430 * linux-sh-low.c (init_registers_sh): Add prototype.
15431 (the_low_target): Add initializer for arch_setup field.
15432 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15433 (the_low_target): Add initializer for arch_setup field.
15434 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15435 (the_low_target): Add initializer for arch_setup field.
15436
15437 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15438 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15439 instead of init_registers ().
15440 * win32-arm-low.c (init_registers_arm): Add prototype.
15441 (the_low_target): Add initializer for arch_setup field.
15442 * win32-i386-low.c (init_registers_i386): Add prototype.
15443 (the_low_target): Add initializer for arch_setup field.
15444
15445 * spu-low.c (init_registers_spu): Add prototype.
15446 (initialize_low): Call initialie_registers_spu () instead of
15447 initialize_registers ().
15448
fd96d250
PA
154492008-02-19 Pedro Alves <pedro@codesourcery.com>
15450
15451 * server.c (handle_v_requests): When handling the vRun and vAttach
15452 packets, if already debugging a process, don't kill it. Return an
15453 error instead.
15454
d41b6bb4
DJ
154552008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15456
15457 * server.c (handle_query): Correct length check.
15458
5ac588cf
PA
154592008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15460
15461 * win32-low.c (do_initial_child_stuff): Add process handle
15462 parameter. Set current_process_handle and current_process_id from the
15463 parameters. Clear globals.
15464 (win32_create_inferior): Don't set current_process_handle and
15465 current_process_id here. Instead pass them on the call to
15466 do_initial_child_stuff.
15467 (win32_attach): Likewise.
15468 (win32_clear_inferiors): New.
15469 (win32_kill): Don't close the current process handle or the
15470 current thread handle here. Instead call win32_clear_inferiors.
15471 (win32_detach): Don't open a new handle to the process. Call
15472 win32_clear_inferiors.
15473 (win32_join): Don't rely on current_process_handle; open a new
15474 handle using the process id.
15475 (win32_wait): Call win32_clear_inferiors when the inferior process
15476 has exited.
15477
ecd7ecbc
DJ
154782008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15479
15480 * server.c (monitor_show_help): Add "exit".
15481
1525d545
MG
154822008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15483
ecd7ecbc 15484 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
15485 (clean): Add reg-xtensa.c.
15486 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
15487 * configure.srv (xtensa*-*-linux*) New target.
15488 * linux-xtensa-low.c: New.
15489 * xtensa-xtregs.c: New.
1525d545 15490
59a016f0
PA
154912008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15492
15493 * hostio.c: Don't include errno.h.
15494 (errno_to_fileio_errno): Move to hostio-errno.
15495 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15496 error number outputting to the target->hostio_last_error callback.
15497 (hostio_packet_error): Use FILEIO_EINVAL directly.
15498 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15499 calls to hostio_error.
15500 * hostio-errno.c: New.
15501 * server.h (hostio_last_error_from_errno): Declare.
15502 * target.h (target_ops): Add hostio_last_error member.
15503 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15504 as hostio_last_error handler.
889bf7c5 15505 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
15506 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15507 (wince_hostio_last_error): New functions.
15508 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15509 as hostio_last_error handler.
15510 (win32_target_ops) [!_WIN32_WCE]: Register
15511 hostio_last_error_from_errno as hostio_last_error handler.
15512 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15513 (hostio-errno.o): New rule.
15514 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15515 * configure.srv (srv_hostio_err_objs): New variable. Default to
15516 hostio-errno.o.
15517 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15518 * configure: Regenerate.
15519
2d717e4f
DJ
155202008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15521
15522 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15523 (linux_kill, linux_detach): Clean up the process list.
15524 * remote-utils.c (remote_open): Improve port number parsing.
15525 (putpkt_binary, input_interrupt): Only send interrupts if the target
15526 is running.
15527 * server.c (extended_protocol): Make static.
15528 (attached): Define earlier.
15529 (exit_requested, response_needed, program_argv): New variables.
15530 (target_running): New.
15531 (start_inferior): Clear attached here.
15532 (attach_inferior): Set attached here.
15533 (require_running): Define.
15534 (handle_query): Use require_running and target_running. Implement
15535 "monitor exit".
15536 (handle_v_attach, handle_v_run): New.
15537 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15538 (gdbserver_usage): Update.
15539 (main): Redo argument parsing. Handle --debug and --multi. Handle
15540 --attach along with other options or after the port. Save
15541 program_argv. Support no initial program. Resynchronize
15542 communication with GDB after an error. Handle "monitor exit".
15543 Use require_running and target_running. Always allow the extended
15544 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15545 restart in extended mode.
15546 * README: Refer to the GDB manual. Update --attach usage.
15547
7407e2de
AS
155482007-12-20 Andreas Schwab <schwab@suse.de>
15549
15550 * linux-low.c (STACK_SIZE): Define.
15551 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15552 (linux_test_for_tracefork): Likewise.
15553
b65d95c5
DJ
155542007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15555
15556 * linux-low.c (linux_wait_for_event): Update messages. Do not
15557 reinsert auto-delete breakpoints.
15558 * mem-break.c (struct breakpoint): Change return type of handler to
15559 int.
15560 (set_breakpoint_at): Update handler type.
15561 (reinsert_breakpoint_handler): Return 1 instead of calling
15562 delete_breakpoint.
15563 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15564 setting a new one.
15565 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15566 * mem-break.h (set_breakpoint_at): Update handler type.
15567 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15568 * win32-low.c (auto_delete_breakpoint): New.
15569 (get_child_debug_event): Use it.
15570
4e799345
DJ
155712007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15572
15573 * configure.ac: Check for pread and pwrite.
15574 * hostio.c (handle_pread): Fall back to lseek and read.
15575 (handle_pwrite): Fall back to lseek and write.
15576 * config.in, configure: Regenerated.
15577
27524b67
DJ
155782007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15579
15580 * server.c (myresume): Add own_buf argument.
15581 (main): Update calls.
15582
a20d5e98
DJ
155832007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15584
15585 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15586 * remote-utils.c (remote_open): Do not call disable_async_io.
15587 (block_async_io): Delete.
15588 (unblock_async_io): Make static.
15589 (initialize_async_io): New.
15590 * server.c (handle_v_cont): Handle async I/O here.
15591 (myresume): Likewise. Move other common resume tasks here...
15592 (main): ... from here. Call initialize_async_io. Disable async
15593 I/O before the main loop.
15594 * server.h (initialize_async_io): Declare.
15595 (block_async_io, unblock_async_io): Delete prototypes.
15596 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15597
b79d787e
DJ
155982007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15599
15600 * remote-utils.c (readchar): Allow binary data in received messages.
15601
d97903b2
PA
156022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15603
15604 * win32-low.c (attaching): New global.
15605 (win32_create_inferior): Clear the `attaching' global.
15606 (win32_attach): Set the `attaching' global.
15607 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15608 attaching. Only set a breakpoint at the entry point if not
15609 attaching.
15610
311de423
PA
156112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15612
15613 * server.c (main): Don't report dll events on the initial
15614 connection on attaches.
15615
6c2d16d2
PA
156162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15617
15618 * server.c (main): Relax numerical bases supported for the pid of
15619 the --attach command line argument.
15620
5ca906e6
PA
156212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15622
15623 * win32-low.c (win32_attach): Call OpenProcess before
15624 DebugActiveProcess, not after. Add last error output to error
15625 call.
15626
9c6c8194
PA
156272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15628
15629 * win32-low.c (win32_get_thread_context)
15630 (win32_set_thread_context): New functions.
15631 (thread_rec): Use win32_get_thread_context.
15632 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15633 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15634 field.
15635
4d5d1aaa
PA
156362007-12-03 Leo Zayas
15637 Pedro Alves <pedro_alves@portugalmail.pt>
15638
15639 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15640 global variables.
15641 (child_add_thread): Minor cleanup.
15642 (child_continue): Resume artificially suspended threads before
15643 calling ContinueDebugEvent.
15644 (suspend_one_thread): New.
15645 (fake_breakpoint_event): New.
15646 (get_child_debug_event): Change return type to int. Check here if
15647 gdb sent an interrupt request. If a soft interrupt was requested,
15648 fake a breakpoint event. Return 0 if there is no event to handle,
15649 and 1 otherwise.
15650 (win32_wait): Don't check here if gdb sent an interrupt request.
15651 Ensure there is a valid event to handle.
15652 (win32_request_interrupt): Add soft interruption method as last
15653 resort.
15654
c436e841
PA
156552007-12-03 Leo Zayas
15656 Pedro Alves <pedro_alves@portugalmail.pt>
15657
15658 * win32-low.h (win32_thread_info): Add descriptions to the
15659 structure members. Replace `suspend_count' counter by a
15660 `suspended' flag.
15661 * win32-low.c (thread_rec): Update condition of when to get the
15662 context from the inferior. Rely on ContextFlags being set if it
15663 has already been retrieved. Only suspend the inferior thread if
15664 we haven't already. Warn if that fails.
15665 (continue_one_thread): s/suspend_count/suspended/. Only call
15666 ResumeThread once. Warn if that fails.
15667
e7b5fa67
PA
156682007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15669
15670 * win32-low.c (win32_wait): Don't read from the inferior when it
15671 has already exited.
15672
a385171d
PA
156732007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15674
15675 * Makefile.in (win32_low_h): New variable.
15676 (win32-low.o): Add dependency on $(win32_low_h).
15677 (win32-arm-low.o, win32-i386-low.o): New rules.
15678
f80c84b3
DJ
156792007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15680
15681 * hostio.c: Correct copyright year.
15682
a6b151f1
DJ
156832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * Makefile.in (OBS): Add hostio.o.
15686 (hostio.o): New rule.
15687 * server.h (handle_vFile): Declare.
15688 * hostio.c: New file.
15689 * server.c (handle_v_requests): Take packet_len and new_packet_len
15690 for binary packets. Call handle_vFile.
15691 (main): Update call to handle_v_requests.
15692
f9387fc3
DJ
156932007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15694
15695 * linux-low.c: Include <sched.h>.
15696
51c2684e
DJ
156972007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15698
15699 * linux-low.c (linux_tracefork_grandchild): New.
15700 (linux_tracefork_child): Use clone.
15701 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15702
75f83163
JB
157032007-10-31 Joel Brobecker <brobecker@adacore.com>
15704
15705 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15706
da5898ce
DJ
157072007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15708
15709 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15710
24a09b5f
DJ
157112007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15712
15713 * inferiors.c (change_inferior_id): Delete.
15714 (add_pid_to_list, pull_pid_from_list): New.
15715 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15716 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15717 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15718 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15719 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15720 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15721 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15722 (using_threads): Always set to 1.
15723 (handle_extended_wait): New.
15724 (add_process): Do not set TID.
15725 (linux_create_inferior): Set must_set_ptrace_flags.
15726 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15727 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15728 (linux_thread_alive): Rename TID argument to LWPID.
15729 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15730 (linux_wait_for_event): Do not use TID or check using_threads. Update
15731 call to dead_thread_notify. Call handle_extended_wait.
15732 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15733 (send_sigstop): Delete sigstop_sent.
15734 (wait_for_sigstop): Avoid TID.
15735 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15736 (linux_test_for_tracefork): New.
15737 (linux_lookup_signals): Use thread_db_active and
15738 linux_supports_tracefork_flag.
15739 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15740 * linux-low.h (get_process_thread): Avoid TID.
15741 (struct process_ifo): Move thread_known and tid to the end. Remove
15742 sigstop_sent.
15743 (linux_attach_lwp, thread_db_init): Update prototypes.
15744 * server.h (change_inferior_id): Delete prototype.
15745 (add_pid_to_list, pull_pid_from_list): New prototypes.
15746 * thread-db.c (thread_db_use_events): New.
15747 (find_first_thread): Rename to...
15748 (find_one_thread): ...this. Update callers and messages. Do not
15749 call fatal. Check thread_db_use_events. Do not call
15750 change_inferior_id or new_thread_notify.
15751 (maybe_attach_thread): Update. Do not call new_thread_notify.
15752 (thread_db_init): Set thread_db_use_events. Check use_events.
15753 * utils.c (fatal, warning): Correct message prefix.
15754
30ed0a8f
DJ
157552007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15756
15757 * Makefile.in (clean): Remove new files.
15758 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15759 (powerpc-64.o, powerpc-64.c): New rules.
15760 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15761 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15762 with SPE.
15763 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15764 SPE targets.
15765 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15766 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15767 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15768 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15769 (target_regsets): Add AltiVec and SPE register sets.
15770 * configure.ac: Check for AltiVec and SPE.
15771 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15772 (ppc_fill_vrregset, ppc_store_vrregset): New.
15773 (target_regsets): Add AltiVec register set.
15774 * configure: Regenerated.
15775
fd462a61
DJ
157762007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15777
15778 * linux-low.c (O_LARGEFILE): Define.
15779 (linux_read_memory): Use /proc/PID/mem.
15780 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15781 * configure, config.in: Regenerated.
15782
69f223ed
DJ
157832007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15784
15785 * linux-low.c (linux_wait_for_event): Do not pass signals while
15786 single-stepping.
15787
aec18585
PA
157882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15789
15790 * win32-low.c (create_process): New.
15791 (win32_create_inferior): Use create_process instead of
15792 CreateProcess. If create_process failed retry appending an ".exe"
15793 suffix. Store the GetLastError result immediatelly after
15794 create_process calls and use it on the call to error.
15795
34d86ddd
PA
157962007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15797
15798 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15799
5a0e3bd0
JB
158002007-08-23 Joel Brobecker <brobecker@adacore.com>
15801
15802 * configure.ac: Switch license to GPLv3.
15803
f88c79e6
MS
158042007-08-01 Michael Snyder <msnyder@access-company.com>
15805
15806 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15807
6b3d9b83
PA
158082007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15809
15810 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15811 typedef.
15812 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15813 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15814 CloseToolhelp32Snapshot.
15815 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15816 CloseToolhelp32Snapshot.
15817
c588c53c
MS
158182007-07-27 Michael Snyder <michael.snyder@access-company.com>
15819
15820 * server.c (main): Check for inferior exit before main loop.
15821
aa0403d9
PA
158222007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15823
15824 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15825 instead of on tmp_desc.
15826
255e7678
DJ
158272007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15828 Daniel Jacobowitz <dan@codesourcery.com>
15829
15830 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15831 (add_thread): Minor cleanups.
15832 (clear_inferiors): Move lower in the file. Clear the DLL
15833 list.
15834 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15835 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15836 (xml_escape_text): New.
15837 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15838 for qSupported.
15839 (handle_v_cont): Report errors.
15840 (gdbserver_version): Update.
15841 (main): Correct size of own_buf. Do not report initial DLL events.
15842 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15843 (unloaded_dll, xml_escape_text): New.
15844 * win32-low.c (enum target_waitkind): Update comments.
15845 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15846 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15847 (win32_EnumProcessModules, win32_GetModuleInformation)
15848 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15849 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15850 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15851 (win32_Module32First, win32_Module32Next, load_toolhelp)
15852 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15853 (get_child_debug_event): Handle DLL events.
15854 (win32_wait): Likewise.
15855
0d37add9
DJ
158562007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15857
15858 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15859 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15860
45e2715e
PA
158612007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15862
15863 * win32-low.c (handle_output_debug_string): Ignore event if not
15864 waiting.
15865
c5674cf1
PA
158662007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15867
15868 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15869
2bbe3cc1
DJ
158702007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15871
15872 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15873
ae13219e
DJ
158742007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15875
15876 * inferiors.c (change_inferior_id): Add comment.
15877 * linux-low.c (check_removed_breakpoint): Add an early
15878 prototype. Improve debug output.
15879 (linux_attach): Doc update.
15880 (linux_detach_one_process, linux_detach): Clean up before releasing
15881 each process.
15882 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15883 * linux-low.h (struct process_info): Doc improvement.
15884 * mem-break.c (delete_all_breakpoints): New.
15885 * mem-break.h (delete_all_breakpoints): New prototype.
15886 * thread-db.c (find_first_thread): New.
15887 (thread_db_create_event): Call it instead of
15888 thread_db_find_new_threads. Clean up unused variables.
15889 (maybe_attach_thread): Remove first thread handling.
15890 (thread_db_find_new_threads): Use find_first_thread.
15891 (thread_db_get_tls_address): Likewise.
15892
4105de34
DJ
158932007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15894
15895 * thread-db.c (thread_db_find_new_threads): Add prototype.
15896 (thread_db_create_event): Check for the main thread before adding
15897 a new thread.
15898 (maybe_attach_thread): Only enable event reporting if TID == 0.
15899 (thread_db_get_tls_address): Check for new threads.
15900
2b876972
DJ
159012007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15902
15903 * linux-low.c (linux_create_inferior): Try execv before execvp.
15904 * spu-low.c (spu_create_inferior): Likewise.
15905
7a245884
DJ
159062007-06-13 Mike Frysinger <vapier@gentoo.org>
15907
15908 * linux-low.c (linux_create_inferior): Change execv to execvp.
15909 * spu-low.c (spu_create_inferior): Likewies.
15910
117ce543
DJ
159112007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15912
15913 * Makefile.in (clean): Clean new files instead of deleted ones.
15914 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15915 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15916 rules.
15917 * configure.srv: Specify XML files and new regformats for MIPS and
15918 MIPS64 GNU/Linux.
15919 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15920 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15921 an entry for the restart register.
15922 (mips_cannot_fetch_register, mips_cannot_store_register)
15923 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15924 register names to match the XML descriptions.
15925 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15926 restart register instead of $0.
15927
0e7f50da
UW
159282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15929 Markus Deuling <deuling@de.ibm.com>
15930
15931 * remote-utils.c (decode_xfer_write): New function.
15932 * server.h (decode_xfer_write): Add prototype.
15933 * server.c (handle_query): Add PACKET_LEN argument. Support
15934 qXfer:spu:read and qXfer:spu:write packets.
15935 (main): Pass packet_len to handle_query.
15936 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15937 * target.h (target_ops): Add qxfer_spu.
15938
374c1d38
UW
159392007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15940
15941 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15942 accessing non-seekable spufs files.
15943
bb63802a
UW
159442007-05-16 Markus Deuling <deuling@de.ibm.com>
15945
889bf7c5 15946 * server.c (handle_query): Add reply for qC packet.
bb63802a 15947
7390519e
PA
159482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15949 Leo Zayas <lerele@champenstudios@com>
15950
15951 * server.h (check_remote_input_interrupt_request): New function.
15952 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15953 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15954 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15955 (check_remote_input_interrupt_request): New function.
15956 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 15957 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
15958 winapi_GenerateConsoleCtrlEvent): New typedefs.
15959 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15960 to 250 ms.
15961 (win32_wait): Check for remote interrupt request
15962 with check_remote_input_interrupt_request.
15963 (win32_request_interrupt): New function.
15964 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15965
34b34921
PA
159662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15967
15968 * win32-low.c (debug_registers_changed,
15969 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15970 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15971 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15972 (thread_rec): Get context using the low target.
15973 (child_add_thread): Call thread_added on the low target,
15974 which does the same thing.
15975 (regptr): Delete.
15976 (do_initial_child_stuff): Remove debug registers references.
15977 Set context using the low target. Resume threads after
15978 setting the contexts.
15979 (child_continue): Remove dead variable. Remove debug
15980 registers references.
15981 (child_fetch_inferior_registers): Go through the low target.
15982 (do_child_store_inferior_registers): Remove.
15983 (child_store_inferior_registers): Go through the low target.
15984 (win32_resume): Remove debug registers references.
15985 Set context using the low target.
15986 (handle_exception): Change return type to void. Don't record
15987 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15988 first chance exception.
889bf7c5 15989 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
15990 goto loop. Always return after waiting for debug event.
15991 (win32_wait): Convert to switch statement. Handle spurious
15992 events.
15993
15994 * win32-i386-low.c (debug_registers_changed,
15995 debug_registers_used): New.
15996 (initial_stuff): Rename to ...
15997 (i386_initial_stuff): ... this. Clear debug registers
15998 state variables.
15999 (store_debug_registers): Delete.
16000 (i386_get_thread_context): New.
16001 (load_debug_registers): Delete.
16002 (i386_set_thread_context): New.
16003 (i386_thread_added): New.
16004 (single_step): Rename to ...
16005 (i386_single_step): ... this.
16006 (do_fetch_inferior_registers): Rename to ...
16007 (i386_fetch_inferior_register): ... this.
16008 (i386_store_inferior_register): New.
16009 (the_low_target): Adapt to new interface.
16010
16011 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16012 (arm_get_thread_context): New.
16013 (arm_set_thread_context): New.
16014 (regptr): New.
16015 (do_fetch_inferior_registers): Rename to ...
16016 (arm_fetch_inferior_register): ... this.
16017 (arm_store_inferior_register): New.
16018 (arm_wince_breakpoint): Reimplement as unsigned long.
16019 (arm_wince_breakpoint_len): Define.
16020 (the_low_target): Adapt to new interface.
16021
16022 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16023 load_debug_registers. Add get_thread_context, set_thread_context,
16024 thread_added and store_inferior_register. Rename
16025 fetch_inferior_registers to fetch_inferior_register.
16026 (regptr): Remove declaration.
16027
dd6953e1
PA
160282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16029
16030 * linux-low.c (linux_detach): Change return type to int. Return 0.
16031 * spu-low.c (spu_detach): Likewise.
16032
444d6139
PA
160332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16034
16035 * target.h (target_ops): Change return type of detach to int.
16036 Add join.
16037 (join_inferior): New.
16038 * server.c (main): Don't skip detach support on mingw32.
16039 If the inferior doesn't support detaching return error.
16040 Call join_inferior instead of using waitpid.
16041 * linux-low.c (linux_join): New.
16042 (linux_target_op): Add linux_join.
16043 * spu-low.c (spu_join): New.
16044 (spu_target_ops): Add spu_join.
16045 * win32-low.c (win32_detach): Adapt to new interface.
16046 Reopen current_process_handle before detaching. Issue a child
16047 resume before detaching.
16048 (win32_join): New.
16049 (win32_target_op): Add win32_join.
16050
1d5315fe
PA
160512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16052
16053 * win32-low.c (win32-attach): Fix return value.
16054 * target.h (target_ops): Describe ATTACH return values.
16055
bf914831
PA
160562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16057
16058 * win32-low.c (GETPROCADDRESS): Define.
16059 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16060 (winapi_DebugSetProcessKillOnExit): Likewise.
16061 (win32_create_inferior): Force usage of ansi CreateProcessA.
16062 (win32_attach): Use GETPROCADDRESS.
16063 (win32_detach): Likewise.
16064
f72f3e60
PA
160652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16066
16067 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16068
ed50f18f
PA
160692007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16070
16071 * win32-low.c: Commit leftover changes from 2007-03-29.
16072
0c2ead7e
DJ
160732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16074
16075 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16076 fields short instead of int. Add explicit padding.
16077 (i387_cache_to_fsave): Remove unnecessary casts.
16078 (i387_fsave_to_cache): Doc fix.
16079 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16080
73725ff3
DJ
160812007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16084 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16085
d99f33d8
PA
160862007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16087
16088 * configure.srv (arm*-*-mingw32ce*): Move near the other
16089 arm targets.
16090
68070c10
PA
160912007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16092
2482afc6 16093 * configure.ac: Add errno checking.
68070c10
PA
16094 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16095 sys/file.h and malloc.h.
16096 (AC_CHECK_DECLS): Add perror.
16097 (srv_mingwce): Handle.
2482afc6 16098 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
16099 win32-i386-low.o to srv_tgtobj.
16100 (i[34567]86-*-mingw*): Likewise.
16101 (arm*-*-mingw32ce*): Add case.
16102 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16103 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16104 [__MINGW32CE__] (strerror): New function.
16105 [__MINGW32CE__] (errno): Define to GetLastError.
16106 [__MINGW32CE__] (COUNTOF): New macro.
16107 (remote_open): Remove extra close call.
16108 * mem-break.c (delete_breakpoint_at): New function.
16109 * mem-break.h (delete_breakpoint_at): Declare.
16110 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16111 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16112 [USE_WIN32API] (read, write): Add char* casts.
16113 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16114 * server.h: Include wincecompat.h on Windows CE.
16115 [HAVE_ERRNO_H]: Check.
16116 (perror): Declare if not declared.
16117 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16118 (perror_with_name): Remove errno declaration.
16119 * wincecompat.h: New.
16120 * wincecompat.c: New.
16121 * win32-low.h: New.
16122 * win32-arm-low.c: New.
16123 * win32-i386-low.c: New.
16124 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16125 (OUTMSG2): Make it safe.
16126 (_T): New macro.
16127 (COUNTOF): New macro.
16128 (NUM_REGS): Get it from the low target.
16129 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16130 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16131 (thread_rec): Let low target handle debug registers.
16132 (child_add_thread): Likewise.
16133 (child_init_thread_list): Likewise.
16134 (continue_one_thread): Likewise.
16135 (regptr): New.
16136 (do_child_fetch_inferior_registers): Move to ...
16137 * win32-i386-low.c: ... here, and rename to ...
16138 (do_fetch_inferior_registers): ... this.
889bf7c5 16139 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
16140 Go through the low target.
16141 (do_child_store_inferior_registers): Use regptr.
16142 (strwinerror): New function.
16143 (win32_create_inferior): Handle Windows CE.
16144 Use strwinerror instead of strerror on Windows error
16145 codes. Add program to the error output.
16146 Don't close the main thread handle on Windows CE.
16147 (win32_attach): Use coredll.dll on Windows CE.
16148 (win32_kill): Close current process and current
16149 thread handles.
16150 (win32_detach): Use coredll.dll on Windows CE.
16151 (win32_resume): Let low target handle debug registers, and
16152 step request.
16153 (handle_exception): Add/Remove initial breakpoint. Avoid
16154 non-existant WSTOPSIG on Windows CE.
16155 (win32_read_inferior_memory): Cast to remove warning.
16156 (win32_arch_string): Go through the low target.
16157 (initialize_low): Call set_breakpoint_data with the low
16158 target's breakpoint.
16159 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16160 FOP_REGNUM, mappings): Move to ...
16161 * win32-i386-low.c: ... here.
16162 * win32-low.c (win32_thread_info): Move to ...
16163 * win32-low.h: ... here.
16164 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16165 win32-arm-low.c and wincecompat.c.
16166 (all:): Add $EXEEXT.
16167 (install-only:): Likewise.
16168 (gdbserver:): Likewise.
16169 (gdbreplay:): Likewise.
16170 * config.in: Regenerate.
16171 * configure: Regenerate.
16172
41093d81
PA
161732007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16174
16175 * win32-low.c: Rename typedef thread_info to
16176 win32_thread_info throughout.
16177
544afa54
PA
161782007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16179
16180 * win32-i386-low.c: Rename to ...
16181 * win32-low.c: ... this.
16182 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16183 * Makefile.in: Likewise.
16184
bce7165d
PA
161852007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16186
16187 * remote-utils.c (monitor_output): Constify msg parameter.
16188 * server.h (monitor_output): Likewise.
16189 * win32-i386-low.c (handle_output_debug_string): New.
16190 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16191 handle_output_debug_string.
16192 (get_child_debug_event): Likewise.
16193
506c7aa0
DJ
161942007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16195
16196 * server.c (main): Correct strtoul check.
16197
42c81e2a
DJ
161982007-03-27 Jon Ringle <jon@ringle.org>
16199
16200 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16201
9453113a
DJ
162022007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16203
16204 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16205
64a69107
DJ
162062007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16207
16208 * terminal.h: Check HAVE_SGTTY_H.
16209
162102007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
16211
16212 * remote-utils.c (remote_open): Print out the assigned port number.
16213
c74d0ad8
DJ
162142007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16215
16216 * remote-utils.c (monitor_output): New function.
16217 * server.c (debug_threads): Define here.
16218 (monitor_show_help): New function.
16219 (handle_query): Handle qRcmd.
16220 (main): Do not handle 'd' packet.
16221 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16222 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16223 of debug_threads.
16224
de7c3b4a
PA
162252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16226
16227 * Makefile.in (EXEEXT): New.
16228 (clean): Use $(EXEEXT).
16229
ef57601b
PA
162302007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16231
16232 * target.h (target_ops): Rename send_signal to request_interrupt,
16233 and remove enum target_signal parameter.
16234 * linux-low.c (linux_request_interrupt): Rename from
16235 linux_send_signal, and always send SIGINT.
16236 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16237 and always send SIGINT.
16238 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16239 of send_signal.
16240 (input_interrupt): Likewise.
16241
820f2bda
PA
162422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16243
16244 * server.c (get_features_xml): Check if target implemented
16245 arch_string.
16246 * win32-i386-low.c (win32_arch_string): New.
16247 (win32_target_ops): Add win32_arch_string as arch_string member.
16248
ab39bf24
UW
162492007-02-22 Markus Deuling <deuling@de.ibm.com>
16250
16251 * spu-low.c (spu_arch_string): New.
16252 (spu_target_ops): Add spu_arch_string.
16253
61ff6e04
DJ
162542007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16255
16256 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16257 * configure.ac: Do not check for terminal.h.
16258 * configure, config.in: Regenerated.
16259
fb1e4ffc
DJ
162602007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16261
16262 * Makefile.in (OBS): Add $(XML_BUILTIN).
16263 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16264 (clean): Update.
16265 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16266 (arm-with-iwmmxt.c): New.
16267 * config.in, configure: Regenerate.
16268 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16269 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16270 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16271 (arm*-*-linux*): Add iWMMXt and regset support.
16272 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16273 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16274 (arm_store_wmmxregset, target_regsets): New.
16275 * server.c (get_features_xml): Take annex argument. Check builtin
16276 XML documents.
16277 (handle_query): Handle multiple annexes.
16278
0f48aa01
DJ
162792007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16280
16281 * remote-utils.c [USE_WIN32API] (read, write): Define.
16282 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16283 write.
16284
23181151
DJ
162852007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16286
16287 * linux-i386-low.c (the_low_target): Set arch_string.
16288 * linux-x86-64-low.c (the_low_target): Likewise.
16289 * linux-low.c (linux_arch_string): New.
16290 (linux_target_ops): Add it.
16291 * linux-low.h (struct linux_target_ops): Add arch_string.
16292 * server.c (write_qxfer_response): Use const void * for DATA.
16293 (get_features_xml): New.
16294 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16295 * target.h (struct target_ops): Add arch_string method.
16296
9d606399
DJ
162972007-01-03 Denis Pilat <denis.pilat@st.com>
16298 Daniel Jacobowitz <dan@codesourcery.com>
16299
16300 * linux-low.c (linux_kill): Handle being called with no threads.
16301 * win32-i386-low.c (win32_kill): Likewise.
16302 (get_child_debug_event): Clear current_process_handle.
16303
163042006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
16305 Daniel Jacobowitz <dan@codesourcery.com>
16306
16307 * remote-utils.c (remote_open): Check the type of specified
16308 serial port devices before opening them.
16309 * server.c (main): Kill the inferior if an error occurs during
16310 the first remote_open.
16311
a5e13d24
DJ
163122006-12-05 Markus Deuling <deuling@de.ibm.com>
16313
16314 * README: Update supported targets.
16315
186947f7
DJ
163162006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16317
16318 * Makefile.in (clean): Remove reg-mips64.c.
16319 (reg-mips64.c, reg-mips64.o): New rules.
16320 * configure.srv: Handle mips64. Include regset support for mips.
16321 * linux-mips-low.c (union mips_register): New.
16322 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16323 (mips_breakpoint, mips_breakpoint_at): Use int.
16324 (mips_collect_register, mips_supply_register)
16325 (mips_collect_register_32bit, mips_supply_register_32bit)
16326 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16327 (mips_store_fpregset, target_regsets): New.
16328 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16329
a13e2c95
UW
163302006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16331
16332 * configure.srv: Add target "spu*-*-*".
16333 * Makefile.in (clean): Remove reg-spu.c.
16334 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16335 * spu-low.c: New file.
16336
cb7283db
DJ
163372006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16338
16339 * configure.ac: Correct td_thr_tls_get_addr test.
16340 * configure: Regenerated.
16341
89be2091
DJ
163422006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16343
16344 * linux-low.c (linux_wait_for_event): Reformat. Use the
16345 pass_signals array.
16346 * remote-utils.c (decode_address_to_semicolon): New.
16347 * server.c (pass_signals, handle_general_set): New.
16348 (handle_query): Mention QPassSignals for qSupported.
16349 (main): Call handle_general_set.
16350 * server.h (pass_signals, decode_address_to_semicolon): New.
16351
000ef4f0
DJ
163522006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16353
16354 * server.c (handle_query): Correct error handling for read_auxv.
16355
b7149293
UW
163562005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16357
16358 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16359 and srv_linux_thread_db to yes.
16360 * linux-s390-low.c (s390_fill_gregset): New function.
16361 (target_regsets): Define data structure.
16362
dae5f5cf
DJ
163632006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16364
16365 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16366 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16367 * config.in, configure: Regenerated.
16368 * inferiors.c (gdb_id_to_thread): New function.
16369 (gdb_id_to_thread_id): Use it.
16370 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16371 * linux-low.h (struct process_info): Add th member.
16372 (thread_db_get_tls_address): New prototype.
16373 * remote-utils.c (decode_address): Make non-static.
16374 * server.c (handle_query): Handle qGetTLSAddr.
16375 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16376 * target.h (struct target_ops): Add get_tls_address.
16377 * thread-db.c (maybe_attach_thread): Save the thread handle.
16378 (thread_db_get_tls_address): New.
16379
32ca6d61
DJ
163802006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16381
16382 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16383 (linux_resume_one_process): Take a siginfo_t *. Update all
16384 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16385 (struct pending_signals): Add a siginfo_t.
16386 (linux_wait_for_process): Always set last_status.
16387 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16388 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16389 * linux-low.h (struct process_info): Add last_status.
16390
5ffff7c1
DJ
163912006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16392
16393 * remote-utils.c (try_rle): New function.
16394 (putpkt_binary): Use it.
16395
8695c747
DJ
163962006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16397
16398 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16399 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16400 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16401 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16402 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16403 point registers.
16404
290fadea
RS
164052006-08-08 Richard Sandiford <richard@codesourcery.com>
16406
16407 * server.c (terminal_fd): New variable.
16408 (old_foreground_pgrp): Likewise.
16409 (restore_old_foreground_pgrp): New function.
16410 (start_inferior): Record the terminal file descriptor in terminal_fd
16411 and its original foreground group in old_foreground_pgrp. Register
16412 restore_old_foreground_pgrp with atexit().
16413
9f2e1e63
DJ
164142006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16415
16416 * server.c (handle_query): Correct qPart to qXfer.
16417
b80864fb
DJ
164182006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16419
16420 * configure.ac: Check for more headers which are missing on
16421 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16422 * configure.srv: Add Cygwin and mingw32.
16423 * remote-utils.c: Don't include headers unconditionally which
16424 are missing on mingw32. Include <winsock.h> for mingw32.
16425 (remote_open): Adjust for mingw32 support. Flush
16426 standard error after writing to it.
16427 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16428 (unblock_async_io, enable_async_io, disable_async_io)
16429 (readchar, getpkt): Update for Winsock support.
16430 (prepare_resume_reply): Expect a protocol signal number.
16431 * server.c: Disable <sys/wait.h> on mingw32.
16432 (start_inferior): Adjust for mingw32 support. Flush
16433 standard error after writing to it.
16434 (attach_inferior): Likewise. Use protocol signal
16435 numbers.
16436 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16437 and names.
16438 * win32-i386-low.c: New file.
16439 * Makefile.in (XM_CLIBS): Set.
16440 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16441 (win32-i386-low.o): New dependency rule.
16442 * linux-low.c (linux_wait): Use target signal numbers.
16443 * target.h (struct target_ops): Doc fix.
16444 * server.h (target_signal_to_name): New prototype.
16445 * gdbreplay.c: Don't include headers unconditionally which
16446 are missing on mingw32. Include <winsock.h> for mingw32.
16447 (remote_close, remote_open): Adjust for Winsock support.
16448 * configure, config.in: Regenerated.
16449
0876f84a
DJ
164502006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16451
16452 * server.c (decode_xfer_read, write_qxfer_response): New.
16453 (handle_query): Take a packet length argument. Handle
16454 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16455 the qSupported response.
16456 (main): Update call to handle_query.
16457
01f9e8fa
DJ
164582006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16459
16460 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16461 (putpkt_binary): Renamed from putpkt and adjusted for binary
16462 data.
16463 (putpkt): New wrapper for putpkt_binary.
16464 (readchar): Don't mask off the high bit.
16465 (decode_X_packet): New function.
16466 * server.c (main): Call putpkt_binary if a handler sets the packet
16467 length. Save the length of the incoming packet. Handle 'X'.
16468 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16469
be2a5f71
DJ
164702006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16471
16472 * server.c (handle_query): Handle qSupported.
16473
ea025f5f
DJ
164742006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16475
16476 * remote-utils.c (all_symbols_looked_up): New variable.
16477 (look_up_one_symbol): Check it.
16478 * server.h (look_up_one_symbol): New declaration.
16479 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16480
9308fc88
DJ
164812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16482
16483 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 16484 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
16485 (PTRACE_GET_THREAD_AREA): Define.
16486 (ps_get_thread_area): New function.
16487
52fb6437
NS
164882006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16489
16490 * configure.srv (m68k*-*-uclinux*): New target.
16491 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16492 (linux_resume_one_process): Remove extraneous cast.
16493 (linux_read_offsets): New.
16494 (linux_target_op): Add linux_read_offsets on mmuless systems.
16495 * server.c (handle_query): Add qOffsets logic.
16496 * target.h (struct target_ops): Add read_offsets.
16497
21b0f40c
DJ
164982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16499
16500 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16501 (PTRACE_GET_THREAD_AREA): Define.
16502 (ps_get_thread_area): New function.
16503 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16504 (linux-x86-64-low.o): Update.
16505
0050a760
DJ
165062006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16507
16508 * configure.ac: Remove checks for prfpregset_t.
16509 * gdb_proc_service.h: New file.
16510 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16511 new "gdb_proc_service.h".
16512 * proc-service.c: Likewise.
16513 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16514 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16515 * Makefile.in (gdb_proc_service_h): Updated.
16516 * configure, config.in: Regenerated.
16517
b92a518e
DJ
165182006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16519
16520 * remote-utils.c (prepare_resume_reply): Move declaration
16521 of gdb_id_from_wait to the top of the block.
16522
545587ee
DJ
165232006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16524
16525 * linux-low.c (regsets_store_inferior_registers): Read the regset
16526 from the target before filling it.
16527
9db87ebd
DJ
165282006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16529
16530 * server.c (attach_inferior): Return SIGTRAP for a successful
16531 attach.
16532
dd24457d
DJ
165332006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16534
16535 * Makefile.in (OBS): Add version.o.
16536 (STAGESTUFF): Delete.
16537 (version.o): Add dependencies.
16538 (version.c): Replace rule.
16539 (clean): Remove version.c.
16540 * server.c (gdbserver_version): New.
16541 (gdbserver_usage): Use printf.
16542 (main): Handle --version and --help.
16543 * server.h (version, host_name): Add declarations.
16544
6f0f660e
EZ
165452005-12-23 Eli Zaretskii <eliz@gnu.org>
16546
889bf7c5
PA
16547 * linux-arm-low.c:
16548 * linux-arm-low.c:
16549 * inferiors.c:
16550 * i387-fp.h:
16551 * i387-fp.c:
16552 * gdbreplay.c:
16553 * regcache.c:
16554 * proc-service.c:
16555 * mem-break.h:
16556 * mem-break.c:
16557 * linux-x86-64-low.c:
16558 * linux-sh-low.c:
16559 * linux-s390-low.c:
16560 * linux-ppc64-low.c:
16561 * linux-ppc-low.c:
16562 * linux-mips-low.c:
16563 * linux-m68k-low.c:
16564 * linux-m32r-low.c:
16565 * linux-low.h:
16566 * linux-low.c:
16567 * linux-ia64-low.c:
16568 * linux-i386-low.c:
16569 * linux-crisv32-low.c:
16570 * thread-db.c:
16571 * terminal.h:
16572 * target.h:
16573 * target.c:
16574 * server.h:
16575 * server.c:
16576 * remote-utils.c:
16577 * regcache.h:
16578 * utils.c:
16579 * Makefile.in:
16580 * configure.ac:
6f0f660e
EZ
16581 * gdbserver.1: Add (C) after Copyright. Update the FSF
16582 address.
16583
9d1fb177
DJ
165842005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16585
16586 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16587 (arm_breakpoint_at): Recognize both breakpoints.
16588 (the_low_target): Use the correct breakpoint instruction.
16589
011a70c2
DJ
165902005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16591
16592 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16593 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16594 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16595 (the_low_target): Update.
16596
7fb85e41
AS
165972005-10-25 Andreas Schwab <schwab@suse.de>
16598
16599 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16600
16601 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16602 (ia64_num_regs): Reduce to 462.
16603
3db0444b
DJ
166042005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16605
16606 * acinclude.m4: Correct quoting.
16607 * aclocal.m4: Regenerated.
16608
16609 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16610 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16611 (thread_db_init): Call thread_db_err_str.
16612 * configure.ac: Check for TD_VERSION.
16613 * config.in, configure: Regenerated.
16614
bee0189a
DJ
166152005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16616
16617 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16618
e9d25b98
DJ
166192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16620
16621 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16622 is not available. Define HAVE_PTRACE_GETREGS if it is.
16623 * config.in, configure: Regenerated.
16624 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16625 * linux-i386-low.c, linux-m68k-low.c: Update to use
16626 HAVE_PTRACE_GETREGS.
16627 * linux-low.c (regsets_fetch_inferior_registers)
16628 (regsets_store_inferior_registers): Only return 0 if we processed
16629 GENERAL_REGS.
16630 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16631 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16632
a06660f7
DJ
166332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16634
16635 * inferiors.c (struct thread_info): Add gdb_id.
16636 (add_thread): Add gdb_id argument.
16637 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16638 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16639 calls to add_thread.
16640 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16641 * server.c (handle_query): Use thread_to_gdb_id.
16642 (handle_v_cont, main): Use gdb_id_to_thread_id.
16643 * server.h (add_thread): Update prototype.
16644 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16645 prototypes.
16646
5a1f5858
DJ
166472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16648
16649 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16650 left-padded registers.
16651 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16652 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16653
e122f1f5
SE
166542005-07-01 Steve Ellcey <sje@cup.hp.com>
16655
16656 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16657 * configure: Regenerate.
16658 * config.in: Regenerate.
16659 * server.h (NEED_DECLARATION_STRERROR):
16660 Replace with !HAVE_DECL_STRERROR.
16661
d592fa2f
DJ
166622005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16663
16664 * linux-low.c (linux_wait, linux_send_signal): Don't test
16665 an unsigned long variable for > 0 if it could be MAX_ULONG.
16666 * server.c (myresume): Likewise.
16667 * target.c (set_desired_inferior): Likewise.
16668
ccbd4912
MK
166692005-06-13 Mark Kettenis <kettenis@gnu.org>
16670
16671 * configure.ac: Simplify and improve check for socklen_t.
16672 * configure, config.in: Regenerate.
16673
f450004a
DJ
166742005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16675
16676 * acconfig.h: Remove.
16677 * configure.ac: Add a test for socklen_t. Use three-argument
16678 AC_DEFINE throughout.
16679 * config.in: Regenerated using autoheader 2.59.
16680 * configure: Regenerated.
16681
16682 * gdbreplay.c (socklen_t): Provide a default.
16683 (remote_open): Use socklen_t.
16684 * remote-utils.c (socklen_t): Provide a default.
16685 (remote_open): Use socklen_t.
16686 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16687 unsigned char.
16688
16689 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16690 char for buffers.
16691 * linux-low.c (linux_read_memory, linux_write_memory)
16692 (linux_read_auxv): Likewise.
16693 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16694 (check_mem_write): Likewise.
16695 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16696 Likewise.
16697 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16698 (registers_from_string, register_data): Likewise.
16699 * server.c (handle_query, main): Likewise.
16700 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16701 (decode_M_packet): Likewise.
16702 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16703 * target.h (struct target_ops): Update read_memory, write_memory,
16704 and read_auxv.
16705 (read_inferior_memory, write_inferior_memory): Update.
16706 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16707 to unsigned char *.
16708 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16709 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16710 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16711 linux-s390-low.c, linux-sh-low.c: Update for changes in
16712 read_inferior_memory and the_low_target->breakpoint.
16713
eee84df1
DJ
167142005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16715
16716 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16717 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16718 * configure.srv: Add powerpc64-*-linux*.
16719 * linux-ppc64-low.c: New file.
16720
45b134e5
OF
167212005-05-23 Orjan Friberg <orjanf@axis.com>
16722
16723 * linux-cris-low.c: New file with support for CRIS.
16724 * linux-crisv32-low.c: Ditto for CRISv32.
16725 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16726 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 16727 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
16728 reg-crisv32.o, and reg-crisv32.c to make rules.
16729 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16730 recognized targets.
16731
48d93c75
UW
167322005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16733
16734 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16735 of sizeof (PTRACE_XFER_TYPE).
16736 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16737
e013ee27
OF
167382005-05-12 Orjan Friberg <orjanf@axis.com>
16739
889bf7c5 16740 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
16741 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16742 pointers for hardware watchpoint support.
16743 * linux-low.h (struct linux_target_ops): Ditto.
16744 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16745 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16746 to linux_target_ops.
16747 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16748 reply packet.
16749 * server.c (main): Recognize 'Z' and 'z' packets.
16750
b0ded00b
UW
167512005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16752
16753 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16754 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16755 (the_low_target): Add new members.
16756
8643e2ad
DJ
167572005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16758
16759 * proc-service.c (ps_lgetregs): Search all_processes instead of
16760 all_threads.
16761
fc620387
DJ
167622005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16763
16764 * server.c (start_inferior): Change return type to int.
16765 (attach_inferior): Change sigptr to int *.
16766 (handle_v_cont, handle_v_requests): Change signal to int *.
16767 (main): Change signal to int.
16768
167692005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
16770
16771 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16772 * configure.srv: Add m32r*-*-linux*.
16773 * linux-m32r-low.c: New file.
16774
e0e76420
DJ
167752005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16776
16777 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16778
a1928bad
DJ
167792005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16780
16781 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16782 Take unsigned long arguments for PIDs.
16783 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16784 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16785 (wait_for_sigstop, linux_resume_one_process)
16786 (regsets_fetch_inferior_registers, linux_send_signal)
16787 (linux_read_auxv): Likewise. Update the types of variables holding
16788 PIDs. Update format string specifiers.
16789 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16790 * remote-utils.c (prepare_resume_reply): Likewise.
16791 * server.c (cont_thread, general_thread, step_thread)
16792 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16793 unsigned long.
16794 (handle_query): Update format specifiers.
16795 (handle_v_cont, main): Use strtoul for thread IDs.
16796 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16797 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16798 (general_thread, step_thread, thread_from_wait)
16799 (old_thread_from_wait): Update.
16800 * target.h (struct thread_resume): Use unsigned long for THREAD.
16801 (struct target_ops): Use unsigned long for arguments to attach and
16802 thread_alive.
16803
dcdb98d2
DJ
168042005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16805
16806 * acinclude.m4: Include bfd/bfd.m4 directly.
16807 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16808 <agriffis@toolchain.org>.
16809 * aclocal.m4, configure: Regenerated.
16810
bec39cab
AC
168112005-01-07 Andrew Cagney <cagney@gnu.org>
16812
16813 * configure.ac: Rename configure.in, require autoconf 2.59.
16814 * configure: Re-generate.
16815
434c4c77
DJ
168162004-12-08 Daniel Jacobowitz <dan@debian.org>
16817
16818 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16819 LIBS when finished.
16820 * aclocal.m4: Regenerated.
16821 * configure: Regenerated.
16822
db1d3e1b
AS
168232004-11-21 Andreas Schwab <schwab@suse.de>
16824
16825 * linux-m68k-low.c (m68k_num_gregs): Define.
16826 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16827 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16828 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16829 (m68k_breakpoint_at): New. Add to the_low_target.
16830
16831 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16832 srv_linux_thread_db to yes.
16833
43360365
JB
168342004-10-20 Joel Brobecker <brobecker@gnat.com>
16835
16836 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16837 (ARCH_SET_FS): Likewise.
16838 (ARCH_GET_FS): Likewise.
16839 (ARCH_GET_GS): Likewise.
16840
fd500816
DJ
168412004-10-16 Daniel Jacobowitz <dan@debian.org>
16842
16843 * linux-i386-low.c (ps_get_thread_area): New.
16844 * linux-x86-64-low.c (ps_get_thread_area): New.
16845 * linux-low.c: Include <sys/syscall.h>.
16846 (linux_kill_one_process): Don't kill the first thread here.
16847 (linux_kill): Kill the first thread here.
16848 (kill_lwp): New function.
16849 (send_sigstop, linux_send_signal): Use it.
16850 * proc-service.c: Clean up #ifdefs.
16851 (fpregset_info): Delete.
16852 (ps_lgetregs): Update and enable implementation.
16853 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16854 implementations.
16855 * remote-utils.c (struct sym_cache, symbol_cache): New.
16856 (input_interrupt): Print a clearer message.
16857 (async_io_enabled): New variable.
16858 (enable_async_io, disable_async_io): Use it. Update comments.
16859 (look_up_one_symbol): Use the symbol cache.
16860 * thread-db.c (thread_db_look_up_symbols): New function.
16861 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16862
f6de3c42
DJ
168632004-10-16 Daniel Jacobowitz <dan@debian.org>
16864
16865 * configure.in: Test for -rdynamic.
16866 * configure: Regenerated.
16867 * Makefile (INTERNAL_LDFLAGS): New.
16868 (gdbserver, gdbreplay): Use it.
16869
2c0fc042
AC
168702004-09-02 Andrew Cagney <cagney@gnu.org>
16871
16872 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16873
075b3282
DJ
168742004-03-23 Daniel Jacobowitz <drow@mvista.com>
16875
16876 * linux-low.c (linux_wait): Clear all_processes list also.
16877
fa6a77dc
DJ
168782004-03-12 Daniel Jacobowitz <drow@mvista.com>
16879
16880 * linux-low.c: Include <errno.h>. Remove extern declaration of
16881 errno.
16882
6d782a97
DJ
168832004-03-12 Daniel Jacobowitz <drow@mvista.com>
16884
16885 * gdbreplay.c, server.h, utils.c: Update copyright years.
16886
3a7fb99b
DJ
168872004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16888
16889 * server.c (main): Print child status or termination signal from
16890 variable 'signal', not 'sig'.
16891
c3e735a6
DJ
168922004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16893
16894 * linux-low.c (linux_read_memory): Change return type to
16895 int. Check for and return error from ptrace().
16896 * target.c (read_inferior_memory): Change return type to int. Pass
16897 back return status from the_target->read_memory().
16898 * target.h (struct target_ops): Adapt *read_memory() prototype.
16899 Update comment.
16900 (read_inferior_memory): Adapt prototype.
16901 * server.c (main): Return an error packet if
16902 read_inferior_memory() returns an error.
16903
a59d1c82
DJ
169042004-03-04 Daniel Jacobowitz <drow@mvista.com>
16905
16906 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16907 Unify with other clean targets.
16908
dc3f8883
DJ
169092004-02-29 Daniel Jacobowitz <drow@mvista.com>
16910
16911 * server.c (handle_v_cont): Call set_desired_inferior.
16912
89a208da
DJ
169132004-02-29 Daniel Jacobowitz <drow@mvista.com>
16914
16915 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16916
62ea82f5
DJ
169172004-02-29 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * linux-low.c (linux_wait): Unblock async I/O.
16920 (linux_resume): Block and enable async I/O.
16921 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16922 * server.h (block_async_io, unblock_async_io): Add prototypes.
16923
6910d122
DJ
169242004-02-29 Daniel Jacobowitz <drow@mvista.com>
16925
16926 * remote-utils.c (remote_open): Print a status notice after
16927 opening a TCP port.
16928 * server.c (attach_inferior): Print a status notice after
16929 attaching.
16930
169312004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
16932
16933 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16934
c89dc5d4
DJ
169352004-02-26 Daniel Jacobowitz <drow@mvista.com>
16936
16937 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16938 error packet.
16939 * server.c, target.h: Update copyright years.
16940
4b8dad4a
RM
169412004-02-25 Roland McGrath <roland@redhat.com>
16942
16943 * target.h (struct target_ops): New member `read_auxv'.
16944 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16945 * linux-low.c (linux_read_auxv): New function.
16946 (linux_target_ops): Initialize `read_auxv' member to that.
16947
d7446758
JB
169482004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16949
16950 Committed by Jim Blandy <jimb@redhat.com>.
16951
16952 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 16953 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
16954 instead of GPR_SIZE to distiguish s390 and s390x targets.
16955
5544ad89
DJ
169562004-01-31 Daniel Jacobowitz <drow@mvista.com>
16957
16958 * linux-low.c: Update copyright year.
16959 (check_removed_breakpoint): Clear pending_is_breakpoint.
16960 (linux_set_resume_request, linux_queue_one_thread)
16961 (resume_status_pending_p): New functions.
16962 (linux_continue_one_thread): Use process->resume.
16963 (linux_resume): Only resume threads if there are no pending events.
16964 * linux-low.h (struct process_info): Add resume request
16965 pointer.
16966
2a68b70e
DJ
169672004-01-30 Daniel Jacobowitz <drow@mvista.com>
16968
16969 * regcache.c (new_register_cache): Clear the allocated register
16970 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16971
64386c31
DJ
169722003-10-13 Daniel Jacobowitz <drow@mvista.com>
16973
16974 * linux-low.c (linux_resume): Take a struct thread_resume *
16975 argument.
16976 (linux_wait): Update call.
16977 (resume_ptr): New static variable.
16978 (linux_continue_one_thread): Renamed from
16979 linux_continue_one_process. Use resume_ptr.
16980 (linux_resume): Use linux_continue_one_thread.
16981 * server.c (handle_v_cont, handle_v_requests): New functions.
16982 (myresume): New function.
16983 (main): Handle 'v' case.
16984 * target.h (struct thread_resume): New type.
16985 (struct target_ops): Change argument of "resume" to struct
16986 thread_resume *.
16987 (myresume): Delete macro.
16988
c938e9b0
L
169892003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16990
16991 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16992 (uninstall): Support DESTDIR.
16993
7f313d07
BC
16994Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16995
16996 * configure.srv: Add xscale*linux copy of arm*linux entry.
16997
3b2fc2ea
DJ
169982003-07-24 Daniel Jacobowitz <drow@mvista.com>
16999
17000 * linux-arm-low.c (arm_reinsert_addr): New function.
17001 (the_low_target): Add arm_reinsert_addr.
17002
1c0a559e
MK
170032003-07-08 Mark Kettenis <kettenis@gnu.org>
17004
17005 * mem-break.c: Remove whitespace at end of file.
17006
43d5792c
DJ
170072003-06-28 Daniel Jacobowitz <drow@mvista.com>
17008
17009 * configure.in: Check whether we need to prototype strerror.
17010 * server.h: Optionally prototype strerror.
17011 * gdbreplay.c (perror_with_name): Use strerror.
17012 * linux-low.c (linux_attach_lwp): Use strerror.
17013 * utils.c (perror_with_name): Use strerror.
17014 * config.in, configure: Regenerated.
17015
c8a86edf
DJ
170162003-06-28 Daniel Jacobowitz <drow@mvista.com>
17017
17018 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17019 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17020
73d37363
DJ
170212003-06-20 Daniel Jacobowitz <drow@mvista.com>
17022
17023 * Makefile.in (SFILES): Update.
17024 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17025 low-sun3.c: Remove files.
17026
6ad8ae5c
DJ
170272003-06-17 Daniel Jacobowitz <drow@mvista.com>
17028
17029 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17030 (linux_detach_one_process, linux_detach): New functions.
17031 (linux_target_ops): Add linux_detach.
17032 * server.c (main): Handle 'D' packet.
17033 * target.h (struct target_ops): Add "detach" member.
17034 (detach_inferior): Define.
17035
1581182a
MK
170362003-06-13 Mark Kettenis <kettenis@gnu.org>
17037
17038 From Kelley Cook <kelleycook@wideopenwest.com>:
17039 * configure.srv: Accept i[34567]86 variants.
17040
e5379b03
DJ
170412003-06-05 Daniel Jacobowitz <drow@mvista.com>
17042
17043 * linux-low.c (linux_wait_for_event): Correct comment typos.
17044 (linux_resume_one_process): Call check_removed_breakpoint.
17045 (linux_send_signal): New function.
17046 (linux_target_ops): Add linux_send_signal.
17047 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17048 of kill.
17049 * target.h (struct target_ops): Add send_signal.
17050
2ff29de4
JB
170512003-05-29 Jim Blandy <jimb@redhat.com>
17052
17053 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17054 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17055 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17056 away part of the register's value.
17057
254787d4
DJ
170582003-03-26 Daniel Jacobowitz <drow@mvista.com>
17059
17060 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17061 (linux_wait_for_event, linux_init_signals): Likewise.
17062
94e10508
DJ
170632003-03-17 Daniel Jacobowitz <drow@mvista.com>
17064
17065 * configure.in: Check for stdlib.h.
17066 * configure: Regenerated.
17067 * config.in: Regenerated.
17068
4c0711e0
DJ
170692003-01-04 Andreas Schwab <schwab@suse.de>
17070
17071 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17072
ef66e766
AC
170732003-01-02 Andrew Cagney <ac131313@redhat.com>
17074
17075 * Makefile.in: Remove obsolete code.
17076
a1358604
DJ
170772002-11-20 Daniel Jacobowitz <drow@mvista.com>
17078
17079 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17080 defined(PT_FPR0_HI).
17081
23ce3b1c
DJ
170822002-11-17 Stuart Hughes <seh@zee2.com>
17083
17084 * linux-arm-low.c (arm_num_regs): Increase.
17085 (arm_regmap): Include status register.
17086
170872002-11-17 Daniel Jacobowitz <drow@mvista.com>
17088
17089 * linux-low.c (register_addr): Remove incorrect -1 check.
17090
a9fa9f7d
DJ
170912002-08-29 Daniel Jacobowitz <drow@mvista.com>
17092
17093 * linux-low.c (linux_create_inferior): Call setpgid. Return
17094 the new PID.
17095 (unstopped_p, linux_signal_pid): Remove.
17096 (linux_target_ops): Remove linux_signal_pid.
17097 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17098 global instead of target method.
17099 * target.h (struct target_ops): Remove signal_pid. Update comment
17100 for create_inferior.
17101 * server.c (signal_pid): New variable.
17102 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 17103 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
17104 (attach_inferior): Set signal_pid.
17105
17574093
DJ
171062002-08-23 Daniel Jacobowitz <drow@mvista.com>
17107
17108 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17109
171102002-08-20 Jim Blandy <jimb@redhat.com>
17111
17112 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17113 default for this.
17114
171152002-08-01 Andrew Cagney <cagney@redhat.com>
17116
17117 * Makefile.in: Make chill references obsolete.
17118
171192002-07-24 Kevin Buettner <kevinb@redhat.com>
17120
17121 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17122 * configure: Regenerate.
17123 * config.in: Regenerate.
17124
171252002-07-09 David O'Brien <obrien@FreeBSD.org>
17126
17127 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17128 (perror_with_name, remote_close, remote_open, expect, play): Static.
17129
171302002-07-04 Michal Ludvig <mludvig@suse.cz>
17131
4b8dad4a 17132 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
17133 byte offsets instead of an array of indexes.
17134 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17135
171362002-06-13 Daniel Jacobowitz <drow@mvista.com>
17137
17138 * regcache.c: Add comment.
17139
171402002-06-11 Daniel Jacobowitz <drow@mvista.com>
17141
17142 * thread-db.c: New file.
17143 * proc-service.c: New file.
17144 * acinclude.m4: New file.
17145 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17146 proc-service.o, and thread-db.o.
17147 (linux-low.o): Add USE_THREAD_DB.
17148 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17149 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17150 * aclocal.m4: Regenerated.
17151 * config.in: Regenerated.
17152 * configure: Regenerated.
17153 * configure.in: Check for proc_service.h, sys/procfs.h,
17154 thread_db.h, and linux/elf.h headrs.
17155 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17156 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17157 Check for -lthread_db and thread support.
17158 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17159 PowerPC, and SuperH.
17160 * i387-fp.c: Constify arguments.
17161 * i387-fp.h: Likewise.
17162 * inferiors.c: (struct thread_info): Renamed from
17163 `struct inferior_info'. Remove PID member. Use generic inferior
17164 list header. All uses updated.
17165 (inferiors, signal_pid): Removed.
17166 (all_threads): New variable.
17167 (get_thread): Define.
17168 (add_inferior_to_list): New function.
17169 (for_each_inferior): New function.
17170 (change_inferior_id): New function.
17171 (add_inferior): Removed.
17172 (remove_inferior): New function.
17173 (add_thread): New function.
17174 (free_one_thread): New function.
17175 (remove_thread): New function.
17176 (clear_inferiors): Use for_each_inferior and free_one_thread.
17177 (find_inferior): New function.
17178 (find_inferior_id): New function.
17179 (inferior_target_data): Update argument type.
17180 (set_inferior_target_data): Likewise.
17181 (inferior_regcache_data): Likewise.
17182 (set_inferior_regcache_data): Likewise.
17183 * linux-low.c (linux_bp_reinsert): Remove.
17184 (all_processes, stopping_threads, using_thrads)
17185 (struct pending_signals, debug_threads, pid_of): New.
17186 (inferior_pid): Replace with macro.
17187 (struct inferior_linux_data): Remove.
17188 (get_stop_pc, add_process): New functions.
17189 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17190 Use add_process and add_thread.
17191 (linux_attach_lwp): New function, based on old linux_attach. Use
17192 add_process and add_thread. Set stop_expected for new threads.
17193 (linux_attach): New function.
17194 (linux_kill_one_process): New function.
17195 (linux_kill): Kill all LWPs.
17196 (linux_thread_alive): Use find_inferior_id.
17197 (check_removed_breakpoints, status_pending_p): New functions.
17198 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17199 Update. Use WNOHANG. Wait for cloned processes also. Update process
17200 struct for the found process.
17201 (linux_wait_for_event): New function.
17202 (linux_wait): Use it. Support LWPs.
17203 (send_sigstop, wait_for_sigstop, stop_all_processes)
17204 (linux_resume_one_process, linux_continue_one_process): New functions.
17205 (linux_resume): Support LWPs.
17206 (REGISTER_RAW_SIZE): Remove.
17207 (fetch_register): Use register_size instead. Call supply_register.
17208 (usr_store_inferior_registers): Likewise. Call collect_register.
17209 Fix recursive case.
17210 (regsets_fetch_inferior_registers): Improve error message.
17211 (regsets_store_inferior_registers): Add debugging.
17212 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17213 (unstopped_p, linux_signal_pid): New functions.
17214 (linux_target_ops): Add linux_signal_pid.
17215 (linux_init_signals): New function.
17216 (initialize_low): Call it. Initialize using_threads.
17217 * regcache.c (inferior_regcache_data): Add valid
17218 flag.
17219 (get_regcache): Fetch registers lazily. Add fetch argument
17220 and update all callers.
17221 (regcache_invalidate_one, regcache_invalidate): New
17222 functions.
17223 (new_register_cache): Renamed from create_register_cache.
17224 Return the new regcache.
17225 (free_register_cache): Change argument to a void *.
17226 (registers_to_string, registers_from_string): Call get_regcache
17227 with fetch flag set.
17228 (register_data): Make static. Pass fetch flag to get_regcache.
17229 (supply_register): Call get_regcache with fetch flag clear.
17230 (collect_register): Call get_regcache with fetch flag set.
17231 (collect_register_as_string): New function.
17232 * regcache.h: Update.
17233 * remote-utils.c (putpkt): Flush after debug output and use
17234 stderr.
17235 Handle input interrupts while waiting for an ACK.
17236 (input_interrupt): Use signal_pid method.
17237 (getpkt): Flush after debug output and use stderr.
17238 (outreg): Use collect_register_as_string.
17239 (new_thread_notify, dead_thread_notify): New functions.
17240 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17241 and general_thread.
17242 (look_up_one_symbol): Flush after debug output.
17243 * server.c (step_thread, server_waiting): New variables.
17244 (start_inferior): Don't use signal_pid. Update call to mywait.
17245 (attach_inferior): Update call to mywait.
17246 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17247 (main): Don't fetch/store registers explicitly. Use
17248 set_desired_inferior. Support proposed ``Hs'' packet. Update
17249 calls to mywait.
17250 * server.h: Update.
17251 (struct inferior_list, struct_inferior_list_entry): New.
17252 * target.c (set_desired_inferior): New.
17253 (write_inferior_memory): Constify.
17254 (mywait): New function.
17255 * target.h: Update.
17256 (struct target_ops): New signal_pid method.
17257 (mywait): Removed macro, added prototype.
17258
17259 * linux-low.h (regset_func): Removed.
17260 (regset_fill_func, regset_store_func): New.
17261 (enum regset_type): New.
17262 (struct regset_info): Add type field. Use new operation types.
17263 (struct linux_target_ops): stop_pc renamed to get_pc.
17264 Add decr_pc_after_break and breakpoint_at.
17265 (get_process, get_thread_proess, get_process_thread)
17266 (strut process_info, all_processes, linux_attach_lwp)
17267 (thread_db_init): New.
17268
17269 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17270 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17271 (the_low_target): Add new members.
17272 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17273 (i386_store_fpxregset): Constify.
17274 (target_regsets): Add new kind identifier.
17275 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17276 (i386_set_pc): Add debugging.
17277 (i386_breakpoint_at): New function.
17278 (the_low_target): Add new members.
17279 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17280 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17281 (mips_breakpoint_at): New.
17282 (the_low_target): Add new members.
17283 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17284 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17285 (the_low_target): Add new members.
17286 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17287 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17288 (the_low_target): Add new members.
17289 * linux-x86-64-low.c (target_regsets): Add new kind
17290 identifier.
17291
172922002-05-15 Daniel Jacobowitz <drow@mvista.com>
17293
17294 From Martin Pool <mbp@samba.org>:
17295 * server.c (gdbserver_usage): New function.
17296 (main): Call it.
17297
172982002-05-14 Daniel Jacobowitz <drow@mvista.com>
17299
17300 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17301 stop_at -> stop_pc.
17302
173032002-05-04 Andrew Cagney <ac131313@redhat.com>
17304
17305 * Makefile.in: Remove obsolete code.
17306
173072002-04-24 Michal Ludvig <mludvig@suse.cz>
17308
17309 * linux-low.c (regsets_fetch_inferior_registers),
17310 (regsets_store_inferior_registers): Removed cast to int from
17311 ptrace() calls.
17312 * regcache.h: Added declaration of struct inferior_info.
17313
173142002-04-20 Daniel Jacobowitz <drow@mvista.com>
17315
17316 * inferiors.c (struct inferior_info): Add regcache_data.
17317 (add_inferior): Call create_register_cache.
17318 (clear_inferiors): Call free_register_cache.
17319 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17320 * regcache.c (struct inferior_regcache_data): New.
17321 (registers): Remove.
17322 (get_regcache): New function.
17323 (create_register_cache, free_register_cache): New functions.
17324 (set_register_cache): Don't initialize the register cache here.
17325 (registers_to_string, registers_from_string, register_data): Call
17326 get_regcache.
17327 * regcache.h: Add prototypes.
17328 * server.h: Likewise.
17329
173302002-04-20 Daniel Jacobowitz <drow@mvista.com>
17331
17332 * mem-break.c: New file.
17333 * mem-break.h: New file.
17334 * Makefile.in: Add mem-break.o rule; update server.h
17335 dependencies.
17336 * inferiors.c (struct inferior_info): Add target_data
17337 member.
17338 (clear_inferiors): Free target_data member if set.
17339 (inferior_target_data, set_inferior_target_data): New functions.
17340 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17341 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17342 * linux-low.c (linux_bp_reinsert): New variable.
17343 (struct inferior_linux_data): New.
17344 (linux_create_inferior): Use set_inferior_target_data.
17345 (linux_attach): Likewise. Call add_inferior.
17346 (linux_wait_for_one_inferior): New function.
17347 (linux_wait): Call it.
17348 (linux_write_memory): Add const.
17349 (initialize_low): Call set_breakpoint_data.
17350 * linux-low.h (struct linux_target_ops): Add breakpoint
17351 handling members.
17352 * server.c (attach_inferior): Remove extra add_inferior
17353 call.
17354 * server.h: Include mem-break.h. Update inferior.c
17355 prototypes.
17356 * target.c (read_inferior_memory)
17357 (write_inferior_memory): New functions.
17358 * target.h (read_inferior_memory)
17359 (write_inferior_memory): Change macros to prototypes.
17360 (struct target_ops): Update comments. Add const to write_memory
17361 definition.
17362
173632002-04-11 Daniel Jacobowitz <drow@mvista.com>
17364
17365 * linux-low.c (usr_store_inferior_registers): Support
17366 registers which are allowed to fail to store.
17367 * linux-low.h (linux_target_ops): Likewise.
17368 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17369 (ppc_cannot_store_register): FPSCR may not be storable.
17370
173712002-04-09 Daniel Jacobowitz <drow@mvista.com>
17372
17373 * server.h: Include <string.h> if HAVE_STRING_H.
17374 * ChangeLog: Correct paths in last ChangeLog entry.
17375
173762002-04-09 Daniel Jacobowitz <drow@mvista.com>
17377
17378 * linux-low.h: Remove obsolete prototypes.
17379 (struct linux_target_ops): New.
17380 (extern the_low_target): New.
17381 * linux-low.c (num_regs, regmap): Remove declarations.
17382 (register_addr): Use the_low_target explicitly.
17383 (fetch_register): Likewise.
17384 (usr_fetch_inferior_registers): Likewise.
17385 (usr_store_inferior_registers): Likewise.
17386 * linux-arm-low.c (num_regs): Remove.
17387 (arm_num_regs): Define.
17388 (arm_regmap): Renamed from regmap, made static.
17389 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17390 made static.
17391 (arm_cannot_store_register): Renamed from cannot_store_register,
17392 made static.
17393 (the_low_target): New.
17394 * linux-i386-low.c (num_regs): Remove.
17395 (i386_num_regs): Define.
17396 (i386_regmap): Renamed from regmap, made static.
17397 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17398 made static.
17399 (i386_cannot_store_register): Renamed from cannot_store_register,
17400 made static.
17401 (the_low_target): New.
17402 * linux-ia64-low.c (num_regs): Remove.
17403 (ia64_num_regs): Define.
17404 (ia64_regmap): Renamed from regmap, made static.
17405 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17406 made static.
17407 (ia64_cannot_store_register): Renamed from cannot_store_register,
17408 made static.
17409 (the_low_target): New.
17410 * linux-m68k-low.c (num_regs): Remove.
17411 (m68k_num_regs): Define.
17412 (m68k_regmap): Renamed from regmap, made static.
17413 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17414 made static.
17415 (m68k_cannot_store_register): Renamed from cannot_store_register,
17416 made static.
17417 (the_low_target): New.
17418 * linux-mips-low.c (num_regs): Remove.
17419 (mips_num_regs): Define.
17420 (mips_regmap): Renamed from regmap, made static.
17421 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17422 made static.
17423 (mips_cannot_store_register): Renamed from cannot_store_register,
17424 made static.
17425 (the_low_target): New.
17426 * linux-ppc-low.c (num_regs): Remove.
17427 (ppc_num_regs): Define.
17428 (ppc_regmap): Renamed from regmap, made static.
17429 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17430 made static.
17431 (ppc_cannot_store_register): Renamed from cannot_store_register,
17432 made static.
17433 (the_low_target): New.
17434 * linux-s390-low.c (num_regs): Remove.
17435 (s390_num_regs): Define.
17436 (s390_regmap): Renamed from regmap, made static.
17437 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17438 made static.
17439 (s390_cannot_store_register): Renamed from cannot_store_register,
17440 made static.
17441 (the_low_target): New.
17442 * linux-sh-low.c (num_regs): Remove.
17443 (sh_num_regs): Define.
17444 (sh_regmap): Renamed from regmap, made static.
17445 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17446 made static.
17447 (sh_cannot_store_register): Renamed from cannot_store_register,
17448 made static.
17449 (the_low_target): New.
17450 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17451 (the_low_target): New.
17452
174532002-04-09 Daniel Jacobowitz <drow@mvista.com>
17454
17455 * Makefile.in: Add stamp-h target.
17456 * configure.in: Create stamp-h.
17457 * configure: Regenerated.
17458
174592002-04-09 Daniel Jacobowitz <drow@mvista.com>
17460
17461 * inferiors.c: New file.
17462 * target.c: New file.
17463 * target.h: New file.
17464 * Makefile.in: Add target.o and inferiors.o. Update
17465 dependencies.
17466 * linux-low.c (inferior_pid): New static variable,
17467 moved from server.c.
17468 (linux_create_inferior): Renamed from create_inferior.
17469 Call add_inferior. Return 0 on success instead of a PID.
17470 (linux_attach): Renamed from myattach.
17471 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17472 (linux_thread_alive): Renamed from mythread_alive.
17473 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17474 child dies.
17475 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17476 (regsets_store_inferior_registers): Correct error message.
17477 Add missing ``return 0''.
17478 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17479 (linux_store_registers): Renamed from store_inferior_registers.
17480 (linux_read_memory): Renamed from read_inferior_memory.
17481 (linux_write_memory): Renamed from write_inferior_memory.
17482 (linux_target_ops): New structure.
17483 (initialize_low): Call set_target_ops ().
17484 * remote-utils.c (unhexify): New function.
17485 (hexify): New function.
17486 (input_interrupt): Send signals to ``signal_pid''.
17487 * server.c (inferior_pid): Remove.
17488 (start_inferior): Update create_inferior call.
17489 (attach_inferior): Call add_inferior.
17490 (handle_query): New function.
17491 (main): Call handle_query for `q' packets.
17492 * server.h: Include "target.h". Remove obsolete prototypes.
17493 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17494
174952002-04-09 Daniel Jacobowitz <drow@mvista.com>
17496
17497 * Makefile.in: Add WARN_CFLAGS. Update configury
17498 dependencies.
17499 * configure.in: Check for <string.h>
17500 * configure: Regenerate.
17501 * config.in: Regenerate.
17502 * gdbreplay.c: Include needed system headers.
17503 (remote_open): Remove strchr prototype.
17504 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17505 * regcache.c (supply_register): Change buf argument to const void *.
17506 (supply_register_by_name): Likewise.
17507 (collect_register): Change buf argument to void *.
17508 (collect_register_by_name): Likewise.
17509 * regcache.h: Add missing prototypes.
17510 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17511 * server.c (handle_query): New function.
17512 (attached): New static variable, moved out of main.
17513 (main): Quiet longjmp clobber warnings.
17514 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17515 * utils.c (error): Remove NORETURN.
17516 (fatal): Likewise.